github.com/pluralsh/plural-cli@v0.9.5/pkg/utils/string.go (about)

     1  package utils
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  func Pluralize(one, many string, count int) string {
     8  	if count == 1 {
     9  		return one
    10  	}
    11  	return many
    12  }
    13  
    14  func ToString(val interface{}) string {
    15  	return fmt.Sprintf("%v", val)
    16  }