-
Notifications
You must be signed in to change notification settings - Fork 1
/
flags.go
executable file
·41 lines (37 loc) · 1.53 KB
/
flags.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
package cli
import (
flag "github.com/spf13/pflag"
)
const (
FlagTo = "to"
FlagAmount = "amount"
FlagDocumentHash = "document-hash"
FlagAssetType = "asset-hype"
FlagAssetPrice = "asset-price"
FlagAssetQuantity = "asset-quantity"
FlagQuantityUnit = "quantity-unit"
FlagPegHash = "peg-hash"
FlagOwnerAddress = "owner"
)
var (
fsTo = flag.NewFlagSet("", flag.ContinueOnError)
fsAmount = flag.NewFlagSet("", flag.ContinueOnError)
fsDocumentHash = flag.NewFlagSet("", flag.ContinueOnError)
fsAssetType = flag.NewFlagSet("", flag.ContinueOnError)
fsAssetPrice = flag.NewFlagSet("", flag.ContinueOnError)
fsAssetQuantity = flag.NewFlagSet("", flag.ContinueOnError)
fsQuantityUnit = flag.NewFlagSet("", flag.ContinueOnError)
fsPegHash = flag.NewFlagSet("", flag.ContinueOnError)
fsOwnerAddress = flag.NewFlagSet("", flag.ContinueOnError)
)
func init() {
fsTo.String(FlagTo, "", "Address to send coins")
fsAmount.String(FlagAmount, "", "Amount of coins to send")
fsDocumentHash.String(FlagDocumentHash, "", "Hash of the asset doccuments of the asset")
fsAssetType.String(FlagAssetType, "", "Type of the asset")
fsAssetPrice.String(FlagAssetPrice, "", "Type of the asset")
fsAssetQuantity.String(FlagAssetQuantity, "", "Quantity of the assent in integer")
fsQuantityUnit.String(FlagQuantityUnit, "", "The unit of the qunatity")
fsPegHash.String(FlagPegHash, "", "Peg Hash to be transferred ")
fsOwnerAddress.String(FlagOwnerAddress, "", "Address of current owner of asset peg")
}