Documentation
¶
Index ¶
Constants ¶
View Source
const ( EnvPrefix = "OTELTOOL_" BuildConfFile = "conf.json" )
Variables ¶
View Source
var ToolVersion = "1.0.0"
@@This value is specified by the build system. This is the version of the tool, which will be printed when the -version flag is passed.
Functions ¶
func InitConfig ¶
func InitConfig() (err error)
func PrintVersion ¶
func PrintVersion() error
Types ¶
type BuildConfig ¶
type BuildConfig struct { // RuleJsonFiles is the name of the rule file. It is used to tell instrument // tool where to find the instrument rules. Multiple rules are separated by // comma. e.g. -rule=rule1.json,rule2.json. By default, new rules are appended // to default rules, i.e. -rule=rule1.json,rule2.json is exactly equivalent to // -rule=default.json,rule1.json,rule2.json. But if you do want to disable // default rules, you can configure -disable flag in advance. RuleJsonFiles string // Verbose true means print verbose log. Verbose bool // Debug true means debug mode. Debug bool // DisableRules specifies which rules to disable. It can be: // - "all" to disable all default rules // - comma-separated list of rule file names to disable specific rules // e.g. "gorm.json,redis.json" // - empty string to enable all default rules // Note that base.json is inevitable to be enabled, even if it is explicitly // disabled. DisableRules string }
func GetConf ¶
func GetConf() *BuildConfig
func (*BuildConfig) GetDisabledRules ¶ added in v0.11.0
func (bc *BuildConfig) GetDisabledRules() string
GetDisabledRules returns a set of rule file names that should be disabled
func (*BuildConfig) IsDisableAll ¶ added in v0.11.0
func (bc *BuildConfig) IsDisableAll() bool
Click to show internal directories.
Click to hide internal directories.