青春纸盒子

文: 芦苇

你喜欢我笑的样子

我靠上了落寞的窗子

晚风吹起了我的袖子

明月沾湿了你的眸子


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

树影婆娑,整座院子


挽起袖子

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

装进,青春,这纸盒子


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

luwei0915

导航

12 2021 档案

canvas_11 requestAnimationFrame 与 小球
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="vi 阅读全文

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

canvas_10 像素动态文字
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="view 阅读全文

posted @ 2021-12-27 01:30 芦苇の 阅读(101) 评论(0) 推荐(0) 编辑

canvas_09 像素文字
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="view 阅读全文

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

canvas_08 数字时钟
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="vi 阅读全文

posted @ 2021-12-27 01:21 芦苇の 阅读(35) 评论(0) 推荐(0) 编辑

canvas_07 炫彩小球
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="vi 阅读全文

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

canvas_06 线性小球
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="vi 阅读全文

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

canvas_05 面向对象的小球
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="vi 阅读全文

posted @ 2021-12-27 00:44 芦苇の 阅读(25) 评论(0) 推荐(0) 编辑

canvas_04 碰撞检测
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="vi 阅读全文

posted @ 2021-12-26 22:21 芦苇の 阅读(33) 评论(0) 推荐(0) 编辑

canvas_03 圆形进度条
摘要:效果图: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta name="vi 阅读全文

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

canvas_02 条形统计图
摘要:效果图: code: 1 <!DOCTYPE html> 2 <html lang="en"> 3 4 <head> 5 <meta charset="UTF-8"> 6 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 7 <meta na 阅读全文

posted @ 2021-12-26 19:59 芦苇の 阅读(61) 评论(0) 推荐(0) 编辑

