func NewRoot(cxt context.Context) (cmd *cobra.Command) {
	cmd = &cobra.Command{
		Use:   "hd",
		Short: "HTTP download tool",
	}
	if err := loadConfig(); err != nil {
		panic(err)
	}
	cmd.AddCommand(
		newGetCmd(cxt), newInstallCmd(cxt), newFetchCmd(cxt), newSearchCmd(cxt), newTestCmd(),
		extver.NewVersionCmd("linuxsuren", "http-downloader", "hd", nil),
		extpkg.NewCompletionCmd(cmd))
	return
}
NewRoot returns the root command
package cmd
import (
	"context"
	extpkg "github.com/linuxsuren/cobra-extension/pkg"
	extver "github.com/linuxsuren/cobra-extension/version"
	"github.com/spf13/cobra"
	"github.com/spf13/viper"
	"runtime"
)