青春纸盒子

文: 芦苇

你喜欢我笑的样子

我靠上了落寞的窗子

晚风吹起了我的袖子

明月沾湿了你的眸子


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

树影婆娑,整座院子


挽起袖子

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

装进,青春,这纸盒子


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

luwei0915

导航

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

2021年12月13日

04_Go-1_04 数据库数据表设计

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

posted @ 2021-12-13 19:49 芦苇の 阅读(35) 评论(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 芦苇の 阅读(99) 评论(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 芦苇の 阅读(3) 评论(0) 推荐(0) 编辑

2021年12月12日

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

2021年12月8日

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 芦苇の 阅读(95) 评论(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 芦苇の 阅读(51) 评论(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 芦苇の 阅读(47) 评论(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 芦苇の 阅读(36) 评论(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 芦苇の 阅读(22) 评论(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 芦苇の 阅读(29) 评论(0) 推荐(0) 编辑

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