Cleanup: worker, simplify setting the manager URL

The return value of `FileConfigWrangler.SetManagerURL()` was never used,
so now the function doesn't return anything any more.
This commit is contained in:
Sybren A. Stüvel 2022-06-28 11:42:47 +02:00
parent 4e4f67d20a
commit 24344e9632

View File

@ -125,10 +125,8 @@ func (fcw *FileConfigWrangler) SaveCredentials(creds WorkerCredentials) error {
// SetManagerURL overwrites the Manager URL in the cached configuration. // SetManagerURL overwrites the Manager URL in the cached configuration.
// This is an in-memory change only, and will not be written to the config file. // This is an in-memory change only, and will not be written to the config file.
// Returns a new copy of the WorkerConfig with the Manager URL updated. func (fcw *FileConfigWrangler) SetManagerURL(managerURL string) {
func (fcw *FileConfigWrangler) SetManagerURL(managerURL string) WorkerConfig {
fcw.wc.ManagerURL = managerURL fcw.wc.ManagerURL = managerURL
return *fcw.wc
} }
// DefaultConfig returns a fairly sane default configuration. // DefaultConfig returns a fairly sane default configuration.