Skip to content

Commit c353755

Browse files
bradfitzhugelgupf
authored andcommitted
ubinary: deprecate, use github.com/josharian/native instead
Fixes #7 Updates golang/go#57237 Signed-off-by: Brad Fitzpatrick <[email protected]>
1 parent 301ac51 commit c353755

File tree

7 files changed

+24
-37
lines changed

7 files changed

+24
-37
lines changed

go.mod

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,7 @@ module github.com/u-root/uio
22

33
go 1.15
44

5-
require golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664
5+
require (
6+
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531
7+
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664
8+
)

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1+
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531 h1:3HNVAxEgGca1i23Ai/8DeCmibx02jBvTHAT11INaVfU=
2+
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531/go.mod h1:7X/raswPFr05uY3HiLlYeyQntB6OO7E/d2Cu7qoaN2w=
13
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664 h1:wEZYwx+kK+KlZ0hpvP2Ls1Xr4+RWnlzGFwPP0aiDjIU=
24
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=

ubinary/big_endian.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

ubinary/doc.go

Lines changed: 0 additions & 6 deletions
This file was deleted.

ubinary/little_endian.go

Lines changed: 0 additions & 14 deletions
This file was deleted.

ubinary/ubinary.go

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2018 the u-root Authors. All rights reserved
2+
// Use of this source code is governed by a BSD-style
3+
// license that can be found in the LICENSE file.
4+
5+
// Package ubinary provides a native endian binary.ByteOrder.
6+
//
7+
// Deprecated: use github.com/josharian/native instead.
8+
package ubinary
9+
10+
import "github.com/josharian/native"
11+
12+
// NativeEndian is $GOARCH's implementation of byte order.
13+
//
14+
// Deprecated: use github.com/josharian/native.Endian. This package
15+
// now just forwards to that one.
16+
var NativeEndian = native.Endian

uio/buffer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"encoding/binary"
99
"fmt"
1010

11-
"github.com/u-root/uio/ubinary"
11+
"github.com/josharian/native"
1212
)
1313

1414
// Marshaler is the interface implemented by an object that can marshal itself
@@ -173,7 +173,7 @@ func NewBigEndianBuffer(b []byte) *Lexer {
173173
func NewNativeEndianBuffer(b []byte) *Lexer {
174174
return &Lexer{
175175
Buffer: NewBuffer(b),
176-
order: ubinary.NativeEndian,
176+
order: native.Endian,
177177
}
178178
}
179179

0 commit comments

Comments
 (0)