Move all kubernetes to posix flags

This commit is contained in:
Joe Beda
2015-01-13 11:22:02 -08:00
parent b9dd9c4f6c
commit dcd00c936e
16 changed files with 45 additions and 15 deletions

View File

@@ -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)