Skip to content

Commit

Permalink
Fix linter warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
swiatekm committed Sep 27, 2024
1 parent b360671 commit b910b89
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
10 changes: 6 additions & 4 deletions kubernetes/metadata/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ func NewNamespaceMetadataGenerator(cfg *config.C, namespaces cache.Store, client

// Generate generates pod metadata from a resource object
// Metadata map is in the following form:
// {
// "kubernetes": {},
// "some.ecs.field": "asdf"
// }
//
// {
// "kubernetes": {},
// "some.ecs.field": "asdf"
// }
//
// All Kubernetes fields that need to be stored under kuberentes. prefix are populetad by
// GenerateK8s method while fields that are part of ECS are generated by GenerateECS method
func (n *namespace) Generate(obj kubernetes.Resource, opts ...FieldOptions) mapstr.M {
Expand Down
10 changes: 6 additions & 4 deletions kubernetes/metadata/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ func NewNodeMetadataGenerator(cfg *config.C, nodes cache.Store, client k8s.Inter

// Generate generates node metadata from a resource object
// Metadata map is in the following form:
// {
// "kubernetes": {},
// "some.ecs.field": "asdf"
// }
//
// {
// "kubernetes": {},
// "some.ecs.field": "asdf"
// }
//
// All Kubernetes fields that need to be stored under kuberentes. prefix are populetad by
// GenerateK8s method while fields that are part of ECS are generated by GenerateECS method
func (n *node) Generate(obj kubernetes.Resource, opts ...FieldOptions) mapstr.M {
Expand Down
5 changes: 3 additions & 2 deletions kubernetes/metadata/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
package metadata

import (
"github.com/elastic/elastic-agent-autodiscover/kubernetes"
"k8s.io/apimachinery/pkg/api/meta"
"regexp"
"strings"

"github.com/elastic/elastic-agent-autodiscover/kubernetes"
"k8s.io/apimachinery/pkg/api/meta"

k8s "k8s.io/client-go/kubernetes"

"github.com/elastic/elastic-agent-autodiscover/utils"
Expand Down

0 comments on commit b910b89

Please sign in to comment.