chore(deps): upgrade urfave/cli from v1 to v3

Migrate from urfave/cli v1 (maintenance mode) to v3 to benefit from
active development, improved features, and long-term support.

Signed-off-by: lifubang <lifubang@acmcoder.com>
This commit is contained in:
lifubang
2026-03-18 03:00:21 +00:00
parent 84762a5c1a
commit 57fad01d52
124 changed files with 8429 additions and 13736 deletions
+5 -5
View File
@@ -15,7 +15,7 @@ import (
"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
"github.com/urfave/cli/v3"
"golang.org/x/sys/unix"
)
@@ -25,12 +25,12 @@ type notifySocket struct {
socketPath string
}
func newNotifySocket(context *cli.Context, notifySocketHost, id string) *notifySocket {
func newNotifySocket(cmd *cli.Command, notifySocketHost, id string) *notifySocket {
if notifySocketHost == "" {
return nil
}
root := filepath.Join(context.GlobalString("root"), id)
root := filepath.Join(cmd.String("root"), id)
socketPath := filepath.Join(root, "notify", "notify.sock")
notifySocket := &notifySocket{
@@ -84,8 +84,8 @@ func (s *notifySocket) setupSocketDirectory() error {
return os.Mkdir(path.Dir(s.socketPath), 0o755)
}
func notifySocketStart(context *cli.Context, notifySocketHost, id string) (*notifySocket, error) {
notifySocket := newNotifySocket(context, notifySocketHost, id)
func notifySocketStart(cmd *cli.Command, notifySocketHost, id string) (*notifySocket, error) {
notifySocket := newNotifySocket(cmd, notifySocketHost, id)
if notifySocket == nil {
return nil, nil
}