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

从包访问未导出的变量

Does Go allow the use of reflection (or any other method) to extract un-exported variables from a package. For instance, let's say we have a package that includes the following variable:

// ... various exported functions

var _MySecretVariable = MySecretStruct{ /* ... */ }

Is there any way to access _MyDescretVariable? The name of the variable is known.

近期文章

  • 如何在上下文中针对所有规格在银杏中初始化数据?
  • UUID的Base 64编码-用作访问令牌
  • SQL 2008 有多列,只需要其中的两列进行列转行
  • Boost Note 的全新版本(β版)体验如何?
  • 安卓时间段选择控件(类似快递上门取件的时间选择)
  • 求指教,这个安卓app工作量大吗?工作周期多久?
  • 微信小程序点击按钮不跳转页面怎么办?
  • springsecurity免密码登录
  • 使用Client.Do时在封闭的正文上无效读取
  • googleapi:错误400:错误的请求,失败前提条件
  • “ [HTTP] http:多个响应。WriteHeader调用”错误
  • 身份验证问题和glog无法打印日志
  • 从github导入使用本机C代码的go软件包
  • 如何从gin gonic中的POST负载读取变量?
  • 捕获S3文件下载的开始和结束时间以及其他详细信息
  • Golang中的MySQL分片
  • 从Windows交叉编译到Linux时出错?
  • 使用动态键解组json [重复]
  • 使用限制和带有参数化的子查询在mysql5.7中不起作用,并且在mysql 5.6中很好
  • QML QT的grabToImage获取图像字节

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华