We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! Found some data races when using Run() for promptui.Prompt. Is it my bad or is it some bug on your side?
Sincerely, mindhunter86!
package cli import ( "bufio" "bytes" "fmt" "io" "log" "net" "github.com/manifoldco/promptui" "github.com/urfave/cli/v2" ) func TestDial(c *cli.Context, _ string) (err error) { log.Println("trying to connect via unix socket") conn, err := net.Dial("unix", c.String("socket-path")) if err != nil { return } defer conn.Close() log.Println("connection successfull") var buf = bytes.NewBuffer(nil) for { buf.Reset() pr := promptui.Prompt{ Label: ":>", Templates: &promptui.PromptTemplates{ Prompt: "{{ . }} ", Valid: "{{ . | green }} ", Invalid: "{{ . | red }} ", Success: "{{ . | bold }} ", }, AllowEdit: true, } var data string data, err = pr.Run() if err != nil { return } buf.WriteString(data + "\n") _, err = io.Copy(conn, buf) if err != nil { return } buf.Reset() scanner := bufio.NewScanner(conn) var lines []string for { scanner.Scan() line := scanner.Text() if len(line) == 0 { break } lines = append(lines, line) } if scanner.Err() != nil { return } for _, line := range lines { fmt.Println(line) } } }
================== WARNING: DATA RACE Read at 0x00c000186578 by main goroutine: github.com/manifoldco/promptui.(*Cursor).Get() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/cursor.go:151 +0x52 github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:196 +0xd10 github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c000186578 by goroutine 24: github.com/manifoldco/promptui.(*Cursor).Update() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/cursor.go:145 +0x5dd github.com/manifoldco/promptui.(*Cursor).Listen() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/cursor.go:203 +0x135 github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:162 +0x14a github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c000536080 by main goroutine: github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:196 +0xd75 github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous read at 0x00c000536080 by goroutine 24: github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:183 +0x7eb github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Read at 0x00c000186540 by main goroutine: bytes.(*Buffer).Reset() /usr/local/go/src/bytes/buffer.go:98 +0x37 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Reset() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:36 +0x57 github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:243 +0x190f github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c000186540 by goroutine 24: bytes.(*Buffer).Reset() /usr/local/go/src/bytes/buffer.go:98 +0x4c bytes.(*Buffer).WriteTo() /usr/local/go/src/bytes/buffer.go:268 +0x336 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Flush() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:128 +0x33a github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:188 +0x9d3 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c000186558 by main goroutine: bytes.(*Buffer).Reset() /usr/local/go/src/bytes/buffer.go:99 +0x71 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Reset() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:36 +0x57 github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:243 +0x190f github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c000186558 by goroutine 24: bytes.(*Buffer).WriteTo() /usr/local/go/src/bytes/buffer.go:256 +0x230 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Flush() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:128 +0x33a github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:188 +0x9d3 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c000186560 by main goroutine: bytes.(*Buffer).Reset() /usr/local/go/src/bytes/buffer.go:100 +0x96 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Reset() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:36 +0x57 github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:243 +0x190f github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c000186560 by goroutine 24: bytes.(*Buffer).Reset() /usr/local/go/src/bytes/buffer.go:100 +0x96 bytes.(*Buffer).WriteTo() /usr/local/go/src/bytes/buffer.go:268 +0x336 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Flush() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:128 +0x33a github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:188 +0x9d3 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c000186528 by main goroutine: github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Reset() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:37 +0x6f github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:243 +0x190f github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c000186528 by goroutine 24: github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Reset() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:37 +0x6f github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:181 +0x789 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Read at 0x00c000186538 by main goroutine: github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Clear() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:42 +0x7a github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:68 +0x2ec github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:244 +0x195c github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c000186538 by goroutine 24: github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Clear() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:53 +0x27b github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:68 +0x2ec github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:182 +0x7d6 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c0000fe0c0 by main goroutine: runtime.slicecopy() /usr/local/go/src/runtime/slice.go:307 +0x0 bytes.(*Buffer).Write() /usr/local/go/src/bytes/buffer.go:172 +0x1fa github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Clear() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:43 +0x104 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:68 +0x2ec github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:244 +0x195c github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c0000fe0c0 by goroutine 24: runtime.slicecopy() /usr/local/go/src/runtime/slice.go:307 +0x0 bytes.(*Buffer).Write() /usr/local/go/src/bytes/buffer.go:172 +0x1fa github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Flush() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:136 +0x495 github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:188 +0x9d3 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c000186530 by main goroutine: github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Clear() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:52 +0x253 github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:68 +0x2ec github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:244 +0x195c github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c000186530 by goroutine 24: github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Flush() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:142 +0x536 github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:188 +0x9d3 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c0000fe0c9 by main goroutine: runtime.slicecopy() /usr/local/go/src/runtime/slice.go:307 +0x0 bytes.(*Buffer).Write() /usr/local/go/src/bytes/buffer.go:172 +0x1fa github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:75 +0x45e github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:244 +0x195c github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c0000fe0c9 by goroutine 24: runtime.slicecopy() /usr/local/go/src/runtime/slice.go:307 +0x0 bytes.(*Buffer).Write() /usr/local/go/src/bytes/buffer.go:172 +0x1fa github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:75 +0x45e github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:182 +0x7d6 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 ================== ================== WARNING: DATA RACE Write at 0x00c0000fe0e4 by main goroutine: runtime.slicecopy() /usr/local/go/src/runtime/slice.go:307 +0x0 bytes.(*Buffer).Write() /usr/local/go/src/bytes/buffer.go:172 +0x1fa github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/screenbuf/screenbuf.go:85 +0x6f5 github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:244 +0x195c github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4 Previous write at 0x00c0000fe0e0 by goroutine 24: runtime.slicecopy() /usr/local/go/src/runtime/slice.go:307 +0x0 bytes.(*Buffer).Write() /usr/local/go/src/bytes/buffer.go:172 +0x1fa github.com/manifoldco/promptui/screenbuf.(*ScreenBuf).Write() github.com/manifoldco/promptui.(*Prompt).Run.func2() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:182 +0x7d6 github.com/chzyer/readline.(*DumpListener).OnChange() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:516 +0x12a github.com/chzyer/readline.(*Operation).ioloop() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:339 +0x26ea github.com/chzyer/readline.NewOperation.func2() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x44 Goroutine 24 (running) created at: github.com/chzyer/readline.NewOperation() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/operation.go:88 +0x8e9 github.com/chzyer/readline.(*Terminal).Readline() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/terminal.go:95 +0x6e github.com/chzyer/readline.NewEx() /workspaces/repos/pkg/mod/github.com/chzyer/readline@v0.0.0-20180603132655-2972be24d48e/readline.go:167 +0x13b github.com/manifoldco/promptui.(*Prompt).Run() /workspaces/repos/pkg/mod/github.com/manifoldco/promptui@v0.9.0/prompt.go:138 +0x55e github.com/MindHunter86/aniliSeeder/cli.TestDial() /workspaces/repos/aniliSeeder/cli/cli.go:59 +0x764 main.main.func3() /workspaces/repos/aniliSeeder/main.go:294 +0x4b github.com/urfave/cli/v2.(*Command).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/command.go:177 +0x1449 github.com/urfave/cli/v2.(*App).RunContext() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:387 +0x1974 github.com/urfave/cli/v2.(*App).Run() /workspaces/repos/pkg/mod/github.com/urfave/cli/v2@v2.17.1/app.go:252 +0xd3 main.main() /workspaces/repos/aniliSeeder/main.go:302 +0x5fd4
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! Found some data races when using Run() for promptui.Prompt.
Is it my bad or is it some bug on your side?
Sincerely, mindhunter86!
Code example && data race logs
Part of my test code:
Data races logs:
The text was updated successfully, but these errors were encountered: