Skip to content

Commit

Permalink
ubinary: deprecate, use github.com/josharian/native instead
Browse files Browse the repository at this point in the history
Fixes u-root#7
Updates golang/go#57237

Signed-off-by: Brad Fitzpatrick <brad@danga.com>
  • Loading branch information
bradfitz committed Dec 13, 2022
1 parent 301ac51 commit 0f3efec
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 37 deletions.
5 changes: 4 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ module github.com/u-root/uio

go 1.15

require golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664
require (
github.com/josharian/native v1.0.1-0.20221213033349-c1e37c09b531
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
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=
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664 h1:wEZYwx+kK+KlZ0hpvP2Ls1Xr4+RWnlzGFwPP0aiDjIU=
golang.org/x/sys v0.0.0-20220622161953-175b2fd9d664/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
14 changes: 0 additions & 14 deletions ubinary/big_endian.go

This file was deleted.

6 changes: 0 additions & 6 deletions ubinary/doc.go

This file was deleted.

14 changes: 0 additions & 14 deletions ubinary/little_endian.go

This file was deleted.

16 changes: 16 additions & 0 deletions ubinary/ubinary.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// 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
4 changes: 2 additions & 2 deletions uio/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"encoding/binary"
"fmt"

"github.com/u-root/uio/ubinary"
"github.com/josharian/native"
)

// Marshaler is the interface implemented by an object that can marshal itself
Expand Down Expand Up @@ -173,7 +173,7 @@ func NewBigEndianBuffer(b []byte) *Lexer {
func NewNativeEndianBuffer(b []byte) *Lexer {
return &Lexer{
Buffer: NewBuffer(b),
order: ubinary.NativeEndian,
order: native.Endian,
}
}

Expand Down

0 comments on commit 0f3efec

Please sign in to comment.