refactor: kcrypto 包更名为 crypto,与目录名对应

This commit is contained in:
kercylan98 2023-07-27 16:46:09 +08:00
parent ed8ee4a542
commit 1ae14f0d7b
7 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@ import (
"github.com/kercylan98/minotaur/utils/generic"
)
// NewList 创建一个排名从0开始的排行榜
// NewList 创建一个排名从 0 开始的排行榜
func NewList[CompetitorID comparable, Score generic.Ordered](options ...ListOption[CompetitorID, Score]) *List[CompetitorID, Score] {
rankingList := &List[CompetitorID, Score]{
event: new(event[CompetitorID, Score]),

View File

@ -1,4 +1,4 @@
package kcrypto
package crypto
import "encoding/base64"

View File

@ -1,4 +1,4 @@
package kcrypto
package crypto
import (
"hash/crc32"

View File

@ -1,4 +1,4 @@
package kcrypto
package crypto
import (
"crypto/md5"

View File

@ -1,4 +1,4 @@
package kcrypto
package crypto
import (
"crypto/sha1"

View File

@ -1,4 +1,4 @@
package kcrypto
package crypto
import (
"crypto/sha256"

View File

@ -8,6 +8,7 @@ import (
var json = jsonIter.ConfigCompatibleWithStandardLibrary
// MarshalJSON 将对象转换为 json
// - 当转换失败时,将返回 json 格式的空对象
func MarshalJSON(v interface{}) []byte {
b, err := json.Marshal(v)
if err != nil {