Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go1.21 #26

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Lint (main module)
uses: golangci/golangci-lint-action@v3
with:
version: v1.52
version: v1.54
github-token: ${{ secrets.GITHUB_TOKEN }}
only-new-issues: false
skip-cache: true
Expand Down
5 changes: 2 additions & 3 deletions automation/publish_signals.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Searis AS
// Copyright 2022-2023 Searis AS
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -24,7 +24,6 @@ import (
"github.com/clarify/clarify-go"
"github.com/clarify/clarify-go/query"
"github.com/clarify/clarify-go/views"
"golang.org/x/exp/maps"
)

const (
Expand Down Expand Up @@ -162,7 +161,7 @@ func (p PublishSignals) Do(ctx context.Context, c *clarify.Client, opts PublishO
}

total += len(items)
maps.Clear(items)
items = make(map[string]views.ItemSave)
return nil
}

Expand Down
8 changes: 5 additions & 3 deletions examples/devdata_cli/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"log"
"math/rand"
"os"
"slices"
"strconv"
"strings"
"time"
Expand All @@ -34,8 +35,6 @@ import (
"github.com/clarify/clarify-go/views"
"github.com/peterbourgon/ff/v3"
"github.com/peterbourgon/ff/v3/ffcli"
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
)

const (
Expand Down Expand Up @@ -618,7 +617,10 @@ func (p *program) dataFrame(ctx context.Context, config dataFrameConfig) error {
return err
}

keys := maps.Keys(result.Data)
keys := make([]string, 0, len(result.Data))
for k := range result.Data {
keys = append(keys, k)
}
slices.Sort(keys)
var i, samples int
for _, k := range keys {
Expand Down
4 changes: 2 additions & 2 deletions examples/devdata_cli/go.mod
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
module github.com/clarify/clarify-go/devdata_cli

go 1.19
go 1.20

require (
github.com/clarify/clarify-go v0.2.4
github.com/peterbourgon/ff/v3 v3.4.0
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
)

require (
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect
golang.org/x/oauth2 v0.12.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
Expand Down
5 changes: 2 additions & 3 deletions fields/maps.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ package fields

import (
"encoding/json"

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

// EnumValues maps integer Items values to strings.
Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
module github.com/clarify/clarify-go

go 1.18
go 1.21

require golang.org/x/oauth2 v0.12.0

require (
github.com/golang/protobuf v1.5.3 // indirect
golang.org/x/exp v0.0.0-20230905200255-921286631fa9
golang.org/x/text v0.13.0
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg
github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9 h1:GoHiUyI/Tp2nVkLI2mCxVkOjsbSXD66ic0XW0js0R9g=
golang.org/x/exp v0.0.0-20230905200255-921286631fa9/go.mod h1:S2oDrQGGwySpoQPVqRShND87VCbxmc6bL1Yd2oYrm6k=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
Expand Down
4 changes: 2 additions & 2 deletions views/data_frame.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Searis AS
// Copyright 2022-2023 Searis AS
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,10 +17,10 @@ package views
import (
"encoding/json"
"math"
"slices"
"sort"

"github.com/clarify/clarify-go/fields"
"golang.org/x/exp/slices"
)

var (
Expand Down