Skip to content

Commit

Permalink
Merge pull request #1828 from Juneezee/refactor/replace-experimental-…
Browse files Browse the repository at this point in the history
…with-stdlib

refactor: replace usages of `golang.org/x/exp` with stdlib
  • Loading branch information
tolgaOzen authored Dec 7, 2024
2 parents 29a86ce + 7f73884 commit 78ddb96
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ require (
go.opentelemetry.io/otel/sdk v1.32.0
go.opentelemetry.io/otel/sdk/metric v1.32.0
go.opentelemetry.io/otel/trace v1.32.0
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56
golang.org/x/net v0.31.0
golang.org/x/sync v0.9.0
google.golang.org/genproto/googleapis/api v0.0.0-20241118233622-e639e219e697
Expand Down Expand Up @@ -104,6 +103,7 @@ require (
github.com/shirou/gopsutil/v4 v4.24.10 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/time v0.7.0 // indirect
google.golang.org/api v0.203.0 // indirect
Expand Down
3 changes: 1 addition & 2 deletions internal/engines/subjectFilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ import (
"context"
"errors"
"fmt"
"slices"
"strings"
"sync"

"github.com/google/cel-go/cel"

"golang.org/x/exp/slices"

"github.com/Permify/permify/internal/schema"
"github.com/Permify/permify/internal/storage"
storageContext "github.com/Permify/permify/internal/storage/context"
Expand Down
3 changes: 1 addition & 2 deletions internal/engines/subjectPermission.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package engines
import (
"context"
"errors"
"slices"
"sync"

"golang.org/x/exp/slices"

"github.com/Permify/permify/internal/invoke"
"github.com/Permify/permify/internal/storage"
base "github.com/Permify/permify/pkg/pb/base/v1"
Expand Down
3 changes: 1 addition & 2 deletions internal/storage/context/attributes.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package context

import (
"slices"
"sort"

"golang.org/x/exp/slices"

"github.com/Permify/permify/internal/storage/context/utils"
"github.com/Permify/permify/pkg/database"
base "github.com/Permify/permify/pkg/pb/base/v1"
Expand Down
3 changes: 1 addition & 2 deletions internal/storage/context/tuples.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package context

import (
"slices"
"sort"

"golang.org/x/exp/slices"

"github.com/Permify/permify/internal/storage/context/utils"
"github.com/Permify/permify/pkg/database"
base "github.com/Permify/permify/pkg/pb/base/v1"
Expand Down
3 changes: 1 addition & 2 deletions internal/storage/context/tuples_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package context

import (
"slices"
"testing"

"golang.org/x/exp/slices"

"github.com/Permify/permify/pkg/database"
base "github.com/Permify/permify/pkg/pb/base/v1"
"github.com/Permify/permify/pkg/tuple"
Expand Down
3 changes: 1 addition & 2 deletions internal/storage/memory/dataReader.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package memory
import (
"context"
"errors"
"slices"
"sort"
"strconv"
"time"

"golang.org/x/exp/slices"

"github.com/hashicorp/go-memdb"

"github.com/Permify/permify/internal/storage/memory/constants"
Expand Down
3 changes: 2 additions & 1 deletion internal/storage/memory/utils/filter.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package utils

import (
"slices"

"github.com/hashicorp/go-memdb"
"golang.org/x/exp/slices"

"github.com/Permify/permify/internal/storage"
base "github.com/Permify/permify/pkg/pb/base/v1"
Expand Down
2 changes: 1 addition & 1 deletion internal/storage/postgres/utils/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"fmt"
"log/slog"
"math"
"math/rand/v2"
"strings"
"time"

"go.opentelemetry.io/otel/codes"
"golang.org/x/exp/rand"

"go.opentelemetry.io/otel/trace"

Expand Down
3 changes: 1 addition & 2 deletions pkg/database/postgres/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ package postgres
import (
"context"
"fmt"
"log/slog"
"strings"
"time"

"github.com/cenkalti/backoff/v4"

"github.com/exaring/otelpgx"

"golang.org/x/exp/slog"

"github.com/jackc/pgx/v5"

"github.com/jackc/pgx/v5/pgxpool"
Expand Down
3 changes: 1 addition & 2 deletions pkg/development/coverage/coverage.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ package coverage

import (
"fmt"

"golang.org/x/exp/slices"
"slices"

"github.com/Permify/permify/pkg/attribute"
"github.com/Permify/permify/pkg/development/file"
Expand Down
3 changes: 1 addition & 2 deletions pkg/tuple/tuple.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ package tuple
import (
"errors"
"fmt"
"slices"
"strings"

"golang.org/x/exp/slices"

base "github.com/Permify/permify/pkg/pb/base/v1"
)

Expand Down

0 comments on commit 78ddb96

Please sign in to comment.