//args := os.Args //获取用户输入的所有参数
//两种方式在终端执行:
//第一种:编译后的code_007_command_args.exe 127.0.0.1 8888
//第二种:go run 127.0.0.1 8888
// 结果:ip = 127.0.0.1, port = 8888
- 本文固定链接: https://phpmianshi.com/?id=684
- 转载请注明: golang中国 于 PHP面试网 发表
《本文》有 4788 条评论