Jacobc' Blog

纵有疾风起,人生不言弃

Golang Interface 解析

Interface 解析 原文链接 先看一段代码: func Foo(x interface{}) { if x == nil { fmt.Println("empty interface") return } fmt.Println("non-empty interface") } func main() { var x *int = nil Foo(x) } 上面的例子的输出结果如下 $ go run test_interface.go non-empty interface 可能你会感觉奇怪,为什么

Golang slice 切片原理

Golang slice 切片原理解析

Jobrunner 源码解析

Jobrunner 定时任务库源码解析

Golang I/O 包的妙用

Golang I/O 包的妙用 golang标准库对io的抽象非常精巧,各个组件可以随意组合,可以作为接口设计的典范。这篇文章结合一个实际的例子来和大家分享一下

跨域资源共享 CORS 详解

跨域资源共享 CORS 详解

CORS是一个W3C标准,全称是"跨域资源共享"(Cross-origin resource sharing)。 它允许浏览器向跨源服务器,发出XMLHttpRequest请求,从而克服了AJAX只能同源使用的限制。 本文详细介绍CORS的内部机制。


Go注意点总结

Go >注意点< 总结 1. 布尔类型 ​ 布尔类型 不能 接受其他类型的赋值,不支持 自动或者强制的类型转换 var b bool b = 1 // 编译错误 b = bool(1) // 编译错误 2.

Docker Note

Docker Note 镜像 虚悬镜像 ​ 没有仓库名,也没有标签,均为<none>的为虚悬镜像: <none> <none> 00285df0df87 5 days ago 342 MB ​ 由于新旧镜像同名,旧镜像名称被取消,从