Skip to content

Commit

Permalink
make it officially version 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
darkhelmet committed Aug 31, 2013
1 parent 0567d85 commit cf50c7b
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ Simple TCP/HTTP/HTTPS load balancer in Go
balance tcp -bind :4000 localhost:4001 localhost:4002

# HTTP mode
balance http -bind :4000 localhost:4001 localhost:4002
balance http -bind :4000 localhost:4001 localhost:4002

# HTTPS mode
balance https -bind :4000 -cert ssl.crt -key ssl.key localhost:4001 localhost:4002

## License

Expand Down
5 changes: 4 additions & 1 deletion balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import (
"os"
)

var cmd = &commander.Commander{Name: "balance"}
var cmd = &commander.Commander{
Name: "balance",
Short: "load balance tcp, http, and https connections to multiple backends",
}

func ensureBind(bindFlag *flag.Flag) string {
if bindFlag == nil {
Expand Down
23 changes: 23 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package main

import (
"fmt"
"github.com/gonuts/commander"
)

const Version = "0.0.1"

func version(cmd *commander.Command, args []string) {
fmt.Println(Version)
}

func init() {
fs := newFlagSet("tcp")

cmd.Commands = append(cmd.Commands, &commander.Command{
UsageLine: "version",
Short: "display version information",
Flag: *fs,
Run: version,
})
}

0 comments on commit cf50c7b

Please sign in to comment.