电子灵魂

golang,go,C#,JAVA,PYTHON,PHP

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2021年12月27日

摘要: //context.WithDeadline() // 指定一个终止时间 time //context.WithTimeout() // 自定义超时时间 time //context.WithValue() // 自定义一个键值对 取值 map[key]value //ctx,cancel:=con 阅读全文
posted @ 2021-12-27 13:13 conncent 阅读(119) 评论(0) 推荐(0) 编辑

摘要: go context 上下文简单介绍和使用 //context.WithDeadline() // 指定一个终止时间 time //context.WithTimeout() // 自定义超时时间 time //context.WithValue() // 自定义一个键值对 取值 map[key]v 阅读全文
posted @ 2021-12-27 13:03 conncent 阅读(5405) 评论(0) 推荐(1) 编辑

摘要: // new make的区别 // new 主要是初始化基础类型 比如 string bool .... 以及自定义类型,返回的是指针 // make 主要是初始化slice/map/channel类型,返回的是对应的类型。 阅读全文
posted @ 2021-12-27 09:42 conncent 阅读(28) 评论(0) 推荐(0) 编辑