Documentation
¶
Index ¶
- Variables
- func CheckGitVersionAtLeast(atLeast string) error
- func EnsureExecutable(filename string) error
- func GetHookTemplates() (hookNames, hookTpls, giteaHookTpls []string)
- func Remove(name string) error
- func SanitizeCredentialURLs(s string) string
- func SanitizeErrorCredentialURLs(err error) error
- func SupportProcReceive() bool
- func UnsafeBytesToString(b []byte) string
- func UnsafeStringToBytes(s string) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var (
DefaultContext context.Context
)
Functions ¶
func CheckGitVersionAtLeast ¶
CheckGitVersionAtLeast check git version is at least the constraint version
func EnsureExecutable ¶
func GetHookTemplates ¶
func GetHookTemplates() (hookNames, hookTpls, giteaHookTpls []string)
func SanitizeCredentialURLs ¶
SanitizeCredentialURLs remove all credentials in URLs (starting with "scheme://") for the input string: "https://user:pass@domain.com" => "https://sanitized-credential@domain.com"
func SanitizeErrorCredentialURLs ¶
SanitizeErrorCredentialURLs wraps the error and make sure the returned error message doesn't contain sensitive credentials in URLs
func SupportProcReceive ¶
func SupportProcReceive() bool
SupportProcReceive returns true if the installed git binary supports proc-receive
func UnsafeBytesToString ¶
UnsafeBytesToString uses Go's unsafe package to convert a byte slice to a string.
func UnsafeStringToBytes ¶
UnsafeStringToBytes uses Go's unsafe package to convert a string to a byte slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.