MCPcopy Index your code
hub / github.com/writefreely/writefreely / OrDefaultString

Function OrDefaultString

config/funcs.go:52–57  ·  view source on GitHub ↗

OrDefaultString returns input or a default value if input is empty.

(input, defaultValue string)

Source from the content-addressed store, hash-verified

50
51// OrDefaultString returns input or a default value if input is empty.
52func OrDefaultString(input, defaultValue string) string {
53 if len(input) == 0 {
54 return defaultValue
55 }
56 return input
57}
58
59// DefaultHTTPClient returns a sane default HTTP client.
60func DefaultHTTPClient() *http.Client {

Callers 5

NewOAuthButtonsFunction · 0.92
configureWriteAsOauthFunction · 0.92
configureGitlabOauthFunction · 0.92
configureGenericOauthFunction · 0.92
viewSettingsFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected