command: implement proper module.Storage interface

This commit is contained in:
Mitchell Hashimoto 2015-04-07 16:46:56 -07:00
parent 2378160803
commit 650a9f372b
1 changed files with 4 additions and 4 deletions

View File

@ -14,16 +14,16 @@ type uiModuleStorage struct {
Ui cli.Ui Ui cli.Ui
} }
func (s *uiModuleStorage) Dir(source string) (string, bool, error) { func (s *uiModuleStorage) Dir(key string) (string, bool, error) {
return s.Storage.Dir(source) return s.Storage.Dir(key)
} }
func (s *uiModuleStorage) Get(source string, update bool) error { func (s *uiModuleStorage) Get(key string, source string, update bool) error {
updateStr := "" updateStr := ""
if update { if update {
updateStr = " (update)" updateStr = " (update)"
} }
s.Ui.Output(fmt.Sprintf("Get: %s%s", source, updateStr)) s.Ui.Output(fmt.Sprintf("Get: %s%s", source, updateStr))
return s.Storage.Get(source, update) return s.Storage.Get(key, source, update)
} }