Make a Go Interface instead of a struct for top level objects.
Use a new struct Id as a concrete version of that type.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"gitlab.wow.st/gmp/nswrap/examples/foundation/ns"
|
||||
)
|
||||
|
||||
func main() {
|
||||
n1 := ns.StringWithUTF8String(ns.CharFromString("hi there"))
|
||||
c1 := n1.CapitalizedString()
|
||||
gs := c1.UTF8String().String()
|
||||
fmt.Println(gs)
|
||||
a := ns.ArrayWithObjects(n1)
|
||||
_ = a
|
||||
}
|
||||
Reference in New Issue
Block a user