本文整理汇总了Golang中flag.Uint64Var函数的典型用法代码示例。如果您正苦于以下问题:Golang Uint64Var函数的具体用法?Golang Uint64Var怎么用?Golang Uint64Var使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了Uint64Var函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1: init
func init() {
var b bytes.Buffer
for name, s := range scalerByName {
if s == vibrant.DefaultScaler {
scalerName = name
}
if b.Len() > 0 {
b.WriteString(", ")
}
b.WriteString(name)
}
availableScalers := b.String()
flag.StringVar(&outputFile, "outputFile", "", "Output location for a quantized version of the image.")
flag.StringVar(&outputFile, "o", outputFile, "Output location for a quantized version of the image.")
flag.Uint64Var(&maximumColorCount, "maximumColorCount", maximumColorCount, "Maximum color count.")
flag.Uint64Var(&maximumColorCount, "m", maximumColorCount, "Maximum color count.")
flag.Uint64Var(&resizeImageArea, "resizeImageArea", resizeImageArea, "Resize image area.")
flag.Uint64Var(&resizeImageArea, "r", resizeImageArea, "Resize image area.")
flag.BoolVar(&debug, "debug", debug, "Debug mode.")
flag.BoolVar(&debug, "d", debug, "Debug mode.")
flag.StringVar(&scalerName, "scaler", scalerName, "Scaler. One of: "+availableScalers)
flag.StringVar(&scalerName, "s", scalerName, "Scaler. One of: "+availableScalers)
flag.Parse()
inputFile = flag.Arg(0)
}
开发者ID:RobCherry,项目名称:vibrant,代码行数:32,代码来源:main.go
示例2: registerFlags
func registerFlags() {
flag.StringVar(&addressVersion, "address-version", addressVersion,
"Network address version. Options are \"test\" and \"main\"")
// Input files
flag.StringVar(&blockchainFile, "blockchain", blockchainFile,
"Location of the blockchain file")
// Output files
flag.StringVar(&transactionFileOut, "transaction-out", transactionFileOut,
"Where to write the created transaction, if not committing to the "+
"blockchain")
// Ownership parameters. Some of these are mutually exclusive
flag.StringVar(&srcWallet, "src-wallet", srcWallet,
"Use this wallet as the spender")
flag.IntVar(&srcWalletEntry, "src-wallet-entry", srcWalletEntry,
"Only spend from this entry in the wallet. -1 means use all.")
flag.StringVar(&srcSecretKey, "src-secret", srcSecretKey,
"Spend from this secret key")
// Spending destination
flag.StringVar(&destAddress, "dest", destAddress,
"Which address to send the coins to")
// Spending amount options
flag.Uint64Var(&spendCoins, "coins", spendCoins, "How many coins to spend")
flag.Uint64Var(&spendHours, "hours", spendHours, "How many hours to spend")
flag.Uint64Var(&spendFee, "fee", spendFee,
"How much to pay in fee above the minimum fee")
flag.Uint64Var(&burnFactor, "burn", burnFactor,
"How many hours must be spent as a minimum fee, calculated as the "+
"number of output hours divided by this number. 0 is no burn.")
}
开发者ID:JmAbuDabi,项目名称:skycoin,代码行数:34,代码来源:spend.go
示例3: FlagsParse
func FlagsParse() {
flag.StringVar(&Port, "port", "50000", "node port")
flag.StringVar(&Host, "host", "127.0.0.1", "node address")
flag.Uint64Var(&MinWorkers, "minWorkers", 2, "min workers")
flag.Uint64Var(&MinPartitionsPerWorker, "ppw", 1, "min partitions per worker")
flag.Int64Var(&MessageThreshold, "mthresh", 1000, "message threshold")
flag.Int64Var(&VertexThreshold, "vthresh", 1000, "vertex threshold")
flag.StringVar(&LoadPath, "loadPath", "data", "data load path")
flag.StringVar(&PersistPath, "persistPath", "persist", "data persist path")
flag.Parse()
}
开发者ID:dforsyth,项目名称:syrup,代码行数:12,代码来源:setup.go
示例4: main
//============================================================================
// main : Entry point.
//----------------------------------------------------------------------------
func main() {
var dwarfData *dwarf.Data
var theFile *macho.File
var theErr os.Error
var relativeAddress uint64
var runtimeAddress uint64
var loadAddress uint64
var segmentAddress uint64
var pathMacho string
var pathDsym string
// Parse our arguments
flag.Uint64Var(&runtimeAddress, "raddr", 0, "")
flag.Uint64Var(&loadAddress, "laddr", 0, "")
flag.StringVar(&pathMacho, "macho", "", "")
flag.StringVar(&pathDsym, "dsym", "", "")
flag.Parse()
if runtimeAddress == 0 || loadAddress == 0 || pathMacho == "" || pathDsym == "" {
printHelp()
}
// Find the text segment address
theFile, theErr = macho.Open(pathMacho)
if theErr != nil {
fatalError("Can't open Mach-O file: " + theErr.String())
}
segmentAddress = theFile.Segment("__TEXT").Addr
theFile.Close()
// Calculate the target address
relativeAddress = runtimeAddress - loadAddress
gTargetAddress = segmentAddress + relativeAddress
// Find the target
theFile, theErr = macho.Open(pathDsym)
if theErr != nil {
fatalError("Can't open .dsym file: " + theErr.String())
}
dwarfData, theErr = theFile.DWARF()
if theErr != nil {
fatalError("Can't find DWARF info: " + theErr.String())
}
processChildren(dwarfData.Reader(), 0, false)
theFile.Close()
}
开发者ID:refnum,项目名称:gatos,代码行数:55,代码来源:gatos.go
示例5: init
func init() {
flag.Uint64Var(&CmdlineOptions.SpoolSize, "spool-size", CmdlineOptions.SpoolSize, "event count spool threshold - forces network flush")
flag.Uint64Var(&CmdlineOptions.SpoolSize, "sv", CmdlineOptions.SpoolSize, "event count spool threshold - forces network flush")
flag.IntVar(&CmdlineOptions.HarvesterBufferSize, "harvest-buffer-size", CmdlineOptions.HarvesterBufferSize, "harvester reader buffer size")
flag.IntVar(&CmdlineOptions.HarvesterBufferSize, "hb", CmdlineOptions.HarvesterBufferSize, "harvester reader buffer size")
flag.BoolVar(&CmdlineOptions.TailOnRotate, "tail", CmdlineOptions.TailOnRotate, "always tail on log rotation -note: may skip entries ")
flag.BoolVar(&CmdlineOptions.TailOnRotate, "t", CmdlineOptions.TailOnRotate, "always tail on log rotation -note: may skip entries ")
flag.BoolVar(&CmdlineOptions.Quiet, "quiet", CmdlineOptions.Quiet, "operate in quiet mode - only emit errors to log")
}
开发者ID:peterrosell,项目名称:filebeat,代码行数:13,代码来源:config.go
最后编辑: kuteng 文档更新时间: 2021-08-23 19:14 作者:kuteng