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

Remove golang.org/x/exp dependency and upgrade to Go 1.21 #80

Merged
merged 2 commits into from
Aug 9, 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/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
version: v1.53.3
2 changes: 1 addition & 1 deletion .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ linters-settings:
- github.com/spf13/cobra
- golang.org/x/crypto/blake2b
- golang.org/x/crypto/chacha20poly1305
- golang.org/x/exp/slog
- log/slog
- golang.zx2c4.com/wireguard/wgctrl
deny:
- pkg: math/rand
Expand Down
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
package main

import (
"log/slog"
"os"
"os/exec"
"strings"

"github.com/spf13/cobra"
"github.com/spf13/cobra/doc"
"golang.org/x/exp/slog"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ package main

import (
"fmt"
"log/slog"

"github.com/spf13/cobra"
"github.com/stv0g/go-rosenpass/config"
"golang.org/x/exp/slog"
)

func validate(_ *cobra.Command, args []string) error {
Expand Down
3 changes: 1 addition & 2 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
package rosenpass

import (
"log/slog"
"net"

"golang.org/x/exp/slog"
)

type Config struct {
Expand Down
2 changes: 1 addition & 1 deletion config/arguments.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ package config
import (
"errors"
"fmt"
"log/slog"

rp "github.com/stv0g/go-rosenpass"
"golang.org/x/exp/slog"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion config/handler_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ package config

import (
"bytes"
"log/slog"
"os/exec"
"strings"

rp "github.com/stv0g/go-rosenpass"
"golang.org/x/exp/slog"
)

type exchangeCommandHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion config/handler_keyout.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ package config
import (
"encoding/base64"
"fmt"
"log/slog"
"os"
"path/filepath"

rp "github.com/stv0g/go-rosenpass"
"golang.org/x/exp/slog"
)

type keyoutFileHandler struct {
Expand Down
2 changes: 1 addition & 1 deletion config/handler_wg_wgctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ package config

import (
"fmt"
"log/slog"

rp "github.com/stv0g/go-rosenpass"
"golang.org/x/exp/slog"
"golang.zx2c4.com/wireguard/wgctrl"
"golang.zx2c4.com/wireguard/wgctrl/wgtypes"
)
Expand Down
3 changes: 1 addition & 2 deletions conn_udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ package rosenpass
import (
"errors"
"fmt"
"log/slog"
"net"

"golang.org/x/exp/slog"
)

var errInvalidEndpoint = errors.New("invalid endpoint type")
Expand Down
11 changes: 5 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
module github.com/stv0g/go-rosenpass

go 1.20
go 1.21

require (
github.com/cloudflare/circl v0.0.0-00010101000000-000000000000
github.com/open-quantum-safe/liboqs-go v0.0.0-20230705192921-cf9c63b76ce6
github.com/open-quantum-safe/liboqs-go v0.0.0-20230726174627-a49f79a6b626
github.com/pelletier/go-toml/v2 v2.0.9
github.com/spf13/cobra v1.7.0
golang.org/x/crypto v0.12.0
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
)

Expand All @@ -26,10 +25,10 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
golang.org/x/net v0.10.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/net v0.14.0 // indirect
golang.org/x/sync v0.3.0 // indirect
golang.org/x/sys v0.11.0 // indirect
golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b // indirect
golang.zx2c4.com/wireguard v0.0.0-20230704135630-469159ecf7d1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

Expand Down
23 changes: 9 additions & 14 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU
github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
github.com/mdlayher/socket v0.4.1/go.mod h1:cAqeGjoufqdxWkD7DkpyS+wcefOtmu5OQ8KuoJGIReA=
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721 h1:RlZweED6sbSArvlE924+mUcZuXKLBHA35U7LN621Bws=
github.com/open-quantum-safe/liboqs-go v0.0.0-20230705192921-cf9c63b76ce6 h1:0seF5SlT4gR+smS+jv9oU3JWtSQEVYwu/jzgbvePidc=
github.com/open-quantum-safe/liboqs-go v0.0.0-20230705192921-cf9c63b76ce6/go.mod h1:7o26+0OF/Oh1Vo1sWUN+2jZavRhXvuLldh++utxFvRI=
github.com/mikioh/ipaddr v0.0.0-20190404000644-d465c8ab6721/go.mod h1:Ickgr2WtCLZ2MDGd4Gr0geeCH5HybhRJbonOgQpvSxc=
github.com/open-quantum-safe/liboqs-go v0.0.0-20230726174627-a49f79a6b626 h1:aDWl8Y1TZ7SVYBtZYZf+kYiCzztCMV7zdLwJ0xWV1BQ=
github.com/open-quantum-safe/liboqs-go v0.0.0-20230726174627-a49f79a6b626/go.mod h1:7o26+0OF/Oh1Vo1sWUN+2jZavRhXvuLldh++utxFvRI=
github.com/pelletier/go-toml/v2 v2.0.9 h1:uH2qQXheeefCCkuBBSLi7jCiSmj3VRh2+Goq2N7Xxu0=
github.com/pelletier/go-toml/v2 v2.0.9/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -37,22 +38,16 @@ github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcU
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/stv0g/circl v0.0.0-20230801113412-fec58fc7b5f6 h1:+lCakOkbjp3Qcc73KlV8sHoxTGfBA9VA22J1s3mVwaM=
github.com/stv0g/circl v0.0.0-20230801113412-fec58fc7b5f6/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw=
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
golang.org/x/crypto v0.12.0 h1:tFM/ta59kqch6LlvYnPa0yx5a83cL2nHflFhYKvv9Yk=
golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b h1:r+vk0EmXNmekl0S0BascoeeoHk/L7wmaW2QF90K+kYI=
golang.org/x/exp v0.0.0-20230801115018-d63ba01acd4b/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc=
golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/net v0.14.0 h1:BONx9s002vGdD9umnlX1Po8vOZmrgH34qlHcD1MfK14=
golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b h1:J1CaxgLerRR5lgx3wnr6L04cJFbWoceSK9JWBdglINo=
golang.zx2c4.com/wireguard v0.0.0-20230325221338-052af4a8072b/go.mod h1:tqur9LnfstdR9ep2LaJT4lFUl0EjlHtge+gAjmsHUG4=
golang.zx2c4.com/wireguard v0.0.0-20230704135630-469159ecf7d1 h1:EY138uSo1JYlDq+97u1FtcOUwPpIU6WL1Lkt7WpYjPA=
golang.zx2c4.com/wireguard v0.0.0-20230704135630-469159ecf7d1/go.mod h1:tqur9LnfstdR9ep2LaJT4lFUl0EjlHtge+gAjmsHUG4=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6 h1:CawjfCvYQH2OU3/TnxLx97WDSUDRABfT18pCOYwc2GE=
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6/go.mod h1:3rxYc4HtVcSG9gVaTs2GEBdehh+sYPOwKtyUWEOTb80=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
3 changes: 1 addition & 2 deletions handshake_initiator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import (
"crypto/rand"
"encoding/binary"
"fmt"
"log/slog"
"math"
"time"

"golang.org/x/exp/slog"
)

type initiatorHandshake struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/test/server_standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import (
"flag"
"fmt"
"io"
"log/slog"
"os"
"os/exec"
"path/filepath"

rp "github.com/stv0g/go-rosenpass"
"github.com/stv0g/go-rosenpass/config"
"golang.org/x/exp/slog"
)

type StandaloneServer struct {
Expand Down
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
package rosenpass_test

import (
"log/slog"
"os"
"testing"
"time"

rp "github.com/stv0g/go-rosenpass"
"golang.org/x/exp/slog"
)

func TestMain(m *testing.M) {
Expand Down
3 changes: 1 addition & 2 deletions peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ package rosenpass
import (
"errors"
"fmt"
"log/slog"
"net"
"time"

"golang.org/x/exp/slog"
)

var (
Expand Down
3 changes: 1 addition & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ package rosenpass
import (
"errors"
"fmt"
"log/slog"
"net"
"sync"
"time"

"golang.org/x/exp/slog"
)

type Server struct {
Expand Down
2 changes: 1 addition & 1 deletion server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package rosenpass_test

import (
"encoding/base64"
"log/slog"
"math"
"math/rand"
"net"
Expand All @@ -14,7 +15,6 @@ import (
"github.com/stretchr/testify/require"
rp "github.com/stv0g/go-rosenpass"
"github.com/stv0g/go-rosenpass/internal/test"
"golang.org/x/exp/slog"
)

type handshakeHandler struct {
Expand Down
Loading