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
|
```go
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
"github.com/posener/complete/predict"
|
"github.com/posener/complete/v2/predict"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -99,7 +99,7 @@ To use this feature, simply call `complete.CommandLine` before `flag.Parse`. (Se
|
||||||
```diff
|
```diff
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
+ "github.com/posener/complete"
|
+ "github.com/posener/complete/v2"
|
||||||
)
|
)
|
||||||
var (
|
var (
|
||||||
// Define flags here...
|
// Define flags here...
|
||||||
|
@ -121,8 +121,8 @@ flag with values, it is possible to use the `github.com/posener/complete/compfla
|
||||||
```diff
|
```diff
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
+ "github.com/posener/complete"
|
+ "github.com/posener/complete/v2"
|
||||||
+ "github.com/posener/complete/compflag"
|
+ "github.com/posener/complete/v2/compflag"
|
||||||
)
|
)
|
||||||
var (
|
var (
|
||||||
// Define flags here...
|
// Define flags here...
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
//
|
//
|
||||||
// Usage
|
// Usage
|
||||||
//
|
//
|
||||||
// import "github.com/posener/complete/compflag"
|
// import "github.com/posener/complete/v2/compflag"
|
||||||
//
|
//
|
||||||
// var (
|
// var (
|
||||||
// // Define flags...
|
// // Define flags...
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
//
|
//
|
||||||
// import (
|
// import (
|
||||||
// "flag"
|
// "flag"
|
||||||
// "github.com/posener/complete/compflag"
|
// "github.com/posener/complete/v2/compflag"
|
||||||
// )
|
// )
|
||||||
//
|
//
|
||||||
// var (
|
// var (
|
||||||
|
@ -41,7 +41,7 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Flag options.
|
// Flag options.
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"flag"
|
"flag"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,9 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/posener/complete/internal/arg"
|
"github.com/posener/complete/v2/internal/arg"
|
||||||
"github.com/posener/complete/internal/install"
|
"github.com/posener/complete/v2/internal/install"
|
||||||
"github.com/posener/complete/internal/tokener"
|
"github.com/posener/complete/v2/internal/tokener"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Completer is an interface that a command line should implement in order to get bash completion.
|
// Completer is an interface that a command line should implement in order to get bash completion.
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/posener/complete/internal/arg"
|
"github.com/posener/complete/v2/internal/arg"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"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 (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
"github.com/posener/complete/predict"
|
"github.com/posener/complete/v2/predict"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -87,7 +87,7 @@ To use this feature, simply call `complete.CommandLine` before `flag.Parse`. (Se
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
+ "github.com/posener/complete"
|
+ "github.com/posener/complete/v2"
|
||||||
)
|
)
|
||||||
var (
|
var (
|
||||||
// Define flags here...
|
// Define flags here...
|
||||||
|
@ -107,8 +107,8 @@ flag with values, it is possible to use the `github.com/posener/complete/compfla
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"flag"
|
"flag"
|
||||||
+ "github.com/posener/complete"
|
+ "github.com/posener/complete/v2"
|
||||||
+ "github.com/posener/complete/compflag"
|
+ "github.com/posener/complete/v2/compflag"
|
||||||
)
|
)
|
||||||
var (
|
var (
|
||||||
// Define flags here...
|
// Define flags here...
|
||||||
|
|
|
@ -7,8 +7,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
"github.com/posener/complete/predict"
|
"github.com/posener/complete/v2/predict"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/posener/complete/compflag"
|
"github.com/posener/complete/v2/compflag"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -7,7 +7,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module github.com/posener/complete
|
module github.com/posener/complete/v2
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/hashicorp/go-multierror v1.0.0
|
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/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 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
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/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 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
"github.com/posener/complete/predict"
|
"github.com/posener/complete/v2/predict"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -9,7 +9,7 @@ import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/posener/complete/predict"
|
"github.com/posener/complete/v2/predict"
|
||||||
)
|
)
|
||||||
|
|
||||||
// predictPackages completes packages in the directory pointed by a.Last
|
// predictPackages completes packages in the directory pointed by a.Last
|
||||||
|
|
|
@ -6,7 +6,7 @@ import (
|
||||||
"regexp"
|
"regexp"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
|
@ -5,7 +5,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPredictions(t *testing.T) {
|
func TestPredictions(t *testing.T) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package arg
|
||||||
|
|
||||||
import "strings"
|
import "strings"
|
||||||
|
|
||||||
import "github.com/posener/complete/internal/tokener"
|
import "github.com/posener/complete/v2/internal/tokener"
|
||||||
|
|
||||||
// Arg is typed a command line argument.
|
// Arg is typed a command line argument.
|
||||||
type Arg struct {
|
type Arg struct {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Package predict provides helper functions for completion predictors.
|
// Package predict provides helper functions for completion predictors.
|
||||||
package predict
|
package predict
|
||||||
|
|
||||||
import "github.com/posener/complete"
|
import "github.com/posener/complete/v2"
|
||||||
|
|
||||||
// Set predicts a set of predefined values.
|
// Set predicts a set of predefined values.
|
||||||
type Set []string
|
type Set []string
|
||||||
|
|
|
@ -3,7 +3,7 @@ package predict
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/posener/complete"
|
"github.com/posener/complete/v2"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ import (
|
||||||
"sort"
|
"sort"
|
||||||
"testing"
|
"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.
|
// Test is a testing helper function for testing bash completion of a given completer.
|
||||||
|
|
Loading…
Reference in New Issue