From 7500e1a0dbc8a493a89778efa9e7400279bae8aa Mon Sep 17 00:00:00 2001 From: Wonder Date: Thu, 16 Oct 2025 12:49:50 +0800 Subject: [PATCH] =?UTF-8?q?=20=F0=9F=94=84Update:=20Lecture-1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Lec-1/Note.md | 0 Lec-1/go.mod | 3 +++ Lec-1/main.go | 17 +++++++++++++++++ 3 files changed, 20 insertions(+) create mode 100644 Lec-1/Note.md create mode 100644 Lec-1/go.mod create mode 100644 Lec-1/main.go 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) + +}