diff --git a/pkg/core/watched_contract.go b/pkg/core/watched_contract.go index ec8176dd..85df30af 100644 --- a/pkg/core/watched_contract.go +++ b/pkg/core/watched_contract.go @@ -12,13 +12,13 @@ type ContractAttribute struct { type ContractAttributes []ContractAttribute -func (s ContractAttributes) Len() int { - return len(s) +func (attributes ContractAttributes) Len() int { + return len(attributes) } -func (s ContractAttributes) Swap(i, j int) { - s[i], s[j] = s[j], s[i] +func (attributes ContractAttributes) Swap(i, j int) { + attributes[i], attributes[j] = attributes[j], attributes[i] } -func (s ContractAttributes) Less(i, j int) bool { - return s[i].Name < s[j].Name -} \ No newline at end of file +func (attributes ContractAttributes) Less(i, j int) bool { + return attributes[i].Name < attributes[j].Name +} diff --git a/pkg/watched_contracts/summary_test.go b/pkg/watched_contracts/summary_test.go index ee5b6d46..6c4886e5 100644 --- a/pkg/watched_contracts/summary_test.go +++ b/pkg/watched_contracts/summary_test.go @@ -95,7 +95,7 @@ var _ bool = Describe("The watched contract summary", func() { Expect(contractSummary.GetStateAttribute("foo")).To(Equal("bar")) }) - It("gets a attributes for the contract from the blockchain", func() { + It("gets attributes for the contract from the blockchain", func() { repository := repositories.NewInMemory() watchedContract := core.WatchedContract{Hash: "0x123"} repository.CreateWatchedContract(watchedContract)