Skip to content

Commit

Permalink
Merge pull request gliderlabs#346 from jgeiger/run_gofmt_against_code…
Browse files Browse the repository at this point in the history
…base

gofmt bridge/
  • Loading branch information
progrium committed Feb 17, 2016
2 parents a3f28f5 + ab48664 commit 0248e65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bridge/bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ func (b *Bridge) newService(port ServicePort, isgroup bool) *Service {
service.ID = hostname + ":" + container.Name[1:] + ":" + port.ExposedPort
service.Name = mapDefault(metadata, "name", defaultName)
if isgroup && !metadataFromPort["name"] {
service.Name += "-" + port.ExposedPort
service.Name += "-" + port.ExposedPort
}
var p int
if b.config.Internal == true {
Expand Down
1 change: 0 additions & 1 deletion bridge/extpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,3 @@ func (ep *adapterFactoryExt) All() map[string]AdapterFactory {
}
return all
}

8 changes: 4 additions & 4 deletions bridge/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func combineTags(tagParts ...string) []string {
func serviceMetaData(config *dockerapi.Config, port string) (map[string]string, map[string]bool) {
meta := config.Env
for k, v := range config.Labels {
meta = append(meta, k + "=" + v)
meta = append(meta, k+"="+v)
}
metadata := make(map[string]string)
metadataFromPort := make(map[string]bool)
Expand Down Expand Up @@ -74,17 +74,17 @@ func servicePort(container *dockerapi.Container, port dockerapi.Port, published
if len(exposedPort) == 2 {
ept = exposedPort[1]
} else {
ept = "tcp" // default
ept = "tcp" // default
}

// Nir: support docker NetworkSettings
eip = container.NetworkSettings.IPAddress
if eip == "" {
for _, network := range container.NetworkSettings.Networks {
eip = network.IPAddress
}
}

return ServicePort{
HostPort: hp,
HostIP: hip,
Expand Down

0 comments on commit 0248e65

Please sign in to comment.