whatcanGOwrong

This commit is contained in:
2024-09-19 21:38:24 -04:00
commit d0ae4d841d
17908 changed files with 4096831 additions and 0 deletions
@@ -0,0 +1,31 @@
package main
import (
"fmt"
"runtime"
)
func afunction(s string) {
fmt.Println(s)
}
type someStruct struct {
s string
}
func (o *someStruct) structfunc(s2 string) {
fmt.Println(o.s, s2)
}
func main() {
fn1 := afunction
var o someStruct
fn2 := o.structfunc
fn3 := func(s string) {
fmt.Println("inline", s)
}
runtime.Breakpoint()
fn1("test")
afunction("test")
fmt.Println(fn1, fn2, fn3, o)
}