fix golint warnings
This commit is contained in:
@ -114,7 +114,7 @@ func (client *GUI) renderContentArea() fyne.CanvasObject {
|
||||
client.contentPane = widget.NewVBox()
|
||||
if client.selectedChannel == "" {
|
||||
return client.contentPane
|
||||
} else {
|
||||
}
|
||||
if client.selectedMessage != 0 {
|
||||
var currentMessage data.Message
|
||||
for _, msg := range client.db.chanList[client.selectedChannel] {
|
||||
@ -156,7 +156,6 @@ func (client *GUI) renderContentArea() fyne.CanvasObject {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return client.contentPane
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ type database struct {
|
||||
Messages []data.Message
|
||||
}
|
||||
|
||||
func NewDatabase() *database {
|
||||
func newDatabase() *database {
|
||||
return new(database)
|
||||
}
|
||||
|
||||
|
5
gui.go
5
gui.go
@ -13,6 +13,7 @@ import (
|
||||
"github.com/kpetku/syndie-core/fetcher"
|
||||
)
|
||||
|
||||
// GUI contains various GUI configuration options
|
||||
type GUI struct {
|
||||
db *database
|
||||
window fyne.Window
|
||||
@ -30,12 +31,14 @@ type GUI struct {
|
||||
selectedMessage int
|
||||
}
|
||||
|
||||
// NewGUI creates a new GUI
|
||||
func NewGUI() *GUI {
|
||||
return new(GUI)
|
||||
}
|
||||
|
||||
// Start launches a new syndie-gui application
|
||||
func (client *GUI) Start(path string) {
|
||||
client.db = NewDatabase()
|
||||
client.db = newDatabase()
|
||||
client.db.openDB(path)
|
||||
client.db.reload()
|
||||
|
||||
|
Reference in New Issue
Block a user