# go-learning **Repository Path**: zjs215/go-learning ## Basic Information - **Project Name**: go-learning - **Description**: go-learning - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-31 - **Last Updated**: 2026-02-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Go 学习项目 Go 语言基础学习代码示例,针对有 Java 背景的开发者。 ## 项目结构 ``` go-basics/ ├── 01-hello-world/ # Hello World 入门 ├── 02-variables/ # 变量、类型、常量、iota ├── 03-composite-types/ # 数组、切片、Map、结构体 ├── 04-control-functions/ # 控制流、函数、defer ├── 05-interfaces-errors/ # 接口、错误处理 ├── 06-concurrency/ # Goroutine、Channel、并发 ├── 07-testing/ # 单元测试、表格驱动测试、基准测试 ├── 08-http-server/ # HTTP 服务器、RESTful API ├── 09-json-files/ # JSON 处理、文件操作 ├── 10-cli-tool/ # 命令行工具开发 ├── 11-generics/ # 泛型 (Go 1.18+) ├── 12-web-framework/ # Web 框架 (Gin) ├── 13-database/ # 数据库操作 (GORM) ├── 14-grpc/ # gRPC 微服务通信 ├── 15-docker/ # Docker 容器化 ├── 16-microservices/ # 微服务架构模式 ├── 17-performance/ # 性能优化技巧 ├── 18-security/ # 安全编程实践 ├── 19-messaging/ # 消息队列 (RabbitMQ, Kafka, Redis) └── 20-advanced-patterns/ # 高级设计模式 ``` ## 运行方式 ```bash cd go-basics # 基础课程 go run ./01-hello-world/main.go go run ./08-http-server/main.go # 启动 HTTP 服务 go test -v ./07-testing/... # 运行测试 # 进阶课程 go run ./12-web-framework/main.go # Gin Web 框架 go run ./13-database/main.go # 数据库操作 go run ./14-grpc/main.go # gRPC 示例 go run ./17-performance/main.go # 性能优化 go run ./18-security/main.go # 安全编程 go run ./19-messaging/main.go # 消息队列 go run ./20-advanced-patterns/main.go # 设计模式 ``` ## 环境要求 - Go 1.18+