Skip to content

Commit

Permalink
fix: remove lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ravisuhag committed Nov 26, 2024
1 parent 83f5052 commit 1f0808e
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 120 deletions.
49 changes: 25 additions & 24 deletions auth/audit/audit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package audit_test
import (
"context"
"errors"
audit2 "github.com/raystack/salt/auth/audit"
"github.com/raystack/salt/auth/audit/mocks"
"testing"
"time"

"github.com/raystack/salt/auth/audit"
"github.com/raystack/salt/auth/audit/mocks"

"github.com/stretchr/testify/mock"
"github.com/stretchr/testify/suite"
)
Expand All @@ -18,24 +19,24 @@ type AuditTestSuite struct {
now time.Time

mockRepository *mocks.Repository
service *audit2.Service
service *audit.Service
}

func (s *AuditTestSuite) setupTest() {
s.mockRepository = new(mocks.Repository)
s.service = audit2.New(
audit2.WithMetadataExtractor(func(context.Context) map[string]interface{} {
s.service = audit.New(
audit.WithMetadataExtractor(func(context.Context) map[string]interface{} {
return map[string]interface{}{
"trace_id": "test-trace-id",
"app_name": "guardian_test",
"app_version": 1,
}
}),
audit2.WithRepository(s.mockRepository),
audit.WithRepository(s.mockRepository),
)

s.now = time.Now()
audit2.TimeNow = func() time.Time {
audit.TimeNow = func() time.Time {
return s.now
}
}
Expand All @@ -48,7 +49,7 @@ func (s *AuditTestSuite) TestLog() {
s.Run("should insert to repository", func() {
s.setupTest()

s.mockRepository.On("Insert", mock.Anything, &audit2.Log{
s.mockRepository.On("Insert", mock.Anything, &audit.Log{
Timestamp: s.now,
Action: "action",
Actor: "[email protected]",
Expand All @@ -61,23 +62,23 @@ func (s *AuditTestSuite) TestLog() {
}).Return(nil)

ctx := context.Background()
ctx = audit2.WithActor(ctx, "[email protected]")
ctx = audit.WithActor(ctx, "[email protected]")
err := s.service.Log(ctx, "action", map[string]interface{}{"foo": "bar"})
s.NoError(err)
})

s.Run("actor extractor", func() {
s.Run("should use actor extractor if option given", func() {
expectedActor := "test-actor"
s.service = audit2.New(
audit2.WithActorExtractor(func(ctx context.Context) (string, error) {
s.service = audit.New(
audit.WithActorExtractor(func(ctx context.Context) (string, error) {
return expectedActor, nil
}),
audit2.WithRepository(s.mockRepository),
audit.WithRepository(s.mockRepository),
)

s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
log := args.Get(1).(*audit2.Log)
log := args.Get(1).(*audit.Log)
s.Equal(expectedActor, log.Actor)
}).Return(nil).Once()

Expand All @@ -87,8 +88,8 @@ func (s *AuditTestSuite) TestLog() {

s.Run("should return error if extractor returns error", func() {
expectedError := errors.New("test error")
s.service = audit2.New(
audit2.WithActorExtractor(func(ctx context.Context) (string, error) {
s.service = audit.New(
audit.WithActorExtractor(func(ctx context.Context) (string, error) {
return "", expectedError
}),
)
Expand All @@ -100,18 +101,18 @@ func (s *AuditTestSuite) TestLog() {

s.Run("metadata", func() {
s.Run("should pass empty trace id if extractor not found", func() {
s.service = audit2.New(
audit2.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
s.service = audit.New(
audit.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
return map[string]interface{}{
"app_name": "guardian_test",
"app_version": 1,
}
}),
audit2.WithRepository(s.mockRepository),
audit.WithRepository(s.mockRepository),
)

s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
l := args.Get(1).(*audit2.Log)
l := args.Get(1).(*audit.Log)
s.IsType(map[string]interface{}{}, l.Metadata)

md := l.Metadata.(map[string]interface{})
Expand All @@ -125,25 +126,25 @@ func (s *AuditTestSuite) TestLog() {
})

s.Run("should append new metadata to existing one", func() {
s.service = audit2.New(
audit2.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
s.service = audit.New(
audit.WithMetadataExtractor(func(ctx context.Context) map[string]interface{} {
return map[string]interface{}{
"existing": "foobar",
}
}),
audit2.WithRepository(s.mockRepository),
audit.WithRepository(s.mockRepository),
)

expectedMetadata := map[string]interface{}{
"existing": "foobar",
"new": "foobar",
}
s.mockRepository.On("Insert", mock.Anything, mock.Anything).Run(func(args mock.Arguments) {
log := args.Get(1).(*audit2.Log)
log := args.Get(1).(*audit.Log)
s.Equal(expectedMetadata, log.Metadata)
}).Return(nil).Once()

ctx, err := audit2.WithMetadata(context.Background(), map[string]interface{}{
ctx, err := audit.WithMetadata(context.Background(), map[string]interface{}{
"new": "foobar",
})
s.Require().NoError(err)
Expand Down
3 changes: 2 additions & 1 deletion auth/audit/repositories/dockertest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"database/sql"
"fmt"
"github.com/raystack/salt/auth/audit/repositories"
"time"

"github.com/raystack/salt/auth/audit/repositories"

_ "github.com/lib/pq"
"github.com/ory/dockertest/v3"
"github.com/ory/dockertest/v3/docker"
Expand Down
3 changes: 2 additions & 1 deletion auth/audit/repositories/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"database/sql"
"encoding/json"
"fmt"
"github.com/raystack/salt/auth/audit"
"time"

"github.com/raystack/salt/auth/audit"

"github.com/jmoiron/sqlx/types"
)

Expand Down
5 changes: 3 additions & 2 deletions auth/audit/repositories/postgres_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package repositories_test

import (
"context"
"github.com/raystack/salt/auth/audit"
"github.com/raystack/salt/auth/audit/repositories"
"testing"
"time"

"github.com/raystack/salt/auth/audit"
"github.com/raystack/salt/auth/audit/repositories"

"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/jmoiron/sqlx/types"
Expand Down
3 changes: 2 additions & 1 deletion cli/cmdx/ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package cmdx
import (
"bytes"
"fmt"
"github.com/raystack/salt/cli/printer"
"io"
"strings"

"github.com/raystack/salt/cli/printer"

"github.com/spf13/cobra"
)

Expand Down
3 changes: 2 additions & 1 deletion cli/printer/spinner.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package printer

import (
"github.com/raystack/salt/cli/terminal"
"time"

"github.com/raystack/salt/cli/terminal"

"github.com/briandowns/spinner"
)

Expand Down
14 changes: 2 additions & 12 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ require (
github.com/google/go-cmp v0.6.0
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
github.com/google/uuid v1.6.0
github.com/goto/salt v0.3.7
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0
github.com/hashicorp/go-version v1.3.0
github.com/jeremywohl/flatten v1.0.1
github.com/jmoiron/sqlx v1.3.5
Expand All @@ -33,7 +29,6 @@ require (
github.com/pkg/errors v0.9.1
github.com/schollz/progressbar/v3 v3.8.5
github.com/sirupsen/logrus v1.9.2
github.com/soheilhy/cmux v0.1.5
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.19.0
Expand Down Expand Up @@ -66,10 +61,8 @@ require (
github.com/alecthomas/chroma v0.8.2 // indirect
github.com/alecthomas/repr v0.2.0 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/containerd/continuity v0.3.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 // indirect
Expand All @@ -94,6 +87,8 @@ require (
github.com/google/s2a-go v0.1.7 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
Expand All @@ -106,7 +101,6 @@ require (
github.com/magiconair/properties v1.8.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect
github.com/microcosm-cc/bluemonday v1.0.6 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
Expand All @@ -118,10 +112,6 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/prometheus/client_golang v1.17.0 // indirect
github.com/prometheus/client_model v0.6.0 // indirect
github.com/prometheus/common v0.44.0 // indirect
github.com/prometheus/procfs v0.11.1 // indirect
github.com/rivo/uniseg v0.2.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
Expand Down
25 changes: 1 addition & 24 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,13 @@ github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuP
github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/briandowns/spinner v1.18.0 h1:SJs0maNOs4FqhBwiJ3Gr7Z1D39/rukIVGQvpNZVHVcM=
github.com/briandowns/spinner v1.18.0/go.mod h1:QOuQk7x+EaDASo80FEXwlwiA+j/PPIcX3FScO+3/ZPQ=
github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d h1:S2NE3iHSwP0XV47EEXL8mWmRdEfGscSJ+7EgePNgt0s=
github.com/certifi/gocertifi v0.0.0-20210507211836-431795d63e8d/go.mod h1:sGbDF6GwGcLpkNXPUTkMRoywsNa/ol15pxFe6ERfguA=
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/charmbracelet/glamour v0.3.0 h1:3H+ZrKlSg8s+WU6V7eF2eRVYt8lCueffbi7r2+ffGkc=
github.com/charmbracelet/glamour v0.3.0/go.mod h1:TzF0koPZhqq0YVBNL100cPHznAAjVj7fksX2RInwjGw=
github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E=
Expand Down Expand Up @@ -163,12 +159,8 @@ github.com/googleapis/gax-go/v2 v2.12.3 h1:5/zPPDvw8Q1SuXjrqrZslrqT7dL/uJT2CQii/
github.com/googleapis/gax-go/v2 v2.12.3/go.mod h1:AKloxT6GtNbaLm8QTNSidHUVsHYcBHwWRvkNFJUQcS4=
github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY=
github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c=
github.com/goto/salt v0.3.7 h1:XwnKDEMXkYhStcyLtw7SjHg4TRseRt5OSqOV8DUqfBI=
github.com/goto/salt v0.3.7/go.mod h1:KR7LfsHQY3ae1iBEZDOlDrDZQZVRtDNdwpBttrcT5sE=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 h1:UH//fgunKIs4JdUbpDl1VZCDaL56wXCB/5+wF6uHfaI=
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0/go.mod h1:g5qyo/la0ALbONm6Vbp88Yd8NsDy6rZz+RcrMPxvld8=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho=
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
Expand Down Expand Up @@ -233,8 +225,6 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh
github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.16 h1:yOQRA0RpS5PFz/oikGwBEqvAWhWg5ufRz4ETLjwpU1Y=
github.com/mattn/go-sqlite3 v1.14.16/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo=
github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mcuadros/go-defaults v1.2.0 h1:FODb8WSf0uGaY8elWJAkoLL0Ri6AlZ1bFlenk56oZtc=
github.com/mcuadros/go-defaults v1.2.0/go.mod h1:WEZtHEVIGYVDqkKSWBdWKUVdRyKlMfulPaGDWIVeCWY=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
Expand Down Expand Up @@ -283,15 +273,7 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 h1:Jamvg5psRI
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 h1:o4JXh1EVt9k/+g42oCprj/FisM4qX9L3sZB3upGN2ZU=
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
github.com/prometheus/client_golang v1.17.0 h1:rl2sfwZMtSthVU752MqfjQozy7blglC+1SOtjMAMh+Q=
github.com/prometheus/client_golang v1.17.0/go.mod h1:VeL+gMmOAxkS2IqfCq0ZmHSL+LjWfWDUmp1mBz9JgUY=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.6.0 h1:k1v3CzpSRUTrKMppY35TLwPvxHqBu0bYgxZzqGIgaos=
github.com/prometheus/client_model v0.6.0/go.mod h1:NTQHnmxFpouOD0DpvP4XujX3CdOAGQPoaGhyTchlyt8=
github.com/prometheus/common v0.44.0 h1:+5BrQJwiBB9xsMygAB3TNvpQKOwlkc25LbISbrdOOfY=
github.com/prometheus/common v0.44.0/go.mod h1:ofAIvZbQ1e/nugmZGz4/qCb9Ap1VoSTIO7x0VV9VvuY=
github.com/prometheus/procfs v0.11.1 h1:xRC8Iq1yyca5ypa9n1EZnWZkt7dwcoRPQwX/5gwaUuI=
github.com/prometheus/procfs v0.11.1/go.mod h1:eesXgaPo1q7lBpVMoMy0ZOFTth9hBn4W/y0/p/ScXhY=
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
Expand All @@ -307,18 +289,15 @@ github.com/sagikazarmark/slog-shim v0.1.0/go.mod h1:SrcSrq8aKtyuqEI1uvTDTK1arOWR
github.com/schollz/progressbar/v3 v3.8.5 h1:VcmmNRO+eFN3B0m5dta6FXYXY+MEJmXdWoIS+jjssQM=
github.com/schollz/progressbar/v3 v3.8.5/go.mod h1:ewO25kD7ZlaJFTvMeOItkOZa8kXu1UvFs379htE8HMQ=
github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg=
github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shirou/gopsutil/v4 v4.24.9 h1:KIV+/HaHD5ka5f570RZq+2SaeFsb/pq+fp2DGNWYoOI=
github.com/shirou/gopsutil/v4 v4.24.9/go.mod h1:3fkaHNeYsUFCGZ8+9vZVWtbyM1k2eRnlL+bWO8Bxa/Q=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y=
github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/soheilhy/cmux v0.1.5 h1:jjzc5WVemNEDTLwv9tlmemhC73tI08BNOIGwBOo10Js=
github.com/soheilhy/cmux v0.1.5/go.mod h1:T7TcVDs9LWfQgPlPsdngu6I6QIoyIFZDDC6sNE1GqG0=
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
github.com/spf13/afero v1.11.0 h1:WJQKhtpdm3v2IzqG8VMqrr6Rf3UYpEF239Jy9wNepM8=
Expand Down Expand Up @@ -444,7 +423,6 @@ golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLL
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM=
Expand All @@ -456,7 +434,6 @@ golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA=
golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
2 changes: 1 addition & 1 deletion telemetry/opentelemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"time"

"github.com/goto/salt/log"
"github.com/raystack/salt/log"
"go.opentelemetry.io/contrib/instrumentation/host"
"go.opentelemetry.io/contrib/instrumentation/runtime"
"go.opentelemetry.io/contrib/samplers/probability/consistent"
Expand Down
4 changes: 2 additions & 2 deletions telemetry/otelgrpc/otelgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"time"

"github.com/goto/salt/utils"
"github.com/raystack/salt/utils"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
Expand All @@ -30,7 +30,7 @@ type Meter struct {
attributes []attribute.KeyValue
}
type MeterOpts struct {
meterName string `default:"github.com/goto/salt/telemetry/otelgrpc"`
meterName string `default:"github.com/raystack/salt/telemetry/otelgrpc"`
}
type Option func(*MeterOpts)

Expand Down
Loading

0 comments on commit 1f0808e

Please sign in to comment.