Gofmt
This commit is contained in:
parent
b17ff318c2
commit
b1dc965a4a
@ -25,7 +25,6 @@ import (
|
||||
"time"
|
||||
|
||||
"runtime/debug"
|
||||
|
||||
)
|
||||
|
||||
var writer io.Writer
|
||||
|
@ -67,7 +67,7 @@ type LoginView interface {
|
||||
type MessageDirection int
|
||||
|
||||
const (
|
||||
AppendMessage MessageDirection = iota
|
||||
AppendMessage MessageDirection = iota
|
||||
PrependMessage
|
||||
IgnoreMessage
|
||||
)
|
||||
|
@ -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),
|
||||
|
@ -9,4 +9,3 @@
|
||||
//
|
||||
// This package is licensed under the Mozilla Public License v2.0.
|
||||
package ansimage
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
|
@ -35,8 +35,8 @@ func TestPushActionArray_Should_EmptyArrayReturnsDefaults(t *testing.T) {
|
||||
func TestPushActionArray_Should_MixedArrayReturnsExpected1(t *testing.T) {
|
||||
should := pushrules.PushActionArray{
|
||||
{Action: pushrules.ActionNotify},
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakHighlight },
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: "ping" },
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakHighlight},
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: "ping"},
|
||||
}.Should()
|
||||
assert.True(t, should.NotifySpecified)
|
||||
assert.True(t, should.Notify)
|
||||
@ -49,7 +49,7 @@ func TestPushActionArray_Should_MixedArrayReturnsExpected2(t *testing.T) {
|
||||
should := pushrules.PushActionArray{
|
||||
{Action: pushrules.ActionDontNotify},
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakHighlight, Value: false},
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: "" },
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: ""},
|
||||
}.Should()
|
||||
assert.True(t, should.NotifySpecified)
|
||||
assert.False(t, should.Notify)
|
||||
@ -92,7 +92,7 @@ func TestPushActionArray_Should_DontNotify(t *testing.T) {
|
||||
|
||||
func TestPushActionArray_Should_HighlightBlank(t *testing.T) {
|
||||
should := pushrules.PushActionArray{
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakHighlight },
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakHighlight},
|
||||
}.Should()
|
||||
assert.False(t, should.NotifySpecified)
|
||||
assert.False(t, should.Notify)
|
||||
@ -103,7 +103,7 @@ func TestPushActionArray_Should_HighlightBlank(t *testing.T) {
|
||||
|
||||
func TestPushActionArray_Should_HighlightFalse(t *testing.T) {
|
||||
should := pushrules.PushActionArray{
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakHighlight, Value: false },
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakHighlight, Value: false},
|
||||
}.Should()
|
||||
assert.False(t, should.NotifySpecified)
|
||||
assert.False(t, should.Notify)
|
||||
@ -114,7 +114,7 @@ func TestPushActionArray_Should_HighlightFalse(t *testing.T) {
|
||||
|
||||
func TestPushActionArray_Should_SoundName(t *testing.T) {
|
||||
should := pushrules.PushActionArray{
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: "ping" },
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: "ping"},
|
||||
}.Should()
|
||||
assert.False(t, should.NotifySpecified)
|
||||
assert.False(t, should.Notify)
|
||||
@ -125,7 +125,7 @@ func TestPushActionArray_Should_SoundName(t *testing.T) {
|
||||
|
||||
func TestPushActionArray_Should_SoundNameEmpty(t *testing.T) {
|
||||
should := pushrules.PushActionArray{
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: "" },
|
||||
{Action: pushrules.ActionSetTweak, Tweak: pushrules.TweakSound, Value: ""},
|
||||
}.Should()
|
||||
assert.False(t, should.NotifySpecified)
|
||||
assert.False(t, should.Notify)
|
||||
|
@ -17,8 +17,8 @@
|
||||
package tstring
|
||||
|
||||
import (
|
||||
"maunium.net/go/tcell"
|
||||
"github.com/mattn/go-runewidth"
|
||||
"maunium.net/go/tcell"
|
||||
)
|
||||
|
||||
type Cell struct {
|
||||
|
@ -20,9 +20,9 @@ import (
|
||||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"maunium.net/go/tcell"
|
||||
"maunium.net/go/gomuks/matrix/rooms"
|
||||
"maunium.net/go/gomuks/ui/widget"
|
||||
"maunium.net/go/tcell"
|
||||
"maunium.net/go/tview"
|
||||
)
|
||||
|
||||
|
2
ui/ui.go
2
ui/ui.go
@ -17,8 +17,8 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"maunium.net/go/tcell"
|
||||
"maunium.net/go/gomuks/interface"
|
||||
"maunium.net/go/tcell"
|
||||
"maunium.net/go/tview"
|
||||
)
|
||||
|
||||
|
@ -18,8 +18,8 @@ package ui
|
||||
|
||||
import (
|
||||
"maunium.net/go/gomuks/config"
|
||||
"maunium.net/go/gomuks/interface"
|
||||
"maunium.net/go/gomuks/debug"
|
||||
"maunium.net/go/gomuks/interface"
|
||||
"maunium.net/go/gomuks/ui/widget"
|
||||
"maunium.net/go/tview"
|
||||
)
|
||||
|
@ -24,9 +24,9 @@ import (
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"maunium.net/go/tcell"
|
||||
"github.com/mattn/go-runewidth"
|
||||
"github.com/zyedidia/clipboard"
|
||||
"maunium.net/go/tcell"
|
||||
"maunium.net/go/tview"
|
||||
)
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
package widget
|
||||
|
||||
import (
|
||||
"maunium.net/go/tcell"
|
||||
"github.com/mattn/go-runewidth"
|
||||
"maunium.net/go/tcell"
|
||||
"maunium.net/go/tview"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user