flags

command
v0.0.0-...-fabbfc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

README

Flags

演示如何使用命令行的flag参数

运行示例

INT_FLAG=109 go run main.go --string_flag="串串来了" --bool_flag=true

可以看到程序打印出获取到的flag参数信息

字符串flag值: 串串来了
字符串缺省值: 我是缺省值
整形flag值:109
布尔值flag值:true

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL