gitlab.com/evatix-go/core@v1.3.55/internal/strutilinternal/AnyToString.go (about)

     1  package strutilinternal
     2  
     3  import (
     4  	"fmt"
     5  
     6  	"gitlab.com/evatix-go/core/constants"
     7  )
     8  
     9  func AnyToString(any interface{}) string {
    10  	if any == nil {
    11  		return ""
    12  	}
    13  
    14  	val := ReflectInterfaceVal(any)
    15  
    16  	return fmt.Sprintf(
    17  		constants.SprintValueFormat,
    18  		val)
    19  }