mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 20:29:56 +00:00
Move all kubernetes to posix flags
This commit is contained in:
@@ -19,12 +19,12 @@ limitations under the License.
|
||||
package verflag
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/version"
|
||||
flag "github.com/spf13/pflag"
|
||||
)
|
||||
|
||||
type versionValue int
|
||||
@@ -66,6 +66,10 @@ func (v *versionValue) String() string {
|
||||
return fmt.Sprintf("%v", bool(*v == VersionTrue))
|
||||
}
|
||||
|
||||
func (v *versionValue) Type() string {
|
||||
return "version"
|
||||
}
|
||||
|
||||
func VersionVar(p *versionValue, name string, value versionValue, usage string) {
|
||||
*p = value
|
||||
flag.Var(p, name, usage)
|
||||
|
Reference in New Issue
Block a user