Procházet zdrojové kódy

change module name

chris před 2 roky
rodič
revize
eb24318dc9

+ 1 - 1
README.md

@@ -1,6 +1,6 @@
 # Nunu - An Elegant Golang Scaffold 
 # Nunu - An Elegant Golang Scaffold 
 
 
-[简体中文介绍](https://github.com/go-nunu/nunu-layout/blob/main/README_zh.md)
+[简体中文介绍](https://github.com/go-nunu/nunu-layout-advanced/blob/main/README_zh.md)
 
 
 Nunu is an application scaffold based on Golang. Its name comes from the character Nunu in League of Legends, who is a little boy riding on the shoulder of a snowman. Like Nunu, Go-Nunu also stands on the shoulders of giants, and it is composed of various third-party libraries, including gin, gorm, wire, viper, zap, golang-jwt, go-redis, testify, sonyflake, tableflip, go-survey, cobra, etc. These libraries are very popular in the Golang ecosystem, and their combination can help you quickly build an efficient and reliable application.
 Nunu is an application scaffold based on Golang. Its name comes from the character Nunu in League of Legends, who is a little boy riding on the shoulder of a snowman. Like Nunu, Go-Nunu also stands on the shoulders of giants, and it is composed of various third-party libraries, including gin, gorm, wire, viper, zap, golang-jwt, go-redis, testify, sonyflake, tableflip, go-survey, cobra, etc. These libraries are very popular in the Golang ecosystem, and their combination can help you quickly build an efficient and reliable application.
 
 

+ 1 - 1
README_zh.md

@@ -1,5 +1,5 @@
 # Nunu - 一个优雅的 Golang 脚手架
 # Nunu - 一个优雅的 Golang 脚手架
-[英文介绍](https://github.com/go-nunu/nunu-layout/blob/main/README.md)
+[英文介绍](https://github.com/go-nunu/nunu-layout-advanced/blob/main/README.md)
 
 
 Nunu是一个基于Golang的应用脚手架,它的名字来自于英雄联盟中的角色 努努,努努是一个骑在雪怪肩膀上的小男孩,和努努一样,Go-Nunu也是站在巨人的肩膀上,它是由各种第三方库组合而成的,包括gin、gorm、wire、viper、zap、golang-jwt、go-redis、testify、sonyflake、tableflip、go-survey、cobra等。这些库都是Golang生态中非常流行的库,它们的组合可以帮助你快速构建一个高效、可靠的应用程序。
 Nunu是一个基于Golang的应用脚手架,它的名字来自于英雄联盟中的角色 努努,努努是一个骑在雪怪肩膀上的小男孩,和努努一样,Go-Nunu也是站在巨人的肩膀上,它是由各种第三方库组合而成的,包括gin、gorm、wire、viper、zap、golang-jwt、go-redis、testify、sonyflake、tableflip、go-survey、cobra等。这些库都是Golang生态中非常流行的库,它们的组合可以帮助你快速构建一个高效、可靠的应用程序。
 
 

+ 3 - 3
cmd/job/main.go

@@ -1,9 +1,9 @@
 package main
 package main
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/cmd/job/wire"
-	"github.com/go-nunu/nunu-layout/pkg/config"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/cmd/job/wire"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/config"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 )
 )
 
 
 func main() {
 func main() {

+ 3 - 3
cmd/job/wire/wire.go

@@ -4,9 +4,9 @@
 package wire
 package wire
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/job"
-	"github.com/go-nunu/nunu-layout/internal/provider"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/job"
+	"github.com/go-nunu/nunu-layout-advanced/internal/provider"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/google/wire"
 	"github.com/google/wire"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 )
 )

+ 3 - 3
cmd/job/wire/wire_gen.go

@@ -7,9 +7,9 @@
 package wire
 package wire
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/dao"
-	"github.com/go-nunu/nunu-layout/internal/job"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/dao"
+	"github.com/go-nunu/nunu-layout-advanced/internal/job"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 )
 )
 
 

+ 3 - 3
cmd/migration/main.go

@@ -1,9 +1,9 @@
 package main
 package main
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/cmd/migration/wire"
-	"github.com/go-nunu/nunu-layout/pkg/config"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/cmd/migration/wire"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/config"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 )
 )
 
 
 func main() {
 func main() {

+ 3 - 3
cmd/migration/wire/wire.go

@@ -4,9 +4,9 @@
 package wire
 package wire
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/migration"
-	"github.com/go-nunu/nunu-layout/internal/provider"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/migration"
+	"github.com/go-nunu/nunu-layout-advanced/internal/provider"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/google/wire"
 	"github.com/google/wire"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 )
 )

+ 3 - 3
cmd/migration/wire/wire_gen.go

@@ -7,9 +7,9 @@
 package wire
 package wire
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/dao"
-	"github.com/go-nunu/nunu-layout/internal/migration"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/dao"
+	"github.com/go-nunu/nunu-layout-advanced/internal/migration"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 )
 )
 
 

+ 3 - 3
cmd/server/main.go

@@ -1,9 +1,9 @@
 package main
 package main
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/cmd/server/wire"
-	"github.com/go-nunu/nunu-layout/pkg/config"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/cmd/server/wire"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/config"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"go.uber.org/zap"
 	"go.uber.org/zap"
 )
 )
 
 

+ 2 - 2
cmd/server/wire/wire.go

@@ -5,8 +5,8 @@ package wire
 
 
 import (
 import (
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
-	"github.com/go-nunu/nunu-layout/internal/provider"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/provider"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/google/wire"
 	"github.com/google/wire"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 )
 )

+ 7 - 7
cmd/server/wire/wire_gen.go

@@ -8,13 +8,13 @@ package wire
 
 
 import (
 import (
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
-	"github.com/go-nunu/nunu-layout/internal/dao"
-	"github.com/go-nunu/nunu-layout/internal/handler"
-	"github.com/go-nunu/nunu-layout/internal/middleware"
-	"github.com/go-nunu/nunu-layout/internal/server"
-	"github.com/go-nunu/nunu-layout/internal/service"
-	"github.com/go-nunu/nunu-layout/pkg/helper/sonyflake"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/dao"
+	"github.com/go-nunu/nunu-layout-advanced/internal/handler"
+	"github.com/go-nunu/nunu-layout-advanced/internal/middleware"
+	"github.com/go-nunu/nunu-layout-advanced/internal/server"
+	"github.com/go-nunu/nunu-layout-advanced/internal/service"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/sonyflake"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 )
 )
 
 

+ 0 - 65
go.mod

@@ -1,65 +0,0 @@
-module github.com/go-nunu/nunu-layout
-
-go 1.20
-
-require (
-	github.com/gin-gonic/gin v1.9.1
-	github.com/go-redis/redis/v8 v8.11.5
-	github.com/golang-jwt/jwt/v5 v5.0.0
-	github.com/google/wire v0.5.0
-	github.com/robfig/cron v1.2.0
-	github.com/satori/go.uuid v1.2.0
-	github.com/sony/sonyflake v1.1.0
-	github.com/spf13/viper v1.16.0
-	github.com/stretchr/testify v1.8.4
-	go.uber.org/zap v1.24.0
-	gopkg.in/natefinch/lumberjack.v2 v2.2.1
-	gorm.io/driver/mysql v1.5.1
-	gorm.io/gorm v1.25.1
-)
-
-require (
-	github.com/bytedance/sonic v1.9.1 // indirect
-	github.com/cespare/xxhash/v2 v2.1.2 // indirect
-	github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 // indirect
-	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
-	github.com/fsnotify/fsnotify v1.6.0 // indirect
-	github.com/gabriel-vasile/mimetype v1.4.2 // indirect
-	github.com/gin-contrib/sse v0.1.0 // indirect
-	github.com/go-playground/locales v0.14.1 // indirect
-	github.com/go-playground/universal-translator v0.18.1 // indirect
-	github.com/go-playground/validator/v10 v10.14.0 // indirect
-	github.com/go-sql-driver/mysql v1.7.0 // indirect
-	github.com/goccy/go-json v0.10.2 // indirect
-	github.com/hashicorp/hcl v1.0.0 // indirect
-	github.com/jinzhu/inflection v1.0.0 // indirect
-	github.com/jinzhu/now v1.1.5 // indirect
-	github.com/json-iterator/go v1.1.12 // indirect
-	github.com/klauspost/cpuid/v2 v2.2.4 // indirect
-	github.com/leodido/go-urn v1.2.4 // indirect
-	github.com/magiconair/properties v1.8.7 // indirect
-	github.com/mattn/go-isatty v0.0.19 // indirect
-	github.com/mitchellh/mapstructure v1.5.0 // indirect
-	github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
-	github.com/modern-go/reflect2 v1.0.2 // indirect
-	github.com/pelletier/go-toml/v2 v2.0.8 // indirect
-	github.com/pmezard/go-difflib v1.0.0 // indirect
-	github.com/spf13/afero v1.9.5 // indirect
-	github.com/spf13/cast v1.5.1 // indirect
-	github.com/spf13/jwalterweatherman v1.1.0 // indirect
-	github.com/spf13/pflag v1.0.5 // indirect
-	github.com/subosito/gotenv v1.4.2 // indirect
-	github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
-	github.com/ugorji/go/codec v1.2.11 // indirect
-	go.uber.org/atomic v1.9.0 // indirect
-	go.uber.org/multierr v1.8.0 // indirect
-	golang.org/x/arch v0.3.0 // indirect
-	golang.org/x/crypto v0.9.0 // indirect
-	golang.org/x/net v0.10.0 // indirect
-	golang.org/x/sys v0.8.0 // indirect
-	golang.org/x/text v0.9.0 // indirect
-	google.golang.org/protobuf v1.30.0 // indirect
-	gopkg.in/ini.v1 v1.67.0 // indirect
-	gopkg.in/yaml.v3 v3.0.1 // indirect
-)

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 819 - 11
go.sum


+ 1 - 2
internal/dao/dao.go

@@ -3,8 +3,7 @@ package dao
 import (
 import (
 	"context"
 	"context"
 	"fmt"
 	"fmt"
-	"github.com/go-nunu/nunu-layout/pkg/log"
-	"github.com/go-redis/redis/v8"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 	"gorm.io/driver/mysql"
 	"gorm.io/driver/mysql"
 	"gorm.io/gorm"
 	"gorm.io/gorm"

+ 1 - 1
internal/dao/user.go

@@ -1,7 +1,7 @@
 package dao
 package dao
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/model"
+	"github.com/go-nunu/nunu-layout-advanced/internal/model"
 )
 )
 
 
 type UserDao struct {
 type UserDao struct {

+ 1 - 1
internal/handler/handler.go

@@ -1,7 +1,7 @@
 package handler
 package handler
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/sony/sonyflake"
 	"github.com/sony/sonyflake"
 )
 )
 
 

+ 3 - 3
internal/handler/user.go

@@ -2,9 +2,9 @@ package handler
 
 
 import (
 import (
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
-	"github.com/go-nunu/nunu-layout/internal/model"
-	"github.com/go-nunu/nunu-layout/internal/service"
-	"github.com/go-nunu/nunu-layout/pkg/helper/resp"
+	"github.com/go-nunu/nunu-layout-advanced/internal/model"
+	"github.com/go-nunu/nunu-layout-advanced/internal/service"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/resp"
 	"go.uber.org/zap"
 	"go.uber.org/zap"
 	"net/http"
 	"net/http"
 )
 )

+ 1 - 1
internal/job/job.go

@@ -2,7 +2,7 @@ package job
 
 
 import (
 import (
 	"fmt"
 	"fmt"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/robfig/cron"
 	"github.com/robfig/cron"
 	"gorm.io/gorm"
 	"gorm.io/gorm"
 )
 )

+ 2 - 3
internal/middleware/jwt.go

@@ -3,9 +3,8 @@ package middleware
 import (
 import (
 	"fmt"
 	"fmt"
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
-	"github.com/go-nunu/nunu-layout/pkg/helper/resp"
-	"github.com/go-nunu/nunu-layout/pkg/log"
-	"github.com/golang-jwt/jwt/v5"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/resp"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 	"go.uber.org/zap"
 	"go.uber.org/zap"
 	"net/http"
 	"net/http"

+ 3 - 3
internal/middleware/log.go

@@ -6,9 +6,9 @@ import (
 	"encoding/json"
 	"encoding/json"
 	"fmt"
 	"fmt"
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
-	"github.com/go-nunu/nunu-layout/pkg/helper/md5"
-	"github.com/go-nunu/nunu-layout/pkg/helper/uuid"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/md5"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/uuid"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"go.uber.org/zap"
 	"go.uber.org/zap"
 	"io"
 	"io"
 	"strconv"
 	"strconv"

+ 3 - 3
internal/middleware/sign.go

@@ -2,9 +2,9 @@ package middleware
 
 
 import (
 import (
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
-	"github.com/go-nunu/nunu-layout/pkg/helper/md5"
-	"github.com/go-nunu/nunu-layout/pkg/helper/resp"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/md5"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/resp"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/spf13/viper"
 	"github.com/spf13/viper"
 	"net/http"
 	"net/http"
 	"sort"
 	"sort"

+ 2 - 2
internal/migration/migration.go

@@ -1,8 +1,8 @@
 package migration
 package migration
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/model"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/model"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"gorm.io/gorm"
 	"gorm.io/gorm"
 )
 )
 
 

+ 8 - 8
internal/provider/provider.go

@@ -1,14 +1,14 @@
 package provider
 package provider
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/dao"
-	"github.com/go-nunu/nunu-layout/internal/handler"
-	"github.com/go-nunu/nunu-layout/internal/job"
-	"github.com/go-nunu/nunu-layout/internal/middleware"
-	"github.com/go-nunu/nunu-layout/internal/migration"
-	"github.com/go-nunu/nunu-layout/internal/server"
-	"github.com/go-nunu/nunu-layout/internal/service"
-	"github.com/go-nunu/nunu-layout/pkg/helper/sonyflake"
+	"github.com/go-nunu/nunu-layout-advanced/internal/dao"
+	"github.com/go-nunu/nunu-layout-advanced/internal/handler"
+	"github.com/go-nunu/nunu-layout-advanced/internal/job"
+	"github.com/go-nunu/nunu-layout-advanced/internal/middleware"
+	"github.com/go-nunu/nunu-layout-advanced/internal/migration"
+	"github.com/go-nunu/nunu-layout-advanced/internal/server"
+	"github.com/go-nunu/nunu-layout-advanced/internal/service"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/sonyflake"
 	"github.com/google/wire"
 	"github.com/google/wire"
 )
 )
 
 

+ 4 - 4
internal/server/http.go

@@ -3,10 +3,10 @@ package server
 import (
 import (
 	"fmt"
 	"fmt"
 	"github.com/gin-gonic/gin"
 	"github.com/gin-gonic/gin"
-	"github.com/go-nunu/nunu-layout/internal/handler"
-	"github.com/go-nunu/nunu-layout/internal/middleware"
-	"github.com/go-nunu/nunu-layout/pkg/helper/resp"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/handler"
+	"github.com/go-nunu/nunu-layout-advanced/internal/middleware"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/helper/resp"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 )
 )
 
 
 func NewServerHTTP(
 func NewServerHTTP(

+ 1 - 1
internal/service/service.go

@@ -1,6 +1,6 @@
 package service
 package service
 
 
-import "github.com/go-nunu/nunu-layout/pkg/log"
+import "github.com/go-nunu/nunu-layout-advanced/pkg/log"
 
 
 type Service struct {
 type Service struct {
 	logger *log.Logger
 	logger *log.Logger

+ 2 - 2
internal/service/user.go

@@ -1,8 +1,8 @@
 package service
 package service
 
 
 import (
 import (
-	"github.com/go-nunu/nunu-layout/internal/dao"
-	"github.com/go-nunu/nunu-layout/internal/model"
+	"github.com/go-nunu/nunu-layout-advanced/internal/dao"
+	"github.com/go-nunu/nunu-layout-advanced/internal/model"
 )
 )
 
 
 type UserService struct {
 type UserService struct {

+ 8 - 8
test/server/handler/storage/logs/server.log

@@ -52,27 +52,27 @@
 2023-06-05 15:52:04	info	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:55	建立请求	{"trace": "66ab47224d8602f41e275df08e55582f", "request_method": "POST", "request_headers": "{\"Authorization\":[\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VyU2lkIjoiOHpsdGxQRzhXSCIsIm5pY2tuYW1lIjoi55CD55CDIiwidXNlcklkIjowfSwiZXhwIjoxNjg3NzcwMzYzLCJqdGkiOiI4emx0bFBHOFdIIiwiaXNzIjoiaHR0cHM6Ly90ZWh1Yi5jb20vYXBpIiwibmJmIjoxNjcyMjE3NzYzLCJzdWIiOiI4emx0bFBHOFdIIn0.G0sSUzj3GBANqj6dU7rSMsr44SARgYwH1ERwKUCaxsM\"]}", "request_url": "/user", "request_params": "{\"email\":\"5303221@gmail.com\",\"username\":\"test\"}"}
 2023-06-05 15:52:04	info	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:55	建立请求	{"trace": "66ab47224d8602f41e275df08e55582f", "request_method": "POST", "request_headers": "{\"Authorization\":[\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VyU2lkIjoiOHpsdGxQRzhXSCIsIm5pY2tuYW1lIjoi55CD55CDIiwidXNlcklkIjowfSwiZXhwIjoxNjg3NzcwMzYzLCJqdGkiOiI4emx0bFBHOFdIIiwiaXNzIjoiaHR0cHM6Ly90ZWh1Yi5jb20vYXBpIiwibmJmIjoxNjcyMjE3NzYzLCJzdWIiOiI4emx0bFBHOFdIIn0.G0sSUzj3GBANqj6dU7rSMsr44SARgYwH1ERwKUCaxsM\"]}", "request_url": "/user", "request_params": "{\"email\":\"5303221@gmail.com\",\"username\":\"test\"}"}
 2023-06-05 15:52:04	info	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:55	建立请求	{"trace": "66ab47224d8602f41e275df08e55582f", "request_method": "POST", "request_headers": "{\"Authorization\":[\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VyU2lkIjoiOHpsdGxQRzhXSCIsIm5pY2tuYW1lIjoi55CD55CDIiwidXNlcklkIjowfSwiZXhwIjoxNjg3NzcwMzYzLCJqdGkiOiI4emx0bFBHOFdIIiwiaXNzIjoiaHR0cHM6Ly90ZWh1Yi5jb20vYXBpIiwibmJmIjoxNjcyMjE3NzYzLCJzdWIiOiI4emx0bFBHOFdIIn0.G0sSUzj3GBANqj6dU7rSMsr44SARgYwH1ERwKUCaxsM\"]}", "request_url": "/user", "request_params": "{\"email\":\"5303221@gmail.com\",\"username\":\"test\"}"}
 2023-06-05 15:52:04	info	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:55	建立请求	{"trace": "66ab47224d8602f41e275df08e55582f", "request_method": "POST", "request_headers": "{\"Authorization\":[\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VyU2lkIjoiOHpsdGxQRzhXSCIsIm5pY2tuYW1lIjoi55CD55CDIiwidXNlcklkIjowfSwiZXhwIjoxNjg3NzcwMzYzLCJqdGkiOiI4emx0bFBHOFdIIiwiaXNzIjoiaHR0cHM6Ly90ZWh1Yi5jb20vYXBpIiwibmJmIjoxNjcyMjE3NzYzLCJzdWIiOiI4emx0bFBHOFdIIn0.G0sSUzj3GBANqj6dU7rSMsr44SARgYwH1ERwKUCaxsM\"]}", "request_url": "/user", "request_params": "{\"email\":\"5303221@gmail.com\",\"username\":\"test\"}"}
 2023-06-05 15:52:04	error	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:77	token error	{"trace": "66ab47224d8602f41e275df08e55582f", "request_method": "POST", "request_headers": "{\"Authorization\":[\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VyU2lkIjoiOHpsdGxQRzhXSCIsIm5pY2tuYW1lIjoi55CD55CDIiwidXNlcklkIjowfSwiZXhwIjoxNjg3NzcwMzYzLCJqdGkiOiI4emx0bFBHOFdIIiwiaXNzIjoiaHR0cHM6Ly90ZWh1Yi5jb20vYXBpIiwibmJmIjoxNjcyMjE3NzYzLCJzdWIiOiI4emx0bFBHOFdIIn0.G0sSUzj3GBANqj6dU7rSMsr44SARgYwH1ERwKUCaxsM\"]}", "request_url": "/user", "request_params": "{\"email\":\"5303221@gmail.com\",\"username\":\"test\"}", "data": {"params":null,"url":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/user","RawPath":"","OmitHost":false,"ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""}}}
 2023-06-05 15:52:04	error	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:77	token error	{"trace": "66ab47224d8602f41e275df08e55582f", "request_method": "POST", "request_headers": "{\"Authorization\":[\"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySW5mbyI6eyJ1c2VyU2lkIjoiOHpsdGxQRzhXSCIsIm5pY2tuYW1lIjoi55CD55CDIiwidXNlcklkIjowfSwiZXhwIjoxNjg3NzcwMzYzLCJqdGkiOiI4emx0bFBHOFdIIiwiaXNzIjoiaHR0cHM6Ly90ZWh1Yi5jb20vYXBpIiwibmJmIjoxNjcyMjE3NzYzLCJzdWIiOiI4emx0bFBHOFdIIn0.G0sSUzj3GBANqj6dU7rSMsr44SARgYwH1ERwKUCaxsM\"]}", "request_url": "/user", "request_params": "{\"email\":\"5303221@gmail.com\",\"username\":\"test\"}", "data": {"params":null,"url":{"Scheme":"","Opaque":"","User":null,"Host":"","Path":"/user","RawPath":"","OmitHost":false,"ForceQuery":false,"RawQuery":"","Fragment":"","RawFragment":""}}}
-github.com/go-nunu/nunu-layout/internal/middleware.StrictAuth.func1
+github.com/go-nunu/nunu-layout-advanced/internal/middleware.StrictAuth.func1
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:77
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:77
 github.com/gin-gonic/gin.(*Context).Next
 github.com/gin-gonic/gin.(*Context).Next
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
-github.com/go-nunu/nunu-layout/internal/middleware.NoAuth.func1
+github.com/go-nunu/nunu-layout-advanced/internal/middleware.NoAuth.func1
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:56
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:56
 github.com/gin-gonic/gin.(*Context).Next
 github.com/gin-gonic/gin.(*Context).Next
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
-github.com/go-nunu/nunu-layout/internal/middleware.ResponseLogMiddleware.func1
+github.com/go-nunu/nunu-layout-advanced/internal/middleware.ResponseLogMiddleware.func1
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/log.go:48
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/log.go:48
 github.com/gin-gonic/gin.(*Context).Next
 github.com/gin-gonic/gin.(*Context).Next
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
-github.com/go-nunu/nunu-layout/internal/middleware.NoAuth.func1
+github.com/go-nunu/nunu-layout-advanced/internal/middleware.NoAuth.func1
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:56
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/jwt.go:56
 github.com/gin-gonic/gin.(*Context).Next
 github.com/gin-gonic/gin.(*Context).Next
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
-github.com/go-nunu/nunu-layout/internal/middleware.CORSMiddleware.func1
+github.com/go-nunu/nunu-layout-advanced/internal/middleware.CORSMiddleware.func1
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/cors.go:20
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/cors.go:20
 github.com/gin-gonic/gin.(*Context).Next
 github.com/gin-gonic/gin.(*Context).Next
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
-github.com/go-nunu/nunu-layout/internal/middleware.RequestLogMiddleware.func1
+github.com/go-nunu/nunu-layout-advanced/internal/middleware.RequestLogMiddleware.func1
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/log.go:40
 	/Users/chris/Projects/stu/nunu-layout/internal/middleware/log.go:40
 github.com/gin-gonic/gin.(*Context).Next
 github.com/gin-gonic/gin.(*Context).Next
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174
@@ -88,9 +88,9 @@ github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620
 github.com/gin-gonic/gin.(*Engine).ServeHTTP
 github.com/gin-gonic/gin.(*Engine).ServeHTTP
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576
 	/Users/chris/Go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576
-github.com/go-nunu/nunu-layout/test/server/handler.NewRequest
+github.com/go-nunu/nunu-layout-advanced/test/server/handler.NewRequest
 	/Users/chris/Projects/stu/nunu-layout/test/server/handler/user_test.go:58
 	/Users/chris/Projects/stu/nunu-layout/test/server/handler/user_test.go:58
-github.com/go-nunu/nunu-layout/test/server/handler.TestCreateUser
+github.com/go-nunu/nunu-layout-advanced/test/server/handler.TestCreateUser
 	/Users/chris/Projects/stu/nunu-layout/test/server/handler/user_test.go:84
 	/Users/chris/Projects/stu/nunu-layout/test/server/handler/user_test.go:84
 testing.tRunner
 testing.tRunner
 	/usr/local/go/src/testing/testing.go:1576
 	/usr/local/go/src/testing/testing.go:1576

+ 3 - 3
test/server/handler/user_test.go

@@ -4,9 +4,9 @@ import (
 	"bytes"
 	"bytes"
 	"encoding/json"
 	"encoding/json"
 	"fmt"
 	"fmt"
-	"github.com/go-nunu/nunu-layout/cmd/server/wire"
-	"github.com/go-nunu/nunu-layout/pkg/config"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/cmd/server/wire"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/config"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/assert"
 	"io"
 	"io"
 	"net/http"
 	"net/http"

+ 5 - 5
test/server/service/user_test.go

@@ -2,11 +2,11 @@ package service
 
 
 import (
 import (
 	"fmt"
 	"fmt"
-	"github.com/go-nunu/nunu-layout/internal/dao"
-	"github.com/go-nunu/nunu-layout/internal/model"
-	"github.com/go-nunu/nunu-layout/internal/service"
-	"github.com/go-nunu/nunu-layout/pkg/config"
-	"github.com/go-nunu/nunu-layout/pkg/log"
+	"github.com/go-nunu/nunu-layout-advanced/internal/dao"
+	"github.com/go-nunu/nunu-layout-advanced/internal/model"
+	"github.com/go-nunu/nunu-layout-advanced/internal/service"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/config"
+	"github.com/go-nunu/nunu-layout-advanced/pkg/log"
 	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/assert"
 	"gorm.io/gorm"
 	"gorm.io/gorm"
 	"os"
 	"os"

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů