Skip to content

Instantly share code, notes, and snippets.

@cljoly

cljoly/go.mod Secret

Last active August 6, 2022 19:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cljoly/0b754259df036ba0163f2cdaad48e048 to your computer and use it in GitHub Desktop.
Save cljoly/0b754259df036ba0163f2cdaad48e048 to your computer and use it in GitHub Desktop.
Test file for https://cj.rs/blog
module cj.rs/tmp_test
go 1.19
package main
import "fmt"
type MyStruct struct {
i int
}
func g() (bool, error) {
return true, nil
}
func myFunc() (*MyStruct, error) {
v := true
a := func() (bool, error, int, string) {
return v, nil, 3, "3"
}
a1, a2, a3, a4 := a()
fmt.Printf("%v %v %v %v\n", a1, a2, a3, a4)
return &MyStruct{}, nil
}
func main() {
myFunc()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment