github.com/goplus/llgo@v0.8.3/_demo/concat/concat.go (about) 1 package main 2 3 import ( 4 "github.com/goplus/llgo/c" 5 ) 6 7 func concat(args ...string) (ret string) { 8 for _, v := range args { 9 ret += v 10 } 11 return 12 } 13 14 func main() { 15 result := concat("Hello", " ", "World") 16 c.Fprintf(c.Stderr, c.Str("Hi, %s\n"), c.AllocaCStr(result)) 17 } 18 19 /* Expected output (stderr): 20 Hi, Hello World 21 */