code: func (s SecretData) SaveTo(dir string) error {
  	path := filepath.Join(dir, s.Name)
  	if err := os.MkdirAll(filepath.Dir(path), 0700); err != nil && !os.IsExist(err) {
  		return err
  	}
  	return ioutil.WriteFile(path, s.Data, 0700)
  }
docs: // SaveTo saves secret data to given directory