add export demo and test

This commit is contained in:
Li Jie
2025-09-11 14:08:52 +08:00
parent 3605eeeef7
commit c3b674d804
9 changed files with 1376 additions and 0 deletions

29
_demo/go/export/c/c.go Normal file
View File

@@ -0,0 +1,29 @@
package C
// XType - struct for export.go to use
type XType struct {
ID int32 `json:"id"`
Name string `json:"name"`
Value float64 `json:"value"`
Flag bool `json:"flag"`
}
func XAdd(a, b int) int {
return a + b
}
func Sub(a, b int64) int64 {
return a - b
}
func sub(a, b uint32) uint32 {
return a - b
}
func Xmul(a, b float32) float32 {
return a * b
}
func Concat(a, b string) string {
return a + b
}