Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up code comments for the kubecfg command #537

Merged
merged 1 commit into from
Jul 20, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions cmd/kubecfg/kubecfg.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (
// AppVersion is the current version of kubecfg.
const AppVersion = "0.1"

// The flag package provides a default help printer via -h switch
var (
versionFlag = flag.Bool("V", false, "Print the version number.")
httpServer = flag.String("h", "", "The host to connect to.")
Expand Down Expand Up @@ -71,7 +70,8 @@ func usage() {
flag.PrintDefaults()
}

// Reads & parses config file. On error, calls glog.Fatal().
// readConfig reads and parses pod, replicationController, and service
// configuration files. If any errors log and exit non-zero.
func readConfig(storage string) []byte {
if len(*config) == 0 {
glog.Fatal("Need config file (-c)")
Expand All @@ -90,13 +90,12 @@ func readConfig(storage string) []byte {
return data
}

// CloudCfg command line tool.
func main() {
flag.Usage = func() {
usage()
}

flag.Parse() // Scan the arguments list
flag.Parse()
util.InitLogs()
defer util.FlushLogs()

Expand Down Expand Up @@ -150,7 +149,6 @@ func main() {
}
}

// Attempts to execute an API request
func executeAPIRequest(method string, s *kube_client.Client) bool {
parseStorage := func() string {
if len(flag.Args()) != 2 {
Expand Down Expand Up @@ -225,7 +223,6 @@ func executeAPIRequest(method string, s *kube_client.Client) bool {
return true
}

// Attempts to execute a replicationController request
func executeControllerRequest(method string, c *kube_client.Client) bool {
parseController := func() string {
if len(flag.Args()) != 2 {
Expand Down