code: func (p *Process) writeConfig() error {
  	logger := p.Logger.New("fn", "writeConfig")
  	logger.Info("writing")
  
  	// Create parent directory if it doesn't exist.
  	if err := os.MkdirAll(filepath.Dir(p.ConfigPath()), 0777); err != nil {
  		logger.Error("cannot create config parent directory", "err", err)
  		return err
  	}
  
  	f, err := os.Create(p.ConfigPath())
  	if err != nil {
  		logger.Error("cannot create config file", "err", err)
  		return err
  	}
  	defer f.Close()
  
  	return configTemplate.Execute(f, struct {
  		ID       string
  		Port     string
  		DataDir  string
  		Password string
  	}{p.ID, p.Port, p.DataDir, p.Password})
  }
docs: // writeConfig generates a new redis.conf at the config path.