Documentation ¶
Index ¶
- Constants
- func StringToCapacityHookFunc() func(f reflect.Type, t reflect.Type, data interface{}) (interface{}, error)
- type Capacities
- func (c Capacities) MarshalJSON() ([]byte, error)
- func (c Capacities) MarshalYAML() (interface{}, error)
- func (c *Capacities) Set(s string) error
- func (c *Capacities) String() string
- func (c *Capacities) Type() string
- func (c *Capacities) UnmarshalJSON(b []byte) error
- func (c *Capacities) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
View Source
const ( Byte Capacities = 1 Kilobyte = Byte << 10 Megabyte = Kilobyte << 10 Gigabyte = Megabyte << 10 Terabyte = Gigabyte << 10 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Capacities ¶
type Capacities int64
func ParseCapacities ¶
func ParseCapacities(s string) (Capacities, error)
func (Capacities) MarshalJSON ¶
func (c Capacities) MarshalJSON() ([]byte, error)
func (Capacities) MarshalYAML ¶
func (c Capacities) MarshalYAML() (interface{}, error)
func (*Capacities) Set ¶
func (c *Capacities) Set(s string) error
Set
@Description[en-US]: Implement the Set method in the Value interface of `spf13/pflag` @Description[zh-CN]: 实现spf13/pflag的Value接口中的Set方法 @param s string @return error
func (*Capacities) String ¶
func (c *Capacities) String() string
String
@Description[en-US]: Implement the String method in the Value interface of `spf13/pflag` @Description[zh-CN]: 实现spf13/pflag的Value接口中的String方法 @return string
func (*Capacities) Type ¶
func (c *Capacities) Type() string
Type
@Description[en-US]: Implement the Type method in the Value interface of `spf13/pflag` @Description[zh-CN]: 实现spf13/pflag的Value接口中的Type方法 @return string
func (*Capacities) UnmarshalJSON ¶
func (c *Capacities) UnmarshalJSON(b []byte) error
func (*Capacities) UnmarshalYAML ¶
func (c *Capacities) UnmarshalYAML(unmarshal func(interface{}) error) error
Click to show internal directories.
Click to hide internal directories.