Skip to content

Commit

Permalink
Fix lint errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
dplepage-dd committed Jan 13, 2025
1 parent 1396ef2 commit 052a036
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2016-present Datadog, Inc.

// Package cmd implements a cobra command for validating and normalizing profiles.
package cmd

import (
Expand Down Expand Up @@ -55,6 +56,7 @@ var rootCmd = &cobra.Command{
},
}

// GetProfile parses a profile from a file path and validates it.
func GetProfile(filePath string) (*profiledefinition.ProfileDefinition, []string) {
buf, err := os.ReadFile(filePath)
if err != nil {
Expand All @@ -72,6 +74,7 @@ func GetProfile(filePath string) (*profiledefinition.ProfileDefinition, []string
return def, nil
}

// WriteProfile writes a profile to disk.
func WriteProfile(def *profiledefinition.ProfileDefinition, name string, outdir string, useJSON bool) error {
if outdir == "" {
return nil
Expand Down Expand Up @@ -108,6 +111,7 @@ func WriteProfile(def *profiledefinition.ProfileDefinition, name string, outdir
return nil
}

// Execute runs the command.
func Execute() {
err := rootCmd.Execute()
if err != nil {
Expand Down

0 comments on commit 052a036

Please sign in to comment.