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

在Go中编译时间反射

I am doing an inventory of all log statements in my Go application. Since the log statements will contain just variable names, a simple grep is not of use. I want to identify the variable "type" in each log statement and if its a struct, the field names in that struct. I want to write a script to do this.

Is it possible to extract such information using reflections or by any other means in Go?

近期文章

  • 创建不带标题的zip文件
  • “ dep init -v”,它不生成Gopkg.toml和Gopkg.lock,为什么?
  • 如何更改json对象数组的字段名称
  • 为什么f1.Read(buf)不将内容读出到buf?
  • 尝试在Windows 10上为Linux构建Go代码时出错
  • Go中无缓冲的输入管理器?
  • 从带有gorm的两个表中选择
  • 如何使用循环内返回的值更新for循环条件?
  • 无法实例化对等点上的链码,连接被对等点重置
  • Kubernetes活力探测器停止响应
  • 在没有OEF的情况下使用扫描仪读取stdin
  • 将自定义运输添加到第三方程序包
  • 通过中间件配置时,如何允许Buffalo(gobuffalo)中间件的skip()方法?
  • 如何在golang中获取mongodb的转储并还原它
  • 隔离字符串输出
  • 嵌套结构
  • go-plus atom软件包无法运行goimports
  • 大猩猩使用包装器会话cookie使用
  • 使用Go在Linux中以编程方式安全地安装网络位置
  • 使用tivo / tview GoLang库时获取实际的Form值

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

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

友情链接:代码精华