青春纸盒子

文: 芦苇

你喜欢我笑的样子

我靠上了落寞的窗子

晚风吹起了我的袖子

明月沾湿了你的眸子


转身,你走出了两个人的圈子

树影婆娑,整座院子


挽起袖子

回头,把揽你忧伤一地的影子

装进,青春,这纸盒子


更多代码请关注我的微信小程序: "ecoder"

luwei0915

导航

随笔分类 -  11_Go-基础

上一页 1 2 3 4 5 下一页

60_Go基础_1_27 字符串常用方法
摘要:1 package main 2 3 import ( 4 "fmt" 5 "strings" 6 ) 7 8 func main() { 9 /* 10 strings包下的关于字符串的函数 11 12 */ 13 14 s1 := "helloworld" 15 // 1.是否包含指定的内容-- 阅读全文

posted @ 2021-12-01 16:11 芦苇の 阅读(33) 评论(0) 推荐(0)

59_Go基础_1_26 字符串
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 Go中的字符串是一个字节的切片。 8 可以通过将其内容封装在“”中来创建字符串。Go中的字符串是Unicode兼容的,并且是UTF-8编码的。 9 10 字符串是一些字节的集合。 11 阅读全文

posted @ 2021-12-01 16:00 芦苇の 阅读(33) 评论(0) 推荐(0)

58_Go基础_1_25 map数据类型
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 一:数据类型: 8 基本数据类型:int,float,string,bool 9 复合数据类型:array,slice,map,function,pointer,struct。。。 10 阅读全文

posted @ 2021-12-01 15:42 芦苇の 阅读(54) 评论(0) 推荐(0)

57_Go基础_1_24 map与slice
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 map和slice的结合使用: 8 1.创建map用于存储人的信息 9 name,age,sex,address 10 11 2.每个map存储一个人的信息 12 13 3.将这些map 阅读全文

posted @ 2021-12-01 15:36 芦苇の 阅读(33) 评论(0) 推荐(0)

56_Go基础_1_23 map的遍历与排序
摘要:1 package main 2 3 import ( 4 "fmt" 5 "sort" 6 ) 7 8 func main() { 9 /* 10 map的遍历: 11 使用:for range 12 13 数组,切片:index,value 14 map:key,value 15 */ 16 1 阅读全文

posted @ 2021-12-01 15:30 芦苇の 阅读(75) 评论(0) 推荐(0)

55_Go基础_1_22 map 基本用法
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 map:映射,是一种专门用于存储键值对的集合。属于引用类型 8 9 存储特点: 10 A:存储的是无序的键值对 11 B:键不能重复,并且和value值一一对应的。 12 map中的ke 阅读全文

posted @ 2021-12-01 14:20 芦苇の 阅读(95) 评论(0) 推荐(0)

54_Go基础_1_21 切片的拷贝
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 深拷贝:拷贝的是数据本身。 8 值类型的数据,默认都是深拷贝:array,int,float,string,bool,struct 9 10 11 浅拷贝:拷贝的是数据 地址。 12 导 阅读全文

posted @ 2021-12-01 14:09 芦苇の 阅读(44) 评论(0) 推荐(0)

53_Go基础_1_20 切片是引用类型
摘要:package main import "fmt" func main() { /* 按照类型来分: 基本类型:int,float,string,bool 复合类型:array,slice,map,struct,pointer,function,chan 按照特点来分: 值类型:int,float, 阅读全文

posted @ 2021-12-01 12:10 芦苇の 阅读(60) 评论(0) 推荐(0)

52_Go基础_1_19 切片的再扩容
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 slice := arr[start:end] 8 切片中的数据:[start,end) 9 arr[:end],从头到end 10 arr[start:]从start到末尾 11 12 阅读全文

posted @ 2021-11-30 18:38 芦苇の 阅读(327) 评论(0) 推荐(0)

51_Go基础_1_18 切片的扩容
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 切片Slice: 8 1.每一个切片引用了一个底层数组 9 2.切片本身不存储任何数据,都是这个底层数组存储,所以修改切片也就是修改这个数组中的数据 10 3.当向切片中添加数据时,如果 阅读全文

posted @ 2021-11-30 18:07 芦苇の 阅读(177) 评论(0) 推荐(0)

50_Go基础_1_17 slice-1
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 数组array: 8 存储一组相同数据类型的数据结构。 9 特点:定长 10 11 切片slice: 12 同数组类似,也叫做变长数组或者动态数组。 13 特点:变长 14 15 是一个 阅读全文

posted @ 2021-11-30 18:04 芦苇の 阅读(28) 评论(0) 推荐(0)

49_Go基础_1_16 数组的遍历
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 数组的遍历: 8 依次访问数组中的元素 9 方法一:arr[0],arr[1],arr[2].... 10 11 方法二:通过循环,配合下标 12 for i:=0;i<len(arr) 阅读全文

posted @ 2021-11-30 17:56 芦苇の 阅读(46) 评论(0) 推荐(0)

48_Go基础_1_15 数组的数据类型
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 数据类型: 8 基本类型:int,float,string,bool。。 9 复合类型:array,slice,map,function,pointer,channel。。 10 11 阅读全文

posted @ 2021-11-30 17:54 芦苇の 阅读(32) 评论(0) 推荐(0)

47_Go基础_1_14 数组排序
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 数组的排序: 8 让数组中的元素具有一定的顺序。 9 10 arr :=[5]int{15,23,8,10,7} 11 升序:[7,8,10,15,23] 12 将序:[23,15,10 阅读全文

posted @ 2021-11-30 17:48 芦苇の 阅读(40) 评论(0) 推荐(0)

46_Go基础_1_13 arr-2
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 一维数组:存储的多个数据是数值本身 8 a1 :=[3]int{1,2,3} 9 10 二维数组:存储的是一维的一维 11 a2 := [3][4]int{{},{},{}} 12 13 阅读全文

posted @ 2021-11-30 17:42 芦苇の 阅读(35) 评论(0) 推荐(0)

45_Go基础_1_12 arr-1
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 数据类型: 8 基本类型:整数,浮点,布尔,字符串 9 复合类型:array,slice,map,struct,pointer,function,channel。。。 10 11 数组: 阅读全文

posted @ 2021-11-30 17:39 芦苇の 阅读(48) 评论(0) 推荐(0)

44_Go基础_1_11 switch
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 1.switch的标注写法: 8 switch 变量{ 9 case 数值1:分支1 10 case 数值2:分支2 11 。。。 12 default: 13 最后一个分支 14 } 阅读全文

posted @ 2021-11-29 09:47 芦苇の 阅读(76) 评论(0) 推荐(0)

43_Go基础_1_10 随机数
摘要:1 package main 2 3 import ( 4 "fmt" 5 "math/rand" 6 "time" 7 ) 8 9 func main() { 10 11 /* 12 生成随机数random: 13 伪随机数,根据一定的算法公式算出来的。 14 math/rand 15 */ 16 阅读全文

posted @ 2021-11-29 09:28 芦苇の 阅读(203) 评论(0) 推荐(0)

42_Go基础_1_9 输入和输出
摘要:1 package main 2 3 import ( 4 "bufio" 5 "fmt" 6 "os" 7 ) 8 9 func main() { 10 /* 11 输入和输出: 12 fmt包:输入,输出 13 14 输出: 15 Print() //打印 16 Printf() //格式化打印 阅读全文

posted @ 2021-11-29 09:16 芦苇の 阅读(39) 评论(0) 推荐(0)

41_Go基础_1_8 逻辑运算符
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 7 /* 8 逻辑运算符:操作数必须是bool,运算结果也是bool 9 逻辑与:&& 10 运算规则:所有的操作数都是真,结果才为真,有一个为假,结果就为假 11 "一假则假,全真才真" 12 阅读全文

posted @ 2021-11-29 09:02 芦苇の 阅读(33) 评论(0) 推荐(0)

上一页 1 2 3 4 5 下一页