我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

在标志中隐藏选项

Can I somehow hide any option using standard library flag? This means flag would work, but --help would not print this option.

And it would be more nice to print --option instead of -option in help. Is it possible?

I think the standard pkg does not support this thing you are trying to achieve. Maybe you can use: https://godoc.org/github.com/jessevdk/go-flags

You could use the cli package instead.

近期文章

  • 去ListenAndServeTLS
  • 如何在Koding的风筝库中使用JWT
  • 如何从用Go编写的客户端连接到sockJS?
  • dns错误,google-container-engine上没有此类主机
  • 使用XSD验证Golang XML?
  • golang appengine-文件名太长
  • GAE go仅在localhost上提供路径,在域上不提供服务
  • 将嵌套循环内生成的数据存储在地图或切片中
  • 如何访问用Golang编写的OS X沙箱应用程序的资源文件?
  • 在Go中使用原始套接字实现TCP数据包嗅探器
  • JOSE_JS JWE用javascript加密的数据不会被go解密
  • 具有多个goroutine和每个请求不同代理的Http客户端
  • http测试-在传输层伪造分块响应
  • 如何在go中将[] [2] string转换为map [string]字符串?
  • 在本地网络中配置多个IoT设备
  • Golang-嵌套地图不支持内部级别的索引,而外部级别很好
  • 列索引1上的扫描错误:不支持的扫描,将驱动程序存储。值类型<nil>转换为* string类型
  • 去安装:将非源文件添加到内置包中
  • 追加新跟踪失败
  • 开始-解组XML,属性问题

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华