| # Test that we get a sensible error message when there is a type |
| # checking error in the package that is being 'cue get go'-ed. |
| |
| [!go1.16] skip 'Only relevant for Go 1.16 and above' |
| [golang.org/issue/44287] skip |
| |
| cue get go --local |
| exec ls |
| cmp cue.mod/gen/mod.com/blah/blah_go_gen.cue blah.cue.golden |
| |
| -- go.mod -- |
| module mod.com/blah |
| |
| go 1.14 |
| -- go.mod.golden -- |
| module mod.com/blah |
| |
| go 1.14 |
| -- blah.go -- |
| package main |
| |
| import _ "embed" |
| |
| // go:embed blah.txt |
| var blah string |
| |
| type T struct { |
| Age int |
| } |
| |
| -- blah.cue.golden -- |
| // Code generated by cue get go. DO NOT EDIT. |
| |
| //cue:generate cue get go mod.com/blah |
| |
| package main |
| |
| #T: Age: int |