Format go code.

This commit is contained in:
Benjamin Manns 2014-03-06 10:45:21 -08:00
parent 922993c258
commit baf468973f
6 changed files with 37 additions and 38 deletions

View File

@ -514,7 +514,7 @@ func (b *Builder) writeProxyScript(dir string) error {
// map ip address to localhost // map ip address to localhost
for _, container := range b.services { for _, container := range b.services {
// create an entry for each port // 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) proxyfile.Set(port.Port(), container.NetworkSettings.IPAddress)
} }
} }

View File

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

View File

@ -1,2 +1 @@
package publish package publish

View File

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