mobile: performed gofmt

This commit is contained in:
Eugene Valeyev 2018-01-12 12:10:55 +03:00
parent 978346e438
commit f22a3e9451
3 changed files with 22 additions and 22 deletions

View file

@ -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
}

View file

@ -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 }

View file

@ -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