{"id":21878183,"url":"https://github.com/suifengtec/go","last_synced_at":"2026-04-29T16:38:26.108Z","repository":{"id":76190196,"uuid":"98478813","full_name":"suifengtec/go","owner":"suifengtec","description":"Go语言基础和测试。","archived":false,"fork":false,"pushed_at":"2017-07-31T06:19:22.000Z","size":7679,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-21T23:44:27.167Z","etag":null,"topics":["c","go","golang"],"latest_commit_sha":null,"homepage":"http://coolwp.com/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/suifengtec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-07-27T01:05:15.000Z","updated_at":"2022-11-24T22:09:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"c6ab2b07-0616-4ad9-a946-30fe0ec63909","html_url":"https://github.com/suifengtec/go","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/suifengtec/go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suifengtec%2Fgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suifengtec%2Fgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suifengtec%2Fgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suifengtec%2Fgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/suifengtec","download_url":"https://codeload.github.com/suifengtec/go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/suifengtec%2Fgo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271740714,"owners_count":24812642,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-23T02:00:09.327Z","response_time":69,"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":["c","go","golang"],"created_at":"2024-11-28T08:11:53.117Z","updated_at":"2026-04-29T16:38:26.076Z","avatar_url":"https://github.com/suifengtec.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang 基础\nGo语言基础,测试,相关书籍以及 Web 框架。\n## 基础\n走马观花的记录。\n### 关键词\n\n共有25个关键词,分三类:\n```\n程序声明(2个)： import, package\n\n程序实体的声明和定义(8个):  type ,struct, interface, var, func,const,chan,map\n\n流程控制(15个):  if, else, for, break,cotinue, switch,case, fallthrough, default, defer,range,goto,return,go,select\n\n```\n\n### 类型系统\n\n基础类型(分布尔，数值，字符串三类19种): \n```\nstring,bool, byte(uint8的别名),rune(int32的别名), int/uint, unit8/uint8, int16/uint16, int32/uint32, int64/unit64, float32,float64,complex64,copmlex128, uintptr\n```\n\n聚合类型(2种):  \n```\narray, struct\n```\n引用类型(5种): \n```\npointer,slice,map,func,channel\n```\n\n[数组,切片和字典/映射的示例](https://github.com/suifengtec/go/tree/master/array-slice-map)\n\n接口类型(2种): interface,error\n\n\n### 预置\n\n预置数据类型有 20 种: 基础类型中的数据类型，加上  error;\n\n预置常量有4个:\n```\ntrue, false, iota, nil\n```\n\n预置函数 13 个 : \n```\n\nnew , make, delete,\ncomplex, real,imag,\npanic,recover,\nlen,cap,\nappend,copy,\nclose\n\n\n```\n\n### 操作符\n\n除了赋值,算术,比较,逻辑操作符,地址操作符外,Go 还有类叫接收操作符的操作符, 接收操作符仅有一种符号 `\u003c-`:\n\n```\n\nv1 := \u003c-ch1\nv2 := \u003c-ch3\nv3 := \u003c-ch2\n\n```\n\n\n### 其它\n\n表达式,语句,函数,结构体,接口,包,库,工程管理(初始化,格式化,测试,构建)等从略。\n\n\n\n## 相关书籍\n\n[点这里地球就会爆炸 :panda_face:,你信吗?](https://github.com/suifengtec/go/blob/master/books.md)\n\n\n## 示例\n\n### mysql-and-rest-api-and-cli\n\n一个简单的示例程序: 如何通过 CLI 或 REST API 对存储在 MySQL 中的数据进行增删改查。\n\n### goroutine\n\nGo 可让函数或方法并发运行,仅需在方法或函数的前面加上关键词 `go` 即可。\n\n### C 和 Go 语言中的乘法表\n\n同样的功能,类似的代码量,编译为 Windows 上的可执行文件后:\n\n```\n\nC 编译的可执行程序是 53KB;\n\nGo 编译的可执行程序是 1604KB;\n\n```\n\n## Web 框架或工具集\n\n\n\n\n* :+1:[Gin](https://gin-gonic.github.io/gin/) : 是一个非常简约的、精简的框架，它只包含最基本的功能。据说比 Martini 快 39倍。它使用 httprouter 进行请求处理的。\n\n* :thumbsdown:[Martini](https://github.com/olebedev/martini) : 出现的比较早的 Go 语言web框架，在它上面集成第三方支持很容易，Martini 还对路由方法和格式提供了广泛的支持，并支持通配符、变量参数、regex限制等等。Martini 有足够大的群众基础，很多问题容易被解决。但是它最近一次维护是在 2014 年...\n\n* [Web.go](https://github.com/hoisie/web) : 一个非常轻量级的框架。\n* [Revel](https://revel.github.io/) : 借鉴了 Play! 这个框架, 它似乎将自己定位为“一站式解决方案”，大部分功能都是预先配置的，并安装了最佳功能。这意味着你可以在没有设置的情况下做很多事情，这对许多创业公司和小团队来说都很有吸引力。\n* [Beego](https://beego.me/)： 国人谢孟军做的一个工具化了的全功能 Web 框架，支持模块化开发，在国内很火，它有一个强大的ORM系统，但它在页面缓存（缓存了前几个版本的页面）和多第三方扩展的支持上有所欠缺。\n* [Buffalo](https://github.com/gobuffalo/buffalo)： 和Beego, Revel 一样会生成你不熟悉的代码。\n* :+1:[Ego](https://github.com/go-ego/ego)：一个基于 Gin 用 Go 编写的全栈 Web 框架，轻量级和高效的前端组件解决方案. 前端编译执行，不影响后端效率。\n* :+1::+1::+1:[Iris](https://github.com/kataras/iris)： 比较新,很炫,可使用至少6种模板引擎,支持自定义序列化引擎,支持动态子域名,支持具名路径参数...总之,很炫酷,并且执行效率比以上所有的框架都高 [相关文档](https://suifengtec.gitbooks.io/iris-cn/content/)。\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuifengtec%2Fgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuifengtec%2Fgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuifengtec%2Fgo/lists"}