├── .gitignore ├── go.mod ├── go.sum └── main.go /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | 17 | # ignore editor settings 18 | *.sublime-project 19 | *.sublime-workspace 20 | *.code-workspace 21 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/GoesToEleven/golang-architecture 2 | 3 | go 1.13 4 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GoesToEleven/golang-architecture/84014430a5cfe518ac13fc22d56bd5c03f1f2496/go.sum -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | //go:noinline 4 | func foo() int { 5 | x := 42 6 | return x 7 | } 8 | 9 | //go:noinline 10 | func bar() *int { 11 | y := 43 12 | return &y 13 | } 14 | 15 | func main() { 16 | _ = foo() 17 | _ = bar() 18 | } 19 | --------------------------------------------------------------------------------