diff --git a/Lec-1/Note.md b/Lec-1/Note.md new file mode 100644 index 0000000..e69de29 diff --git a/Lec-1/go.mod b/Lec-1/go.mod new file mode 100644 index 0000000..86a77ec --- /dev/null +++ b/Lec-1/go.mod @@ -0,0 +1,3 @@ +module Lec-1 + +go 1.25 diff --git a/Lec-1/main.go b/Lec-1/main.go new file mode 100644 index 0000000..6687301 --- /dev/null +++ b/Lec-1/main.go @@ -0,0 +1,17 @@ +// 包声明,表示这是一个可执行的 Go 程序 +package main + +// 格式化输入输出,提供打印、扫描、格式化字符串等功能 +import ( + "fmt" +) + +// main 函数是程序的入口点 +func main() { + // 声明 + var s string + // 赋值 + s = "Wonder" + fmt.Printf("Hello and welcome, %s!\n", s) + +}