Skip to content

Commit b084a17

Browse files
committed
Make linter happy
1 parent f5a5fb0 commit b084a17

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎config.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type DeckConfig struct {
3939
Keys Keys `toml:"keys"`
4040
}
4141

42-
// LoadConfig loads config from filename
42+
// LoadConfig loads config from filename.
4343
func LoadConfig(filename string) (DeckConfig, error) {
4444
config := DeckConfig{}
4545

@@ -52,7 +52,7 @@ func LoadConfig(filename string) (DeckConfig, error) {
5252
return config, err
5353
}
5454

55-
// Save writes config as json to filename
55+
// Save writes config as json to filename.
5656
func (c DeckConfig) Save(filename string) error {
5757
var b bytes.Buffer
5858
e := toml.NewEncoder(&b)

‎deck.go‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import (
1111
"github.com/godbus/dbus"
1212
)
1313

14-
// Deck is a set of widgets
14+
// Deck is a set of widgets.
1515
type Deck struct {
1616
Widgets []Widget
1717
}
1818

19-
// LoadDeck loads a deck configuration
19+
// LoadDeck loads a deck configuration.
2020
func LoadDeck(deck string) (*Deck, error) {
2121
d := Deck{}
2222
dc, err := LoadConfig(deck)
@@ -32,7 +32,7 @@ func LoadDeck(deck string) (*Deck, error) {
3232
return &d, nil
3333
}
3434

35-
// emulates a (multi-)key press
35+
// emulates a (multi-)key press.
3636
func emulateKeyPress(keys string) {
3737
if keyboard == nil {
3838
log.Println("Keyboard emulation is disabled!")
@@ -55,7 +55,7 @@ func emulateKeyPress(keys string) {
5555
}
5656
}
5757

58-
// emulates a clipboard paste
58+
// emulates a clipboard paste.
5959
func emulateClipboard(text string) {
6060
err := clipboard.WriteAll(text)
6161
if err != nil {
@@ -66,15 +66,15 @@ func emulateClipboard(text string) {
6666
emulateKeyPress("29-47") // ctrl-v
6767
}
6868

69-
// executes a dbus method
69+
// executes a dbus method.
7070
func executeDBusMethod(object, path, method, args string) {
7171
call := dbusConn.Object(object, dbus.ObjectPath(path)).Call(method, 0, args)
7272
if call.Err != nil {
7373
log.Printf("dbus call failed: %s", call.Err)
7474
}
7575
}
7676

77-
// executes a command
77+
// executes a command.
7878
func executeCommand(cmd string) {
7979
args := strings.Split(cmd, " ")
8080
c := exec.Command(args[0], args[1:]...)
@@ -87,7 +87,7 @@ func executeCommand(cmd string) {
8787
}
8888
}
8989

90-
// triggerAction triggers an action
90+
// triggerAction triggers an action.
9191
func (d *Deck) triggerAction(index uint8, hold bool) {
9292
for _, w := range d.Widgets {
9393
if w.Key() == index {
@@ -132,7 +132,7 @@ func (d *Deck) triggerAction(index uint8, hold bool) {
132132
}
133133
}
134134

135-
// updateWidgets updates/repaints all the widgets
135+
// updateWidgets updates/repaints all the widgets.
136136
func (d *Deck) updateWidgets() {
137137
for _, w := range d.Widgets {
138138
w.Update(&dev)

‎desktop_unix.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func (x *Xorg) TrackWindows(ch chan interface{}, timeout time.Duration) {
144144
}()
145145
}
146146

147-
// ActiveWindow returns the currently active window
147+
// ActiveWindow returns the currently active window.
148148
func (x Xorg) ActiveWindow() Window {
149149
return x.activeWindow
150150
}

‎main.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ var (
2727
brightness = flag.Uint("brightness", 80, "brightness in percent")
2828
)
2929

30-
func handleActiveWindowChanged(dev streamdeck.Device, event ActiveWindowChangedEvent) {
31-
fmt.Println(fmt.Sprintf("Active window changed to %s (%d, %s)",
32-
event.Window.Class, event.Window.ID, event.Window.Name))
30+
func handleActiveWindowChanged(_ streamdeck.Device, event ActiveWindowChangedEvent) {
31+
fmt.Printf("Active window changed to %s (%d, %s)",
32+
event.Window.Class, event.Window.ID, event.Window.Name)
3333

3434
// remove dupes
3535
i := 0

0 commit comments

Comments
 (0)
⌂ 换网址