diff --git a/projects/golang.org/tools/package.yml b/projects/golang.org/tools/package.yml index a4f2ea1d86..5a30958194 100644 --- a/projects/golang.org/tools/package.yml +++ b/projects/golang.org/tools/package.yml @@ -18,7 +18,7 @@ companions: build: dependencies: - go.dev: ~1.25 + go.dev: ~1.26.0 script: - go mod download - go build -v -trimpath -ldflags="$GO_LDFLAGS" -o {{prefix}}/bin/goimports ./cmd/goimports @@ -37,77 +37,80 @@ build: - -buildmode=pie test: - # goimports - - run: goimports -d $FIXTURE | tee out - fixture: - extname: go - contents: | - package main + dependencies: + go.dev: ~1.26.0 + script: + # goimports + - run: goimports -d $FIXTURE | tee out + fixture: + extname: go + contents: | + package main - func main() { - fmt.Println("hello") - } - - grep '+import "fmt"' out - # callgraph - - run: callgraph $FIXTURE | tee out - fixture: - extname: go - contents: | - package main + func main() { + fmt.Println("hello") + } + - grep '+import "fmt"' out + # callgraph + - run: callgraph $FIXTURE | tee out + fixture: + extname: go + contents: | + package main - import "fmt" + import "fmt" - func main() { - fmt.Println("hello") - } - - grep "fmt.Println" out - # digraph - - run: cp $FIXTURE clothes.txt - fixture: | - socks shoes - "boxer shorts" pants - pants belt shoes - shirt tie sweater - sweater jacket - hat - - cat clothes.txt | digraph reverse jacket | tee out - - run: test "$(cat out)" = "$(cat $FIXTURE)" - fixture: | - jacket - shirt - sweater + func main() { + fmt.Println("hello") + } + - grep "fmt.Println" out + # digraph + - run: cp $FIXTURE clothes.txt + fixture: | + socks shoes + "boxer shorts" pants + pants belt shoes + shirt tie sweater + sweater jacket + hat + - cat clothes.txt | digraph reverse jacket | tee out + - run: test "$(cat out)" = "$(cat $FIXTURE)" + fixture: | + jacket + shirt + sweater - # stringer - - run: cp $FIXTURE pill.go - fixture: | - package main + # stringer + - run: cp $FIXTURE pill.go + fixture: | + package main - //go:generate stringer -type=Pill - type Pill int + //go:generate stringer -type=Pill + type Pill int - const ( - Placebo Pill = iota - Aspirin - Ibuprofen - Paracetamol - ) - - go mod init pilltest - - stringer -type=Pill - - grep "func (. Pill) String() string" pill_string.go + const ( + Placebo Pill = iota + Aspirin + Ibuprofen + Paracetamol + ) + - go mod init pilltest + - stringer -type=Pill + - grep "func (. Pill) String() string" pill_string.go - # toolstash - # this is just a basic smoke test to ensure the binary runs - - toolstash save - - toolstash restore - - run: toolstash go run $FIXTURE | tee out - fixture: - extname: go - contents: | - package main + # toolstash + # this is just a basic smoke test to ensure the binary runs + - toolstash save + - toolstash restore + - run: toolstash go run $FIXTURE | tee out + fixture: + extname: go + contents: | + package main - import "fmt" + import "fmt" - func main() { - fmt.Println("toolstash test") - } - - test "$(cat out)" = "toolstash test" + func main() { + fmt.Println("toolstash test") + } + - test "$(cat out)" = "toolstash test"