gofmt -s all code
MODIFY
app/app.go
app/app.go
@@ -2,17 +2,16 @@ package app
import (
"fmt"
- "github.com/Bios-Marcel/cordless/readstate"
- "github.com/Bios-Marcel/cordless/shortcuts"
- "github.com/Bios-Marcel/cordless/version"
- "log"
- "os"
-
"github.com/Bios-Marcel/cordless/commands/commandimpls"
"github.com/Bios-Marcel/cordless/config"
+ "github.com/Bios-Marcel/cordless/readstate"
+ "github.com/Bios-Marcel/cordless/shortcuts"
"github.com/Bios-Marcel/cordless/ui"
+ "github.com/Bios-Marcel/cordless/version"
"github.com/Bios-Marcel/discordgo"
"github.com/Bios-Marcel/tview"
+ "log"
+ "os"
)
const (

MODIFY
commands/commandimpls/friends.go
commands/commandimpls/friends.go
@@ -52,7 +52,6 @@ func (f *Friends) Execute(writer io.Writer, parameters []string) {
return
}
-
switch parameters[0] {
case "list", "show", "which":
fmt.Fprintln(writer, "Friends:")

MODIFY
commands/commandimpls/version.go
commands/commandimpls/version.go
@@ -19,7 +19,6 @@ const versionDocumentation = `[::b]NAME
your installation might contain commits which aren't part of the stated
version.`
-
type VersionCmd struct{}
func NewVersionCommand() *VersionCmd {
@@ -41,5 +40,3 @@ func (cmd VersionCmd) Name() string {
func (cmd VersionCmd) Aliases() []string {
return nil
}
-
-

MODIFY
discordutil/message_test.go
discordutil/message_test.go
@@ -27,7 +27,7 @@ func Test_MentionsCurrentUserExplicitly(t *testing.T) {
name: "one foreign mention",
message: &discordgo.Message{
Mentions: []*discordgo.User{
- &discordgo.User{ID: "1"},
+ {ID: "1"},
},
},
want: false,
@@ -35,10 +35,10 @@ func Test_MentionsCurrentUserExplicitly(t *testing.T) {
name: "multiple foreign mention",
message: &discordgo.Message{
Mentions: []*discordgo.User{
- &discordgo.User{ID: "1"},
- &discordgo.User{ID: "2"},
- &discordgo.User{ID: "3"},
- &discordgo.User{ID: "4"},
+ {ID: "1"},
+ {ID: "2"},
+ {ID: "3"},
+ {ID: "4"},
},
},
want: false,
@@ -46,7 +46,7 @@ func Test_MentionsCurrentUserExplicitly(t *testing.T) {
name: "one mention for current user",
message: &discordgo.Message{
Mentions: []*discordgo.User{
- &discordgo.User{ID: "123"},
+ {ID: "123"},
},
},
want: true,
@@ -54,11 +54,11 @@ func Test_MentionsCurrentUserExplicitly(t *testing.T) {
name: "multiple mentions containing one for current user in the middle",
message: &discordgo.Message{
Mentions: []*discordgo.User{
- &discordgo.User{ID: "1"},
- &discordgo.User{ID: "2"},
- &discordgo.User{ID: "123"},
- &discordgo.User{ID: "4"},
- &discordgo.User{ID: "5"},
+ {ID: "1"},
+ {ID: "2"},
+ {ID: "123"},
+ {ID: "4"},
+ {ID: "5"},
},
},
want: true,
@@ -66,11 +66,11 @@ func Test_MentionsCurrentUserExplicitly(t *testing.T) {
name: "multiple mentions containing one for current user in the end",
message: &discordgo.Message{
Mentions: []*discordgo.User{
- &discordgo.User{ID: "1"},
- &discordgo.User{ID: "2"},
- &discordgo.User{ID: "3"},
- &discordgo.User{ID: "4"},
- &discordgo.User{ID: "123"},
+ {ID: "1"},
+ {ID: "2"},
+ {ID: "3"},
+ {ID: "4"},
+ {ID: "123"},
},
},
want: true,
@@ -78,11 +78,11 @@ func Test_MentionsCurrentUserExplicitly(t *testing.T) {
name: "multiple mentions containing one for current user in the beginning",
message: &discordgo.Message{
Mentions: []*discordgo.User{
- &discordgo.User{ID: "123"},
- &discordgo.User{ID: "2"},
- &discordgo.User{ID: "3"},
- &discordgo.User{ID: "4"},
- &discordgo.User{ID: "5"},
+ {ID: "123"},
+ {ID: "2"},
+ {ID: "3"},
+ {ID: "4"},
+ {ID: "5"},
},
},
want: true,

gofmt -s all code