mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-07-05 03:26:26 +00:00
Format go code.
This commit is contained in:
parent
922993c258
commit
baf468973f
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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()
|
||||||
|
@ -1,2 +1 @@
|
|||||||
package publish
|
package publish
|
||||||
|
|
||||||
|
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user