一键导入
xgo-language
Handbook for XGo language features, syntax, and classfile concepts. Use this skill to understand how to read and write code in XGo.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Handbook for XGo language features, syntax, and classfile concepts. Use this skill to understand how to read and write code in XGo.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | xgo-language |
| description | Handbook for XGo language features, syntax, and classfile concepts. Use this skill to understand how to read and write code in XGo. |
The XGo programming language is
XGo allows omitting package main and func main.
package main
import "fmt"
func main() {
fmt.Println("Hi")
}
import "fmt"
fmt.Println("Hi")
XGo provides more builtin functions. It simplifies the expression of the most common tasks.
fmt.Println("Hi")
println("Hi")
XGo recommends command-line style code, which is a special style for function-calls whose return values are not used:
println("Hi")
println "Hi"
a := []int{1, 2, 3}
a := [1, 2, 3]
a := map[string]int{
"Monday": 1,
"Tuesday": 2,
}
a := {
"Monday": 1,
"Tuesday": 2,
}
onStart(func() {...})
onMsg(msg, func() {...})
onStart => {...}
onMsg msg, => {...}
XGo allows calling multiple functions (they are defined as Xxx__0, Xxx__1, etc.) with the same name (xxx) in XGo but different implementations.
Step__0(5.5)
Step__1(5.5, "run")
Step__2(10)
step 5.5
step 5.5, "run"
step 10
XGo classfiles provide a mechanism to abstract domain knowledge, making XGo more accessible and friendly to various user groups, especially those new to programming or unfamiliar with object-oriented programming concepts. Instead of explicitly defining classes using type and struct keywords as in Go, XGo allows defining classes using a simpler, more intuitive syntax within files called classfiles.
Key Aspects of XGo Classfiles:
struct and method declarations.Under the hood, XGo classfiles will be compiled into Go code with struct and method declarations, allowing seamless integration with existing Go codebases.
Load references/syntax.md for compact syntax examples.