Files
checky/object.go

19 lines
256 B
Go
Raw Normal View History

2022-03-15 04:52:43 +00:00
package main
import "fmt"
type Object interface {
GetType() string
GetId() string
}
func ObjectKey(obj Object) string {
return fmt.Sprintf(
"%d:%s:%d:%s",
len(obj.GetType()),
obj.GetType(),
len(obj.GetId()),
obj.GetId(),
)
}