Categorygithub.com/zew/util
modulepackage
1.0.5
Repository: https://github.com/zew/util.git
Documentation: pkg.go.dev

# README

Package util

GoDoc

# Functions

This should be moved to log package.
This should be moved to log package.
No description provided by the author
No description provided by the author
Checks whether file exists, checks whether it is a directory.
No description provided by the author
No description provided by the author
EnvVar returns an error, if the key is not present.
Required environment var terminates the program if the env var is not set.
Checks whether file exists.
Stripping subdomains Last two "." delimited tokens of hostname xx1.shop.wsj.com => wsj.com.
Get a http client blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/.
Get a http server thenewstack.io/building-a-web-server-in-go/ blog.cloudflare.com/the-complete-guide-to-golang-net-http-timeouts/.
No description provided by the author
No description provided by the author
No description provided by the author
Func isSpacey is a shortcut func.
No description provided by the author
Loads a file relative to app dir.
in addition - extensions are respected and cleansed.
No description provided by the author
No description provided by the author
No description provided by the author
NewFlags returns a slice of settings.
All kinds of newlines, tabs and double spaces are reduced to single space.
subdomain1.host.com/dir1 is reformed to host.com/subdomain1/dir1 except for www.host.com.
ParseAndSaveUploaded is a convenience func to process uploaded files.
No description provided by the author
No description provided by the author
No description provided by the author
Returns the the source file path.
No description provided by the author
No description provided by the author
No description provided by the author
StackTrace returns the call stack as slice of strings First arg => level init Second arg => levels up Third arg => dirs of before source file.
StackTraceHTML returns StackTrace as a string embeddable into HTML.
StackTraceStr returns StackTrace as a string with new lines.
No description provided by the author
StripPrefix is a 'debug version' of http.StripPrefix; it logs the modified rewritten request elements; it also demonstrated, how to nest a http.Handler.
No description provided by the author
No description provided by the author
Prime data source is in the "dsn1" configuration map key.
Any slice element, that is contained in another slice element gets trimmed.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Implicitly contains removeProtokol() HostName gets reduced (www.
No description provided by the author

# Structs

FlagT reads some command line value.

# Type aliases

FlagsT is a slice of settings.
No description provided by the author