# Test that a basic get go works using --local

# All the things
exec cue get go --local
cmp blah_go_gen.cue all.cue.golden
! exists no_types_go_gen.cue

# Verify dependencies did not change
cmp go.mod go.mod.golden

# Use an alternative package name
exec cue get go --local -p other
cmp blah_go_gen.cue other.cue.golden
! exists no_types_go_gen.cue

# Verify dependencies did not change
cmp go.mod go.mod.golden

-- go.mod --
module mod.test/blah

go 1.14
-- go.mod.golden --
module mod.test/blah

go 1.14
-- blah.go --
package main

type T struct {
	Age int
}
-- no_types.go --
package main

func Foo() {
	println("not a type")
}
-- all.cue.golden --
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go mod.test/blah

package main

#T: Age: int
-- other.cue.golden --
// Code generated by cue get go. DO NOT EDIT.

//cue:generate cue get go mod.test/blah

package other

#T: Age: int
