Merge pull request #167 from benmanns/formatting-vetting

Formatting and Vetting
This commit is contained in:
Brad Rydzewski 2014-03-06 15:46:40 -08:00
commit ef908ebb94
6 changed files with 37 additions and 40 deletions

View file

@ -121,8 +121,6 @@ func (b *Builder) Run() error {
b.BuildState.Finished = time.Now().UTC().Unix()
return nil
}
return nil
}
func (b *Builder) setup() error {
@ -514,7 +512,7 @@ func (b *Builder) writeProxyScript(dir string) error {
// map ip address to localhost
for _, container := range b.services {
// create an entry for each port
for port, _ := range container.NetworkSettings.Ports {
for port := range container.NetworkSettings.Ports {
proxyfile.Set(port.Port(), container.NetworkSettings.IPAddress)
}
}

View file

@ -31,7 +31,8 @@ func (i *IRC) Connect() {
c.AddHandler(irc.CONNECTED,
func(conn *irc.Conn, line *irc.Line) {
conn.Join(i.Channel)
connected <- true})
connected <- true
})
c.Connect(i.Server)
<-connected
i.ClientStarted = true
@ -74,7 +75,6 @@ func (i *IRC) sendSuccess(context *Context) error {
return nil
}
func (i *IRC) send(channel string, message string) error {
if !i.ClientStarted {
i.Connect()

View file

@ -1,2 +1 @@
package publish

View file

@ -1,11 +1,11 @@
package template
import (
"crypto/md5"
"errors"
"fmt"
"html/template"
"io"
"crypto/md5"
"strings"
"github.com/GeertJohan/go.rice"
@ -99,7 +99,7 @@ func init() {
h := md5.New()
io.WriteString(h, mainjs)
jshash := fmt.Sprintf("%x", h.Sum(nil))
base = strings.Replace(base, "main.js", "main.js?h=" + jshash, 1)
base = strings.Replace(base, "main.js", "main.js?h="+jshash, 1)
// extract the base form template as a string
form, err := box.String("form.html")