-
-
Save cljoly/0b754259df036ba0163f2cdaad48e048 to your computer and use it in GitHub Desktop.
Test file for https://cj.rs/blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module cj.rs/tmp_test | |
go 1.19 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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