diff --git a/commands.go b/commands.go index c889d37f1..d726e8ae0 100644 --- a/commands.go +++ b/commands.go @@ -46,11 +46,6 @@ var HiddenCommands map[string]struct{} // Ui is the cli.Ui used for communicating to the outside world. var Ui cli.Ui -const ( - ErrorPrefix = "e:" - OutputPrefix = "o:" -) - func initCommands( originalWorkingDir string, config *cliconfig.Config, diff --git a/synchronized_writers.go b/synchronized_writers.go deleted file mode 100644 index 2533d1316..000000000 --- a/synchronized_writers.go +++ /dev/null @@ -1,31 +0,0 @@ -package main - -import ( - "io" - "sync" -) - -type synchronizedWriter struct { - io.Writer - mutex *sync.Mutex -} - -// synchronizedWriters takes a set of writers and returns wrappers that ensure -// that only one write can be outstanding at a time across the whole set. -func synchronizedWriters(targets ...io.Writer) []io.Writer { - mutex := &sync.Mutex{} - ret := make([]io.Writer, len(targets)) - for i, target := range targets { - ret[i] = &synchronizedWriter{ - Writer: target, - mutex: mutex, - } - } - return ret -} - -func (w *synchronizedWriter) Write(p []byte) (int, error) { - w.mutex.Lock() - defer w.mutex.Unlock() - return w.Writer.Write(p) -}