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

ubinary: deprecate, use github.com/josharian/native instead #8

Merged
merged 1 commit into from
Dec 13, 2022
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
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