Skip to content

Commit

Permalink
fix module name
Browse files Browse the repository at this point in the history
  • Loading branch information
danenania committed Nov 18, 2023
1 parent ed4cde6 commit cee0f8b
Show file tree
Hide file tree
Showing 49 changed files with 85 additions and 91 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ This project and its contibutors are expected to uphold the [Go Community Code o

## Getting help

* [Open an issue](https://github.com/AlecAivazis/survey/issues/new/choose)
* Reach out to `@AlecAivazis` or `@mislav` in the Gophers slack (please use only when urgent)
- [Open an issue](https://github.com/plandex-ai/survey/issues/new/choose)
- Reach out to `@AlecAivazis` or `@mislav` in the Gophers slack (please use only when urgent)

## Submitting a contribution

Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
# Survey

[![GoDoc](http://img.shields.io/badge/godoc-reference-5272B4.svg)](https://pkg.go.dev/github.com/AlecAivazis/survey/v2)
[![GoDoc](http://img.shields.io/badge/godoc-reference-5272B4.svg)](https://pkg.go.dev/github.com/plandex-ai/survey/v2)

A library for building interactive and accessible prompts on terminals supporting ANSI escape sequences.

⚠️ This project is no longer maintained. For an alternative, please check out: https://github.com/charmbracelet/bubbletea ⚠️

Hey everyone! I finally came to terms with the fact that I can no longer dedicate enough time to keep this library alive.
Hey everyone! I finally came to terms with the fact that I can no longer dedicate enough time to keep this library alive.
This project outgrew my wildest expectations and was such a great experience. If someone else wants to take over maintainence,
please reach out


<img width="550" src="https://thumbs.gfycat.com/VillainousGraciousKouprey-size_restricted.gif"/>


```go
package main

import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down Expand Up @@ -371,7 +369,7 @@ By default, users can select all of the multi-select options using the right arr

```golang
import (
"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

number := ""
Expand All @@ -386,7 +384,7 @@ Also by default, users can use the left arrow key to unselect all of the options

```golang
import (
"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

number := ""
Expand All @@ -397,15 +395,14 @@ prompt := &survey.Input{
survey.AskOne(prompt, &number, survey.WithRemoveSelectNone())
```


### Changing the input rune

In some situations, `?` is a perfectly valid response. To handle this, you can change the rune that survey
looks for with `WithHelpInput`:

```golang
import (
"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

number := ""
Expand All @@ -424,7 +421,7 @@ follows the patterns outlined [here](https://github.com/mgutz/ansi#style-format)

```golang
import (
"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

number := ""
Expand Down Expand Up @@ -497,14 +494,14 @@ For some examples, you can see any of the tests in this repo.

survey aims to support most terminal emulators; it expects support for ANSI escape sequences.
This means that reading from piped stdin or writing to piped stdout is **not supported**,
and likely to break your application in these situations. See [#337](https://github.com/AlecAivazis/survey/pull/337#issue-581351617)
and likely to break your application in these situations. See [#337](https://github.com/plandex-ai/survey/pull/337#issue-581351617)

### Why isn't Ctrl-C working?

Ordinarily, when you type Ctrl-C, the terminal recognizes this as the QUIT button and delivers a SIGINT signal to the process, which terminates it.
However, Survey temporarily configures the terminal to deliver control codes as ordinary input bytes.
When Survey reads a ^C byte (ASCII \x03, "end of text"), it interrupts the current survey and returns a
`github.com/AlecAivazis/survey/v2/terminal.InterruptErr` from `Ask` or `AskOne`.
`github.com/plandex-ai/survey/v2/terminal.InterruptErr` from `Ask` or `AskOne`.
If you want to stop the process, handle the returned error in your code:

```go
Expand Down
4 changes: 2 additions & 2 deletions confirm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"testing"

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
"github.com/stretchr/testify/assert"
)

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

"github.com/AlecAivazis/survey/v2/terminal"
shellquote "github.com/kballard/go-shellquote"
"github.com/plandex-ai/survey/v2/terminal"
)

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

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/countrylist.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/cursor.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/inputfilesuggestion.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"path/filepath"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

func suggestFiles(toComplete string) []string {
Expand Down
2 changes: 1 addition & 1 deletion examples/longlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/longmulti.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

survey "github.com/AlecAivazis/survey/v2"
survey "github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/longmultikeepfilter.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"
"strings"

survey "github.com/AlecAivazis/survey/v2"
survey "github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/password.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/select_description.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

type Meal struct {
Expand Down
2 changes: 1 addition & 1 deletion examples/simple.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
2 changes: 1 addition & 1 deletion examples/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ package main
import (
"fmt"

"github.com/AlecAivazis/survey/v2"
"github.com/plandex-ai/survey/v2"
)

// the questions to ask
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/plandex-ai/survey/v2

require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2
github.com/creack/pty v1.1.17
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/mattn/go-isatty v0.0.8
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b
github.com/stretchr/testify v1.6.1
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211
Expand Down
17 changes: 7 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
github.com/AlecAivazis/survey/v2 v2.3.7 h1:6I/u8FvytdGsgonrYsVn2t8t4QiRnh6QSTqkkhIiSjQ=
github.com/AlecAivazis/survey/v2 v2.3.7/go.mod h1:xUTIdE4KCOIjsBAE1JYsUPoCqYdZ1reCfTwbto0Fduo=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec h1:qv2VnGeEQHchGaZ/u7lxST/RaJw+cv273q79D81Xbog=
github.com/hinshun/vt10x v0.0.0-20220119200601-820417d04eec/go.mod h1:Q48J4R4DvxnHolD5P8pOtXigYlRuPLGl6moFx3ulM68=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs=
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8=
github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-isatty v0.0.8 h1:HLtExJ+uU2HOZ+wI0Tt5DtUDrx8yhUqDcp7fYERX4CE=
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
github.com/mattn/go-isatty v0.0.16 h1:bq3VjFmv/sOjHtdEhmkEV4x1AJtvUvOJ2PFAZ5+peKQ=
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b h1:j7+1HpAFS1zy5+Q4qx1fWh90gTKwiN4QCGoY9TWyyO4=
github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
Expand All @@ -32,12 +29,12 @@ golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab h1:2QkjZIsXupsJbJIdSjjUOgWK3aEtzyuh2mPt3l/CkeU=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand Down
4 changes: 2 additions & 2 deletions input.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package survey
import (
"errors"

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
)

/*
Expand Down
4 changes: 2 additions & 2 deletions input_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion multiline.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package survey
import (
"strings"

"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/terminal"
)

type Multiline struct {
Expand Down
4 changes: 2 additions & 2 deletions multiline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"os"
"testing"

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions multiselect.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"fmt"

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
)

/*
Expand Down
4 changes: 2 additions & 2 deletions multiselect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
)

func init() {
Expand Down
4 changes: 2 additions & 2 deletions password.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"strings"

"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
)

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

"github.com/AlecAivazis/survey/v2/core"
"github.com/plandex-ai/survey/v2/core"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions renderer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package survey
import (
"bytes"
"fmt"
"github.com/AlecAivazis/survey/v2/core"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/plandex-ai/survey/v2/core"
"github.com/plandex-ai/survey/v2/terminal"
"golang.org/x/term"
)

Expand Down
2 changes: 1 addition & 1 deletion renderer_posix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"testing"

"github.com/AlecAivazis/survey/v2/terminal"
pseudotty "github.com/creack/pty"
"github.com/plandex-ai/survey/v2/terminal"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
Loading

0 comments on commit cee0f8b

Please sign in to comment.