golang random string
func GetRandomString(n int) string { randBytes := … 继续阅读 golang random string
func GetRandomString(n int) string { randBytes := … 继续阅读 golang random string
http://code.sd/books/migration-to-go/
// 如 255.255.255.0 对应的网络位长度为 24 func SubNetMaskToL… 继续阅读 golang CIDR IPMask
gloang使用OCI ATP数据库 package main import ( "dat… 继续阅读 golang use oracle cloud ATP
package mainimport ( "fmt" "net&quo… 继续阅读 golang open a udp server
golang模拟网页截图 package main import ( "github.co… 继续阅读 Screenshot a web with golang
// golang 让windows发出警告的声音 func winSound() { funInD… 继续阅读 golang PlaySound on windows via syscall
mv /usr/local/go /usr/local/go_bak$(date +%Y%m%d%H… 继续阅读 go1.20.1 install
func TestBlob(t *testing.T) { //0x removed from st… 继续阅读 golang save mysql blob string to file
import ( "github.com/go-vgo/robotgo" ) f… 继续阅读 golang simulator keyborad keys
func binarySearch(arr []int, target int) int { if … 继续阅读 golang binary Search
func main() { goodJSON := `{"key1": 1}` … 继续阅读 golang json valid
for { ctx, _ := context.WithTimeout(context.Backgr… 继续阅读 golang context limit runing time
func HTTPProf() { //log.Infof("pprof listen a… 继续阅读 golang http pprof server
func TestEnv(t *testing.T) { // 1. 获取环境变量 fmt.Prin… 继续阅读 golang get set Environ
func getLine(file *os.File) { // 按行读取 br := bufio.… 继续阅读 golang readline by line
// copy from prometheus source code // NoAllocStri… 继续阅读 golang string to []byte use unsafe.Pointer
#正确的写法是 %% ,这样输出的就是 % 本身 fmt.Sprintf("恒生指数: %… 继续阅读 golang fmt.Sprintf 转义 %
package main import ( "github.com/wangshizebi… 继续阅读 golang 按关键词给wordpress文章打标签
func TestScanInt(t *testing.T) { var ( str = "… 继续阅读 golang fmt.Sscanf 取字符串中格式化值