4

Go语言学习 | CHEGVA

 2 years ago
source link: https://chegva.com/golang/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

分类:Go语言学习

Golang 的一些编程思维和思想,以及总结一些常见的优雅编程实战技巧。

作者:allendbwu,腾讯 PCG 后台开发工程师

一 Golang 编程思维

首先,我们先来看下最基本的,就是 Golang 的学习技巧,比如通读 Golang 的一些好的文章:

要通读 gol...

Continue reading >>

GoLand实用技巧

代码自动换行:Editor → General → Soft-wrap these files 里边加入 *.go

代码折叠:Editor → General → Code Folding

自动选择打开的文件:Project目录设置中勾上 Always Select Opened File

工具链引入:Tools → File...

Continue reading >>

这周把平台后端框架搭起来了,使用Gin、Gorm、MySQL、Redis、Zap等,支持配置文件热加载,服务热重启等特性。代码已经放到github上,很粗糙希望有大佬来帮忙改改,提提建议。

Gin Web Example


快速初始化gin web项目示例,使用Gin、Gorm、MySQ...

Continue reading >>

Go是一门编译型语言,在不同平台上,需要编译生成不同格式的二进制包。编译时候只需要指定两个参数:GOOS 和 GOARCH 即可。使用Makefile来编译Go的二进制包非常合适。Makefile文件示例如下:

.PHONY: all build run gotool clean help
# 根据不同平台编译生成...
Continue reading >>

https改造剩下最后一些不好啃的域名(全站HTTPS改造注意事项及解决方案),包括支付、微服务网关等,服务太重要,需要排查http请求的调用方,通过公司es来查nginx代理的日志,但是最后发现数据量略大,导不出来,只能调接口了。golang中操作elastic主要有以下两个库:

olivere/elastic

go-elasticsea...

Continue reading >>
catch-infinite-scroll-loader

© 2016-2022 安志合 版权所有 | 订阅  | 站点地图 | 站点统计 | 京 ICP17028760 | 由WordPress自豪地提供. Theme: Flat by Themeisle.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK