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

Add type Argument with some common parse function #704

Closed
@lmzqwer2

Description

@lmzqwer2

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions