Skip to content
This repository has been archived by the owner on Dec 8, 2020. It is now read-only.

Commit

Permalink
Fix: Comply with Go module versioning rules
Browse files Browse the repository at this point in the history
  • Loading branch information
impl committed Sep 11, 2019
1 parent da4a93b commit 89917de
Show file tree
Hide file tree
Showing 58 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/puppetlabs/horsehead
module github.com/puppetlabs/horsehead/v2

require (
github.com/DATA-DOG/go-sqlmock v1.3.3
Expand Down
2 changes: 1 addition & 1 deletion httputil/api/conditional.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"strconv"
"strings"

"github.com/puppetlabs/horsehead/httputil/errors"
"github.com/puppetlabs/horsehead/v2/httputil/errors"
)

type Cacheable interface {
Expand Down
2 changes: 1 addition & 1 deletion httputil/api/header_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strings"
"testing"

"github.com/puppetlabs/horsehead/httputil/api"
"github.com/puppetlabs/horsehead/v2/httputil/api"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion httputil/api/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package api
import (
"context"

logging "github.com/puppetlabs/horsehead/logging"
logging "github.com/puppetlabs/horsehead/v2/logging"
)

var (
Expand Down
4 changes: 2 additions & 2 deletions httputil/api/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"net/http"
"time"

"github.com/puppetlabs/horsehead/logging"
"github.com/puppetlabs/horsehead/request"
"github.com/puppetlabs/horsehead/v2/logging"
"github.com/puppetlabs/horsehead/v2/request"
)

func RequestMiddleware(next http.Handler) http.Handler {
Expand Down
4 changes: 2 additions & 2 deletions httputil/api/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/url"

"github.com/puppetlabs/errawr-go/v2/pkg/encoding"
"github.com/puppetlabs/horsehead/httputil/errors"
"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/httputil/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type TrackingResponseWriter interface {
Expand Down
2 changes: 1 addition & 1 deletion httputil/fs/file_map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path/filepath"
"testing"

"github.com/puppetlabs/horsehead/httputil/fs"
"github.com/puppetlabs/horsehead/v2/httputil/fs"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion httputil/fs/fs_without_mod_times_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"net/http"
"testing"

"github.com/puppetlabs/horsehead/httputil/fs"
"github.com/puppetlabs/horsehead/v2/httputil/fs"
"github.com/stretchr/testify/require"
)

Expand Down
2 changes: 1 addition & 1 deletion httputil/websocket/conn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"testing"

gws "github.com/gorilla/websocket"
"github.com/puppetlabs/horsehead/httputil/websocket"
"github.com/puppetlabs/horsehead/v2/httputil/websocket"
)

func TestConnCompatibility(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions instrumentation/alerts/alerts.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package alerts

import (
"github.com/puppetlabs/horsehead/instrumentation/alerts/internal/noop"
"github.com/puppetlabs/horsehead/instrumentation/alerts/internal/sentry"
"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/instrumentation/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/internal/noop"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/internal/sentry"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/errors"
)

type Options struct {
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/delegate.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package alerts

import "github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
import "github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"

type Delegate interface {
NewCapturer() trackers.Capturer
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/internal/httputil/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"net/http"

"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type WrapFunc func(r *http.Request) trackers.Capturer
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/internal/noop/capturer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"runtime/debug"

"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type Capturer struct{}
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/alerts/internal/noop/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package noop
import (
"net/http"

"github.com/puppetlabs/horsehead/instrumentation/alerts/internal/httputil"
"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/internal/httputil"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type Middleware struct {
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/internal/noop/noop.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package noop

import "github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
import "github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"

type NoOp struct{}

Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/internal/noop/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package noop
import (
"context"

"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type Reporter struct{}
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/internal/sentry/capturer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"net/http"

raven "github.com/getsentry/raven-go"
"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type Capturer struct {
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/alerts/internal/sentry/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package sentry
import (
"net/http"

"github.com/puppetlabs/horsehead/instrumentation/alerts/internal/httputil"
"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/internal/httputil"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type Middleware struct {
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/internal/sentry/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"

raven "github.com/getsentry/raven-go"
"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
)

type Reporter struct {
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/alerts/internal/sentry/sentry.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package sentry

import (
raven "github.com/getsentry/raven-go"
"github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/instrumentation/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"
"github.com/puppetlabs/horsehead/v2/instrumentation/errors"
)

type Sentry struct {
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/alerts/internal/sentry/tag.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package sentry

import "github.com/puppetlabs/horsehead/instrumentation/alerts/trackers"
import "github.com/puppetlabs/horsehead/v2/instrumentation/alerts/trackers"

func tagsToSentryTags(tags []trackers.Tag) map[string]string {
tm := make(map[string]string, len(tags))
Expand Down
8 changes: 4 additions & 4 deletions instrumentation/examples/metrics_server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import (
"net/http"
"time"

"github.com/puppetlabs/horsehead/instrumentation/metrics"
"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/delegates"
"github.com/puppetlabs/horsehead/instrumentation/metrics/server"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/delegates"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/server"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/metrics/delegates/delegates.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"net/http"

"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/internal/prometheus"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/internal/prometheus"
)

// Delegate is an interface metrics collectors implement (i.e. prometheus)
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/metrics/internal/noop/counter.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package noop

import "github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
import "github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"

type Counter struct{}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package noop
import (
"net/http"

"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
)

type DurationMiddleware struct{}
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/metrics/internal/noop/timer.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package noop

import "github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
import "github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"

type Timer struct{}

Expand Down
4 changes: 2 additions & 2 deletions instrumentation/metrics/internal/prometheus/counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package prometheus

import (
prom "github.com/prometheus/client_golang/prometheus"
"github.com/puppetlabs/horsehead/instrumentation/errors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
)

type Counter struct {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/puppetlabs/horsehead/instrumentation/errors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
)

type DurationMiddleware struct {
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/metrics/internal/prometheus/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package prometheus

import (
prom "github.com/prometheus/client_golang/prometheus"
"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
)

func convertLabels(labels []collectors.Label) prom.Labels {
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/metrics/internal/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (

prom "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/puppetlabs/horsehead/instrumentation/errors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
)

type Prometheus struct {
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/metrics/internal/prometheus/timer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"sync"

prom "github.com/prometheus/client_golang/prometheus"
"github.com/puppetlabs/horsehead/instrumentation/errors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
)

type Timer struct {
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/metrics/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package metrics
import (
"context"

"github.com/puppetlabs/horsehead/logging"
"github.com/puppetlabs/horsehead/v2/logging"
)

var (
Expand Down
10 changes: 5 additions & 5 deletions instrumentation/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import (
"net/http"
"sync"

"github.com/puppetlabs/horsehead/instrumentation/errors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/instrumentation/metrics/delegates"
"github.com/puppetlabs/horsehead/instrumentation/metrics/internal/noop"
"github.com/puppetlabs/horsehead/logging"
"github.com/puppetlabs/horsehead/v2/instrumentation/errors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/collectors"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/delegates"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics/internal/noop"
"github.com/puppetlabs/horsehead/v2/logging"
)

type errorBehavior int
Expand Down
2 changes: 1 addition & 1 deletion instrumentation/metrics/server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package server
import (
"net/http"

"github.com/puppetlabs/horsehead/instrumentation/metrics"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics"
)

// Handler returns metrics in the style of the configured delegate (i.e. prometheus)
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/metrics/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"net"
"net/http"

"github.com/puppetlabs/horsehead/instrumentation/metrics"
"github.com/puppetlabs/horsehead/netutil"
"github.com/puppetlabs/horsehead/v2/instrumentation/metrics"
"github.com/puppetlabs/horsehead/v2/netutil"
)

// Options are the Server configuration options
Expand Down
2 changes: 1 addition & 1 deletion jsonutil/str_or_str_slice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"testing"

"github.com/puppetlabs/horsehead/jsonutil"
"github.com/puppetlabs/horsehead/v2/jsonutil"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion lifecycle/closer.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"
"time"

"github.com/puppetlabs/horsehead/lifecycle/errors"
"github.com/puppetlabs/horsehead/v2/lifecycle/errors"
)

type (
Expand Down
2 changes: 1 addition & 1 deletion lifecycle/closer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

"github.com/puppetlabs/horsehead/lifecycle"
"github.com/puppetlabs/horsehead/v2/lifecycle"
"github.com/stretchr/testify/assert"
)

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

"github.com/inconshreveable/log15"
"github.com/puppetlabs/horsehead/logging/handler"
"github.com/puppetlabs/horsehead/v2/logging/handler"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion mainutil/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package mainutil
import (
"context"

logging "github.com/puppetlabs/horsehead/logging"
logging "github.com/puppetlabs/horsehead/v2/logging"
)

var (
Expand Down
Loading

0 comments on commit 89917de

Please sign in to comment.