config.go
func readConfig() (*userConfig, error) {
	b, err := ioutil.ReadFile(filepath.Join(configDir, accountFile))
	if err != nil {
		return nil, err
	}
	uc := &userConfig{}
	if err := json.Unmarshal(b, uc); err != nil {
		return nil, err
	}
	if key, err := readKey(filepath.Join(configDir, accountKey)); err == nil {
		uc.key = key
	}
	return uc, nil
}
func readConfig() (*userConfig, error) {
	b, err := ioutil.ReadFile(filepath.Join(configDir, accountFile))
	if err != nil {
		return nil, err
	}
	uc := &userConfig{}
	if err := json.Unmarshal(b, uc); err != nil {
		return nil, err
	}
	if key, err := readKey(filepath.Join(configDir, accountKey)); err == nil {
		uc.key = key
	}
	return uc, nil
}
// readConfig reads userConfig from path and a private key.
// It expects to find the key at the same location,
// by replacing path extention with ".key".
//func readConfig(name string) (*userConfig, error) {