github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/table/service/confirm.go (about)

     1  package serviceTable
     2  
     3  import (
     4  	"strings"
     5  
     6  	structureSpec "github.com/taubyte/go-specs/structure"
     7  	"github.com/taubyte/tau-cli/prompts"
     8  	"github.com/urfave/cli/v2"
     9  )
    10  
    11  func Confirm(ctx *cli.Context, service *structureSpec.Service, prompt string) bool {
    12  	return prompts.ConfirmData(ctx, prompt, [][]string{
    13  		{"Name", service.Name},
    14  		{"Description", service.Description},
    15  		{"Tags", strings.Join(service.Tags, ", ")},
    16  		{"Protocol", service.Protocol},
    17  	})
    18  }