Skip to content

Commit

Permalink
Run make fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
louischan-oursky committed May 13, 2024
1 parent 1495eaa commit 687ac4d
Show file tree
Hide file tree
Showing 119 changed files with 241 additions and 122 deletions.
1 change: 1 addition & 0 deletions cmd/authgear/background/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package background

import (
"context"

"github.com/google/wire"

"github.com/authgear/authgear-server/pkg/lib/config"
Expand Down
3 changes: 2 additions & 1 deletion cmd/portal/analytic/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ package analytic
import (
"context"

"github.com/google/wire"

"github.com/authgear/authgear-server/pkg/lib/analytic"
"github.com/authgear/authgear-server/pkg/lib/config"
"github.com/authgear/authgear-server/pkg/lib/infra/db"
"github.com/authgear/authgear-server/pkg/lib/infra/redis"
"github.com/authgear/authgear-server/pkg/util/clock"
"github.com/authgear/authgear-server/pkg/util/periodical"
"github.com/google/wire"
)

func NewUserWeeklyReport(
Expand Down
1 change: 1 addition & 0 deletions cmd/portal/cmd/cmdanalytic/posthog.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmdanalytic

import (
"context"

"github.com/spf13/cobra"

"github.com/authgear/authgear-server/cmd/portal/analytic"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"fmt"
"log"

portalcmd "github.com/authgear/authgear-server/cmd/portal/cmd"
"github.com/authgear/authgear-server/cmd/portal/internal"
"github.com/spf13/cobra"
"sigs.k8s.io/yaml"

portalcmd "github.com/authgear/authgear-server/cmd/portal/cmd"
"github.com/authgear/authgear-server/cmd/portal/internal"
)

var cmdInternalMigrateRemoveIsFirstParty = &cobra.Command{
Expand Down
1 change: 1 addition & 0 deletions cmd/portal/server/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package server

import (
"context"

"github.com/google/wire"

"github.com/authgear/authgear-server/pkg/lib/config"
Expand Down
3 changes: 2 additions & 1 deletion cmd/portal/usage/deps.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package usage

import (
"github.com/google/wire"

"github.com/authgear/authgear-server/pkg/lib/config"
"github.com/authgear/authgear-server/pkg/lib/infra/db/auditdb"
"github.com/authgear/authgear-server/pkg/lib/infra/db/globaldb"
"github.com/authgear/authgear-server/pkg/lib/infra/redis/analyticredis"
"github.com/authgear/authgear-server/pkg/lib/meter"
"github.com/authgear/authgear-server/pkg/lib/usage"
"github.com/authgear/authgear-server/pkg/util/cobrasentry"
"github.com/google/wire"
)

func NewGlobalDatabaseCredentials(dbCredentials *config.DatabaseCredentials) *config.GlobalDatabaseCredentialsEnvironmentConfig {
Expand Down
3 changes: 2 additions & 1 deletion cmd/portal/usage/wire.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ import (

"github.com/getsentry/sentry-go"

"github.com/google/wire"

"github.com/authgear/authgear-server/pkg/lib/config"
"github.com/authgear/authgear-server/pkg/lib/infra/db"
"github.com/authgear/authgear-server/pkg/lib/infra/redis"
"github.com/authgear/authgear-server/pkg/lib/usage"
"github.com/google/wire"
)

func NewCountCollector(
Expand Down
3 changes: 2 additions & 1 deletion e2e/cmd/e2e/cmd/configsource.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cmd

import (
e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
"github.com/spf13/cobra"

e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion e2e/cmd/e2e/cmd/execsql.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package cmd

import (
e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
"github.com/spf13/cobra"

e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion e2e/cmd/e2e/cmd/otp.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package cmd
import (
"fmt"

e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
"github.com/spf13/cobra"

e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
)

func init() {
Expand Down
3 changes: 2 additions & 1 deletion e2e/cmd/e2e/cmd/userimport.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package cmd
import (
"os"

e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
"github.com/spf13/cobra"

e2e "github.com/authgear/authgear-server/e2e/cmd/e2e/pkg"
)

func init() {
Expand Down
5 changes: 3 additions & 2 deletions e2e/cmd/e2e/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import (
"log"
"os"

cmd "github.com/authgear/authgear-server/e2e/cmd/e2e/cmd"
"github.com/authgear/authgear-server/pkg/util/debug"
"github.com/joho/godotenv"
_ "go.uber.org/automaxprocs"

cmd "github.com/authgear/authgear-server/e2e/cmd/e2e/cmd"
"github.com/authgear/authgear-server/pkg/util/debug"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion e2e/cmd/e2e/pkg/deps.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package e2e
import (
"net/http"

"github.com/google/wire"

deps "github.com/authgear/authgear-server/pkg/lib/deps"
"github.com/authgear/authgear-server/pkg/util/httputil"
"github.com/google/wire"
)

func ProvideEnd2EndHTTPRequest() *http.Request {
Expand Down
5 changes: 3 additions & 2 deletions e2e/cmd/proxy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ import (
"os/signal"
"time"

"github.com/authgear/authgear-server/e2e/cmd/proxy/mockoidc"
"github.com/authgear/authgear-server/e2e/cmd/proxy/modifier"
"github.com/google/martian"
"github.com/google/martian/httpspec"
"github.com/google/martian/mitm"

"github.com/authgear/authgear-server/e2e/cmd/proxy/mockoidc"
"github.com/authgear/authgear-server/e2e/cmd/proxy/modifier"
)

func main() {
Expand Down
3 changes: 2 additions & 1 deletion e2e/cmd/proxy/modifier/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"net/http"
"net/url"

"github.com/authgear/authgear-server/e2e/cmd/proxy/mockoidc"
"github.com/google/martian/parse"

"github.com/authgear/authgear-server/e2e/cmd/proxy/mockoidc"
)

func init() {
Expand Down
1 change: 1 addition & 0 deletions e2e/pkg/testrunner/testcase.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
texttemplate "text/template"

"github.com/Masterminds/sprig"

authflowclient "github.com/authgear/authgear-server/e2e/pkg/e2eclient"
"github.com/authgear/authgear-server/pkg/util/httputil"
)
Expand Down
3 changes: 2 additions & 1 deletion pkg/admin/graphql/group_mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package graphql
import (
relay "github.com/authgear/graphql-go-relay"

"github.com/graphql-go/graphql"

"github.com/authgear/authgear-server/pkg/api/apierrors"
"github.com/authgear/authgear-server/pkg/api/event/nonblocking"
"github.com/authgear/authgear-server/pkg/api/model"
"github.com/authgear/authgear-server/pkg/lib/rolesgroups"
"github.com/authgear/authgear-server/pkg/util/graphqlutil"
"github.com/authgear/authgear-server/pkg/util/slice"
"github.com/graphql-go/graphql"
)

var createGroupInput = graphql.NewInputObject(graphql.InputObjectConfig{
Expand Down
3 changes: 2 additions & 1 deletion pkg/admin/graphql/group_role_mutation.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package graphql

import (
"github.com/graphql-go/graphql"

"github.com/authgear/authgear-server/pkg/api/event/nonblocking"
"github.com/authgear/authgear-server/pkg/api/model"
"github.com/authgear/authgear-server/pkg/lib/rolesgroups"
"github.com/authgear/authgear-server/pkg/util/graphqlutil"
"github.com/authgear/authgear-server/pkg/util/slice"
"github.com/graphql-go/graphql"
)

var addRoleToGroupsInput = graphql.NewInputObject(graphql.InputObjectConfig{
Expand Down
5 changes: 3 additions & 2 deletions pkg/admin/graphql/group_user_mutation.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package graphql

import (
relay "github.com/authgear/graphql-go-relay"
"github.com/graphql-go/graphql"

"github.com/authgear/authgear-server/pkg/api/apierrors"
"github.com/authgear/authgear-server/pkg/api/event/nonblocking"
"github.com/authgear/authgear-server/pkg/api/model"
"github.com/authgear/authgear-server/pkg/lib/rolesgroups"
"github.com/authgear/authgear-server/pkg/util/graphqlutil"
"github.com/authgear/authgear-server/pkg/util/slice"
relay "github.com/authgear/graphql-go-relay"
"github.com/graphql-go/graphql"
)

var addGroupToUsersInput = graphql.NewInputObject(graphql.InputObjectConfig{
Expand Down
3 changes: 2 additions & 1 deletion pkg/admin/graphql/role_mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ package graphql
import (
relay "github.com/authgear/graphql-go-relay"

"github.com/graphql-go/graphql"

"github.com/authgear/authgear-server/pkg/api/apierrors"
"github.com/authgear/authgear-server/pkg/api/event/nonblocking"
"github.com/authgear/authgear-server/pkg/api/model"
"github.com/authgear/authgear-server/pkg/lib/rolesgroups"
"github.com/authgear/authgear-server/pkg/util/graphqlutil"
"github.com/authgear/authgear-server/pkg/util/slice"
"github.com/graphql-go/graphql"
)

var createRoleInput = graphql.NewInputObject(graphql.InputObjectConfig{
Expand Down
5 changes: 3 additions & 2 deletions pkg/admin/graphql/role_user_mutation.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package graphql

import (
relay "github.com/authgear/graphql-go-relay"
"github.com/graphql-go/graphql"

"github.com/authgear/authgear-server/pkg/api/apierrors"
"github.com/authgear/authgear-server/pkg/api/event/nonblocking"
"github.com/authgear/authgear-server/pkg/api/model"
"github.com/authgear/authgear-server/pkg/lib/rolesgroups"
"github.com/authgear/authgear-server/pkg/util/graphqlutil"
"github.com/authgear/authgear-server/pkg/util/slice"
relay "github.com/authgear/graphql-go-relay"
"github.com/graphql-go/graphql"
)

var addRoleToUsersInput = graphql.NewInputObject(graphql.InputObjectConfig{
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/model/siwe.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"encoding/hex"
"fmt"

"github.com/authgear/authgear-server/pkg/util/web3"
"github.com/ethereum/go-ethereum/crypto"

"github.com/authgear/authgear-server/pkg/util/web3"
)

type SIWEPublicKey string
Expand Down
3 changes: 2 additions & 1 deletion pkg/api/model/siwe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"crypto/rand"
"testing"

"github.com/authgear/authgear-server/pkg/api/model"
. "github.com/smartystreets/goconvey/convey"

"github.com/authgear/authgear-server/pkg/api/model"

"github.com/ethereum/go-ethereum/crypto"
)

Expand Down
3 changes: 2 additions & 1 deletion pkg/auth/handler/api/authenticationflow_v1_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"net/http"
"net/url"

"github.com/iawaknahc/jsonschema/pkg/jsonpointer"

"github.com/authgear/authgear-server/pkg/api"
authflow "github.com/authgear/authgear-server/pkg/lib/authenticationflow"
"github.com/authgear/authgear-server/pkg/lib/infra/redis/appredis"
Expand All @@ -17,7 +19,6 @@ import (
"github.com/authgear/authgear-server/pkg/util/log"
"github.com/authgear/authgear-server/pkg/util/slice"
"github.com/authgear/authgear-server/pkg/util/validation"
"github.com/iawaknahc/jsonschema/pkg/jsonpointer"
)

func ConfigureAuthenticationFlowV1CreateRoute(route httproute.Route) httproute.Route {
Expand Down
3 changes: 2 additions & 1 deletion pkg/auth/handler/webapp/authflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"net/url"
"strconv"

"github.com/iawaknahc/jsonschema/pkg/jsonpointer"

"github.com/authgear/authgear-server/pkg/api"
"github.com/authgear/authgear-server/pkg/api/apierrors"
"github.com/authgear/authgear-server/pkg/api/model"
Expand All @@ -24,7 +26,6 @@ import (
"github.com/authgear/authgear-server/pkg/util/httputil"
"github.com/authgear/authgear-server/pkg/util/log"
"github.com/authgear/authgear-server/pkg/util/setutil"
"github.com/iawaknahc/jsonschema/pkg/jsonpointer"
)

//go:generate mockgen -source=authflow_controller.go -destination=authflow_controller_mock_test.go -package webapp
Expand Down
3 changes: 2 additions & 1 deletion pkg/auth/handler/webapp/authflow_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import (
"net/http"
"net/url"

"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"

"github.com/authgear/authgear-server/pkg/auth/handler/webapp/viewmodels"
"github.com/authgear/authgear-server/pkg/auth/webapp"
authflow "github.com/authgear/authgear-server/pkg/lib/authenticationflow"
Expand All @@ -14,7 +16,6 @@ import (
"github.com/authgear/authgear-server/pkg/util/httputil"
"github.com/authgear/authgear-server/pkg/util/template"
"github.com/authgear/authgear-server/pkg/util/validation"
"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"
)

var TemplateWebAuthflowLoginHTML = template.RegisterHTML(
Expand Down
3 changes: 2 additions & 1 deletion pkg/auth/handler/webapp/authflow_promote.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ import (
"net/http"
"net/url"

"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"

"github.com/authgear/authgear-server/pkg/auth/handler/webapp/viewmodels"
"github.com/authgear/authgear-server/pkg/auth/webapp"
authflow "github.com/authgear/authgear-server/pkg/lib/authenticationflow"
"github.com/authgear/authgear-server/pkg/util/httproute"
"github.com/authgear/authgear-server/pkg/util/template"
"github.com/authgear/authgear-server/pkg/util/validation"
"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"
)

var TemplateWebAuthflowPromoteHTML = template.RegisterHTML(
Expand Down
3 changes: 2 additions & 1 deletion pkg/auth/handler/webapp/authflow_signup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"net/http"
"net/url"

"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"

"github.com/authgear/authgear-server/pkg/auth/handler/webapp/viewmodels"
"github.com/authgear/authgear-server/pkg/auth/webapp"
authflow "github.com/authgear/authgear-server/pkg/lib/authenticationflow"
Expand All @@ -13,7 +15,6 @@ import (
"github.com/authgear/authgear-server/pkg/util/httputil"
"github.com/authgear/authgear-server/pkg/util/template"
"github.com/authgear/authgear-server/pkg/util/validation"
"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"
)

var TemplateWebAuthflowSignupHTML = template.RegisterHTML(
Expand Down
3 changes: 2 additions & 1 deletion pkg/auth/handler/webapp/authflowv2/internal_signup_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import (
"fmt"
"net/http"

"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"

handlerwebapp "github.com/authgear/authgear-server/pkg/auth/handler/webapp"
v2viewmodels "github.com/authgear/authgear-server/pkg/auth/handler/webapp/authflowv2/viewmodels"
"github.com/authgear/authgear-server/pkg/auth/handler/webapp/viewmodels"
Expand All @@ -14,7 +16,6 @@ import (
"github.com/authgear/authgear-server/pkg/util/httputil"
"github.com/authgear/authgear-server/pkg/util/template"
"github.com/authgear/authgear-server/pkg/util/validation"
"github.com/authgear/oauthrelyingparty/pkg/api/oauthrelyingparty"
)

var TemplateWebAuthflowV2SignupHTML = template.RegisterHTML(
Expand Down
Loading

0 comments on commit 687ac4d

Please sign in to comment.