From cf7ffab258b292e45c150557b68644c99f6d8c70 Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Fri, 24 Oct 2025 14:10:37 +0200 Subject: [PATCH] Remove unused SimplePrompt and DefaultPrompt functions These functions were added in 5ed635a24 (Aug 2023) for the OAuth enrollment feature but became orphaned in c3ced68c6 (Nov 2023) when the Databricks SDK removed the OAuthEnrollment API. They have been unused for nearly 2 years. --- libs/cmdio/io.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/libs/cmdio/io.go b/libs/cmdio/io.go index 17e3b7531f..813c708e9c 100644 --- a/libs/cmdio/io.go +++ b/libs/cmdio/io.go @@ -203,35 +203,6 @@ func RunSelect(ctx context.Context, prompt *promptui.Select) (int, string, error return prompt.Run() } -func (c *cmdIO) simplePrompt(label string) *promptui.Prompt { - return &promptui.Prompt{ - Label: label, - Stdin: io.NopCloser(c.in), - Stdout: nopWriteCloser{c.out}, - } -} - -func (c *cmdIO) SimplePrompt(label string) (value string, err error) { - return c.simplePrompt(label).Run() -} - -func SimplePrompt(ctx context.Context, label string) (value string, err error) { - c := fromContext(ctx) - return c.SimplePrompt(label) -} - -func (c *cmdIO) DefaultPrompt(label, defaultValue string) (value string, err error) { - prompt := c.simplePrompt(label) - prompt.Default = defaultValue - prompt.AllowEdit = true - return prompt.Run() -} - -func DefaultPrompt(ctx context.Context, label, defaultValue string) (value string, err error) { - c := fromContext(ctx) - return c.DefaultPrompt(label, defaultValue) -} - func (c *cmdIO) Spinner(ctx context.Context) chan string { var sp *spinner.Spinner if c.interactive {