https://github.com/answerail/jaemon-go
Go
https://github.com/answerail/jaemon-go
Last synced: 4 months ago
JSON representation
Go
- Host: GitHub
- URL: https://github.com/answerail/jaemon-go
- Owner: AnswerAIL
- Created: 2020-01-09T08:25:23.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-10T02:56:16.000Z (over 5 years ago)
- Last Synced: 2024-12-31T15:26:05.329Z (6 months ago)
- Language: Go
- Homepage:
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO 语言
___
# 使用 logrus 日志框架
```bash
# 获取代码, 在 $GOPATH/src/github.com目录下
go get github.com/sirupsen/logrus
# eg. C:\Users\answer\go\src\github.com\sirupsen\logrus```
# proto文件生成go代码
```bash
# 新增对应的 ***.proto 文件, 执行以下命令
protoc.exe --go_out=./ common.ptoto# 生成对应的 ***.ptoto.pb.go 文件
```
# int16, int32, int64等类型说明
- int16: 16位整数(16bit integer),相当于short, 占2个字节, -32768 ~ 32767
- int32: 32位整数(32bit integer), 相当于 int, 占4个字节, -2147483648 ~ 2147483647
- int64: 64位整数(64bit interger), 相当于 long long, 占8个字节, -9223372036854775808 ~ 9223372036854775807
- byte: 相当于byte(unsigned char), 0 ~ 255
# Reference
- [windows 下 goprotobuf 的安装与使用](https://blog.csdn.net/u010979642/article/details/103896533)
- [Go 语言入门教程](http://c.biancheng.net/golang/)