Method receiver 'f' is not referenced in method's body, consider removing it
53}
54
55// Description is auto-generated description, based on output of https://github.com/graphite-project/graphite-web
56func (f *aliasByNode) Description() map[string]types.FunctionDescription { 57 return map[string]types.FunctionDescription{
58 "aliasByNode": {
59 Description: "Takes a seriesList and applies an alias derived from one or more \"node\"\nportion/s of the target name or tags. Node indices are 0 indexed.\n\n.. code-block:: none\n\n &target=aliasByNode(ganglia.*.cpu.load5,1)\n\nEach node may be an integer referencing a node in the series name or a string identifying a tag.\n\n.. code-block :: none\n\n &target=seriesByTag(\"name=~cpu.load.*\", \"server=~server[1-9}+\", \"datacenter=dc1\")|aliasByNode(\"datacenter\", \"server\", 1)\n\n # will produce output series like\n # dc1.server1.load5, dc1.server2.load5, dc1.server1.load10, dc1.server2.load10",
Method receiver 'f' is not referenced in method's body, consider removing it
26 return res
27}
28
29func (f *aliasByNode) Do(ctx context.Context, e parser.Expr, from, until int64, values map[parser.MetricRequest][]*types.MetricData) ([]*types.MetricData, error) { 30 if e.ArgsLen() < 2 {
31 return nil, parser.ErrMissingArgument
32 }
Description
Methods with unused receivers can be a symptom of unfinished refactoring or a bug. To keep the same method signature, omit the receiver name or '_' as it is unused.
Bad practice
func (f *Unix) Name() string {
return "unix"
}
func (_ *Unix) Name() string {
return "unix"
}
Recommended
func (*Unix) Name() string {
return "unix"
}