From f22a3e94517c81e11b4aec0c2dc1388a2dbfa96f Mon Sep 17 00:00:00 2001 From: Eugene Valeyev Date: Fri, 12 Jan 2018 12:10:55 +0300 Subject: [PATCH] mobile: performed gofmt --- mobile/shhclient.go | 2 +- mobile/types.go | 36 +++++++++++++-------------- vendor/gopkg.in/check.v1/benchmark.go | 6 ++--- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/mobile/shhclient.go b/mobile/shhclient.go index 573aa47554..53b1be762d 100644 --- a/mobile/shhclient.go +++ b/mobile/shhclient.go @@ -158,7 +158,7 @@ type NewMessageHandler interface { func (wc *WhisperClient) SubscribeMessages(ctx *Context, criteria *Criteria, handler NewMessageHandler, buffer int) (*Subscription, error) { // Subscribe to the event internally ch := make(chan *whisper.Message, buffer) - rawSub, err := wc.client.SubscribeMessages(ctx.context, *criteria.criteria, ch) + rawSub, err := wc.client.SubscribeMessages(ctx.context, *criteria.criteria, ch) if err != nil { return nil, err } diff --git a/mobile/types.go b/mobile/types.go index 05acb2b9ee..9a8f9ba961 100644 --- a/mobile/types.go +++ b/mobile/types.go @@ -372,7 +372,7 @@ type NewMessage struct { newMessage *whisper.NewMessage } -func NewNewMessage() (*NewMessage) { +func NewNewMessage() *NewMessage { nm := &NewMessage{ newMessage: new(whisper.NewMessage), } @@ -403,13 +403,13 @@ type Message struct { message *whisper.Message } -func (m *Message) GetSig() []byte { return m.message.Sig } -func (m *Message) GetTTL() int32 { return int32(m.message.TTL) } -func (m *Message) GetTimestamp() int32 { return int32(m.message.Timestamp) } -func (m *Message) GetPayload() []byte { return m.message.Payload } -func (m *Message) GetPoW() float64 { return m.message.PoW } -func (m *Message) GetHash() []byte { return m.message.Hash } -func (m *Message) GetDst() []byte { return m.message.Dst } +func (m *Message) GetSig() []byte { return m.message.Sig } +func (m *Message) GetTTL() int32 { return int32(m.message.TTL) } +func (m *Message) GetTimestamp() int32 { return int32(m.message.Timestamp) } +func (m *Message) GetPayload() []byte { return m.message.Payload } +func (m *Message) GetPoW() float64 { return m.message.PoW } +func (m *Message) GetHash() []byte { return m.message.Hash } +func (m *Message) GetDst() []byte { return m.message.Dst } // Messages represents an array of messages. type Messages struct { @@ -434,20 +434,20 @@ type Criteria struct { criteria *whisper.Criteria } -func NewCriteria(topic []byte) (*Criteria) { +func NewCriteria(topic []byte) *Criteria { c := &Criteria{ criteria: new(whisper.Criteria), } encodedTopic := whisper.BytesToTopic(topic) - c.criteria.Topics = []whisper.TopicType{ encodedTopic } + c.criteria.Topics = []whisper.TopicType{encodedTopic} return c } -func (c *Criteria) GetSymKeyID() string { return c.criteria.SymKeyID } -func (c *Criteria) SetSymKeyID(symKeyID string) { c.criteria.SymKeyID = symKeyID } -func (c *Criteria) GetPrivateKeyID() string { return c.criteria.PrivateKeyID } -func (c *Criteria) SetPrivateKeyID(privateKeyID string) { c.criteria.PrivateKeyID = privateKeyID } -func (c *Criteria) GetSig() []byte { return c.criteria.Sig } -func (c *Criteria) SetSig(sig []byte) { c.criteria.Sig = sig } -func (c *Criteria) GetMinPow() float64 { return c.criteria.MinPow } -func (c *Criteria) SetMinPow(pow float64) { c.criteria.MinPow = pow } +func (c *Criteria) GetSymKeyID() string { return c.criteria.SymKeyID } +func (c *Criteria) SetSymKeyID(symKeyID string) { c.criteria.SymKeyID = symKeyID } +func (c *Criteria) GetPrivateKeyID() string { return c.criteria.PrivateKeyID } +func (c *Criteria) SetPrivateKeyID(privateKeyID string) { c.criteria.PrivateKeyID = privateKeyID } +func (c *Criteria) GetSig() []byte { return c.criteria.Sig } +func (c *Criteria) SetSig(sig []byte) { c.criteria.Sig = sig } +func (c *Criteria) GetMinPow() float64 { return c.criteria.MinPow } +func (c *Criteria) SetMinPow(pow float64) { c.criteria.MinPow = pow } diff --git a/vendor/gopkg.in/check.v1/benchmark.go b/vendor/gopkg.in/check.v1/benchmark.go index 46ea9dc6da..b2d351948d 100644 --- a/vendor/gopkg.in/check.v1/benchmark.go +++ b/vendor/gopkg.in/check.v1/benchmark.go @@ -1,9 +1,9 @@ // Copyright (c) 2012 The Go Authors. All rights reserved. -// +// // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: -// +// // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above @@ -13,7 +13,7 @@ // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. -// +// // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR