Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
mwear committed Mar 1, 2023
1 parent ee5bbbd commit 14e6efa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions sdk/resource/host_id.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package resource
package resource // import "go.opentelemetry.io/otel/sdk/resource"

import (
"context"
Expand Down Expand Up @@ -42,6 +42,7 @@ type hostIDReader interface {

type fileReader func(string) (string, error)

// nolint:unused // commandExecutor is used on darwin and BSD, but excluded on linux where the lint job runs
type commandExecutor func(string, ...string) (string, error)

func readFile(filename string) (string, error) {
Expand All @@ -53,6 +54,7 @@ func readFile(filename string) (string, error) {
return string(b), nil
}

// nolint:unused // execCommand is used on darwin and BSD, but excluded on linux where the lint job runs
func execCommand(name string, arg ...string) (string, error) {
cmd := exec.Command(name, arg...)
b, err := cmd.Output()
Expand All @@ -65,7 +67,7 @@ func execCommand(name string, arg ...string) (string, error) {

type hostIDDetector struct{}

// Detect returns a *Resource containing the platform specific host id
// Detect returns a *Resource containing the platform specific host id.
func (hostIDDetector) Detect(ctx context.Context) (*Resource, error) {
hostID, err := hostID()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion sdk/resource/host_id_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package resource
package resource // import "go.opentelemetry.io/otel/sdk/resource"

import (
"errors"
Expand Down

0 comments on commit 14e6efa

Please sign in to comment.