Skip to content

Commit

Permalink
replace "context" with "golang.org/x/net/context"
Browse files Browse the repository at this point in the history
dependencies (specifically go-rpc) depend on "golang.org/x/net/context"
and are not compatible with "context"

fixes asteris-llc#318
  • Loading branch information
ryane committed Oct 26, 2016
1 parent 90197dd commit 11eb528
Show file tree
Hide file tree
Showing 50 changed files with 52 additions and 54 deletions.
2 changes: 1 addition & 1 deletion apply/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package apply

import (
"context"
"fmt"

"github.com/asteris-llc/converge/executor"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/asteris-llc/converge/plan"
"github.com/asteris-llc/converge/render"
"github.com/pkg/errors"
"golang.org/x/net/context"
)

// MkPipelineF is a function to generate a pipeline given an id
Expand Down
2 changes: 1 addition & 1 deletion apply/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package apply_test

import (
"context"
"testing"

"github.com/asteris-llc/converge/apply"
Expand All @@ -27,6 +26,7 @@ import (
"github.com/asteris-llc/converge/resource"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)

func TestApplyNoOp(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion cmd/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"context"
"errors"
"fmt"

Expand All @@ -27,6 +26,7 @@ import (
"github.com/asteris-llc/converge/rpc/pb"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/net/context"
)

// applyCmd represents the plan command
Expand Down
2 changes: 1 addition & 1 deletion cmd/graceful_exit.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
package cmd

import (
"context"
"os"
"os/signal"

log "github.com/Sirupsen/logrus"
"golang.org/x/net/context"
)

// GracefulExit traps interrupt signals for a graceful exit
Expand Down
2 changes: 1 addition & 1 deletion cmd/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"context"
"errors"
"fmt"

Expand All @@ -27,6 +26,7 @@ import (
"github.com/asteris-llc/converge/rpc/pb"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/net/context"
)

// graphCmd represents the graph command
Expand Down
2 changes: 1 addition & 1 deletion cmd/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"context"
"errors"
"fmt"

Expand All @@ -27,6 +26,7 @@ import (
"github.com/asteris-llc/converge/rpc/pb"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/net/context"
)

// healthcheckCmd represents the 'healthcheck' command
Expand Down
2 changes: 1 addition & 1 deletion cmd/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package cmd
import (
"bufio"
"bytes"
"context"
"fmt"
"os"
"strings"
Expand All @@ -30,6 +29,7 @@ import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/crypto/openpgp"
"golang.org/x/net/context"
)

var keyCmd = &cobra.Command{
Expand Down
2 changes: 1 addition & 1 deletion cmd/plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"context"
"errors"
"fmt"

Expand All @@ -27,6 +26,7 @@ import (
"github.com/asteris-llc/converge/rpc/pb"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/net/context"
)

// planCmd represents the plan command
Expand Down
2 changes: 1 addition & 1 deletion cmd/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"context"
"crypto/tls"
"encoding/json"
"io"
Expand All @@ -33,6 +32,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/pflag"
"github.com/spf13/viper"
"golang.org/x/net/context"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package cmd

import (
"context"
"os"
"time"

Expand All @@ -24,6 +23,7 @@ import (
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/net/context"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc/grpclog"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/validate.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
package cmd

import (
"context"
"errors"

log "github.com/Sirupsen/logrus"
"github.com/asteris-llc/converge/load"
"github.com/spf13/cobra"
"github.com/spf13/viper"
"golang.org/x/net/context"
)

// validateCmd represents the validate command
Expand Down
3 changes: 2 additions & 1 deletion fetch/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
package fetch

import (
"context"
"fmt"
"net/url"
"path"

"golang.org/x/net/context"
)

// Any fetches a path based on the scheme of the location
Expand Down
2 changes: 1 addition & 1 deletion fetch/fetch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
package fetch_test

import (
"context"
"testing"

"github.com/asteris-llc/converge/fetch"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)

func TestAnyBadURL(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion fetch/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
package fetch

import (
"context"
"fmt"
"io/ioutil"
"net/http"

"golang.org/x/net/context"
)

// HTTP fetches content over HTTP
Expand Down
2 changes: 1 addition & 1 deletion fetch/http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package fetch_test

import (
"context"
"path"
"testing"

Expand All @@ -26,6 +25,7 @@ import (
"github.com/asteris-llc/converge/helpers/testing/http"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)

func TestHTTP(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion graph/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package graph

import (
"context"
"fmt"
"strings"
"sync"
Expand All @@ -26,6 +25,7 @@ import (
"github.com/hashicorp/terraform/dag"
"github.com/pkg/errors"
cmap "github.com/streamrail/concurrent-map"
"golang.org/x/net/context"
)

// WalkFunc is taken by the walking functions
Expand Down
2 changes: 1 addition & 1 deletion graph/graph_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package graph_test

import (
"context"
"errors"
"math/rand"
"sort"
Expand All @@ -29,6 +28,7 @@ import (
"github.com/asteris-llc/converge/helpers/logging"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)

func TestGet(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion graph/merge_duplicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@
package graph

import (
"context"
"strings"
"sync"

"github.com/asteris-llc/converge/graph/node"
"github.com/asteris-llc/converge/helpers/logging"
"github.com/mitchellh/hashstructure"
"golang.org/x/net/context"
)

// SkipMergeFunc will be used to determine whether or not to merge a node
Expand Down
2 changes: 1 addition & 1 deletion graph/merge_duplicates_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
package graph_test

import (
"context"
"testing"

"github.com/asteris-llc/converge/graph"
"github.com/asteris-llc/converge/graph/node"
"github.com/asteris-llc/converge/helpers/logging"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)

func TestMergeDuplicatesRemovesDuplicates(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion graph/notifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
package graph_test

import (
"context"
"errors"
"testing"

"github.com/asteris-llc/converge/graph"
"github.com/asteris-llc/converge/graph/node"
"github.com/asteris-llc/converge/helpers/logging"
"github.com/stretchr/testify/assert"
"golang.org/x/net/context"
)

func TestNotifyTransform(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion healthcheck/healthcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
package healthcheck

import (
"context"
"errors"

"github.com/asteris-llc/converge/graph"
"github.com/asteris-llc/converge/graph/node"
"github.com/asteris-llc/converge/resource"
"golang.org/x/net/context"
)

// Check defines the interface for a health check
Expand Down
3 changes: 1 addition & 2 deletions helpers/logging/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
package logging

import (
"context"

"github.com/Sirupsen/logrus"
"golang.org/x/net/context"
)

var loggerKey = struct{}{}
Expand Down
2 changes: 1 addition & 1 deletion helpers/testing/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package http

import (
"context"
"errors"
"fmt"
"math/rand"
Expand All @@ -26,6 +25,7 @@ import (

log "github.com/Sirupsen/logrus"
"github.com/asteris-llc/converge/rpc"
"golang.org/x/net/context"
)

// ServeFile constructs a SingleFileServer on a random port, returning that
Expand Down
2 changes: 1 addition & 1 deletion load/dependencyresolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package load

import (
"context"
"fmt"
"io/ioutil"
"sort"
Expand All @@ -29,6 +28,7 @@ import (
"github.com/asteris-llc/converge/render/extensions"
"github.com/asteris-llc/converge/render/preprocessor"
"github.com/pkg/errors"
"golang.org/x/net/context"
)

type dependencyGenerator func(g *graph.Graph, id string, node *parse.Node) ([]string, error)
Expand Down
2 changes: 1 addition & 1 deletion load/dependencyresolver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
package load_test

import (
"context"
"testing"

"github.com/asteris-llc/converge/graph"
Expand All @@ -24,6 +23,7 @@ import (
"github.com/asteris-llc/converge/parse"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)

// TestDependencyResolverResolvesDependencies tests dependency resolution
Expand Down
3 changes: 1 addition & 2 deletions load/load.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
package load

import (
"context"

"github.com/asteris-llc/converge/graph"
"github.com/pkg/errors"
"golang.org/x/net/context"
)

// Load produces a fully-formed graph from the given root
Expand Down
Loading

0 comments on commit 11eb528

Please sign in to comment.