Skip to content
This repository has been archived by the owner on May 25, 2023. It is now read-only.

Add type Argument with some common parse function #704

Closed
lmzqwer2 opened this issue Apr 4, 2019 · 1 comment · Fixed by #705
Closed

Add type Argument with some common parse function #704

lmzqwer2 opened this issue Apr 4, 2019 · 1 comment · Fixed by #705
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Milestone

Comments

@lmzqwer2
Copy link
Contributor

lmzqwer2 commented Apr 4, 2019

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug

/kind feature

What happened:
PluginBuilder has function definition with code Introduced in #637

type PluginBuilder func(map[string]string) Plugin

Every plugin use it's own method to parse the arguments.

What you expected to happen:
a common support for arguments parse

How to reproduce it (as minimally and precisely as possible):
I wanna to use a special type to replace it and add some common argument parse function.

type Arguments map[string]string
type PluginBuilder func(Arguments) Plugin

add function

func (a Arguments) GetInt(ptr *int, key string)

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): N/A
  • Cloud provider or hardware configuration:N/A
  • OS (e.g. from /etc/os-release):N/A
  • Kernel (e.g. uname -a):N/A
  • Install tools:N/A
  • Others:N/A
@k82cn
Copy link
Contributor

k82cn commented Apr 4, 2019

/kind feature

@k8s-ci-robot k8s-ci-robot added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 4, 2019
@k82cn k82cn added this to the v0.5 milestone Apr 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants