字符串不能为"nil"(mismatched types string and nil) 1 2 3 4 5 6 7 8 9 10 package main func main() { var x string = nil //error if x == nil { //error x = "default" } } ./hello.go:4: cannot
交叉编译演示注意:本文交叉编译需要 1.5 以上 简单演示 Golang macOS 下编译 windows 64位程序 1 ➜ ~CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o test_win_x64.exe test.go 简单演示 Golang macOS 下编译 Linux 64位程序 1 ➜ ~CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o test_linux_x64 test.go
go lang的函数 1 2 3 func 方法名(参数列表) 返回值 { 定义 } 函数的值(闭包)在Go中,函数被看作第一类值(first-class values) 函
CocoaPods 是干什么用的官方地址 cocoapods CocoaPods 是一个iOS开发的类库管理工具,本身使用 ruby 编写,托管于 github,用于项目中一个类库用到其他类库的依赖管理 很多开
gradle 介绍gradle 是google开发的基于groovy语言 ,用于代替 ant 构建的一种配置型语言 gradle 是基于groovy语言实现(基于JVM的语法和j
[TOC] 针对单个项目设置 gradle 网络代理修改项目中的 gradle.properties 文件,增加配置项: 1 2 3 4 5 6 7 8 9 10 11 12 13 # org.gradle.jvmargs=-DsocksProxyHost=127.0.0.1 -DsocksProxyPort=51087 # socks proxy systemProp.socks.proxyHost=127.0.0.1 systemProp.socks.proxyPort=51087 # http proxy systemProp.http.proxyHost=127.0.0.1 systemProp.http.proxyPort=51087 # https proxy systemProp.https.proxyHost=127.0.0.1 systemProp.https.proxyPort=51087 # no proxy systemProp.https.nonProxyHosts=192.168.*|localhost systemProp.http.nonProxyHosts=192.168.*|localhost 针对所有