You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
Fix CPUModeSystem variable name (#7233)
Do not trim a package prefix when it is the same as the package name. Assume the name itself has semantic meaning and will not stutter. Fix #7232
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
{%- endmacro -%}
|
||||
|
||||
{%- macro to_go_name(fqn="", pkg="") -%}
|
||||
{%- if pkg != "" -%}
|
||||
{%- if pkg != "" and fqn != pkg -%}
|
||||
{%- set n = pkg | length -%}
|
||||
{%- if pkg == fqn[:n] -%}
|
||||
{%- set fqn = fqn[n:] -%}
|
||||
|
||||
@@ -25,8 +25,8 @@ type CPUModeAttr string
|
||||
var (
|
||||
// CPUModeUser is the standardized value "user" of CPUModeAttr.
|
||||
CPUModeUser CPUModeAttr = "user"
|
||||
// CPUMode is the standardized value "system" of CPUModeAttr.
|
||||
CPUMode CPUModeAttr = "system"
|
||||
// CPUModeSystem is the standardized value "system" of CPUModeAttr.
|
||||
CPUModeSystem CPUModeAttr = "system"
|
||||
// CPUModeNice is the standardized value "nice" of CPUModeAttr.
|
||||
CPUModeNice CPUModeAttr = "nice"
|
||||
// CPUModeIdle is the standardized value "idle" of CPUModeAttr.
|
||||
|
||||
Reference in New Issue
Block a user