multipass

​ Multipass 是一个轻量虚拟机管理器,是由 Ubuntu 运营公司 Canonical 所推出的开源项目。运行环境支持 Linux、Windows、macOS。在不同的操作系统上,使用的

mac

Mac 优化 1、mac终端增加颜色,参考centos7 eval "$(/opt/homebrew/bin/brew shellenv)" # Setting PATH for Python 3.9 # The original version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}" export PG_HOME=/opt/homebrew/Cellar/postgresql@10/10.17 export PATH export GOPROXY=https://goproxy.cn,direct export GOPATH=/Users/sugar/go export GO111MODULE="on" export GOBIN=$GOPATH/bin export PATH=$PATH:$GOROOT/bin:$GOBIN:$PG_HOME/bin # 参考RHEL console export PS1="[\u@\h \W]\\$ " export CLICOLOR=1

wsl

WSL2 windows上到linux(windows sub system for linux ) 一、安装 wsl 2 如果系统中带有 wsl,则需要升级到 wsl 2。 以管理员身份打开 PowerShe

Go yaml

Go 读取yaml格式配置文件 package config import ( "fmt" "io/ioutil" "gopkg.in/yaml.v3" ) type Service struct { Host string `json:"host" yaml:"host"` Port string `json:"port" yaml:"port"` } type MyConfig struct { Service Service `json:"service" yaml:"service"` } var Config *MyConfig func LoadConfig(filepath string) { if filepath == "" { return } // 读yaml文件 config, err := ioutil.ReadFile(filepath) if