(confPath, hookFlag string, isGlobal, isReplace bool)
| 29 | } |
| 30 | |
| 31 | func initHooks(confPath, hookFlag string, isGlobal, isReplace bool) (string, error) { |
| 32 | hookDir, err := getHookDir(hookFlag, isGlobal) |
| 33 | if err != nil { |
| 34 | return "", err |
| 35 | } |
| 36 | |
| 37 | err = writeHooks(hookDir, isReplace) |
| 38 | if err != nil { |
| 39 | return "", err |
| 40 | } |
| 41 | return hookDir, nil |
| 42 | } |
| 43 | |
| 44 | func createHooks(hookBaseDir string, isReplace bool) error { |
| 45 | return writeHooks(hookBaseDir, isReplace) |
no test coverage detected