feat 初始化
This commit is contained in:
13
utils/channel.go
Normal file
13
utils/channel.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"git.hlsq.asia/alex/proto/proto/ss/sspb"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// GetChannelName 获得频道名称
|
||||
func GetChannelName(t sspb.ChannelType, sn int64) string {
|
||||
s := sspb.ChannelType_name[int32(t)]
|
||||
return fmt.Sprintf("%v-%v", strings.TrimPrefix(s, "CHANNEL_TYPE_"), sn)
|
||||
}
|
||||
Reference in New Issue
Block a user