摘要: golang 字符串为不可变的量 ,字符串定义要使用双引号 C:/Go/bin/go.exe run main.go [D:/goproject/first/stringxx] # command-line-arguments .\main.go:6:6: cannot use '\u0000' ( 阅读全文
posted @ 2019-09-19 15:43 萱乐庆foreverlove 阅读(598) 评论(0) 推荐(0)
摘要: float32 float64 golang 没有专门的 char 类型 0-255 可以使用byte 来存储 字符类型使用细节 1. 字符常量用单引号包括,大于255 使用int 等类型定义 2. Go 中运行使用转义字符 '\' 来将其后面的字符常量进行转义 3. Go 中使用utf-8 进行编 阅读全文
posted @ 2019-09-19 10:17 萱乐庆foreverlove 阅读(451) 评论(0) 推荐(0)
摘要: 变量特性 1. 变量是内存中的一块存储单元 2. 存储单元包含变量名和类型 var xx int 变量的定义方式: 1. var xx int 2. var xxx = 123 | "123" 根据赋值自动解析类型 ,这里要注意字符串一定是双引号 3. xxxx := 123 使用表达式 := 赋值 阅读全文
posted @ 2019-09-17 21:23 萱乐庆foreverlove 阅读(226) 评论(0) 推荐(0)
摘要: 1. 推荐使用行注释进行注释 2. 代码要有正确的缩进 gofmt 命令辅助进行格式化输出 3. 运算符最好用空格分隔 var a := 1 + 2 4. go的函数这样写是错误的 5. 每一行不要太长 阅读全文
posted @ 2019-09-17 20:27 萱乐庆foreverlove 阅读(117) 评论(0) 推荐(0)
摘要: 行注释 // 块注释 /* */ 块注释中不允许嵌套块注释 阅读全文
posted @ 2019-09-17 20:13 萱乐庆foreverlove 阅读(522) 评论(0) 推荐(0)
摘要: windows cover 阅读全文
posted @ 2019-08-02 09:04 萱乐庆foreverlove 阅读(231) 评论(0) 推荐(0)
摘要: source source命令即点(.)命令。 在bash下输入man source,找到source命令解释处,可以看到解释”Read and execute commands from filename in the current shell environment and …”。从中可以知道 阅读全文
posted @ 2019-07-11 14:00 萱乐庆foreverlove 阅读(2003) 评论(0) 推荐(0)
摘要: powershell 变量的定义方式 $song = 'lele yao' $song = @(1,23,23,23,23,23,23,23,2,31,32,12,3,2,31,23,13,21,3,123) 数组变量 $_ 当前迭代值 阅读全文
posted @ 2019-07-10 19:35 萱乐庆foreverlove 阅读(132) 评论(0) 推荐(0)
摘要: 1.docker build docker build 这个动作有一个context 上下文的概念 [root@fdfs-1 ~]# docker build -t weaveworks/scope:1.11.2 -t weaveworks/scope:latest -f /tmp/Dockerfi 阅读全文
posted @ 2019-07-03 12:50 萱乐庆foreverlove 阅读(1053) 评论(0) 推荐(0)
摘要: docker 还开发了另一个支持跨主机容器网络的 driver:macvlan。 macvlan 本身是 linxu kernel 模块,其功能是允许在同一个物理网卡上配置多个 MAC 地址,即多个 interface,每个 interface 可以配置自己的 IP。macvlan 本质上是一种网卡 阅读全文
posted @ 2019-07-01 10:10 萱乐庆foreverlove 阅读(1050) 评论(0) 推荐(0)