Compare commits

...

8 Commits

3 changed files with 46 additions and 1 deletions

6
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,6 @@
build_job:
stage: build
script:
- echo "仅build分支执行CI流水线"
rules:
- if: '$CI_COMMIT_BRANCH == "build"'

37
4.基本数据类型.go Normal file
View File

@@ -0,0 +1,37 @@
package main
import "fmt"
func main() {
type_()
}
func type_() {
var age int = 12 // 设定类型为数字
fmt.Println(age)
var text = "Hello mfk\n" // 自动识别类型
fmt.Printf(text)
// uint + x
// x 是比特的位数
var u8 uint8 = 255
// 0 0 0 0 0 0 0 0 = 0
// 1 1 1 1 1 1 1 1 = 2^8-1=255
fmt.Println(u8)
// int8 支持正负数
// 0 0 0 0 0 0 0 0 = 1
// 0 1 1 1 1 1 1 1 = 2^(8-1)-1=127 // 一个比特位区分正负了
// 1 0 0 0 0 0 0 1 = -1 负数的最大值
// 1 0 0 0 0 0 0 0 = -128
//######################################################
// 源码 补码 (取反=反码+1听不懂标记一下下次学
//######################################################
}

View File

@@ -5,3 +5,5 @@
目前正在学习两个视频
- https://www.bilibili.com/video/BV14Cetz4E43 8小时带你快速入门Go语言
- https://www.bilibili.com/video/BV1gJ411p7xC 【最新Go Web开发教程】基于gin框架和gorm的web开发实战 (七米出品)
迁移git后的提交测试