Skip to content

Commit 39f97a5

Browse files
authored
Remove unused SimplePrompt and DefaultPrompt functions (#3819)
## Why These functions were added in 5ed635a (Aug 2023) for the OAuth enrollment feature but became orphaned in c3ced68 (Nov 2023) when the Databricks SDK removed OAuth enrollment. They have been unused for nearly 2 years.
1 parent afe399e commit 39f97a5

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

libs/cmdio/io.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -203,35 +203,6 @@ func RunSelect(ctx context.Context, prompt *promptui.Select) (int, string, error
203203
return prompt.Run()
204204
}
205205

206-
func (c *cmdIO) simplePrompt(label string) *promptui.Prompt {
207-
return &promptui.Prompt{
208-
Label: label,
209-
Stdin: io.NopCloser(c.in),
210-
Stdout: nopWriteCloser{c.out},
211-
}
212-
}
213-
214-
func (c *cmdIO) SimplePrompt(label string) (value string, err error) {
215-
return c.simplePrompt(label).Run()
216-
}
217-
218-
func SimplePrompt(ctx context.Context, label string) (value string, err error) {
219-
c := fromContext(ctx)
220-
return c.SimplePrompt(label)
221-
}
222-
223-
func (c *cmdIO) DefaultPrompt(label, defaultValue string) (value string, err error) {
224-
prompt := c.simplePrompt(label)
225-
prompt.Default = defaultValue
226-
prompt.AllowEdit = true
227-
return prompt.Run()
228-
}
229-
230-
func DefaultPrompt(ctx context.Context, label, defaultValue string) (value string, err error) {
231-
c := fromContext(ctx)
232-
return c.DefaultPrompt(label, defaultValue)
233-
}
234-
235206
func (c *cmdIO) Spinner(ctx context.Context) chan string {
236207
var sp *spinner.Spinner
237208
if c.interactive {

0 commit comments

Comments
 (0)