Skip to content

Commit ef0f698

Browse files
committed
Drop dependency on github.com/yalue/native_endian
Signed-off-by: Akihiro Suda <[email protected]>
1 parent 21c7e31 commit ef0f698

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ require (
3232
github.com/sirupsen/logrus v1.9.0
3333
github.com/spf13/cobra v1.6.1
3434
github.com/xorcare/pointer v1.2.2
35-
github.com/yalue/native_endian v1.0.2
3635
golang.org/x/sync v0.1.0
3736
golang.org/x/sys v0.5.0
3837
gotest.tools/v3 v3.4.0

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,6 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q
562562
github.com/xorcare/pointer v1.2.2 h1:zjD77b5DTehClND4MK+9dDE0DcpFIZisAJ/+yVJvKYA=
563563
github.com/xorcare/pointer v1.2.2/go.mod h1:azsKh7oVwYB7C1o8P284fG8MvtErX/F5/dqXiaj71ak=
564564
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
565-
github.com/yalue/native_endian v1.0.2 h1:e4SxBbaCoOOO4E3axd7FSriUhzc1bIzqZGG5jl6Evbg=
566-
github.com/yalue/native_endian v1.0.2/go.mod h1:cr+I2WnCwDkkPV0DvgBpGQkJV12CDWR5bAoMtT+56iE=
567565
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
568566
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
569567
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=

pkg/guestagent/guestagent_linux.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package guestagent
22

33
import (
44
"context"
5-
"encoding/binary"
65
"errors"
76
"reflect"
87
"sync"
@@ -15,7 +14,7 @@ import (
1514
"github.com/lima-vm/lima/pkg/guestagent/procnettcp"
1615
"github.com/lima-vm/lima/pkg/guestagent/timesync"
1716
"github.com/sirupsen/logrus"
18-
"github.com/yalue/native_endian"
17+
"golang.org/x/sys/cpu"
1918
)
2019

2120
func New(newTicker func() (<-chan time.Time, func()), iptablesIdle time.Duration) (Agent, error) {
@@ -171,7 +170,7 @@ func (a *agent) Events(ctx context.Context, ch chan api.Event) {
171170
}
172171

173172
func (a *agent) LocalPorts(ctx context.Context) ([]api.IPPort, error) {
174-
if native_endian.NativeEndian() == binary.BigEndian {
173+
if cpu.IsBigEndian {
175174
return nil, errors.New("big endian architecture is unsupported, because I don't know how /proc/net/tcp looks like on big endian hosts")
176175
}
177176
var res []api.IPPort

0 commit comments

Comments
 (0)