move cli-plugins metadata types/consts to a separate package

This prevents cli-plugins having to import the plugin-manager.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-03-04 23:16:33 +01:00
parent ceef542046
commit 4321293972
13 changed files with 94 additions and 57 deletions

View File

@ -7,11 +7,11 @@ import (
"fmt"
"os"
"github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli-plugins/metadata"
)
func main() {
if len(os.Args) == 2 && os.Args[1] == manager.MetadataSubcommandName {
if len(os.Args) == 2 && os.Args[1] == metadata.MetadataSubcommandName {
fmt.Println(`{invalid-json}`)
os.Exit(0)
}

View File

@ -3,7 +3,7 @@ package main
import (
"fmt"
"github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli-plugins/metadata"
"github.com/docker/cli/cli-plugins/plugin"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
@ -26,7 +26,7 @@ func main() {
},
}
},
manager.Metadata{
metadata.Metadata{
SchemaVersion: "0.1.0",
Vendor: "Docker Inc.",
Version: "testing",

View File

@ -7,14 +7,14 @@ import (
"syscall"
"time"
"github.com/docker/cli/cli-plugins/manager"
"github.com/docker/cli/cli-plugins/metadata"
"github.com/docker/cli/cli-plugins/plugin"
"github.com/docker/cli/cli/command"
"github.com/spf13/cobra"
)
func main() {
plugin.Run(RootCmd, manager.Metadata{
plugin.Run(RootCmd, metadata.Metadata{
SchemaVersion: "0.1.0",
Vendor: "Docker Inc.",
Version: "test",