From 77e62b1b66300cfbcff09b4c2dcfd7618a359712 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Mon, 28 May 2018 11:05:06 -0700 Subject: [PATCH] Renaming to cwtch.im --- app/app.go | 2 +- app/cli/main.go | 2 +- model/group.go | 2 +- model/group_test.go | 2 +- model/message.go | 2 +- model/message_test.go | 2 +- model/profile.go | 2 +- model/profile_test.go | 2 +- peer/connections/connectionsmanager.go | 4 ++-- peer/connections/peerpeerconnection.go | 6 +++--- peer/connections/peerpeerconnection_test.go | 8 ++++---- peer/connections/peerserverconnection.go | 8 ++++---- peer/connections/peerserverconnection_test.go | 6 +++--- peer/cwtch_peer.go | 8 ++++---- peer/fetch/peer_fetch_channel.go | 2 +- peer/fetch/peer_fetch_channel_test.go | 2 +- peer/listen/peer_listen_channel.go | 2 +- peer/listen/peer_listen_channel_test.go | 2 +- peer/peer/peer_channel.go | 2 +- peer/peer/peer_channel_test.go | 2 +- peer/send/peer_send_channel.go | 4 ++-- peer/send/peer_send_channel_test.go | 4 ++-- server/app/main.go | 8 ++++---- server/fetch/server_fetch_channel.go | 2 +- server/fetch/server_fetch_channel_test.go | 2 +- server/listen/server_listen_channel.go | 2 +- server/listen/server_listen_channel_test.go | 2 +- server/send/server_send_channel.go | 4 ++-- server/send/server_send_channel_test.go | 4 ++-- server/server.go | 8 ++++---- server/server_instance.go | 6 +++--- server/server_instance_test.go | 4 ++-- storage/message_store.go | 2 +- storage/message_store_test.go | 2 +- testing/cwtch_peer_server_intergration_test.go | 14 +++++++------- 35 files changed, 68 insertions(+), 68 deletions(-) diff --git a/app/app.go b/app/app.go index a73348b..a69b091 100644 --- a/app/app.go +++ b/app/app.go @@ -1,7 +1,7 @@ package app import ( - "git.mascherari.press/cwtch/peer" + "cwtch.im/cwtch/peer" "log" ) diff --git a/app/cli/main.go b/app/cli/main.go index 3697991..64c42dd 100644 --- a/app/cli/main.go +++ b/app/cli/main.go @@ -1,8 +1,8 @@ package main import ( + app2 "cwtch.im/cwtch/app" "fmt" - app2 "git.mascherari.press/cwtch/app" "github.com/c-bata/go-prompt" "strings" diff --git a/model/group.go b/model/group.go index e859bc9..cbc3e60 100644 --- a/model/group.go +++ b/model/group.go @@ -2,9 +2,9 @@ package model import ( "crypto/rand" + "cwtch.im/cwtch/protocol" "errors" "fmt" - "git.mascherari.press/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/utils" "golang.org/x/crypto/nacl/secretbox" diff --git a/model/group_test.go b/model/group_test.go index 1e08780..f1d0fec 100644 --- a/model/group_test.go +++ b/model/group_test.go @@ -1,7 +1,7 @@ package model import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "testing" "time" diff --git a/model/message.go b/model/message.go index 7db0e0e..cf37251 100644 --- a/model/message.go +++ b/model/message.go @@ -55,7 +55,7 @@ func (t *Timeline) Swap(i, j int) { t.Messages[i], t.Messages[j] = t.Messages[j], t.Messages[i] } -// Less checks 2 messages (i andj) in the timeline and returns true if i occcured before j, else false +// Less checks 2 messages (i and j) in the timeline and returns true if i occcured before j, else false func (t *Timeline) Less(i, j int) bool { if t.Messages[i].Timestamp.Before(t.Messages[j].Timestamp) { diff --git a/model/message_test.go b/model/message_test.go index 59a2cdc..629ffa5 100644 --- a/model/message_test.go +++ b/model/message_test.go @@ -1,7 +1,7 @@ package model import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "strconv" "testing" diff --git a/model/profile.go b/model/profile.go index fc04615..df8e420 100644 --- a/model/profile.go +++ b/model/profile.go @@ -3,10 +3,10 @@ package model import ( "crypto/rand" "crypto/rsa" + "cwtch.im/cwtch/protocol" "encoding/asn1" "encoding/json" "errors" - "git.mascherari.press/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/utils" "golang.org/x/crypto/ed25519" diff --git a/model/profile_test.go b/model/profile_test.go index be9d2cf..93c714d 100644 --- a/model/profile_test.go +++ b/model/profile_test.go @@ -1,7 +1,7 @@ package model import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "testing" ) diff --git a/peer/connections/connectionsmanager.go b/peer/connections/connectionsmanager.go index 75fa9b7..1c6206b 100644 --- a/peer/connections/connectionsmanager.go +++ b/peer/connections/connectionsmanager.go @@ -1,8 +1,8 @@ package connections import ( - "git.mascherari.press/cwtch/model" - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/model" + "cwtch.im/cwtch/protocol" "sync" "time" ) diff --git a/peer/connections/peerpeerconnection.go b/peer/connections/peerpeerconnection.go index abc1f19..b88a397 100644 --- a/peer/connections/peerpeerconnection.go +++ b/peer/connections/peerpeerconnection.go @@ -1,14 +1,14 @@ package connections import ( - "git.mascherari.press/cwtch/peer/peer" - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/peer/peer" + "cwtch.im/cwtch/protocol" "github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/connection" "github.com/s-rah/go-ricochet/identity" //"github.com/s-rah/go-ricochet/utils" - "git.mascherari.press/cwtch/model" + "cwtch.im/cwtch/model" "log" "time" ) diff --git a/peer/connections/peerpeerconnection_test.go b/peer/connections/peerpeerconnection_test.go index 8a03ef9..b20e7e4 100644 --- a/peer/connections/peerpeerconnection_test.go +++ b/peer/connections/peerpeerconnection_test.go @@ -2,9 +2,9 @@ package connections import ( "crypto/rsa" - "git.mascherari.press/cwtch/model" - "git.mascherari.press/cwtch/peer/peer" - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/model" + "cwtch.im/cwtch/peer/peer" + "cwtch.im/cwtch/protocol" "github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/connection" @@ -86,7 +86,7 @@ func TestPeerPeerConnection(t *testing.T) { } profile := model.GenerateNewProfile("sarah") - ppc := NewPeerPeerConnection("127.0.0.1:5452|" + onionAddr, profile) + ppc := NewPeerPeerConnection("127.0.0.1:5452|"+onionAddr, profile) //numcalls := 0 tp := new(TestPeer) tp.Init() diff --git a/peer/connections/peerserverconnection.go b/peer/connections/peerserverconnection.go index dc54e2a..f96d3cf 100644 --- a/peer/connections/peerserverconnection.go +++ b/peer/connections/peerserverconnection.go @@ -1,11 +1,11 @@ package connections import ( + "cwtch.im/cwtch/peer/fetch" + "cwtch.im/cwtch/peer/listen" + "cwtch.im/cwtch/peer/send" + "cwtch.im/cwtch/protocol" "errors" - "git.mascherari.press/cwtch/peer/fetch" - "git.mascherari.press/cwtch/peer/listen" - "git.mascherari.press/cwtch/peer/send" - "git.mascherari.press/cwtch/protocol" "github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/connection" diff --git a/peer/connections/peerserverconnection_test.go b/peer/connections/peerserverconnection_test.go index 3c28c20..3ba691b 100644 --- a/peer/connections/peerserverconnection_test.go +++ b/peer/connections/peerserverconnection_test.go @@ -2,9 +2,9 @@ package connections import ( "crypto/rsa" - "git.mascherari.press/cwtch/protocol" - "git.mascherari.press/cwtch/server/fetch" - "git.mascherari.press/cwtch/server/send" + "cwtch.im/cwtch/protocol" + "cwtch.im/cwtch/server/fetch" + "cwtch.im/cwtch/server/send" "github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/connection" diff --git a/peer/cwtch_peer.go b/peer/cwtch_peer.go index 5d8e9e2..f29510f 100644 --- a/peer/cwtch_peer.go +++ b/peer/cwtch_peer.go @@ -1,13 +1,13 @@ package peer import ( + "cwtch.im/cwtch/model" + "cwtch.im/cwtch/peer/connections" + "cwtch.im/cwtch/peer/peer" + "cwtch.im/cwtch/protocol" "encoding/json" "errors" "fmt" - "git.mascherari.press/cwtch/model" - "git.mascherari.press/cwtch/peer/connections" - "git.mascherari.press/cwtch/peer/peer" - "git.mascherari.press/cwtch/protocol" "github.com/s-rah/go-ricochet/application" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/connection" diff --git a/peer/fetch/peer_fetch_channel.go b/peer/fetch/peer_fetch_channel.go index 279852a..3c70a3a 100644 --- a/peer/fetch/peer_fetch_channel.go +++ b/peer/fetch/peer_fetch_channel.go @@ -1,8 +1,8 @@ package fetch import ( + "cwtch.im/cwtch/protocol" "errors" - "git.mascherari.press/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/utils" diff --git a/peer/fetch/peer_fetch_channel_test.go b/peer/fetch/peer_fetch_channel_test.go index e47aa87..c2a1442 100644 --- a/peer/fetch/peer_fetch_channel_test.go +++ b/peer/fetch/peer_fetch_channel_test.go @@ -1,7 +1,7 @@ package fetch import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/peer/listen/peer_listen_channel.go b/peer/listen/peer_listen_channel.go index b92c280..d837f81 100644 --- a/peer/listen/peer_listen_channel.go +++ b/peer/listen/peer_listen_channel.go @@ -1,8 +1,8 @@ package listen import ( + "cwtch.im/cwtch/protocol" "errors" - "git.mascherari.press/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/utils" diff --git a/peer/listen/peer_listen_channel_test.go b/peer/listen/peer_listen_channel_test.go index a70b915..f8f535b 100644 --- a/peer/listen/peer_listen_channel_test.go +++ b/peer/listen/peer_listen_channel_test.go @@ -1,7 +1,7 @@ package listen import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/peer/peer/peer_channel.go b/peer/peer/peer_channel.go index ae8ad8d..17dadcc 100644 --- a/peer/peer/peer_channel.go +++ b/peer/peer/peer_channel.go @@ -1,7 +1,7 @@ package peer import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/utils" diff --git a/peer/peer/peer_channel_test.go b/peer/peer/peer_channel_test.go index fb1b45b..39fd428 100644 --- a/peer/peer/peer_channel_test.go +++ b/peer/peer/peer_channel_test.go @@ -1,7 +1,7 @@ package peer import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/peer/send/peer_send_channel.go b/peer/send/peer_send_channel.go index 4a7e1dc..e0c73eb 100644 --- a/peer/send/peer_send_channel.go +++ b/peer/send/peer_send_channel.go @@ -1,9 +1,9 @@ package send import ( + "cwtch.im/cwtch/protocol" + "cwtch.im/cwtch/protocol/spam" "errors" - "git.mascherari.press/cwtch/protocol" - "git.mascherari.press/cwtch/protocol/spam" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/utils" diff --git a/peer/send/peer_send_channel_test.go b/peer/send/peer_send_channel_test.go index 069e66d..dc0d81e 100644 --- a/peer/send/peer_send_channel_test.go +++ b/peer/send/peer_send_channel_test.go @@ -1,8 +1,8 @@ package send import ( - "git.mascherari.press/cwtch/protocol" - "git.mascherari.press/cwtch/protocol/spam" + "cwtch.im/cwtch/protocol" + "cwtch.im/cwtch/protocol/spam" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/server/app/main.go b/server/app/main.go index f84d50a..5a45fd9 100644 --- a/server/app/main.go +++ b/server/app/main.go @@ -1,7 +1,7 @@ package main import ( - cwtchserver "git.mascherari.press/cwtch/server" + cwtchserver "cwtch.im/cwtch/server" "github.com/s-rah/go-ricochet/utils" "io/ioutil" "log" @@ -14,11 +14,11 @@ func checkAndGenPrivateKey(privateKeyFile string) { if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) { log.Printf("no private key found!") log.Printf("generating new private key...") - pk, pk_err := utils.GeneratePrivateKey() - if pk_err != nil { + pk, err := utils.GeneratePrivateKey() + if err != nil { log.Fatalf("error generating new private key: %v\n", err) } - err := ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400) + err = ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400) if err != nil { log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err) } diff --git a/server/fetch/server_fetch_channel.go b/server/fetch/server_fetch_channel.go index bcc0228..d3b41ef 100644 --- a/server/fetch/server_fetch_channel.go +++ b/server/fetch/server_fetch_channel.go @@ -1,8 +1,8 @@ package fetch import ( + "cwtch.im/cwtch/protocol" "errors" - "git.mascherari.press/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/utils" diff --git a/server/fetch/server_fetch_channel_test.go b/server/fetch/server_fetch_channel_test.go index 2eb4f36..e53747d 100644 --- a/server/fetch/server_fetch_channel_test.go +++ b/server/fetch/server_fetch_channel_test.go @@ -1,7 +1,7 @@ package fetch import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/server/listen/server_listen_channel.go b/server/listen/server_listen_channel.go index 79074f6..6926f35 100644 --- a/server/listen/server_listen_channel.go +++ b/server/listen/server_listen_channel.go @@ -1,8 +1,8 @@ package listen import ( + "cwtch.im/cwtch/protocol" "errors" - "git.mascherari.press/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/utils" diff --git a/server/listen/server_listen_channel_test.go b/server/listen/server_listen_channel_test.go index 2671761..0652bca 100644 --- a/server/listen/server_listen_channel_test.go +++ b/server/listen/server_listen_channel_test.go @@ -1,7 +1,7 @@ package listen import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/server/send/server_send_channel.go b/server/send/server_send_channel.go index 506fe70..873091d 100644 --- a/server/send/server_send_channel.go +++ b/server/send/server_send_channel.go @@ -1,9 +1,9 @@ package send import ( + "cwtch.im/cwtch/protocol" + "cwtch.im/cwtch/protocol/spam" "errors" - "git.mascherari.press/cwtch/protocol" - "git.mascherari.press/cwtch/protocol/spam" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/server/send/server_send_channel_test.go b/server/send/server_send_channel_test.go index f63c30d..0148857 100644 --- a/server/send/server_send_channel_test.go +++ b/server/send/server_send_channel_test.go @@ -1,8 +1,8 @@ package send import ( - "git.mascherari.press/cwtch/protocol" - "git.mascherari.press/cwtch/protocol/spam" + "cwtch.im/cwtch/protocol" + "cwtch.im/cwtch/protocol/spam" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/wire/control" diff --git a/server/server.go b/server/server.go index 70ac609..a3d054f 100644 --- a/server/server.go +++ b/server/server.go @@ -1,10 +1,10 @@ package server import ( - "git.mascherari.press/cwtch/server/fetch" - "git.mascherari.press/cwtch/server/listen" - "git.mascherari.press/cwtch/server/send" - "git.mascherari.press/cwtch/storage" + "cwtch.im/cwtch/server/fetch" + "cwtch.im/cwtch/server/listen" + "cwtch.im/cwtch/server/send" + "cwtch.im/cwtch/storage" "github.com/s-rah/go-ricochet/application" "github.com/s-rah/go-ricochet/channels" "github.com/s-rah/go-ricochet/utils" diff --git a/server/server_instance.go b/server/server_instance.go index 542034b..bde9645 100644 --- a/server/server_instance.go +++ b/server/server_instance.go @@ -1,9 +1,9 @@ package server import ( - "git.mascherari.press/cwtch/protocol" - "git.mascherari.press/cwtch/server/listen" - "git.mascherari.press/cwtch/storage" + "cwtch.im/cwtch/protocol" + "cwtch.im/cwtch/server/listen" + "cwtch.im/cwtch/storage" "github.com/s-rah/go-ricochet/application" "github.com/s-rah/go-ricochet/channels" ) diff --git a/server/server_instance_test.go b/server/server_instance_test.go index cbd6bfc..4363a72 100644 --- a/server/server_instance_test.go +++ b/server/server_instance_test.go @@ -1,8 +1,8 @@ package server import ( - "git.mascherari.press/cwtch/protocol" - "git.mascherari.press/cwtch/storage" + "cwtch.im/cwtch/protocol" + "cwtch.im/cwtch/storage" "github.com/s-rah/go-ricochet/application" "os" "testing" diff --git a/storage/message_store.go b/storage/message_store.go index 2a91eac..79ea2ef 100644 --- a/storage/message_store.go +++ b/storage/message_store.go @@ -2,9 +2,9 @@ package storage import ( "bufio" + "cwtch.im/cwtch/protocol" "encoding/json" "fmt" - "git.mascherari.press/cwtch/protocol" "log" "os" "sync" diff --git a/storage/message_store_test.go b/storage/message_store_test.go index 46ef703..134d781 100644 --- a/storage/message_store_test.go +++ b/storage/message_store_test.go @@ -1,7 +1,7 @@ package storage import ( - "git.mascherari.press/cwtch/protocol" + "cwtch.im/cwtch/protocol" "os" "strconv" "testing" diff --git a/testing/cwtch_peer_server_intergration_test.go b/testing/cwtch_peer_server_intergration_test.go index bb5290e..b84be17 100644 --- a/testing/cwtch_peer_server_intergration_test.go +++ b/testing/cwtch_peer_server_intergration_test.go @@ -1,11 +1,11 @@ package testing import ( + "cwtch.im/cwtch/model" + "cwtch.im/cwtch/peer" + "cwtch.im/cwtch/protocol" + cwtchserver "cwtch.im/cwtch/server" "fmt" - "git.mascherari.press/cwtch/model" - "git.mascherari.press/cwtch/peer" - "git.mascherari.press/cwtch/protocol" - cwtchserver "git.mascherari.press/cwtch/server" "github.com/golang/protobuf/proto" "github.com/s-rah/go-ricochet" "github.com/s-rah/go-ricochet/utils" @@ -28,11 +28,11 @@ var ( func checkAndGenPrivateKey(privateKeyFile string) (generated bool) { if _, err := os.Stat(privateKeyFile); os.IsNotExist(err) { fmt.Println("generating new private key...") - pk, pk_err := utils.GeneratePrivateKey() - if pk_err != nil { + pk, err := utils.GeneratePrivateKey() + if err != nil { log.Fatalf("error generating new private key: %v\n", err) } - err := ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400) + err = ioutil.WriteFile(privateKeyFile, []byte(utils.PrivateKeyToString(pk)), 0400) if err != nil { log.Fatalf("error writing new private key to file %s: %v\n", privateKeyFile, err) }