Formatting
the build was successful Details

This commit is contained in:
Sarah Jamie Lewis 2020-11-23 13:13:09 -08:00
parent 228a9b6ebd
commit e74a0e8dc2
9 changed files with 83 additions and 96 deletions

View File

@ -14,9 +14,7 @@ const TofuBundlePrefix = "tofubundle:"
const GroupPrefix = "torv3"
const GroupExperiment = "tapir-groups-experiment"
type GroupFunctionality struct {
}
// ExperimentGate returns GroupFunctionality if the experiment is enabled, and an error otherwise.
@ -72,6 +70,5 @@ func (gf * GroupFunctionality) HandleImportString(importString string) error {
return the.Peer.ImportGroup(importString)
}
return errors.New("invalid_group_invite_prefix")
}

View File

@ -2,7 +2,6 @@ package groups
import "testing"
func TestGroupFunctionality_ValidPrefix(t *testing.T) {
gf, _ := ExperimentGate(map[string]bool{GroupExperiment: true})
if gf.ValidPrefix("torv3blahblahblah") == false {

View File

@ -21,8 +21,6 @@ import (
"sync"
)
// ServerManager is responsible for managing user operated servers
type ServerManager struct {
servers sync.Map
@ -37,7 +35,6 @@ type serverStatusCache struct {
bundle []byte
}
// LaunchServiceManager is responsible for setting up everything relating to managing servers in the UI.
func LaunchServiceManager(gcd *ui.GrandCentralDispatcher, acn connectivity.ACN, configDir string) {
sm := new(ServerManager)
@ -112,13 +109,12 @@ func (sm *ServerManager) Init(gcd *ui.GrandCentralDispatcher) {
}
}
// NewServer createa a new server
func (sm *ServerManager) NewServer() {
log.Debugf("Adding a new Server")
num, err := rand.Int(rand.Reader, big.NewInt(math.MaxUint32))
if err == nil {
serverDir := path.Join(sm.configDir, num.String());
serverDir := path.Join(sm.configDir, num.String())
os.MkdirAll(serverDir, 0700)
config := server.LoadConfig(serverDir, "serverconfig")
identity := config.Identity()
@ -137,7 +133,6 @@ func (sm *ServerManager) runServer(s * server.Server) {
the.AppBus.Subscribe(constants.AutoStart, q)
the.AppBus.Subscribe(event.Shutdown, q)
identity := s.Identity()
cache, ok := sm.servers.Load(identity.Hostname())
@ -148,7 +143,6 @@ func (sm *ServerManager) runServer(s * server.Server) {
}
}
log.Debugf("Launching Server %v", identity.Hostname())
log.Debugf("Launching Event Bus for Server %v", identity.Hostname())
for {

View File

@ -36,7 +36,6 @@ type GrandCentralDispatcher struct {
m_selectedProfile string
m_selectedConversation string
_ int `property:"torStatus"`
_ string `property:"os"`
_ bool `property:"firstTime"`

View File

@ -50,7 +50,6 @@ func (this *MessageModel) setHandle(handle string) {
this.handle = handle
}
func (this *MessageModel) init() {
mdt := reflect.TypeOf([]MessageWrapper{}).Elem()
roles := make(map[int]*core.QByteArray)

View File

@ -68,7 +68,6 @@ func ReadGlobalSettings() (*GlobalSettings, bool) {
return &settings, true //firstTime = true
}
err = json.Unmarshal(settingsBytes, &settings)
if err != nil {
log.Errorf("Could not parse global ui settings: %v\n", err)