原创 go 多平臺交叉編譯

 獲取gox工具 go get github.com/mitchellh/gox 使用 多平臺 gox Number of parallel builds: 4 --> darwin/386: github.com/mit

原创 使用element-ui 自定義複選框組件(允許自定義添加新的選項)

vue組件 <template> <div class="main"> <el-checkbox-group v-model="checkResults" class="check-group">

原创 go Tick 定時器官方示例

 每隔5秒執行一次 package main import ( "fmt" "time" ) func statusUpdate() string { return "" } func main() { c := time.

原创 go 切片追加切片

s1 := []int{} s2 := []int{} //把s2所有元素追加到s1中 s1 = append(s1, s2...) //把s2部分元素追加到s1中 s1 = append(s1, s2[start:end]...)

原创 windows cmd 設置http代理

//更改爲自己代理服務器ip和端口 set http_proxy=http://127.0.0.1:1080 set https_proxy=http://127.0.0.1:1080 //如需用戶和密碼,則繼續執行下面命令 set

原创 go reflect Elem() 深入學習

 示例 var r io.Reader = os.Stdin // os.Stdin is of type *os.File which implements io.Reader v := reflect.ValueOf(r) //

原创 go 驗證碼實現

依賴 "github.com/mojocn/base64Captcha"  官方預覽 實現 import ( cp "github.com/mojocn/base64Captcha" "image/color" ) type

原创 go 關於接口的實現

package main import "fmt" type I interface { Io() error } type A struct { } func (r *A) Io() error { fmt.Println

原创 go websocket(copy直接可用)

主要依賴   "github.com/gin-gonic/gin" "github.com/gorilla/websocket"  websocket.go  package api import ( "errors" "git

原创 姬魔戀戰紀腳本開發

 碼雲地址  

原创 go 發送QQ郵件(SSL連接)

package tool import ( "errors" "github.com/outakujo/utils" "gopkg.in/gomail.v2" ) type Email struct { From s

原创 bat批量啓動

 啓動 Chrome Goland Navicat  dev.bat @echo off echo Starting Chrome start "" "C:\Program Files (x86)\Google\Chrome\Appli

原创 JetBrains IDE Run 配置共享

第一種方法 必須開啓VCS (可以是git) 建議先自建git倉庫,不然使用IDE工具欄裏enable vcs自建的倉庫.gitignore在.idea文件夾下 分享設置(勾選 Share through VCS )  可分享的配置文件

原创 go ip listener 限流設計(ip黑名單和白名單)

監聽器 package listener import ( "sync" "time" ) type Listener struct { c chan Msg bmut

原创 yaml 語法注意點

database: [ { alias: ab, #?會識別不出來,所以要加上引號,單引號或雙引號都可以 connect: "root:password@/test1?charset=utf8&parseTime=True&