Documentation
¶
Overview ¶
Copyright © 2025 Matt Krueger <mkrueger@rstms.net> All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright © 2025 Matt Krueger <mkrueger@rstms.net> All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Index ¶
- func CheckErr(err error)
- func CobraAddCommand(cobraRootCmd, parentCmd, cobraCmd CobraCommand)
- func CobraInit(cobraRootCmd CobraCommand)
- func ConfigEdit()
- func ConfigInit(allowClobber bool) string
- func ConfigString(header bool) string
- func Confirm(prompt string) bool
- func Execute()
- func Expand(pathname string) string
- func Fatal(err error) error
- func Fatalf(format string, args ...interface{}) error
- func FormatJSON(v any) string
- func HexDump(data []byte) string
- func Init(name, version, configFile string)
- func IsDir(path string) bool
- func IsFile(pathname string) bool
- func OptionKey(cobraCmd CobraCommand, key string) string
- func OptionString(cobraCmd CobraCommand, name, flag, defaultValue, description string)
- func OptionSwitch(cobraCmd CobraCommand, name, flag, description string)
- func ProgramName() string
- func ProgramVersion() string
- func Shutdown()
- func TildePath(path string) (string, error)
- func ViperGetBool(key string) bool
- func ViperGetInt(key string) int
- func ViperGetInt64(key string) int64
- func ViperGetString(key string) string
- func ViperGetStringSlice(key string) []string
- func ViperKey(key string) string
- func ViperSet(key string, value any)
- func ViperSetDefault(key string, value any)
- func Warning(format string, args ...interface{})
- type CobraCommand
- type Sendmail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CobraAddCommand ¶ added in v0.0.14
func CobraAddCommand(cobraRootCmd, parentCmd, cobraCmd CobraCommand)
func CobraInit ¶ added in v0.0.14
func CobraInit(cobraRootCmd CobraCommand)
func ConfigEdit ¶ added in v0.0.14
func ConfigEdit()
func ConfigInit ¶ added in v0.0.14
func ConfigString ¶ added in v0.0.14
func FormatJSON ¶
func OptionKey ¶ added in v0.0.14
func OptionKey(cobraCmd CobraCommand, key string) string
func OptionString ¶
func OptionString(cobraCmd CobraCommand, name, flag, defaultValue, description string)
func OptionSwitch ¶
func OptionSwitch(cobraCmd CobraCommand, name, flag, description string)
func ProgramName ¶
func ProgramName() string
func ProgramVersion ¶ added in v0.0.14
func ProgramVersion() string
func ViperGetBool ¶
func ViperGetInt ¶
func ViperGetInt64 ¶
func ViperGetString ¶
func ViperGetStringSlice ¶ added in v0.0.14
func ViperSetDefault ¶
Types ¶
type CobraCommand ¶ added in v0.0.14
type CobraCommand interface {
}