Skip to content

Instantly share code, notes, and snippets.

@luizbranco luizbranco/main.go
Created Nov 23, 2017

What would you like to do?
promptui demo step 7
funcMap := promptui.FuncMap
funcMap["truncate"] = func(size int, input string) string {
if len(input) <= size {
return input
return input[:size-3] + "..."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.