Skip to content

Commit

Permalink
Fix gci
Browse files Browse the repository at this point in the history
Signed-off-by: WashingtonKK <washingtonkigan@gmail.com>
  • Loading branch information
WashingtonKK committed Aug 10, 2023
1 parent 6a45d30 commit 9ee3fde
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 32 deletions.
5 changes: 2 additions & 3 deletions cmd/bootstrap/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import (
"log"
"os"

"github.com/go-redis/redis/v8"
"github.com/jmoiron/sqlx"
chclient "github.com/mainflux/callhome/pkg/client"
"github.com/mainflux/mainflux"
"github.com/mainflux/mainflux/bootstrap"
Expand All @@ -33,9 +35,6 @@ import (
"github.com/mainflux/mainflux/users/policies"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"

"github.com/go-redis/redis/v8"
"github.com/jmoiron/sqlx"
)

const (
Expand Down
1 change: 0 additions & 1 deletion cmd/http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import (
"github.com/mainflux/mainflux/pkg/uuid"
"github.com/mainflux/mainflux/things/policies"
"go.opentelemetry.io/otel/trace"

"golang.org/x/sync/errgroup"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/lora/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ import (
"github.com/mainflux/mainflux/lora"
"github.com/mainflux/mainflux/lora/api"
"github.com/mainflux/mainflux/lora/mqtt"
loraredis "github.com/mainflux/mainflux/lora/redis"
"github.com/mainflux/mainflux/pkg/messaging"
"github.com/mainflux/mainflux/pkg/messaging/brokers"
"github.com/mainflux/mainflux/pkg/messaging/tracing"
"github.com/mainflux/mainflux/pkg/uuid"
"golang.org/x/sync/errgroup"
loraredis "github.com/mainflux/mainflux/lora/redis"
)

const (
Expand Down
15 changes: 7 additions & 8 deletions cmd/smpp-notifier/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,23 @@ import (
"github.com/mainflux/mainflux/consumers/notifiers"
"github.com/mainflux/mainflux/consumers/notifiers/api"
notifierpg "github.com/mainflux/mainflux/consumers/notifiers/postgres"
"github.com/mainflux/mainflux/internal"
"github.com/mainflux/mainflux/internal/env"
"github.com/mainflux/mainflux/internal/server"
httpserver "github.com/mainflux/mainflux/internal/server/http"
"github.com/mainflux/mainflux/users/policies"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"

mfsmpp "github.com/mainflux/mainflux/consumers/notifiers/smpp"
"github.com/mainflux/mainflux/consumers/notifiers/tracing"
"github.com/mainflux/mainflux/internal"
authclient "github.com/mainflux/mainflux/internal/clients/grpc/auth"
jaegerclient "github.com/mainflux/mainflux/internal/clients/jaeger"
pgclient "github.com/mainflux/mainflux/internal/clients/postgres"
"github.com/mainflux/mainflux/internal/env"
"github.com/mainflux/mainflux/internal/server"
httpserver "github.com/mainflux/mainflux/internal/server/http"
mflog "github.com/mainflux/mainflux/logger"
"github.com/mainflux/mainflux/pkg/messaging/brokers"
pstracing "github.com/mainflux/mainflux/pkg/messaging/tracing"
"github.com/mainflux/mainflux/pkg/ulid"
"github.com/mainflux/mainflux/pkg/uuid"
"github.com/mainflux/mainflux/users/policies"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"
)

const (
Expand Down
1 change: 0 additions & 1 deletion cmd/smtp-notifier/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
authclient "github.com/mainflux/mainflux/internal/clients/grpc/auth"
jaegerclient "github.com/mainflux/mainflux/internal/clients/jaeger"
pgclient "github.com/mainflux/mainflux/internal/clients/postgres"

"github.com/mainflux/mainflux/internal/email"
"github.com/mainflux/mainflux/internal/env"
"github.com/mainflux/mainflux/internal/server"
Expand Down
3 changes: 1 addition & 2 deletions cmd/timescale-writer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ import (
"log"
"os"

"github.com/jmoiron/sqlx"
chclient "github.com/mainflux/callhome/pkg/client"
"github.com/mainflux/mainflux"

"github.com/jmoiron/sqlx"
"github.com/mainflux/mainflux/consumers"
consumertracing "github.com/mainflux/mainflux/consumers/tracing"
"github.com/mainflux/mainflux/consumers/writers/api"
Expand Down
5 changes: 2 additions & 3 deletions cmd/ws/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ import (
"log"
"os"

"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"

chclient "github.com/mainflux/callhome/pkg/client"
"github.com/mainflux/mainflux"
"github.com/mainflux/mainflux/internal"
Expand All @@ -30,6 +27,8 @@ import (
adapter "github.com/mainflux/mainflux/ws"
"github.com/mainflux/mainflux/ws/api"
"github.com/mainflux/mainflux/ws/tracing"
"go.opentelemetry.io/otel/trace"
"golang.org/x/sync/errgroup"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion consumers/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ import (
"os"
"strings"

"github.com/pelletier/go-toml"
"github.com/mainflux/mainflux/logger"
"github.com/mainflux/mainflux/pkg/errors"
"github.com/mainflux/mainflux/pkg/messaging"
"github.com/mainflux/mainflux/pkg/messaging/brokers"
"github.com/mainflux/mainflux/pkg/transformers"
"github.com/mainflux/mainflux/pkg/transformers/json"
"github.com/mainflux/mainflux/pkg/transformers/senml"
"github.com/pelletier/go-toml"
)

const (
Expand Down
4 changes: 1 addition & 3 deletions http/api/transport.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,12 @@ import (
kithttp "github.com/go-kit/kit/transport/http"
"github.com/go-zoo/bone"
"github.com/mainflux/mainflux"
"go.opentelemetry.io/contrib/instrumentation/github.com/go-kit/kit/otelkit"

adapter "github.com/mainflux/mainflux/http"
"github.com/mainflux/mainflux/internal/apiutil"
"github.com/mainflux/mainflux/pkg/errors"
"github.com/mainflux/mainflux/pkg/messaging"
"github.com/prometheus/client_golang/prometheus/promhttp"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"
"go.opentelemetry.io/contrib/instrumentation/github.com/go-kit/kit/otelkit"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/sdk/go/certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func (sdk mfSDK) IssueCert(thingID, valid, token string) (Cert, errors.SDKError)
if err := json.Unmarshal(body, &c); err != nil {
return Cert{}, errors.NewSDKError(err)
}

return c, nil
}

Expand Down
10 changes: 5 additions & 5 deletions pkg/sdk/go/groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (sdk mfSDK) CreateGroup(g Group, token string) (Group, errors.SDKError) {
if err := json.Unmarshal(body, &g); err != nil {
return Group{}, errors.NewSDKError(err)
}

return g, nil
}

Expand Down Expand Up @@ -81,7 +81,7 @@ func (sdk mfSDK) Groups(pm PageMetadata, token string) (GroupsPage, errors.SDKEr
if err != nil {
return GroupsPage{}, errors.NewSDKError(err)
}

return sdk.getGroups(url, token)
}

Expand All @@ -91,7 +91,7 @@ func (sdk mfSDK) Parents(id string, pm PageMetadata, token string) (GroupsPage,
if err != nil {
return GroupsPage{}, errors.NewSDKError(err)
}

return sdk.getGroups(url, token)
}

Expand All @@ -101,7 +101,7 @@ func (sdk mfSDK) Children(id string, pm PageMetadata, token string) (GroupsPage,
if err != nil {
return GroupsPage{}, errors.NewSDKError(err)
}

return sdk.getGroups(url, token)
}

Expand All @@ -115,7 +115,7 @@ func (sdk mfSDK) getGroups(url, token string) (GroupsPage, errors.SDKError) {
if err := json.Unmarshal(body, &tp); err != nil {
return GroupsPage{}, errors.NewSDKError(err)
}

return tp, nil
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/sdk/go/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (sdk mfSDK) UpdateUser(user User, token string) (User, errors.SDKError) {
if err := json.Unmarshal(body, &user); err != nil {
return User{}, errors.NewSDKError(err)
}

return user, nil
}

Expand All @@ -161,7 +161,7 @@ func (sdk mfSDK) UpdateUserTags(user User, token string) (User, errors.SDKError)
if err := json.Unmarshal(body, &user); err != nil {
return User{}, errors.NewSDKError(err)
}

return user, nil
}

Expand Down
1 change: 0 additions & 1 deletion things/clients/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func (svc service) ListClients(ctx context.Context, token string, pm mfclients.P
return mfclients.ClientsPage{}, err
}


switch err = svc.checkAdmin(ctx, userID, thingsObjectKey, listRelationKey); err {
// If the user is admin, fetch all things from database.
case nil:
Expand Down

0 comments on commit 9ee3fde

Please sign in to comment.