Use gitmedia.Print instead of fmt.Print
This commit is contained in:
parent
56f8c84365
commit
2719233145
@ -22,14 +22,14 @@ func (c *InitCommand) Run() {
|
||||
switch sub {
|
||||
case "hooks":
|
||||
if err := c.hookInit(); err != nil {
|
||||
fmt.Println(err)
|
||||
gitmedia.Print("%s", err)
|
||||
return
|
||||
}
|
||||
default:
|
||||
c.runInit()
|
||||
}
|
||||
|
||||
fmt.Println("git media initialized")
|
||||
gitmedia.Print("git media initialized")
|
||||
}
|
||||
|
||||
func (c *InitCommand) runInit() {
|
||||
@ -55,11 +55,11 @@ func setFilter(filterName string) {
|
||||
|
||||
existing := gitconfig.Find(key)
|
||||
if shouldReset(existing) {
|
||||
fmt.Printf("Installing %s filter\n", filterName)
|
||||
gitmedia.Print("Installing %s filter", filterName)
|
||||
gitconfig.UnsetGlobal(key)
|
||||
gitconfig.SetGlobal(key, value)
|
||||
} else if existing != value {
|
||||
fmt.Printf("The %s filter should be \"%s\" but is \"%s\"\n", filterName, value, existing)
|
||||
gitmedia.Print("The %s filter should be \"%s\" but is \"%s\"", filterName, value, existing)
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ func requireFilters() {
|
||||
gitconfig.UnsetGlobal(key)
|
||||
gitconfig.SetGlobal(key, value)
|
||||
} else if existing != value {
|
||||
fmt.Printf("Media filters should be required but are not")
|
||||
gitmedia.Print("Media filters should be required but are not")
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user