...

Package flagx

import "github.com/ory/x/flagx"
Overview
Index

Overview ▾

func MustGetBool

func MustGetBool(cmd *cobra.Command, name string) bool

MustGetBool returns a bool flag or fatals if an error occurs.

func MustGetDuration

func MustGetDuration(cmd *cobra.Command, name string) time.Duration

MustGetDuration returns a time.Duration flag or fatals if an error occurs.

func MustGetInt

func MustGetInt(cmd *cobra.Command, name string) int

MustGetInt returns a int flag or fatals if an error occurs.

func MustGetString

func MustGetString(cmd *cobra.Command, name string) string

MustGetString returns a string flag or fatals if an error occurs.

func MustGetStringSlice

func MustGetStringSlice(cmd *cobra.Command, name string) []string

MustGetStringSlice returns a []string flag or fatals if an error occurs.

func MustGetUint32

func MustGetUint32(cmd *cobra.Command, name string) uint32

MustGetUint32 returns a uint32 flag or fatals if an error occurs.

func MustGetUint8

func MustGetUint8(cmd *cobra.Command, name string) uint8

MustGetUint8 returns a uint8 flag or fatals if an error occurs.

func NewFlagSet

func NewFlagSet(name string) *pflag.FlagSet