Browse Source

Formatting & Adding to Quality

pull/76/head
Sarah Jamie Lewis 3 years ago
parent
commit
2981cb4dac
  1. 2
      model/group.go
  2. 2
      model/profile.go
  3. 2
      peer/connections/peerpeerconnection.go
  4. 4
      peer/cwtch_peer_test.go
  5. 2
      peer/fetch/peer_fetch_channel.go
  6. 2
      peer/fetch/peer_fetch_channel_test.go
  7. 2
      peer/listen/peer_listen_channel.go
  8. 2
      peer/listen/peer_listen_channel_test.go
  9. 2
      peer/peer/peer_channel.go
  10. 2
      peer/peer/peer_channel_test.go
  11. 2
      peer/send/peer_send_channel.go
  12. 2
      peer/send/peer_send_channel_test.go
  13. 2
      protocol/spam/spamguard.go
  14. 2
      protocol/spam/spamguard_test.go
  15. 2
      server/fetch/server_fetch_channel.go
  16. 2
      server/fetch/server_fetch_channel_test.go
  17. 2
      server/listen/server_listen_channel.go
  18. 2
      server/listen/server_listen_channel_test.go
  19. 2
      server/send/server_send_channel.go
  20. 2
      server/send/server_send_channel_test.go
  21. 6
      testing/cwtch_peer_server_intergration_test.go
  22. 4
      testing/quality.sh

2
model/group.go

@ -5,8 +5,8 @@ import (
"cwtch.im/cwtch/protocol"
"errors"
"fmt"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"github.com/golang/protobuf/proto"
"golang.org/x/crypto/nacl/secretbox"
"io"
"sync"

2
model/profile.go

@ -6,8 +6,8 @@ import (
"cwtch.im/cwtch/protocol"
"encoding/asn1"
"errors"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"github.com/golang/protobuf/proto"
"golang.org/x/crypto/ed25519"
"io"
"sync"

2
peer/connections/peerpeerconnection.go

@ -1,13 +1,13 @@
package connections
import (
"cwtch.im/cwtch/model"
"cwtch.im/cwtch/peer/peer"
"cwtch.im/cwtch/protocol"
"git.openprivacy.ca/openprivacy/libricochet-go"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/connection"
"git.openprivacy.ca/openprivacy/libricochet-go/identity"
"cwtch.im/cwtch/model"
"log"
"time"
)

4
peer/cwtch_peer_test.go

@ -6,10 +6,10 @@ import (
func TestCwtchPeerGenerate(t *testing.T) {
alice := NewCwtchPeer("alice","testpass")
alice := NewCwtchPeer("alice", "testpass")
alice.Save("./test_profile")
aliceLoaded, err := LoadCwtchPeer("./test_profile","testpass")
aliceLoaded, err := LoadCwtchPeer("./test_profile", "testpass")
if err != nil || aliceLoaded.GetProfile().Name != "alice" {
t.Errorf("something went wrong saving and loading profiles %v %v", err, aliceLoaded)
}

2
peer/fetch/peer_fetch_channel.go

@ -3,10 +3,10 @@ package fetch
import (
"cwtch.im/cwtch/protocol"
"errors"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
)
// CwtchPeerFetchChannel is the peer implementation of the im.cwtch.server.fetch

2
peer/fetch/peer_fetch_channel_test.go

@ -2,9 +2,9 @@ package fetch
import (
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
"time"
)

2
peer/listen/peer_listen_channel.go

@ -3,10 +3,10 @@ package listen
import (
"cwtch.im/cwtch/protocol"
"errors"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
)
// CwtchPeerListenChannel is the peer implementation of im.cwtch.server.listen

2
peer/listen/peer_listen_channel_test.go

@ -2,9 +2,9 @@ package listen
import (
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
"time"
)

2
peer/peer/peer_channel.go

@ -2,10 +2,10 @@ package peer
import (
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"log"
)

2
peer/peer/peer_channel_test.go

@ -2,9 +2,9 @@ package peer
import (
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
)

2
peer/send/peer_send_channel.go

@ -4,10 +4,10 @@ import (
"cwtch.im/cwtch/protocol"
"cwtch.im/cwtch/protocol/spam"
"errors"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
)
// CwtchPeerSendChannel is the peer implementation of im.cwtch.server.send

2
peer/send/peer_send_channel_test.go

@ -3,9 +3,9 @@ package send
import (
"cwtch.im/cwtch/protocol"
"cwtch.im/cwtch/protocol/spam"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
)

2
protocol/spam/spamguard.go

@ -4,9 +4,9 @@ import (
"crypto/rand"
"crypto/sha256"
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"io"
//"fmt"
)

2
protocol/spam/spamguard_test.go

@ -2,8 +2,8 @@ package spam
import (
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
)

2
server/fetch/server_fetch_channel.go

@ -3,10 +3,10 @@ package fetch
import (
"cwtch.im/cwtch/protocol"
"errors"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
)
// CwtchServerFetchChannel implements the ChannelHandler interface for a channel of

2
server/fetch/server_fetch_channel_test.go

@ -2,9 +2,9 @@ package fetch
import (
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
)

2
server/listen/server_listen_channel.go

@ -3,10 +3,10 @@ package listen
import (
"cwtch.im/cwtch/protocol"
"errors"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/utils"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
)
// CwtchServerListenChannel implements the ChannelHandler interface for a channel of

2
server/listen/server_listen_channel_test.go

@ -2,9 +2,9 @@ package listen
import (
"cwtch.im/cwtch/protocol"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
)

2
server/send/server_send_channel.go

@ -4,9 +4,9 @@ import (
"cwtch.im/cwtch/protocol"
"cwtch.im/cwtch/protocol/spam"
"errors"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"log"
)

2
server/send/server_send_channel_test.go

@ -3,9 +3,9 @@ package send
import (
"cwtch.im/cwtch/protocol"
"cwtch.im/cwtch/protocol/spam"
"github.com/golang/protobuf/proto"
"git.openprivacy.ca/openprivacy/libricochet-go/channels"
"git.openprivacy.ca/openprivacy/libricochet-go/wire/control"
"github.com/golang/protobuf/proto"
"testing"
)

6
testing/cwtch_peer_server_intergration_test.go

@ -143,17 +143,17 @@ func TestCwtchPeerIntegration(t *testing.T) {
// ***** Peer setup *****
fmt.Println("Creating Alice...")
alice := peer.NewCwtchPeer("Alice","alicepass")
alice := peer.NewCwtchPeer("Alice", "alicepass")
go alice.Listen()
fmt.Println("Alice created:", alice.GetProfile().Onion)
fmt.Println("Creating Bob...")
bob := peer.NewCwtchPeer("Bob","bobpass")
bob := peer.NewCwtchPeer("Bob", "bobpass")
go bob.Listen()
fmt.Println("Bob created:", bob.GetProfile().Onion)
fmt.Println("Creating Carol...")
carol := peer.NewCwtchPeer("Carol","carolpass")
carol := peer.NewCwtchPeer("Carol", "carolpass")
go carol.Listen()
fmt.Println("Carol created:", carol.GetProfile().Onion)

4
testing/quality.sh

@ -10,3 +10,7 @@ echo ""
echo "Linting:"
go list ./... | xargs golint
echo "Time to format"
gofmt -l -s -w .
Loading…
Cancel
Save