Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Hex = &cli.Command{ Name: "hex", Usage: "convert number to hex", UsageText: `hex [command] -[flag] [args...] hex 0b110 hex 06 hex 0x1e hex -b 1988 hex -o 1988 hex -d 1988 `, ArgsUsage: "encode [ids...]", Action: func(c *cli.Context) error { if c.NArg() == 0 { return errors.New("none number is present") } for _, v := range c.Args().Slice() { number, err := parseInt(v) if err != nil { return err } if hexArgs.binary { printBinary(number) } else if hexArgs.octal { printOctal(number) } else if hexArgs.decimal { printDecimal(number) } } return nil }, Flags: hexFlags, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.