code: func ReadCfg(cfgPath string) (*Cfg, error) {
  	b, err := ioutil.ReadFile(cfgPath)
  	if err != nil {
  		return nil, err
  	}
  	var cfg Cfg
  	if err := json.Unmarshal(b, &cfg); err != nil {
  		return nil, err
  	}
  	defaultCfg(&cfg)
  	return &cfg, nil
  }
docs: // ReadCfg reads and unmarshals the specified json file into a Cfg struct.