Skip to content

Commit

Permalink
Merge pull request #104 from 4censord/build-with-go1.16
Browse files Browse the repository at this point in the history
Update for building with go 1.16
  • Loading branch information
xihuan-citrix committed May 17, 2021
2 parents b048e6c + c9ed1de commit 94942cd
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 14 deletions.
16 changes: 8 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ ifeq ($(ARCH), amd64)
endif

XE_DAEMON_SOURCES :=
XE_DAEMON_SOURCES += ./xe-daemon/xe-daemon.go
XE_DAEMON_SOURCES += ./syslog/syslog.go
XE_DAEMON_SOURCES += ./system/system.go
XE_DAEMON_SOURCES += ./guestmetric/guestmetric.go
XE_DAEMON_SOURCES += ./guestmetric/guestmetric_linux.go
XE_DAEMON_SOURCES += ./xenstoreclient/xenstore.go
XE_DAEMON_SOURCES += xe-daemon/xe-daemon.go
XE_DAEMON_SOURCES += syslog/syslog.go
XE_DAEMON_SOURCES += system/system.go
XE_DAEMON_SOURCES += guestmetric/guestmetric.go
XE_DAEMON_SOURCES += guestmetric/guestmetric_linux.go
XE_DAEMON_SOURCES += xenstoreclient/xenstore.go

XENSTORE_SOURCES :=
XENSTORE_SOURCES += ./xenstore/xenstore.go
XENSTORE_SOURCES += ./xenstoreclient/xenstore.go
XENSTORE_SOURCES += xenstore/xenstore.go
XENSTORE_SOURCES += xenstoreclient/xenstore.go

.PHONY: build
build: $(DISTDIR)/$(PACKAGE)_$(VERSION)-$(RELEASE)_$(ARCH).tgz
Expand Down
5 changes: 5 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module xe-guest-utilities

go 1.16

require golang.org/x/sys v0.0.0-20210414055047-fe65e336abe0
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
golang.org/x/sys v0.0.0-20210414055047-fe65e336abe0 h1:g9s1Ppvvun/fI+BptTMj909BBIcGrzQ32k9FNlcevOE=
golang.org/x/sys v0.0.0-20210414055047-fe65e336abe0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
2 changes: 1 addition & 1 deletion guestmetric/guestmetric_linux.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package guestmetric

import (
xenstoreclient "../xenstoreclient"
"bufio"
"bytes"
"fmt"
Expand All @@ -11,6 +10,7 @@ import (
"sort"
"strconv"
"strings"
xenstoreclient "xe-guest-utilities/xenstoreclient"
)

type Collector struct {
Expand Down
8 changes: 4 additions & 4 deletions xe-daemon/xe-daemon.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package main

import (
guestmetric "../guestmetric"
syslog "../syslog"
system "../system"
xenstoreclient "../xenstoreclient"
"flag"
"fmt"
"io"
Expand All @@ -15,6 +11,10 @@ import (
"strconv"
"syscall"
"time"
guestmetric "xe-guest-utilities/guestmetric"
syslog "xe-guest-utilities/syslog"
system "xe-guest-utilities/system"
xenstoreclient "xe-guest-utilities/xenstoreclient"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion xenstore/xenstore.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package main

import (
xenstoreclient "../xenstoreclient"
"errors"
"fmt"
"golang.org/x/sys/unix"
"os"
"strconv"
"strings"
xenstoreclient "xe-guest-utilities/xenstoreclient"
)

func die(format string, a ...interface{}) {
Expand Down

0 comments on commit 94942cd

Please sign in to comment.