01_daemon.json 配置说明
摘要:复制docker-daemon.json各配置详解 { “api-cors-header”:"", ——————在引擎API中设置CORS标头 “authorization-plugins”:[], ——————要加载的授权插件 “bridge”:"", ————将容器附加到网桥 “cgroup-p 阅读全文

posted @ 2021-12-14 17:35 芦苇の 阅读(562) 评论(0) 推荐(0) 编辑

04_Go-1_04 数据库数据表设计
摘要:一. API 设计 用户:上传、观看、下载、删除资源(视频) 评论:用户对视频可以进行评论 视频:被评论的视频与用户,三者的从属关系 1. 用户 创建/注册用户: URL: /user Method: POST SC: 201:ok 400: 500: 用户登录: URL: /user:/usern 阅读全文

posted @ 2021-12-13 19:49 芦苇の 阅读(37) 评论(0) 推荐(0) 编辑

03_Go-1_03 实现基本的API请求框架
摘要:1. 当前目录结构 2. API请求流程 2.1 main.go 进入 1 package main 2 3 import ( 4 "net/http" 5 6 "github.com/julienschmidt/httprouter" 7 ) 8 9 func RegisterHandlers() 阅读全文

posted @ 2021-12-13 09:46 芦苇の 阅读(103) 评论(0) 推荐(0) 编辑

02_Go-1_02 简单实现用户登录API
摘要:main.go package main import ( "net/http" "github.com/julienschmidt/httprouter" ) func RegisterHandlers() *httprouter.Router { // *Router路由指针 router := 阅读全文

posted @ 2021-12-13 00:15 芦苇の 阅读(5) 评论(0) 推荐(0) 编辑

01_Go-1_01 初始化项目及API
摘要:1. 项目目录: /* API: 所有的API操作都在这个目录 dbops: 与数据库交互的目录 defs: 存放一些配置和定义 main.go: API入口 handler.go: 请求方法的集合 */ 2. 目前实现了 CreateUser 2.1 API/main.go package mai 阅读全文

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

01_ASCLL 对照表
摘要:package main import "fmt" func main() { for i := 0; i < 128; i++ { if i < 32 { fmt.Printf("Dec(%d)\tHex(%x)\tBin(%b)\tOct(%o)\n", i, i, i, i) } else { 阅读全文

posted @ 2021-12-08 19:44 芦苇の 阅读(113) 评论(0) 推荐(0) 编辑

98_Go基础_1_66 ioutil 遍历目录
摘要:1 package main 2 3 import ( 4 "fmt" 5 "io/ioutil" 6 "log" 7 ) 8 9 func listFiles(dirname string, level int) { 10 // level用来记录当前递归的层次,生成带有层次感的空格 11 s : 阅读全文

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

97_Go基础_1_65 ioutil
摘要:1 package main 2 3 import ( 4 "fmt" 5 "io/ioutil" 6 "os" 7 ) 8 9 func main() { 10 /* 11 ioutil包: 12 ReadFile() 13 WriteFile() 14 ReadDir() 15 .. 16 */ 阅读全文

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

96_Go基础_1_64 bufio-write
摘要:1 package main 2 3 import ( 4 "bufio" 5 "fmt" 6 "os" 7 ) 8 9 func main() { 10 /* 11 bufio:高效io读写 12 buffer缓存 13 io:input/output 14 15 将io包下的Reader,Wri 阅读全文

posted @ 2021-12-08 15:38 芦苇の 阅读(37) 评论(0) 推荐(0) 编辑

95_Go基础_1_63 bufio
摘要:1 package main 2 3 import ( 4 "bufio" 5 "fmt" 6 "os" 7 ) 8 9 func main() { 10 /* 11 bufio:高效io读写 12 buffer缓存 13 io:input/output 14 15 将io包下的Reader,Wri 阅读全文

posted @ 2021-12-08 14:52 芦苇の 阅读(25) 评论(0) 推荐(0) 编辑

94_Go基础_1_62 断点续传
摘要:1 package main 2 3 import ( 4 "fmt" 5 "io" 6 "log" 7 "os" 8 "strconv" 9 "strings" 10 ) 11 12 func HandleErr(err error) { 13 if err != nil { 14 log.Fat 阅读全文

posted @ 2021-12-08 14:37 芦苇の 阅读(30) 评论(0) 推荐(0) 编辑

93_Go基础_1_61 偏移量 seek
摘要:1 package main 2 3 import ( 4 "fmt" 5 "io" 6 "log" 7 "os" 8 ) 9 10 func main() { 11 /* 12 Seek(offset int64, whence int) (int64, error),设置指针光标的位置 13 第 阅读全文

posted @ 2021-12-08 13:42 芦苇の 阅读(117) 评论(0) 推荐(0) 编辑

92_Go基础_1_60 拷贝文件
摘要:1 package main 2 3 import ( 4 "fmt" 5 "io" 6 "io/ioutil" 7 "os" 8 ) 9 10 // 该函数:用于通过io操作实现文件的拷贝,返回值是拷贝的总数量(字节),错误 11 func CopyFile1(srcFile, destFile 阅读全文

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

91_Go基础_1_59 file.Write
摘要:1 package main 2 3 import ( 4 "fmt" 5 "log" 6 "os" 7 ) 8 9 func HandleErr(err error) { 10 if err != nil { 11 log.Fatal(err) 12 } 13 } 14 15 func main( 阅读全文

posted @ 2021-12-03 17:56 芦苇の 阅读(26) 评论(0) 推荐(0) 编辑

90_Go基础_1_58 read
摘要:1 package main 2 3 import ( 4 "fmt" 5 "io" 6 "os" 7 ) 8 9 func main() { 10 /* 11 读取数据: 12 Reader接口: 13 Read(p []byte)(n int, error) 14 */ 15 16 // ste 阅读全文

posted @ 2021-12-03 17:07 芦苇の 阅读(27) 评论(0) 推荐(0) 编辑

89_Go基础_1_57 IO操作
摘要:1 package main 2 3 import ( 4 "fmt" 5 "os" 6 "path/filepath" 7 ) 8 9 func main() { 10 /* 11 文件操作: 12 1.路径: 13 相对路径:relative 14 ab.txt 15 相对于当前工程 16 绝对 阅读全文

posted @ 2021-12-03 16:43 芦苇の 阅读(40) 评论(0) 推荐(0) 编辑

88_Go基础_1_56 os.Stat
摘要:1 package main 2 3 import ( 4 "fmt" 5 "os" 6 ) 7 8 func main() { 9 /* 10 FileInfo:文件信息 11 interface 12 Name(),文件名 13 Size(),文件大小,字节为单位 14 IsDir(),是否是目 阅读全文

posted @ 2021-12-03 16:04 芦苇の 阅读(75) 评论(0) 推荐(0) 编辑

87_Go基础_1_55 panic and recover
摘要:1 package main 2 3 import "fmt" 4 5 func myprint(s string) { 6 fmt.Println(s) 7 } 8 9 func funA() { 10 fmt.Println("我是一个函数funA()....") 11 } 12 13 func 阅读全文

posted @ 2021-12-03 15:56 芦苇の 阅读(24) 评论(0) 推荐(0) 编辑

86_Go基础_1_54 自定义结构体实现错误2
摘要:1 package main 2 3 import "fmt" 4 5 type areaError struct { 6 msg string // 错误的描述 7 lenght float64 // 发生错误的时候,矩形的长度 8 width float64 // 发生错误的时候,矩形的宽度 9 阅读全文

posted @ 2021-12-02 19:00 芦苇の 阅读(31) 评论(0) 推荐(0) 编辑

85_Go基础_1_53 自定义结构体实现错误
摘要:1 package main 2 3 import ( 4 "fmt" 5 "math" 6 ) 7 8 //1.定义一个结构体,表示错误的类型 9 type areaError struct { 10 msg string 11 radius float64 12 } 13 14 // 2.实现e 阅读全文

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

84_Go基础_1_52 net error
摘要:1 package main 2 3 import ( 4 "fmt" 5 "net" 6 ) 7 8 func main() { 9 addr, err := net.LookupHost("www.baidu.com") 10 fmt.Println(err) 11 if ins, ok := 阅读全文

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

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 芦苇の 阅读(111) 评论(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 芦苇の 阅读(26) 评论(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 芦苇の 阅读(46) 评论(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 芦苇の 阅读(32) 评论(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 芦苇の 阅读(73) 评论(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 芦苇の 阅读(36) 评论(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 芦苇の 阅读(95) 评论(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 芦苇の 阅读(43) 评论(0) 推荐(0) 编辑

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 芦苇の 阅读(37) 评论(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 芦苇の 阅读(27) 评论(0) 推荐(0) 编辑

74_Go基础_1_41 结构体匿名字段
摘要: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 Person // 阅读全文

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

73_Go基础_1_40 结构体嵌套与传值
摘要:package main import "fmt" // 1.定义一个书的结构体 type Book struct { bookName string price float64 } // 2.定义学生的结构体 type Student struct { name string age int bo 阅读全文

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

72_Go基础_1_39 结构体匿名字段
摘要:1 package main 2 3 import "fmt" 4 5 type Student struct { 6 name string 7 age int 8 } 9 10 type Worker struct { 11 string // 匿名字段 12 int // 匿名字段,默认使用数 阅读全文

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

71_Go基础_1_38 结构体是指类型
摘要:1 package main 2 3 import "fmt" 4 5 type Person struct { 6 name string 7 age int 8 sex string 9 address string 10 } 11 12 func main() { 13 /* 14 数据类型: 阅读全文

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

70_Go基础_1_37 结构体
摘要:1 package main 2 3 import "fmt" 4 5 // 定义结构体 6 type Person struct { 7 name string 8 age int 9 sex string 10 address string 11 } 12 13 func main() { 14 阅读全文

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

69_Go基础_1_36 函数的值传递-引用传递
摘要:1 package main 2 3 import "fmt" 4 5 func fun1(num int) { // 值传递:num = a = 10 6 fmt.Println("fun1()函数中,num的值:", num) 7 num = 100 8 fmt.Println("fun1()函 阅读全文

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

68_Go基础_1_35 指针函数
摘要:1 package main 2 3 import "fmt" 4 5 func fun1() { 6 fmt.Println("fun1().....") 7 } 8 9 // 普通函数 10 func fun2() [4]int { 11 arr := [4]int{1, 2, 3, 4} 12 阅读全文

posted @ 2021-12-01 17:46 芦苇の 阅读(30) 评论(0) 推荐(0) 编辑

67_Go基础_1_34 指针数组,数组指针
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 数组指针:首先是一个指针,一个数组的地址。 8 *[4]Type 9 10 指针数组:首先是一个数组,存储的数据类型是指针 11 [4]*Type 12 13 14 *[5]float6 阅读全文

posted @ 2021-12-01 17:36 芦苇の 阅读(31) 评论(0) 推荐(0) 编辑

66_Go基础_1_33 指针
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 指针:pointer 8 存储了另一个变量的内存地址的变量。 9 10 */ 11 12 // 1.定义一个int类型的变量 13 a := 10 14 fmt.Println("a的数 阅读全文

posted @ 2021-12-01 17:24 芦苇の 阅读(37) 评论(0) 推荐(0) 编辑

65_Go基础_1_32 函数变量
摘要:1 package main 2 3 import "fmt" 4 5 func main() { 6 /* 7 Go语言的数据类型: 8 9 数值类型:整数,浮点 10 进行运算操作,加减乘除,打印 11 字符串: 12 可以获取单个字符,截取子串,遍历,strings包下的函数操作。。 13 数 阅读全文

posted @ 2021-12-01 16:59 芦苇の 阅读(28) 评论(0) 推荐(0) 编辑

64_Go基础_1_31 函数的类型
摘要:1 package main 2 3 import "fmt" 4 5 func fun1() {} 6 7 func fun2(a int) int { 8 return 0 9 } 10 11 func fun3(a float64, b, c int) (int, int) { 12 retu 阅读全文

posted @ 2021-12-01 16:52 芦苇の 阅读(27) 评论(0) 推荐(0) 编辑

63_Go基础_1_30 递归
摘要:1 package main 2 3 import "fmt" 4 5 func getSum(n int) int { 6 fmt.Println("**********") 7 if n == 1 { 8 return 1 9 } 10 return getSum(n-1) + n 11 } 1 阅读全文

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

62_Go基础_1_29 函数中切片数组参数的区别
摘要:1 package main 2 3 import "fmt" 4 5 func fun2(s2 []int) { 6 fmt.Println("函数中,切片的数据:", s2) // [1 2 3 4] 7 s2[0] = 100 8 fmt.Println("函数中,切片的数据更改后:", s2 阅读全文

posted @ 2021-12-01 16:44 芦苇の 阅读(28) 评论(0) 推荐(0) 编辑

61_Go基础_1_28 字符串转换
摘要:1 package main 2 3 import ( 4 "fmt" 5 "strconv" 6 ) 7 8 func main() { 9 /* 10 strconv包:字符串和基本类型之前的转换 11 string convert 12 */ 13 14 // fmt.Println("aa" 阅读全文

posted @ 2021-12-01 16:35 芦苇の 阅读(40) 评论(0) 推荐(0) 编辑

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 芦苇の 阅读(24) 评论(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 芦苇の 阅读(25) 评论(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 芦苇の 阅读(47) 评论(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 芦苇の 阅读(28) 评论(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 芦苇の 阅读(64) 评论(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 芦苇の 阅读(82) 评论(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 芦苇の 阅读(41) 评论(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 芦苇の 阅读(53) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示