Skip to content

Hotfix the config writer; unexport initialization functions#47

Merged
bobheadxi merged 1 commit into
rob/#27-serverside-daemonfrom
chad/hotfix-config-writes
Jan 7, 2018
Merged

Hotfix the config writer; unexport initialization functions#47
bobheadxi merged 1 commit into
rob/#27-serverside-daemonfrom
chad/hotfix-config-writes

Conversation

@chadlagore

Copy link
Copy Markdown
Contributor

Status: Ready For Review

🎟️ Ticket(s): None


👷 Changes

  • Fixed the config writer so that we can still mock remote.Bootstrap appropriately (it writes to disk in the middle of the call.
  • Added a new field to Config:
// Config represents the current projects configuration.
type Config struct {
	CurrentRemoteName string     `json:"name"`
	CurrentRemoteVPS  *RemoteVPS `json:"remote"`
	DaemonAPIToken    string     `json:"token"`
	io.Writer         `json:"-"`
}

The io.Writer is used in the call config.Write(). It holds some file or buffer to write the configuration to (useful for testing).

  • Unexported some functions as well (sorry for the noise).

🔦 Testing Instructions

go test ./cmd -cover

@bobheadxi bobheadxi merged commit 2e62259 into rob/#27-serverside-daemon Jan 7, 2018
@bobheadxi bobheadxi deleted the chad/hotfix-config-writes branch January 7, 2018 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants