Skip to content

Commit

Permalink
Merge pull request #307 from saschagrunert/go-modules
Browse files Browse the repository at this point in the history
Add go module support
  • Loading branch information
Luca Bruno authored Nov 8, 2019
2 parents d3cd4ed + b5f71cb commit 5a0db84
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 31 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test_bins
7 changes: 3 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ services:

language: go
go:
- "1.10.x"
- "1.11.x"
- "1.12.x"
- "1.13.x"
go_import_path: github.com/coreos/go-systemd

env:
global:
- IMPORTPATH=github.com/coreos/go-systemd
- GOPATH=/opt
- GO111MODULE=on
- DEP_BINDIR=/tmp
- BUILD_DIR=/opt/src/github.com/coreos/go-systemd
matrix:
Expand All @@ -23,8 +24,6 @@ env:
before_install:
- sudo apt-get -qq update
- sudo apt-get install -y libsystemd-journal-dev libsystemd-daemon-dev
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | INSTALL_DIRECTORY=${DEP_BINDIR} sh
- ${DEP_BINDIR}/dep ensure -v
- docker pull ${DOCKER_BASE}
- docker run --privileged -e GOPATH=${GOPATH} --cidfile=/tmp/cidfile ${DOCKER_BASE} /bin/bash -c "apt-get update && apt-get install -y sudo build-essential git golang dbus libsystemd-dev libpam-systemd systemd-container"
- docker commit `cat /tmp/cidfile` go-systemd/container-tests
Expand Down
7 changes: 0 additions & 7 deletions Gopkg.toml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/coreos/go-systemd.png?branch=master)](https://travis-ci.org/coreos/go-systemd)
[![godoc](https://godoc.org/github.com/coreos/go-systemd?status.svg)](http://godoc.org/github.com/coreos/go-systemd)
![minimum golang 1.10](https://img.shields.io/badge/golang-1.10%2B-orange.svg)
![minimum golang 1.12](https://img.shields.io/badge/golang-1.12%2B-orange.svg)


Go bindings to systemd. The project has several packages:
Expand Down
2 changes: 1 addition & 1 deletion dbus/dbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"strings"
"sync"

"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion dbus/methods.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"path"
"strconv"

"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)

func (c *Conn) jobComplete(signal *dbus.Signal) {
Expand Down
2 changes: 1 addition & 1 deletion dbus/methods_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"testing"
"time"

"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)

type TrUnitProp struct {
Expand Down
4 changes: 2 additions & 2 deletions dbus/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
package dbus

import (
"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)

// From the systemd docs:
Expand Down Expand Up @@ -56,7 +56,7 @@ type execStart struct {
// http://www.freedesktop.org/software/systemd/man/systemd.service.html#ExecStart=
func PropExecStart(command []string, uncleanIsFailure bool) Property {
execStarts := []execStart{
execStart{
{
Path: command[0],
Args: command,
UncleanIsFailure: uncleanIsFailure,
Expand Down
2 changes: 1 addition & 1 deletion dbus/subscription.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"log"
"time"

"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion examples/activation/activation.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"os"

"github.com/coreos/go-systemd/activation"
"github.com/coreos/go-systemd/v21/activation"
)

func fixListenPid() {
Expand Down
2 changes: 1 addition & 1 deletion examples/activation/httpserver/httpserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"io"
"net/http"

"github.com/coreos/go-systemd/activation"
"github.com/coreos/go-systemd/v21/activation"
)

func HelloServer(w http.ResponseWriter, req *http.Request) {
Expand Down
2 changes: 1 addition & 1 deletion examples/activation/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"fmt"
"os"

"github.com/coreos/go-systemd/activation"
"github.com/coreos/go-systemd/v21/activation"
)

func fixListenPid() {
Expand Down
2 changes: 1 addition & 1 deletion examples/activation/udpconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"net"
"os"

"github.com/coreos/go-systemd/activation"
"github.com/coreos/go-systemd/v21/activation"
)

func fixListenPid() {
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 github.com/coreos/go-systemd/v21

go 1.12

require github.com/godbus/dbus/v5 v5.0.3
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/godbus/dbus/v5 v5.0.3 h1:ZqHaoEF7TBzh4jzPmqVhE/5A1z9of6orkAe5uHoAeME=
github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
2 changes: 1 addition & 1 deletion import1/dbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"strconv"
"strings"

"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion login1/dbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
"os"
"strconv"

"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions machine1/dbus.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"strconv"
"syscall"

"github.com/godbus/dbus"
"github.com/godbus/dbus/v5"

sd_dbus "github.com/coreos/go-systemd/dbus"
sd_dbus "github.com/coreos/go-systemd/v21/dbus"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions machine1/dbus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ import (
"testing"
"time"

sd_dbus "github.com/coreos/go-systemd/dbus"
"github.com/godbus/dbus"
sd_dbus "github.com/coreos/go-systemd/v21/dbus"
"github.com/godbus/dbus/v5"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion sdjournal/functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package sdjournal

import (
"github.com/coreos/go-systemd/internal/dlopen"
"github.com/coreos/go-systemd/v21/internal/dlopen"
"sync"
"unsafe"
)
Expand Down
2 changes: 1 addition & 1 deletion sdjournal/journal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
"testing"
"time"

"github.com/coreos/go-systemd/journal"
"github.com/coreos/go-systemd/v21/journal"
)

func TestJournalFollow(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion util/util_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import (
"syscall"
"unsafe"

"github.com/coreos/go-systemd/internal/dlopen"
"github.com/coreos/go-systemd/v21/internal/dlopen"
)

var libsystemdNames = []string{
Expand Down

0 comments on commit 5a0db84

Please sign in to comment.