update module import path
This commit is contained in:
parent
a7d83cca2f
commit
7c7ab2f59a
10
README.md
10
README.md
|
@ -64,8 +64,8 @@ Add bash completion capabilities to any Go program. See [./example/command](./ex
|
|||
```go
|
||||
import (
|
||||
"flag"
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/predict"
|
||||
"github.com/posener/complete/v2"
|
||||
"github.com/posener/complete/v2/predict"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -99,7 +99,7 @@ To use this feature, simply call `complete.CommandLine` before `flag.Parse`. (Se
|
|||
```diff
|
||||
import (
|
||||
"flag"
|
||||
+ "github.com/posener/complete"
|
||||
+ "github.com/posener/complete/v2"
|
||||
)
|
||||
var (
|
||||
// Define flags here...
|
||||
|
@ -121,8 +121,8 @@ flag with values, it is possible to use the `github.com/posener/complete/compfla
|
|||
```diff
|
||||
import (
|
||||
"flag"
|
||||
+ "github.com/posener/complete"
|
||||
+ "github.com/posener/complete/compflag"
|
||||
+ "github.com/posener/complete/v2"
|
||||
+ "github.com/posener/complete/v2/compflag"
|
||||
)
|
||||
var (
|
||||
// Define flags here...
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
//
|
||||
// Usage
|
||||
//
|
||||
// import "github.com/posener/complete/compflag"
|
||||
// import "github.com/posener/complete/v2/compflag"
|
||||
//
|
||||
// var (
|
||||
// // Define flags...
|
||||
|
@ -18,7 +18,7 @@
|
|||
//
|
||||
// import (
|
||||
// "flag"
|
||||
// "github.com/posener/complete/compflag"
|
||||
// "github.com/posener/complete/v2/compflag"
|
||||
// )
|
||||
//
|
||||
// var (
|
||||
|
@ -41,7 +41,7 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/v2"
|
||||
)
|
||||
|
||||
// Flag options.
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"flag"
|
||||
"testing"
|
||||
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -7,9 +7,9 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete/internal/arg"
|
||||
"github.com/posener/complete/internal/install"
|
||||
"github.com/posener/complete/internal/tokener"
|
||||
"github.com/posener/complete/v2/internal/arg"
|
||||
"github.com/posener/complete/v2/internal/install"
|
||||
"github.com/posener/complete/v2/internal/tokener"
|
||||
)
|
||||
|
||||
// Completer is an interface that a command line should implement in order to get bash completion.
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/posener/complete/internal/arg"
|
||||
"github.com/posener/complete/v2/internal/arg"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
|
10
doc.go
10
doc.go
|
@ -54,8 +54,8 @@ Add bash completion capabilities to any Go program. See ./example/command.
|
|||
|
||||
import (
|
||||
"flag"
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/predict"
|
||||
"github.com/posener/complete/v2"
|
||||
"github.com/posener/complete/v2/predict"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -87,7 +87,7 @@ To use this feature, simply call `complete.CommandLine` before `flag.Parse`. (Se
|
|||
|
||||
import (
|
||||
"flag"
|
||||
+ "github.com/posener/complete"
|
||||
+ "github.com/posener/complete/v2"
|
||||
)
|
||||
var (
|
||||
// Define flags here...
|
||||
|
@ -107,8 +107,8 @@ flag with values, it is possible to use the `github.com/posener/complete/compfla
|
|||
|
||||
import (
|
||||
"flag"
|
||||
+ "github.com/posener/complete"
|
||||
+ "github.com/posener/complete/compflag"
|
||||
+ "github.com/posener/complete/v2"
|
||||
+ "github.com/posener/complete/v2/compflag"
|
||||
)
|
||||
var (
|
||||
// Define flags here...
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/predict"
|
||||
"github.com/posener/complete/v2"
|
||||
"github.com/posener/complete/v2/predict"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/posener/complete/compflag"
|
||||
"github.com/posener/complete/v2/compflag"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/posener/complete
|
||||
module github.com/posener/complete/v2
|
||||
|
||||
require (
|
||||
github.com/hashicorp/go-multierror v1.0.0
|
||||
|
|
2
go.sum
2
go.sum
|
@ -6,6 +6,8 @@ github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uP
|
|||
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/posener/complete v1.2.2 h1:xu2vuFugxm4IfAymbmmVrnEVy29eGUDn8I7HheRseHg=
|
||||
github.com/posener/complete v1.2.2/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/predict"
|
||||
"github.com/posener/complete/v2"
|
||||
"github.com/posener/complete/v2/predict"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete/predict"
|
||||
"github.com/posener/complete/v2/predict"
|
||||
)
|
||||
|
||||
// predictPackages completes packages in the directory pointed by a.Last
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"regexp"
|
||||
"strings"
|
||||
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/v2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/v2"
|
||||
)
|
||||
|
||||
func TestPredictions(t *testing.T) {
|
||||
|
|
|
@ -2,7 +2,7 @@ package arg
|
|||
|
||||
import "strings"
|
||||
|
||||
import "github.com/posener/complete/internal/tokener"
|
||||
import "github.com/posener/complete/v2/internal/tokener"
|
||||
|
||||
// Arg is typed a command line argument.
|
||||
type Arg struct {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Package predict provides helper functions for completion predictors.
|
||||
package predict
|
||||
|
||||
import "github.com/posener/complete"
|
||||
import "github.com/posener/complete/v2"
|
||||
|
||||
// Set predicts a set of predefined values.
|
||||
type Set []string
|
||||
|
|
|
@ -3,7 +3,7 @@ package predict
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/posener/complete"
|
||||
"github.com/posener/complete/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"sort"
|
||||
"testing"
|
||||
|
||||
"github.com/posener/complete/internal/arg"
|
||||
"github.com/posener/complete/v2/internal/arg"
|
||||
)
|
||||
|
||||
// Test is a testing helper function for testing bash completion of a given completer.
|
||||
|
|
Loading…
Reference in New Issue