aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2018-04-19 11:10:34 +0300
committerTulir Asokan <tulir@maunium.net>2018-04-19 11:10:34 +0300
commitb1dc965a4a5b8a48666749e824d0e480b9d08eed (patch)
tree5409a3cf7e02a4033a29e2ce2aa46f2297503709 /lib
parentb17ff318c26aecdcf2c6719ed5b0872be5254c44 (diff)
Gofmt
Diffstat (limited to 'lib')
-rw-r--r--lib/ansimage/ansimage.go16
-rw-r--r--lib/ansimage/doc.go1
-rw-r--r--lib/notification/notify_darwin.go6
-rw-r--r--lib/notification/notify_linux.go6
-rw-r--r--lib/notification/notify_windows.go2
5 files changed, 15 insertions, 16 deletions
diff --git a/lib/ansimage/ansimage.go b/lib/ansimage/ansimage.go
index 7320848..ece1f2c 100644
--- a/lib/ansimage/ansimage.go
+++ b/lib/ansimage/ansimage.go
@@ -102,13 +102,13 @@ func (ai *ANSImage) SetAt(y, x int, r, g, b, brightness uint8) error {
func (ai *ANSImage) GetAt(y, x int) (*ANSIpixel, error) {
if y >= 0 && y < ai.h && x >= 0 && x < ai.w {
return &ANSIpixel{
- R: ai.pixmap[y][x].R,
- G: ai.pixmap[y][x].G,
- B: ai.pixmap[y][x].B,
- Brightness: ai.pixmap[y][x].Brightness,
- upper: ai.pixmap[y][x].upper,
- source: ai.pixmap[y][x].source,
- },
+ R: ai.pixmap[y][x].R,
+ G: ai.pixmap[y][x].G,
+ B: ai.pixmap[y][x].B,
+ Brightness: ai.pixmap[y][x].Brightness,
+ upper: ai.pixmap[y][x].upper,
+ source: ai.pixmap[y][x].source,
+ },
nil
}
return nil, ErrOutOfBounds
@@ -170,7 +170,7 @@ func New(h, w int, bg color.Color) (*ANSImage, error) {
r, g, b, _ := bg.RGBA()
ansimage := &ANSImage{
- h: h, w: w,
+ h: h, w: w,
maxprocs: 1,
bgR: uint8(r),
bgG: uint8(g),
diff --git a/lib/ansimage/doc.go b/lib/ansimage/doc.go
index 56bc0c5..d1898a7 100644
--- a/lib/ansimage/doc.go
+++ b/lib/ansimage/doc.go
@@ -9,4 +9,3 @@
//
// This package is licensed under the Mozilla Public License v2.0.
package ansimage
-
diff --git a/lib/notification/notify_darwin.go b/lib/notification/notify_darwin.go
index 1e09ef8..0a7e49b 100644
--- a/lib/notification/notify_darwin.go
+++ b/lib/notification/notify_darwin.go
@@ -42,9 +42,9 @@ func Send(title, text string, critical, sound bool) error {
if sound {
args = append(args, "-sound", "default")
}
-// if len(iconPath) > 0 {
-// args = append(args, "-appIcon", iconPath)
-// }
+ // if len(iconPath) > 0 {
+ // args = append(args, "-appIcon", iconPath)
+ // }
return exec.Command("terminal-notifier", args...).Run()
}
title = strings.Replace(title, `"`, `\"`, -1)
diff --git a/lib/notification/notify_linux.go b/lib/notification/notify_linux.go
index f8ecdaf..11a37a7 100644
--- a/lib/notification/notify_linux.go
+++ b/lib/notification/notify_linux.go
@@ -23,9 +23,9 @@ func Send(title, text string, critical, sound bool) error {
if critical {
args = append(args, "-u", "critical")
}
-// if iconPath {
-// args = append(args, "-i", iconPath)
-// }
+ // if iconPath {
+ // args = append(args, "-i", iconPath)
+ // }
args = append(args, title, text)
if sound {
soundName := "message-new-instant"
diff --git a/lib/notification/notify_windows.go b/lib/notification/notify_windows.go
index d927ee1..999380a 100644
--- a/lib/notification/notify_windows.go
+++ b/lib/notification/notify_windows.go
@@ -25,7 +25,7 @@ func Send(title, text string, critical, sound bool) error {
Message: message,
Audio: toast.Silent,
Duration: toast.Short,
-// Icon: ...,
+ // Icon: ...,
}
if sound {
notification.Audio = toast.IM