正则的使用: package main import ( "fmt" "regexp" ) func main() { buf := "abc axc adc qwe fff aaa" // 解析正则 reg := regexp.MustCompile(`a.c`) if reg == nil { fmt.Println("解析错误") return } result := reg.FindAllStringSubmatch( ...
package main import ( "fmt" "os" ) func main() { // 标准输出设备 // os.Stdout.Close() //fmt.Println("123") // os.Stdout.WriteString("hello") // 输出到标准输出中 // os.Stdin.Close() 关闭后无法输入 var a int fmt.Println("请输入:") ...
写入内容到文件: package main import ( "fmt" "os" ) func WriteFile(path string) { f, err := os.Create(path) if err != nil { fmt.Println("err = ", err) return } defer f.Close() var buf string buf = "1234demodeodke" n, err := ...
etcd是go语言开发的,
" "github.com/mattn/go-gtk/gtk" ) func main
称OPA)是一款go语言编写的
在git bash里设置代理: export https_proxy=http://192.168.0.10:8118 export http_proxy=http://192.168.0.10:8118 git config --global http.proxy 'http://192.168.0.10:8118' git config --global https.proxy 'http://192.168.0.10:8118'
.0 Uses fluent-bit Loki go plugin for gathering logs and
: - source_labels: - __name__ regex: "go_info.*" action: drop
; "$SERVICE_NAME" -o go-template='{{ range $k, $v
spec: 1.0.2-dev go: go1.21.8 libseccomp: 2