Skip to content

Commit

Permalink
Replace references to knative.dev/client to knative.dev/client-pkg (#384
Browse files Browse the repository at this point in the history
)

* Replace references to knative.dev/client to knative.dev/client-pkg

* Added .idea to .gitignore
  • Loading branch information
vyasgun authored Jan 23, 2023
1 parent 21dab6c commit 253b7a4
Show file tree
Hide file tree
Showing 16 changed files with 61 additions and 1,130 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
kn-quickstart*
.idea/
5 changes: 2 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ go 1.17
require (
github.com/spf13/cobra v1.6.0
gotest.tools/v3 v3.3.0
knative.dev/client v0.34.1-0.20230110014447-2593aa6dbcab
knative.dev/hack v0.0.0-20230110013548-af8745e34e08
knative.dev/client-pkg v0.0.0-20230120062501-d4ab4e492526
knative.dev/hack v0.0.0-20230113013652-c7cfcb062de9

)

require (
github.com/google/go-cmp v0.5.9 // indirect
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
)
91 changes: 24 additions & 67 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/plugin/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

"knative.dev/kn-plugin-quickstart/internal/root"

knplugin "knative.dev/client/pkg/kn/plugin"
knplugin "knative.dev/client-pkg/pkg/kn/plugin"
)

func init() {
Expand Down
21 changes: 0 additions & 21 deletions third_party/VENDOR-LICENSE/github.com/mitchellh/go-homedir/LICENSE

This file was deleted.

21 changes: 0 additions & 21 deletions vendor/github.com/mitchellh/go-homedir/LICENSE

This file was deleted.

14 changes: 0 additions & 14 deletions vendor/github.com/mitchellh/go-homedir/README.md

This file was deleted.

167 changes: 0 additions & 167 deletions vendor/github.com/mitchellh/go-homedir/homedir.go

This file was deleted.

File renamed without changes.
30 changes: 30 additions & 0 deletions vendor/knative.dev/client-pkg/pkg/kn/plugin/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package plugin

// Allow plugins to register to this slice for inlining
var InternalPlugins PluginList

// Interface describing a plugin
type Plugin interface {
// Get the name of the plugin (the file name without extensions)
Name() string

// Execute the plugin with the given arguments
Execute(args []string) error

// Return a description of the plugin (if support by the plugin binary)
Description() (string, error)

// The command path leading to this plugin.
// Eg. for a plugin "kn source github" this will be [ "source", "github" ]
CommandParts() []string

// Location of the plugin where it is stored in the filesystem
Path() string
}

// Used for sorting a list of plugins
type PluginList []Plugin

func (p PluginList) Len() int { return len(p) }
func (p PluginList) Less(i, j int) bool { return p[i].Name() < p[j].Name() }
func (p PluginList) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
Loading

0 comments on commit 253b7a4

Please sign in to comment.