Bläddra i källkod

chore: align struct fields

ayntgl 4 år sedan
förälder
incheckning
a6fa21b751
3 ändrade filer med 7 tillägg och 9 borttagningar
  1. 1 1
      config/mod.go
  2. 4 6
      ui/app.go
  3. 2 2
      util/discord.go

+ 1 - 1
config/mod.go

@@ -29,8 +29,8 @@ type KeybindingsConfig struct {
 }
 
 type Config struct {
-	General     GeneralConfig     `json:"general"`
 	Keybindings KeybindingsConfig `json:"keybindings"`
+	General     GeneralConfig     `json:"general"`
 }
 
 func New() *Config {

+ 4 - 6
ui/app.go

@@ -12,16 +12,14 @@ import (
 
 type App struct {
 	*tview.Application
-
 	GuildsList        *tview.List
 	ChannelsTreeView  *tview.TreeView
 	MessagesTextView  *tview.TextView
 	MessageInputField *tview.InputField
-
-	Session         *discordgo.Session
-	SelectedChannel *discordgo.Channel
-	SelectedMessage int
-	Config          config.Config
+	Session           *discordgo.Session
+	SelectedChannel   *discordgo.Channel
+	Config            config.Config
+	SelectedMessage   int
 }
 
 func NewApp() *App {

+ 2 - 2
util/discord.go

@@ -58,10 +58,10 @@ func HasPermission(s *discordgo.State, cID string, p int64) bool {
 }
 
 type loginResponse struct {
-	MFA    bool   `json:"mfa"`
-	SMS    bool   `json:"sms"`
 	Ticket string `json:"ticket"`
 	Token  string `json:"token"`
+	MFA    bool   `json:"mfa"`
+	SMS    bool   `json:"sms"`
 }
 
 func Login(s *discordgo.Session, email string, password string) (*loginResponse, error) {