Documentation
¶
Index ¶
- Variables
- func AddGookmeScript(content string, scriptscriptVariables *ScriptVariables) (string, error)
- func AssertFile(path string) error
- func AssertFolder(path string) error
- func DeleteScriptFile(gitFolderPath string, hookName configuration.HookType) error
- func GenerateScript(variables *ScriptVariables, template string) string
- func LoadScriptFileContent(gitFolderPath string, hookName configuration.HookType) (string, error)
- func ParseScriptVersion(content string) (string, error)
- func RemoveExistingGookmeScript(content string) string
- func ScriptFileExists(gitFolderPath string, hookName configuration.HookType) (bool, error)
- func WriteScriptFileContent(gitFolderPath string, hookName configuration.HookType, content string) error
- type ScriptVariables
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorScriptAlreadyExists = errors.New("script already exists") ErrorScriptVersionNotFound = errors.New("script version not found") )
Functions ¶
func AddGookmeScript ¶
func AddGookmeScript( content string, scriptscriptVariables *ScriptVariables, ) (string, error)
func AssertFile ¶
func AssertFolder ¶
func DeleteScriptFile ¶
func DeleteScriptFile(gitFolderPath string, hookName configuration.HookType) error
func GenerateScript ¶
func GenerateScript(variables *ScriptVariables, template string) string
func LoadScriptFileContent ¶
func LoadScriptFileContent(gitFolderPath string, hookName configuration.HookType) (string, error)
func ParseScriptVersion ¶
Look for a script in the provided content, and parse it to get the version it has been generated with
func RemoveExistingGookmeScript ¶
Remove the gookme script from the provided content
func ScriptFileExists ¶
func ScriptFileExists(gitFolderPath string, hookName configuration.HookType) (bool, error)
Check if git hook script for the provided hook type exists in the provided directory
func WriteScriptFileContent ¶
func WriteScriptFileContent(gitFolderPath string, hookName configuration.HookType, content string) error
Types ¶
type ScriptVariables ¶
type ScriptVariables struct { HookType configuration.HookType Version string }
Click to show internal directories.
Click to hide internal directories.