Documentation ¶
Overview ¶
Package util contains random junk, for internal use only. Thus I'm willing to use a grab-back naming scheme, until something better pops up
Index ¶
- func AttPath(o *kouch.Options) string
- func ChttpDo(ctx context.Context, method, path string, o *kouch.Options) error
- func CommonOptions(ctx context.Context, scope kouch.TargetScope, flags *pflag.FlagSet) (*kouch.Options, error)
- func CopyAll(dst io.Writer, src io.Reader) error
- func DatabasePath(o *kouch.Options) string
- func DocPath(o *kouch.Options) string
- func FetchRev(ctx context.Context, o *kouch.Options) (string, error)
- func NopWriteCloser(w io.Writer) io.WriteCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ChttpDo ¶
ChttpDo performs an HTTP request (GET is downgraded to HEAD if body is nil), writing the header to head, and body to body. If either head or body is nil, that write is skipped.
func CommonOptions ¶
func CommonOptions(ctx context.Context, scope kouch.TargetScope, flags *pflag.FlagSet) (*kouch.Options, error)
CommonOptions parses options common to most or all commands.
func CopyAll ¶
CopyAll copies from src to dst, and checks for any errors on close. If dst is nil, src is simply closed.
func DatabasePath ¶
DatabasePath calculates the server path to a database.
func NopWriteCloser ¶
func NopWriteCloser(w io.Writer) io.WriteCloser
NopWriteCloser turns an io.Writer into an io.WriteCloser, with a noop Close() method.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.