refactor: kcrypto 包更名为 crypto,与目录名对应
This commit is contained in:
parent
ed8ee4a542
commit
1ae14f0d7b
|
@ -6,7 +6,7 @@ import (
|
||||||
"github.com/kercylan98/minotaur/utils/generic"
|
"github.com/kercylan98/minotaur/utils/generic"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewList 创建一个排名从0开始的排行榜
|
// NewList 创建一个排名从 0 开始的排行榜
|
||||||
func NewList[CompetitorID comparable, Score generic.Ordered](options ...ListOption[CompetitorID, Score]) *List[CompetitorID, Score] {
|
func NewList[CompetitorID comparable, Score generic.Ordered](options ...ListOption[CompetitorID, Score]) *List[CompetitorID, Score] {
|
||||||
rankingList := &List[CompetitorID, Score]{
|
rankingList := &List[CompetitorID, Score]{
|
||||||
event: new(event[CompetitorID, Score]),
|
event: new(event[CompetitorID, Score]),
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package kcrypto
|
package crypto
|
||||||
|
|
||||||
import "encoding/base64"
|
import "encoding/base64"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package kcrypto
|
package crypto
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"hash/crc32"
|
"hash/crc32"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package kcrypto
|
package crypto
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/md5"
|
"crypto/md5"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package kcrypto
|
package crypto
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha1"
|
"crypto/sha1"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package kcrypto
|
package crypto
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crypto/sha256"
|
"crypto/sha256"
|
||||||
|
|
|
@ -8,6 +8,7 @@ import (
|
||||||
var json = jsonIter.ConfigCompatibleWithStandardLibrary
|
var json = jsonIter.ConfigCompatibleWithStandardLibrary
|
||||||
|
|
||||||
// MarshalJSON 将对象转换为 json
|
// MarshalJSON 将对象转换为 json
|
||||||
|
// - 当转换失败时,将返回 json 格式的空对象
|
||||||
func MarshalJSON(v interface{}) []byte {
|
func MarshalJSON(v interface{}) []byte {
|
||||||
b, err := json.Marshal(v)
|
b, err := json.Marshal(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue