mirror of
https://github.com/beego/bee.git
synced 2025-06-12 15:10:39 +00:00
generate go.mod skip Minor version.
This commit is contained in:
@ -18,7 +18,6 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
path "path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/beego/bee/cmd/commands"
|
||||
@ -305,7 +304,7 @@ func CreateApp(cmd *commands.Command, args []string) int {
|
||||
os.MkdirAll(appPath, 0755)
|
||||
if module == `true` {
|
||||
fmt.Fprintf(output, "\t%s%screate%s\t %s%s\n", "\x1b[32m", "\x1b[1m", "\x1b[21m", path.Join(appPath, "go.mod"), "\x1b[0m")
|
||||
utils.WriteToFile(path.Join(appPath, "go.mod"), fmt.Sprintf(goMod, packPath, runtime.Version()[2:], beegoVersion.String()))
|
||||
utils.WriteToFile(path.Join(appPath, "go.mod"), fmt.Sprintf(goMod, packPath, utils.GetGoVersionSkipMinor(), beegoVersion.String()))
|
||||
}
|
||||
fmt.Fprintf(output, "\t%s%screate%s\t %s%s\n", "\x1b[32m", "\x1b[1m", "\x1b[21m", appPath+string(path.Separator), "\x1b[0m")
|
||||
os.Mkdir(path.Join(appPath, "conf"), 0755)
|
||||
|
Reference in New Issue
Block a user