forked from cwtch.im/cwtch
fmt
This commit is contained in:
parent
c2d349a817
commit
979ad542f7
|
@ -1,15 +1,13 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
|
||||
"fmt"
|
||||
app2 "git.mascherari.press/cwtch/app"
|
||||
|
||||
"strings"
|
||||
"github.com/c-bata/go-prompt"
|
||||
"strings"
|
||||
)
|
||||
|
||||
|
||||
var app app2.Application
|
||||
|
||||
var suggestions = []prompt.Suggest{
|
||||
|
@ -99,7 +97,6 @@ func completer(d prompt.Document) []prompt.Suggest {
|
|||
return s
|
||||
}
|
||||
|
||||
|
||||
func main() {
|
||||
|
||||
cwtch :=
|
||||
|
@ -151,13 +148,11 @@ func main() {
|
|||
}
|
||||
prmpt := fmt.Sprintf("cwtch [%v]> ", profile)
|
||||
|
||||
|
||||
|
||||
text := prompt.Input(prmpt, completer, prompt.OptionSuggestionBGColor(prompt.Purple),
|
||||
prompt.OptionDescriptionBGColor(prompt.White),
|
||||
prompt.OptionHistory(history))
|
||||
|
||||
commands := strings.Split(text[0:len(text)], " ")
|
||||
commands := strings.Split(text[0:], " ")
|
||||
history = append(history, text)
|
||||
switch commands[0] {
|
||||
case "quit":
|
||||
|
|
|
@ -23,7 +23,6 @@ func NewConnectionsManager() *Manager {
|
|||
func (m *Manager) ManagePeerConnection(host string, profile *model.Profile) {
|
||||
m.lock.Lock()
|
||||
|
||||
|
||||
_, exists := m.peerConnections[host]
|
||||
if !exists {
|
||||
ppc := NewPeerPeerConnection(host, profile)
|
||||
|
@ -57,7 +56,6 @@ func (m *Manager) GetPeers() map[string]ConnectionState {
|
|||
return rm
|
||||
}
|
||||
|
||||
|
||||
func (m *Manager) GetServers() map[string]ConnectionState {
|
||||
rm := make(map[string]ConnectionState)
|
||||
m.lock.Lock()
|
||||
|
|
Loading…
Reference in New Issue