From bf2a5e9b3495912bc4e266052e15cceedab131cf Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 17 Jan 2019 14:13:25 +0200 Subject: Update license and sort imports --- matrix/matrix.go | 21 +++++++++++---------- matrix/matrix_test.go | 10 +++++----- matrix/pushrules/action.go | 10 +++++----- matrix/pushrules/action_test.go | 10 +++++----- matrix/pushrules/condition.go | 11 ++++++----- matrix/pushrules/condition_displayname_test.go | 10 +++++----- matrix/pushrules/condition_eventmatch_test.go | 10 +++++----- matrix/pushrules/condition_membercount_test.go | 10 +++++----- matrix/pushrules/condition_test.go | 10 +++++----- matrix/pushrules/pushrules_test.go | 10 +++++----- matrix/pushrules/rule.go | 12 +++++++----- matrix/pushrules/rule_array_test.go | 10 +++++----- matrix/pushrules/rule_test.go | 10 +++++----- matrix/pushrules/ruleset.go | 10 +++++----- matrix/rooms/room.go | 15 ++++++++------- matrix/rooms/room_test.go | 10 +++++----- matrix/sync.go | 15 ++++++++------- matrix/sync_test.go | 10 +++++----- 18 files changed, 105 insertions(+), 99 deletions(-) (limited to 'matrix') diff --git a/matrix/matrix.go b/matrix/matrix.go index b119fc9..cb986ee 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -1,27 +1,28 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package matrix import ( "bytes" + "crypto/tls" + "encoding/json" "fmt" "io" "io/ioutil" - "maunium.net/go/mautrix/format" "net/http" "net/url" "os" @@ -31,17 +32,17 @@ import ( "strings" "time" - "crypto/tls" - "encoding/json" - "github.com/russross/blackfriday/v2" + + "maunium.net/go/mautrix" + "maunium.net/go/mautrix/format" + "maunium.net/go/gomuks/config" "maunium.net/go/gomuks/debug" "maunium.net/go/gomuks/interface" "maunium.net/go/gomuks/lib/bfhtml" "maunium.net/go/gomuks/matrix/pushrules" "maunium.net/go/gomuks/matrix/rooms" - "maunium.net/go/mautrix" ) // Container is a wrapper for a mautrix Client and some other stuff. diff --git a/matrix/matrix_test.go b/matrix/matrix_test.go index 21ba34e..f66c836 100644 --- a/matrix/matrix_test.go +++ b/matrix/matrix_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package matrix diff --git a/matrix/pushrules/action.go b/matrix/pushrules/action.go index 64dfddd..4637950 100644 --- a/matrix/pushrules/action.go +++ b/matrix/pushrules/action.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules diff --git a/matrix/pushrules/action_test.go b/matrix/pushrules/action_test.go index 41a1056..79b2fdf 100644 --- a/matrix/pushrules/action_test.go +++ b/matrix/pushrules/action_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/condition.go b/matrix/pushrules/condition.go index d547a3f..12fd3f3 100644 --- a/matrix/pushrules/condition.go +++ b/matrix/pushrules/condition.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules @@ -22,6 +22,7 @@ import ( "strings" "maunium.net/go/mautrix" + "maunium.net/go/gomuks/lib/glob" ) diff --git a/matrix/pushrules/condition_displayname_test.go b/matrix/pushrules/condition_displayname_test.go index 0ae85d1..fd3f374 100644 --- a/matrix/pushrules/condition_displayname_test.go +++ b/matrix/pushrules/condition_displayname_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/condition_eventmatch_test.go b/matrix/pushrules/condition_eventmatch_test.go index 0591656..e5761fc 100644 --- a/matrix/pushrules/condition_eventmatch_test.go +++ b/matrix/pushrules/condition_eventmatch_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/condition_membercount_test.go b/matrix/pushrules/condition_membercount_test.go index 32a776b..ad5da9f 100644 --- a/matrix/pushrules/condition_membercount_test.go +++ b/matrix/pushrules/condition_membercount_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/condition_test.go b/matrix/pushrules/condition_test.go index 4e8e8a1..163c964 100644 --- a/matrix/pushrules/condition_test.go +++ b/matrix/pushrules/condition_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/pushrules_test.go b/matrix/pushrules/pushrules_test.go index c56fd10..1883c97 100644 --- a/matrix/pushrules/pushrules_test.go +++ b/matrix/pushrules/pushrules_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/rule.go b/matrix/pushrules/rule.go index 62318ac..ef43721 100644 --- a/matrix/pushrules/rule.go +++ b/matrix/pushrules/rule.go @@ -1,24 +1,26 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules import ( "encoding/gob" + "maunium.net/go/mautrix" + "maunium.net/go/gomuks/lib/glob" ) diff --git a/matrix/pushrules/rule_array_test.go b/matrix/pushrules/rule_array_test.go index 5a5bd3d..8bfc5e9 100644 --- a/matrix/pushrules/rule_array_test.go +++ b/matrix/pushrules/rule_array_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/rule_test.go b/matrix/pushrules/rule_test.go index aad6a77..56d48fd 100644 --- a/matrix/pushrules/rule_test.go +++ b/matrix/pushrules/rule_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules_test diff --git a/matrix/pushrules/ruleset.go b/matrix/pushrules/ruleset.go index 366702e..33036c4 100644 --- a/matrix/pushrules/ruleset.go +++ b/matrix/pushrules/ruleset.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package pushrules diff --git a/matrix/rooms/room.go b/matrix/rooms/room.go index 628a0e3..16d4a9e 100644 --- a/matrix/rooms/room.go +++ b/matrix/rooms/room.go @@ -1,31 +1,32 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package rooms import ( + "encoding/gob" "fmt" + "os" "sort" "sync" "time" - "encoding/gob" "maunium.net/go/mautrix" + "maunium.net/go/gomuks/debug" - "os" ) func init() { diff --git a/matrix/rooms/room_test.go b/matrix/rooms/room_test.go index 891e541..a1fc4a4 100644 --- a/matrix/rooms/room_test.go +++ b/matrix/rooms/room_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package rooms_test diff --git a/matrix/sync.go b/matrix/sync.go index fc426bc..837a340 100644 --- a/matrix/sync.go +++ b/matrix/sync.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . // Based on https://github.com/matrix-org/mautrix/blob/master/sync.go @@ -20,11 +20,12 @@ package matrix import ( "encoding/json" - "maunium.net/go/gomuks/debug" "time" - "maunium.net/go/gomuks/matrix/rooms" "maunium.net/go/mautrix" + + "maunium.net/go/gomuks/debug" + "maunium.net/go/gomuks/matrix/rooms" ) type SyncerSession interface { diff --git a/matrix/sync_test.go b/matrix/sync_test.go index d3ae15e..4b85a75 100644 --- a/matrix/sync_test.go +++ b/matrix/sync_test.go @@ -1,18 +1,18 @@ // gomuks - A terminal Matrix client written in Go. -// Copyright (C) 2018 Tulir Asokan +// Copyright (C) 2019 Tulir Asokan // // This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by +// it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. +// GNU Affero General Public License for more details. // -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . package matrix_test -- cgit v1.2.3