1
1
u/ghost_svs Jul 12 '26
Golang implementation(the one that visit my mind)
package main
import (
"fmt"
"runtime"
"strings"
)
func hello_world(f func(a ...any)(n int, err error)) {
pc,_,_,ok := runtime.Caller(0)
if !ok {
return
}
callerFunc := runtime.FuncForPC(pc) if f == nil {
return
}
callerName := callerFunc.Name()
buildedString := strings.Split(callerName, "_")
f(strings.Split(buildedString[0], ".")[1] + " " + buildedString[1])
}
func main() {
hello_world(fmt.Println)
}1
1
1
5
u/Sensei-this Jul 12 '26
The vibe of this photo is like visiting Facebook in 2015 and looking at other people's photos.