Gofmt
This commit is contained in:
		@@ -21,13 +21,13 @@ import (
 | 
			
		||||
	"os"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
 | 
			
		||||
	"gopkg.in/yaml.v2"
 | 
			
		||||
	"maunium.net/go/gomuks/debug"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/rooms"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/pushrules"
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"gopkg.in/yaml.v2"
 | 
			
		||||
	"maunium.net/go/gomatrix"
 | 
			
		||||
	"maunium.net/go/gomuks/debug"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/pushrules"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/rooms"
 | 
			
		||||
	"strings"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Config contains the main config of gomuks.
 | 
			
		||||
 
 | 
			
		||||
@@ -337,7 +337,7 @@ func (c *Container) HandleReadReceipt(source EventSource, evt *gomatrix.Event) {
 | 
			
		||||
	c.ui.Render()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *Container) parseDirectChatInfo(evt *gomatrix.Event) (map[*rooms.Room]bool){
 | 
			
		||||
func (c *Container) parseDirectChatInfo(evt *gomatrix.Event) map[*rooms.Room]bool {
 | 
			
		||||
	directChats := make(map[*rooms.Room]bool)
 | 
			
		||||
	for _, rawRoomIDList := range evt.Content {
 | 
			
		||||
		roomIDList, ok := rawRoomIDList.([]interface{})
 | 
			
		||||
 
 | 
			
		||||
@@ -17,16 +17,16 @@
 | 
			
		||||
package matrix
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"testing"
 | 
			
		||||
	"maunium.net/go/gomuks/config"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
	"net/http"
 | 
			
		||||
	"maunium.net/go/gomatrix"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"io/ioutil"
 | 
			
		||||
	"encoding/json"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
	"io/ioutil"
 | 
			
		||||
	"maunium.net/go/gomatrix"
 | 
			
		||||
	"maunium.net/go/gomuks/config"
 | 
			
		||||
	"net/http"
 | 
			
		||||
	"os"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"testing"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestContainer_InitClient_Empty(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
@@ -21,8 +21,8 @@ import (
 | 
			
		||||
	"strconv"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"maunium.net/go/gomuks/lib/glob"
 | 
			
		||||
	"maunium.net/go/gomatrix"
 | 
			
		||||
	"maunium.net/go/gomuks/lib/glob"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/rooms"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,9 +17,9 @@
 | 
			
		||||
package pushrules
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"maunium.net/go/gomuks/lib/glob"
 | 
			
		||||
	"maunium.net/go/gomatrix"
 | 
			
		||||
	"encoding/gob"
 | 
			
		||||
	"maunium.net/go/gomatrix"
 | 
			
		||||
	"maunium.net/go/gomuks/lib/glob"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,9 +17,9 @@
 | 
			
		||||
package pushrules_test
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"testing"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/pushrules"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/pushrules"
 | 
			
		||||
	"testing"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestPushRuleArray_GetActions_FirstMatchReturns(t *testing.T) {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,9 +17,9 @@
 | 
			
		||||
package pushrules_test
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"testing"
 | 
			
		||||
	"github.com/stretchr/testify/assert"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/pushrules"
 | 
			
		||||
	"testing"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func TestPushRule_Match_Conditions(t *testing.T) {
 | 
			
		||||
@@ -148,7 +148,6 @@ func TestPushRule_Match_Room_Fail(t *testing.T) {
 | 
			
		||||
	assert.False(t, rule.Match(blankTestRoom, event))
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
func TestPushRule_Match_Sender(t *testing.T) {
 | 
			
		||||
	rule := &pushrules.PushRule{
 | 
			
		||||
		Type:    pushrules.SenderRule,
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,10 @@ import (
 | 
			
		||||
	"sync"
 | 
			
		||||
	"time"
 | 
			
		||||
 | 
			
		||||
	"encoding/gob"
 | 
			
		||||
	"maunium.net/go/gomatrix"
 | 
			
		||||
	"maunium.net/go/gomuks/debug"
 | 
			
		||||
	"os"
 | 
			
		||||
	"encoding/gob"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func init() {
 | 
			
		||||
 
 | 
			
		||||
@@ -22,11 +22,11 @@ import (
 | 
			
		||||
	"strconv"
 | 
			
		||||
 | 
			
		||||
	"github.com/evidlo/fuzzysearch/fuzzy"
 | 
			
		||||
	"maunium.net/go/gomuks/debug"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/rooms"
 | 
			
		||||
	"maunium.net/go/gomuks/ui/widget"
 | 
			
		||||
	"maunium.net/go/tview"
 | 
			
		||||
	"maunium.net/go/tcell"
 | 
			
		||||
	"maunium.net/go/gomuks/debug"
 | 
			
		||||
	"maunium.net/go/tview"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type FuzzySearchModal struct {
 | 
			
		||||
 
 | 
			
		||||
@@ -22,12 +22,12 @@ import (
 | 
			
		||||
	"strconv"
 | 
			
		||||
	"strings"
 | 
			
		||||
 | 
			
		||||
	"math"
 | 
			
		||||
	"maunium.net/go/gomuks/debug"
 | 
			
		||||
	"maunium.net/go/gomuks/matrix/rooms"
 | 
			
		||||
	"maunium.net/go/gomuks/ui/widget"
 | 
			
		||||
	"maunium.net/go/tcell"
 | 
			
		||||
	"maunium.net/go/tview"
 | 
			
		||||
	"math"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type orderedRoom struct {
 | 
			
		||||
 
 | 
			
		||||
@@ -17,8 +17,8 @@
 | 
			
		||||
package widget
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"maunium.net/go/tview"
 | 
			
		||||
	"maunium.net/go/tcell"
 | 
			
		||||
	"maunium.net/go/tview"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Center wraps the given tview primitive into a Flex element in order to
 | 
			
		||||
 
 | 
			
		||||
@@ -17,10 +17,10 @@
 | 
			
		||||
package widget
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"github.com/mattn/go-runewidth"
 | 
			
		||||
	"maunium.net/go/tcell"
 | 
			
		||||
	"maunium.net/go/tview"
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"strconv"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user