{"id":51451442,"url":"https://github.com/haveniceda/go-study","last_synced_at":"2026-07-05T21:01:35.098Z","repository":{"id":345310249,"uuid":"1179803767","full_name":"HaveNiceDa/go-study","owner":"HaveNiceDa","description":"学习go","archived":false,"fork":false,"pushed_at":"2026-05-10T03:01:11.000Z","size":2857,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-05T20:26:53.449Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HaveNiceDa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-12T11:55:36.000Z","updated_at":"2026-05-10T03:01:14.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/HaveNiceDa/go-study","commit_stats":null,"previous_names":["haveniceda/go-study"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/HaveNiceDa/go-study","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaveNiceDa%2Fgo-study","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaveNiceDa%2Fgo-study/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaveNiceDa%2Fgo-study/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaveNiceDa%2Fgo-study/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HaveNiceDa","download_url":"https://codeload.github.com/HaveNiceDa/go-study/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HaveNiceDa%2Fgo-study/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35168795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-05T21:01:33.062Z","updated_at":"2026-07-05T21:01:35.082Z","avatar_url":"https://github.com/HaveNiceDa.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go 学习项目\n\n这是一个用于学习 Go 语言基础的项目，展示了 Go 的基本项目结构和包管理。\n\n## 项目结构\n\n```\nmy-go-project/\n├── go.mod              # Go 模块定义文件\n├── main/\n│   └── main.go         # 主程序入口\n└── example/\n    └── example.go      # 示例包\n```\n\n## 快速开始\n\n### 前置要求\n\n- Go 1.26.1 或更高版本\n\n### 运行项目\n\n```bash\n# 运行主程序\ngo run main/main.go\n```\n\n输出：\n```\nHello\n```\n\n### 编译项目\n\n```bash\n# 编译为可执行文件\ngo build -o my-app main/main.go\n\n# 运行编译后的程序\n./my-app\n```\n\n## 项目说明\n\n### 包结构\n\n- **main**：主程序包，包含程序的入口函数 `main()`\n- **example**：示例包，展示了如何创建和使用自定义包\n\n### Go 模块\n\n项目使用 Go 模块进行依赖管理，模块名为 `my-go-project`。\n\n## Go 基础知识点\n\n### 1. 包（Package）\n\n- 每个 Go 文件必须声明所属的包\n- 同一目录下的所有文件必须属于同一个包\n- `package main` 是特殊的包，包含程序的入口点\n\n### 2. 导入（Import）\n\n使用 `import` 关键字导入其他包：\n```go\nimport \"fmt\"\nimport \"my-go-project/example\"\n```\n\n### 3. 函数定义\n\n```go\nfunc functionName() {\n    // 函数体\n}\n```\n\n### 4. 格式化输出\n\n使用 `fmt` 包进行输出：\n```go\nfmt.Println(\"Hello\")  // 打印并换行\nfmt.Print(\"Hello\")    // 打印不换行\n```\n\n## 学习资源\n\n- [Go 官方文档](https://golang.org/doc/)\n- [Go by Example](https://gobyexample.com/)\n- [Effective Go](https://golang.org/doc/effective_go.html)\n\n## 许可证\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaveniceda%2Fgo-study","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaveniceda%2Fgo-study","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaveniceda%2Fgo-study/lists"}