为什么以下导入不起作用?

Ara*_*ram -1 command-line-interface go

为什么以下工作

package main

import (
    "os"

    cli "github.com/urfave/cli"
)

func main() {
    cli.NewApp().Run(os.Args)
}
Run Code Online (Sandbox Code Playgroud)

但是当我cli按照https://github.com/urfave/cli中的建议将导入更改为以下内容时

import (
        "os"

        cli "gopkg.in/urfave/cli.v2"
    )
Run Code Online (Sandbox Code Playgroud)

它给出了这个错误 undefined: cli.NewApp

小智 5

包的v2没有NewApp()方法.