Skip to content

Commit e8d9ec4

Browse files
committed
fix examples and tools
1 parent 113bd64 commit e8d9ec4

File tree

7 files changed

+15
-10
lines changed

7 files changed

+15
-10
lines changed

_example/exec-command/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"os"
55
"os/exec"
66

7-
prompt "github.com/c-bata/go-prompt"
7+
prompt "github.com/ktr0731/go-prompt"
88
)
99

1010
func executor(t string) {

_example/http-prompt/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"path"
1111
"strings"
1212

13-
prompt "github.com/c-bata/go-prompt"
13+
prompt "github.com/ktr0731/go-prompt"
1414
)
1515

1616
type RequestContext struct {

_example/live-prefix/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"fmt"
55

6-
prompt "github.com/c-bata/go-prompt"
6+
prompt "github.com/ktr0731/go-prompt"
77
)
88

99
var LivePrefixState struct {

_example/simple-echo/cjk-cyrillic/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"fmt"
55

6-
prompt "github.com/c-bata/go-prompt"
6+
prompt "github.com/ktr0731/go-prompt"
77
)
88

99
func executor(in string) {

_example/simple-echo/main.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ package main
22

33
import (
44
"fmt"
5+
"log"
56

6-
prompt "github.com/c-bata/go-prompt"
7+
prompt "github.com/ktr0731/go-prompt"
78
)
89

910
func completer(in prompt.Document) []prompt.Suggest {
@@ -17,12 +18,15 @@ func completer(in prompt.Document) []prompt.Suggest {
1718
}
1819

1920
func main() {
20-
in := prompt.Input(">>> ", completer,
21+
in, err := prompt.Input(">>> ", completer,
2122
prompt.OptionTitle("sql-prompt"),
2223
prompt.OptionHistory([]string{"SELECT * FROM users;"}),
2324
prompt.OptionPrefixTextColor(prompt.Yellow),
2425
prompt.OptionPreviewSuggestionTextColor(prompt.Blue),
2526
prompt.OptionSelectedSuggestionBGColor(prompt.LightGray),
2627
prompt.OptionSuggestionBGColor(prompt.DarkGray))
28+
if err != nil {
29+
log.Fatal(err)
30+
}
2731
fmt.Println("Your input: " + in)
2832
}

_tools/complete_file/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"os"
66
"strings"
77

8-
prompt "github.com/c-bata/go-prompt"
9-
"github.com/c-bata/go-prompt/completer"
8+
prompt "github.com/ktr0731/go-prompt"
9+
"github.com/ktr0731/go-prompt/completer"
1010
)
1111

1212
var filePathCompleter = completer.FilePathCompleter{

_tools/vt100_debug/main.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !windows
12
// +build !windows
23

34
package main
@@ -6,8 +7,8 @@ import (
67
"fmt"
78
"syscall"
89

9-
prompt "github.com/c-bata/go-prompt"
10-
"github.com/c-bata/go-prompt/internal/term"
10+
prompt "github.com/ktr0731/go-prompt"
11+
"github.com/ktr0731/go-prompt/internal/term"
1112
)
1213

1314
func main() {

0 commit comments

Comments
 (0)