Skip to content

Commit 3a2126d

Browse files
author
Josh
committed
gofmt
1 parent c40f7ef commit 3a2126d

File tree

5 files changed

+5
-7
lines changed

5 files changed

+5
-7
lines changed

log.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ var metadataLog = logging.MustGetLogger("fargo.metadata")
1111
var marshalLog = logging.MustGetLogger("fargo.marshal")
1212

1313
func init() {
14-
logging.SetLevel(logging.WARNING, "fargo.metadata")
15-
logging.SetLevel(logging.WARNING, "fargo.marshal")
14+
logging.SetLevel(logging.WARNING, "fargo.metadata")
15+
logging.SetLevel(logging.WARNING, "fargo.marshal")
1616
}

marshal.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,8 @@ func (i *InstanceMetadata) UnmarshalJSON(b []byte) error {
110110

111111
// MarshalJSON is a custom JSON marshaler for InstanceMetadata.
112112
func (i *InstanceMetadata) MarshalJSON() ([]byte, error) {
113-
if (i.parsed != nil) {
113+
if i.parsed != nil {
114114
return json.Marshal(i.parsed)
115115
}
116116
return i.Raw, nil
117117
}
118-

metadata.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ func (a *Application) ParseAllMetadata() error {
1313
for _, instance := range a.Instances {
1414
err := instance.Metadata.parse()
1515
if err != nil {
16-
log.Error("Failed parsing metadata for Instance=%s of Application=%s: %s",
16+
log.Error("Failed parsing metadata for Instance=%s of Application=%s: %s",
1717
instance.HostName, a.Name, err.Error())
1818
return err
1919
}

struct.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ type Port struct {
106106
// InstanceMetadata represents the eureka metadata, which is arbitrary XML. See
107107
// metadata.go for more info.
108108
type InstanceMetadata struct {
109-
Raw []byte `xml:",innerxml" json:"-"`
109+
Raw []byte `xml:",innerxml" json:"-"`
110110
parsed map[string]interface{}
111111
}
112112

tests/marshal_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,3 @@ func TestMetadataMarshal(t *testing.T) {
6060
})
6161
})
6262
}
63-

0 commit comments

Comments
 (0)