Files
teleport/integrations/event-handler/lib/cli.go
T
Hugo Shaka 7e9ff5acc2 Vendor teleport-event-handler (#40364)
* Vendor event-forwarder plugin

* fix tests + add Makefile + CI

* lint

* Fix broken test

* use a separate go.mod

* ignore event-handler in flaky tests + update go.mod

* go mod tidy
2024-04-10 15:46:14 +00:00

35 lines
857 B
Go

/*
Copyright 2015-2021 Gravitational, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package lib
import "github.com/manifoldco/promptui"
// AskYesNo displays Y/N prompt
func AskYesNo(message string) bool {
prompt := promptui.Prompt{
Label: message,
IsConfirm: true,
}
result, err := prompt.Run()
if err != nil {
return false
}
return result == "y"
}