mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
ci(gci/import): improve golangci.yml and add gci linter (#4010)
This commit is contained in:
@ -33,15 +33,13 @@ import (
|
||||
"github.com/gogf/gf/v2/internal/intlog"
|
||||
)
|
||||
|
||||
var (
|
||||
// Alias for charsets.
|
||||
charsetAlias = map[string]string{
|
||||
"HZGB2312": "HZ-GB-2312",
|
||||
"hzgb2312": "HZ-GB-2312",
|
||||
"GB2312": "HZ-GB-2312",
|
||||
"gb2312": "HZ-GB-2312",
|
||||
}
|
||||
)
|
||||
// Alias for charsets.
|
||||
var charsetAlias = map[string]string{
|
||||
"HZGB2312": "HZ-GB-2312",
|
||||
"hzgb2312": "HZ-GB-2312",
|
||||
"GB2312": "HZ-GB-2312",
|
||||
"gb2312": "HZ-GB-2312",
|
||||
}
|
||||
|
||||
// Supported returns whether charset `charset` is supported.
|
||||
func Supported(charset string) bool {
|
||||
|
||||
@ -12,9 +12,10 @@ import (
|
||||
"reflect"
|
||||
"strings"
|
||||
|
||||
strip "github.com/grokify/html-strip-tags-go"
|
||||
|
||||
"github.com/gogf/gf/v2/errors/gcode"
|
||||
"github.com/gogf/gf/v2/errors/gerror"
|
||||
strip "github.com/grokify/html-strip-tags-go"
|
||||
)
|
||||
|
||||
// StripTags strips HTML tags from content, and returns only text.
|
||||
|
||||
@ -61,7 +61,7 @@ func ParseURL(str string, component int) (map[string]string, error) {
|
||||
if component == -1 {
|
||||
component = 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128
|
||||
}
|
||||
var components = make(map[string]string)
|
||||
components := make(map[string]string)
|
||||
if (component & 1) == 1 {
|
||||
components["scheme"] = u.Scheme
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user