mirror of
https://gitee.com/johng/gf
synced 2026-07-08 22:40:30 +08:00
chore: improve golangci-lint.yml, upgrade dependencies, and optimize code and comments (#4025)
This commit is contained in:
@ -4,6 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
// Package gfcmd provides the management of CLI commands for `gf` tool.
|
||||
package gfcmd
|
||||
|
||||
import (
|
||||
@ -25,9 +26,7 @@ import (
|
||||
"github.com/gogf/gf/cmd/gf/v2/internal/utility/mlog"
|
||||
)
|
||||
|
||||
const (
|
||||
cliFolderName = `hack`
|
||||
)
|
||||
const cliFolderName = `hack`
|
||||
|
||||
// Command manages the CLI command of `gf`.
|
||||
// This struct can be globally accessible and extended with custom struct.
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
module github.com/gogf/gf/cmd/gf/v2
|
||||
|
||||
go 1.18
|
||||
go 1.20
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.8.2
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
go 1.18
|
||||
go 1.20
|
||||
|
||||
use (
|
||||
./
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
// You can obtain one at https://github.com/gogf/gf.
|
||||
|
||||
// Package cmd provides the management of CLI commands for `gf` tool.
|
||||
package cmd
|
||||
|
||||
import (
|
||||
@ -19,9 +20,8 @@ import (
|
||||
"github.com/gogf/gf/cmd/gf/v2/internal/utility/mlog"
|
||||
)
|
||||
|
||||
var (
|
||||
GF = cGF{}
|
||||
)
|
||||
// GF is the management object for `gf` command line tool.
|
||||
var GF = cGF{}
|
||||
|
||||
type cGF struct {
|
||||
g.Meta `name:"gf" ad:"{cGFAd}"`
|
||||
|
||||
@ -16,9 +16,10 @@ import (
|
||||
|
||||
func main() {
|
||||
var (
|
||||
ctx = gctx.GetInitCtx()
|
||||
ctx = gctx.GetInitCtx()
|
||||
command, err = gfcmd.GetCommand(ctx)
|
||||
)
|
||||
command, err := gfcmd.GetCommand(ctx)
|
||||
|
||||
if err != nil {
|
||||
mlog.Fatalf(`%+v`, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user