Move go.mod and go.sum into base.

This commit is contained in:
Adam Ierymenko 2020-06-01 16:07:49 -07:00
parent dc1ef0c49e
commit 1d29bc3e8e
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
5 changed files with 9 additions and 14 deletions

View file

View file

@ -13,11 +13,5 @@ golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190529164535-6a60838ec259 h1:so6Hr/LodwSZ5UQDu/7PmQiDeS112WwtLvU3lpSPZTU=
golang.org/x/sys v0.0.0-20190529164535-6a60838ec259/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200107162124-548cf772de50 h1:YvQ10rzcqWXLlJZ3XCUoO25savxmscf4+SC+ZqiCHhA=
golang.org/x/sys v0.0.0-20200107162124-548cf772de50/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479 h1:LhLiKguPgZL+Tglay4GhVtfF0kb8cvOJ0dHTCBO8YNI=
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527 h1:uYVVQ9WP/Ds2ROhcaGPeIdVq0RIXVLwsHlnvJ+cT1So=
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121 h1:rITEj+UZHYC927n8GT97eC3zrpzXdb/voyeOuVKS46o=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=

View file

@ -7,7 +7,6 @@ package zerotier
// static inline const struct sockaddr_storage *_getSS(const ZT_Endpoint *ep) { return &(ep->value.ss); }
// static inline void _setSS(ZT_Endpoint *ep,const void *ss) { memcpy(&(ep->value.ss),ss,sizeof(struct sockaddr_storage)); }
import "C"
import (
"encoding/json"
"unsafe"

View file

@ -23,7 +23,10 @@ type MulticastGroup struct {
// String returns MAC#ADI
func (mg *MulticastGroup) String() string {
return fmt.Sprintf("%s#%.8x", mg.MAC.String(), mg.ADI)
if mg.ADI != 0 {
return fmt.Sprintf("%s#%.8x", mg.MAC.String(), mg.ADI)
}
return mg.MAC.String()
}
// Less returns true if this MulticastGroup is less than another.

View file

@ -18,7 +18,6 @@ package zerotier
// #cgo linux android LDFLAGS: ${SRCDIR}/../../../build/go/native/libzt_go_native.a ${SRCDIR}/../../../build/node/libzt_core.a ${SRCDIR}/../../../build/osdep/libzt_osdep.a -lstdc++ -lpthread -lm
// #include "../../native/GoGlue.h"
import "C"
import (
"bytes"
"errors"
@ -68,17 +67,17 @@ const (
var (
PlatformDefaultHomePath string
CoreVersionMajor int
CoreVersionMinor int
CoreVersionRevision int
CoreVersionBuild int
CoreVersionMajor int
CoreVersionMinor int
CoreVersionRevision int
CoreVersionBuild int
cNodeRefs [maxCNodeRefs]*Node
cNodeRefUsed [maxCNodeRefs]uint32
)
func init() {
PlatformDefaultHomePath = C.GoString(C.ZT_PLATFORM_DEFAULT_HOMEPATH);
PlatformDefaultHomePath = C.GoString(C.ZT_PLATFORM_DEFAULT_HOMEPATH)
var vMaj, vMin, vRev, vBuild C.int
C.ZT_version(&vMaj, &vMin, &vRev, &vBuild)
CoreVersionMajor = int(vMaj)