Skip to content

Commit

Permalink
main frame
Browse files Browse the repository at this point in the history
  • Loading branch information
hootuu committed Sep 19, 2023
1 parent f9486c4 commit 023eb8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
14 changes: 14 additions & 0 deletions strs/crypto.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package strs

import (
"crypto/md5"
"encoding/hex"
)

func MD5(str string) string {
hash := md5.New()
hash.Write([]byte(str))
hashValue := hash.Sum(nil)
md5Str := hex.EncodeToString(hashValue)
return md5Str
}
3 changes: 2 additions & 1 deletion sys/serv.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sys

import (
"github.com/hootuu/utils/configure"
"github.com/hootuu/utils/errors"
"github.com/rs/xid"
"os"
"strings"
Expand All @@ -10,7 +11,7 @@ import (
var ServerID string
var RunMode Mode

func Exit(err error) {
func Exit(err *errors.Error) {
if err != nil {
Error("Crash error: ", err.Error())
}
Expand Down

0 comments on commit 023eb8e

Please sign in to comment.