style: 格式整理

This commit is contained in:
mh-swift
2024-07-09 17:21:32 +08:00
parent e501a33163
commit 5c3bcaf6cc
9 changed files with 33 additions and 36 deletions

View File

@@ -6,15 +6,13 @@
package hggen
import (
"github.com/gogf/gf/v2/os/gfile"
_ "hotgo/internal/library/hggen/internal/cmd/gendao"
"hotgo/internal/library/hggen/internal/utility/utils"
_ "unsafe"
"github.com/gogf/gf/v2/os/gfile"
"context"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
"hotgo/internal/consts"
"hotgo/internal/library/addons"
"hotgo/internal/library/hggen/internal/cmd"
@@ -26,6 +24,10 @@ import (
"hotgo/internal/model/input/sysin"
"hotgo/internal/service"
"sort"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/util/gconv"
)
//go:linkname doGenDaoForArray hotgo/internal/library/hggen/internal/cmd/gendao.doGenDaoForArray
@@ -33,7 +35,6 @@ func doGenDaoForArray(ctx context.Context, index int, in gendao.CGenDaoInput)
// Dao 生成数据库实体
func Dao(ctx context.Context) (err error) {
// 在执行gf gen dao时先将生成文件放在临时路径生成完成后再拷贝到项目
// 目的是希望减少触发gf热编译的几率防止热编译运行时代码生成流程未结束被自动重启打断
// gf gen dao 的执行时长主要取决于需要生成数据库表的数量,表越多速度越慢

View File

@@ -7,14 +7,6 @@ package views
import (
"context"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/os/gview"
"github.com/gogf/gf/v2/text/gstr"
"hotgo/internal/consts"
"hotgo/internal/dao"
"hotgo/internal/library/hggen/internal/cmd/gendao"
@@ -27,6 +19,15 @@ import (
"hotgo/utility/tree"
"runtime"
"strings"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gfile"
"github.com/gogf/gf/v2/os/gtime"
"github.com/gogf/gf/v2/os/gview"
"github.com/gogf/gf/v2/text/gstr"
)
var Curd = gCurd{}
@@ -118,7 +119,7 @@ type CurdOptions struct {
type FuncDict struct {
ValueColumn string // 选项值
LabelColumn string //选项名称
LabelColumn string // 选项名称
Value *sysin.GenCodesColumnListModel
Label *sysin.GenCodesColumnListModel
}

View File

@@ -33,5 +33,4 @@ func AddLineNo(s string) string {
bf.WriteString(strings.Repeat(" ", maxLineNoStrLen-len(lineNoStr)) + lineNoStr + " " + line)
}
return bf.String()
}

View File

@@ -1,10 +1,11 @@
package gohtml
import (
"golang.org/x/net/html"
"io"
"regexp"
"strings"
"golang.org/x/net/html"
)
// parse parses a stirng and converts it into an html.
@@ -106,9 +107,9 @@ func getTagName(tokenizer *html.Tokenizer) string {
}
// setEndTagRaw sets an endTagRaw to the parent.
func setEndTagRaw(tokenizer *html.Tokenizer, parent *tagElement, tagName string) string {
func setEndTagRaw(_ *html.Tokenizer, parent *tagElement, tagName string) string {
if parent != nil && parent.tagName == tagName {
parent.endTagRaw = `</` + fMustCompile(parent.startTagRaw) + `>` //string(tokenizer.Raw())
parent.endTagRaw = `</` + fMustCompile(parent.startTagRaw) + `>` // string(tokenizer.Raw())
return ""
}
return tagName