Skip to content

Commit

Permalink
refactor:update
Browse files Browse the repository at this point in the history
  • Loading branch information
gphper committed Jul 24, 2022
1 parent f9c0900 commit 92d114c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions cmd/run/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import (
"context"
"grm/router"
"grm/web"
"io/ioutil"
"log"
"net"
"net/http"
"os"
"os/signal"
"time"

"github.com/gin-gonic/gin"
"github.com/spf13/cobra"
)

Expand All @@ -32,6 +34,9 @@ func init() {

func runFunction(cmd *cobra.Command, args []string) {

gin.SetMode(gin.ReleaseMode)
gin.DefaultWriter = ioutil.Discard

router := router.Init()

router.StaticFS("/static", web.StaticsFs)
Expand Down
2 changes: 1 addition & 1 deletion cmd/user/add.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func userAddFunc(cmd *cobra.Command, args []string) {
fmt.Println("Please input password:")
fmt.Scan(&password)

fmt.Printf("%s %s", username, password)
fmt.Println("success!")

user := global.GlobalConf.Accounts
user[username] = password
Expand Down

0 comments on commit 92d114c

Please sign in to comment.