gitlab.com/evatix-go/core@v1.3.55/simplewrap/CurlyWrapIf.go (about)

     1  package simplewrap
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"gitlab.com/evatix-go/core/constants"
     7  )
     8  
     9  func CurlyWrapIf(
    10  	isCurly bool,
    11  	source interface{},
    12  ) string {
    13  	if !isCurly {
    14  		return fmt.Sprintf(
    15  			constants.SprintValueFormat,
    16  			source)
    17  	}
    18  
    19  	return fmt.Sprintf(
    20  		constants.CurlyWrapFormat,
    21  		source)
    22  }