From fed1f0e9a37177bfb9e1d8974ea46d0052eebcd8 Mon Sep 17 00:00:00 2001 From: Chris Koch Date: Wed, 7 Feb 2024 23:18:24 +0000 Subject: [PATCH] Require Go 1.21, remove ubinary & josharian/native Signed-off-by: Chris Koch --- .github/workflows/golangci-lint.yml | 2 +- go.mod | 3 +-- go.sum | 2 -- ubinary/ubinary.go | 16 ---------------- uio/buffer.go | 4 +--- 5 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 ubinary/ubinary.go diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 0735439..f488db8 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: '1.20' + go-version: '1.22.x' - uses: actions/checkout@v3 - name: golangci-lint uses: golangci/golangci-lint-action@v3 diff --git a/go.mod b/go.mod index ef2f482..0f31faf 100644 --- a/go.mod +++ b/go.mod @@ -1,9 +1,8 @@ module github.com/u-root/uio -go 1.16 +go 1.21 require ( - github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531 github.com/pierrec/lz4/v4 v4.1.14 golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664 ) diff --git a/go.sum b/go.sum index 2a8038e..e65d31d 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531 h1:3HNVAxEgGca1i23Ai/8DeCmibx02jBvTHAT11INaVfU= -github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w= github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= github.com/pierrec/lz4/v4 v4.1.14/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664 h1:wEZYwx+kK+KlZ0hpvP2Ls1Xr4+RWnlzGFwPP0aiDjIU= diff --git a/ubinary/ubinary.go b/ubinary/ubinary.go deleted file mode 100644 index cc89007..0000000 --- a/ubinary/ubinary.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 the u-root Authors. All rights reserved -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package ubinary provides a native endian binary.ByteOrder. -// -// Deprecated: use github.com/josharian/native instead. -package ubinary - -import "github.com/josharian/native" - -// NativeEndian is $GOARCH's implementation of byte order. -// -// Deprecated: use github.com/josharian/native.Endian. This package -// now just forwards to that one. -var NativeEndian = native.Endian diff --git a/uio/buffer.go b/uio/buffer.go index 158a4d1..a0a603b 100644 --- a/uio/buffer.go +++ b/uio/buffer.go @@ -8,8 +8,6 @@ import ( "encoding/binary" "errors" "fmt" - - "github.com/josharian/native" ) // Marshaler is the interface implemented by an object that can marshal itself @@ -178,7 +176,7 @@ func NewBigEndianBuffer(b []byte) *Lexer { func NewNativeEndianBuffer(b []byte) *Lexer { return &Lexer{ Buffer: NewBuffer(b), - order: native.Endian, + order: binary.NativeEndian, } }