gitlab.com/evatix-go/core@v1.3.55/errcore/MessageNameValues.go (about)

     1  package errcore
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"gitlab.com/evatix-go/core/namevalue"
     7  )
     8  
     9  func MessageNameValues(
    10  	message string,
    11  	nameValues ...namevalue.Instance,
    12  ) string {
    13  	if len(nameValues) == 0 {
    14  		return message
    15  	}
    16  
    17  	compiledMap := VarNameValues(nameValues...)
    18  
    19  	return fmt.Sprintf(
    20  		messageMapFormat,
    21  		message,
    22  		compiledMap)
    23  }