青春纸盒子

文: 芦苇

你喜欢我笑的样子

我靠上了落寞的窗子

晚风吹起了我的袖子

明月沾湿了你的眸子


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

树影婆娑,整座院子


挽起袖子

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

装进,青春,这纸盒子


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

luwei0915

导航

上一页 1 2 3 4 5 6 7 8 9 10 ··· 51 下一页

2021年12月2日

83_Go基础_1_51 其他创建 error 的方法

摘要: 1 package main 2 3 import ( 4 "errors" 5 "fmt" 6 ) 7 8 // 设计一个函数:验证年龄是否合法,如果为负数,就返回一个error 9 func checkAge(age int) error { 10 if age < 0 { 11 //返回err 阅读全文

posted @ 2021-12-02 16:15 芦苇の 阅读(83) 评论(0) 推荐(0) 编辑

82_Go基础_1_50 error

摘要: 1 package main 2 3 import ( 4 "fmt" 5 "os" 6 ) 7 8 func main() { 9 f, err := os.Open("test.txt") 10 if err != nil { 11 //log.Fatal(err) 12 fmt.Println 阅读全文

posted @ 2021-12-02 16:08 芦苇の 阅读(24) 评论(0) 推荐(0) 编辑

81_Go基础_1_49 结构体别名

摘要: 1 package main 2 3 import "fmt" 4 5 type Person struct { 6 name string 7 } 8 9 func (p Person) show() { 10 fmt.Println("Person >", p.name) 11 } 12 13 阅读全文

posted @ 2021-12-02 15:23 芦苇の 阅读(44) 评论(0) 推荐(0) 编辑

80_Go基础_1_48 类型别名、类型定义

摘要: 1 package main 2 3 import ( 4 "fmt" 5 "strconv" 6 ) 7 8 // 1.定义一个新的类型 9 type myint int 10 type mystr string 11 12 // 2.定义函数类型 13 type myfun func(int, 阅读全文

posted @ 2021-12-02 14:57 芦苇の 阅读(29) 评论(0) 推荐(0) 编辑

79_Go基础_1_47 接口嵌套

摘要: 1 package main 2 3 import "fmt" 4 5 type A interface { 6 test1() 7 } 8 9 type B interface { 10 test2() 11 } 12 13 type C interface { 14 A 15 B 16 test 阅读全文

posted @ 2021-12-02 14:36 芦苇の 阅读(64) 评论(0) 推荐(0) 编辑

78_Go基础_1_46 类型断言

摘要: 1 package main 2 3 import ( 4 "fmt" 5 "math" 6 ) 7 8 // 1.定义一个接口 9 type Shape interface { 10 peri() float64 // 形状的周长 11 area() float64 // 形状的面积 12 } 1 阅读全文

posted @ 2021-12-02 14:05 芦苇の 阅读(34) 评论(0) 推荐(0) 编辑

77_Go基础_1_45 空接口

摘要: 1 package main 2 3 import "fmt" 4 5 // 空接口 6 type A interface{} 7 8 type Cat struct { 9 color string 10 } 11 12 type Person struct { 13 name string 14 阅读全文

posted @ 2021-12-02 11:14 芦苇の 阅读(69) 评论(0) 推荐(0) 编辑

77_Go基础_1_44 接口是一种类型

摘要: 1 package main 2 3 import "fmt" 4 5 // 1.定义接口 6 type USB interface { 7 start() //USB设备开始工作 8 end() //USB设备结束工作 9 } 10 11 // 2.实现类 12 type Mouse struct 阅读全文

posted @ 2021-12-02 11:05 芦苇の 阅读(40) 评论(0) 推荐(0) 编辑

2021年12月1日

76_Go基础_1_43 方法继承

摘要: 1 package main 2 3 import "fmt" 4 5 // 1.定义一个"父类" 6 type Person struct { 7 name string 8 age int 9 } 10 11 // 2.定义一个"子类" 12 type Student struct { 13 P 阅读全文

posted @ 2021-12-01 18:49 芦苇の 阅读(32) 评论(0) 推荐(0) 编辑

75_Go基础_1_42 方法

摘要: 1 package main 2 3 import "fmt" 4 5 //1.定义一个工人结构体 6 type Worker struct { 7 name string 8 age int 9 sex string 10 } 11 12 type Cat struct { 13 color st 阅读全文

posted @ 2021-12-01 18:42 芦苇の 阅读(26) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 8 9 10 ··· 51 下一页