This repository has been archived by the owner on Apr 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathfacade.go
51 lines (43 loc) · 1.69 KB
/
facade.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package cmdkit
import (
"reflect"
"github.com/ipfs/go-ipfs-cmds"
)
type (
Argument = cmds.Argument
ArgumentType = cmds.ArgumentType
Error = cmds.Error
ErrorType = cmds.ErrorType
HelpText = cmds.HelpText
OptMap = cmds.OptMap
Option = cmds.Option
)
const (
Invalid = cmds.Invalid
Bool = cmds.Bool
Int = cmds.Int
Uint = cmds.Uint
Int64 = cmds.Int64
Uint64 = cmds.Uint64
Float = cmds.Float
String = cmds.String
ArgString = cmds.ArgString
ArgFile = cmds.ArgFile
)
func BoolOption(names ...string) Option { return cmds.BoolOption(names...) }
func FloatOption(names ...string) Option { return cmds.FloatOption(names...) }
func Int64Option(names ...string) Option { return cmds.Int64Option(names...) }
func IntOption(names ...string) Option { return cmds.IntOption(names...) }
func NewOption(kind reflect.Kind, names ...string) Option { return cmds.NewOption(kind, names...) }
func StringOption(names ...string) Option { return cmds.StringOption(names...) }
func Uint64Option(names ...string) Option { return cmds.Uint64Option(names...) }
func UintOption(names ...string) Option { return cmds.UintOption(names...) }
func FileArg(name string, required, variadic bool, description string) Argument {
return cmds.FileArg(name, required, variadic, description)
}
func StringArg(name string, required, variadic bool, description string) Argument {
return cmds.StringArg(name, required, variadic, description)
}
func Errorf(code ErrorType, format string, args ...interface{}) Error {
return cmds.Errorf(code, format, args...)
}