diff --git a/hsp/constants.go b/hsp/constants.go index 4b87548..6b3b42e 100644 --- a/hsp/constants.go +++ b/hsp/constants.go @@ -6,6 +6,9 @@ import ( "strings" ) +// DO NOT CHANGE THIS +const HSP_PORT = "998" + const ( H_STATUS = "status" H_DATA_FORMAT = "data-format" @@ -70,3 +73,10 @@ func ParseDataFormat(format string) (*DataFormat, error) { }, nil } +func (df *DataFormat) String() string { + if df.Format == DF_BYTES { + return df.Format + } + return fmt.Sprintf("%s:%s", df.Format, df.Encoding) +} +