在Go语言中有flag.String()函数,请问下:
countryCodeFile = flag.String("country", "", "Path to the country code file")
1、flag.String()
返回的是什么呢? 为何需要这样来返回?
2、countryCodeFile 不是一个字符串吗?
在Go语言中有flag.String()函数,请问下:
countryCodeFile = flag.String("country", "", "Path to the country code file")
1、flag.String()
返回的是什么呢? 为何需要这样来返回?
2、countryCodeFile 不是一个字符串吗?
2 回答1.3k 阅读
2 回答1.2k 阅读
2 回答1.2k 阅读
2 回答1.1k 阅读
3 回答759 阅读
2 回答931 阅读
1 回答830 阅读
flag#String
返回的是一个字符串指针,里面会存储提取出的 flag 的值。