https://docs.etherniti.org/architecture/optimizations/address-validation/ package main import ( "fmt" "regexp" ) var ( re := regexp.MustCompile("^0x[0-9a-fA-F]{40}$") ) func IsValidAddress(v string) bool { return re.MatchString(v) } func main() { fmt.Println(IsValidAddress("0x323b5d4c32345ced77393b3530b1eed0f346429d")) // true fmt.Println(IsValidAddress("0xXYZb5d4c32345ced77393b3530b1eed0f346429d")) // false }

繼續閱讀

https://christina04.hatenablog.com/entry/vault-login-golang user passwd get token https://www.vaultproject.io/docs/auth/userpass.html setting token https://www.vaultproject.io/docs/auth/token.html

繼續閱讀

https://www.reddit.com/r/golang/comments/8ojjoj/huge_performance_hit_on_a_simple_go_server_with/ Docker’s disk I/O was the bottleneck! Solved: Disk I/O was the problem. Even though I’m on Debian 9.4, changing to an in-memory sqlite allowed Docker to push 2.9k reqs/sec. Credits to /u/Willson50 for the amazing find! With file=dco.sqlite3?mode=memory, Docker can push ~2.9k req/sec. Other way: PRAGMA journal_mode=WAL; PRAGMA synchronous=NORMAL; https://www.sqlite.org/wal.html

繼續閱讀

作者的圖片

Sue boy

Sueboy Can support You

CIO

Taiwan