mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-13 01:50:55 +00:00
Make plugin dir match Go conventions.
This commit is contained in:
27
plugin/someteam.example.com/v1/kvMaker.go
Normal file
27
plugin/someteam.example.com/v1/kvMaker.go
Normal file
@@ -0,0 +1,27 @@
|
||||
// +build plugin
|
||||
|
||||
package main
|
||||
|
||||
var database = map[string]string{
|
||||
"TREE": "oak",
|
||||
"ROCKET": "Saturn V",
|
||||
"FRUIT": "apple",
|
||||
"VEGETABLE": "carrot",
|
||||
"SIMPSON": "homer",
|
||||
}
|
||||
|
||||
type plugin struct{}
|
||||
|
||||
var KVSource plugin
|
||||
|
||||
func (p plugin) Get(
|
||||
root string, args []string) (map[string]string, error) {
|
||||
r := make(map[string]string)
|
||||
for _, k := range args {
|
||||
v, ok := database[k]
|
||||
if ok {
|
||||
r[k] = v
|
||||
}
|
||||
}
|
||||
return r, nil
|
||||
}
|
||||
Reference in New Issue
Block a user