안쓰는 코드 정리 및 bson을 json으로 통일. 추후 gob으로 변경 예정

This commit is contained in:
2023-09-08 15:26:30 +09:00
parent 3603c0386b
commit 46ce5f0989
5 changed files with 12 additions and 289 deletions

View File

@ -18,8 +18,6 @@ import (
"repositories.action2quare.com/ayo/gocommon/flagx"
"repositories.action2quare.com/ayo/gocommon/logger"
"go.mongodb.org/mongo-driver/bson"
)
var linkupdate = flagx.String("updatelink", "", "")
@ -239,17 +237,3 @@ func ReplyUpdateComplete() {
// return (uint32(b[0]) << 0) | (uint32(b[1]) << 8) | (uint32(b[2]) << 16) | (uint32(b[3]) << 24)
// }
type BsonMarshaler[T any] struct {
val T
}
func NewBsonMarshaler[T any](val T) *BsonMarshaler[T] {
return &BsonMarshaler[T]{
val: val,
}
}
func (m *BsonMarshaler[T]) MarshalBinary() (data []byte, err error) {
return bson.Marshal(m.val)
}