Rename package

This commit is contained in:
Tulir Asokan 2018-10-02 14:31:42 +03:00
commit 8154c462e1
15 changed files with 24 additions and 51 deletions

26
.gitignore vendored
View file

@ -1,24 +1,2 @@
# Compiled Object files, Static and Dynamic libs (Shared Objects)
*.o
*.a
*.so
# Folders
_obj
_test
# Architecture specific extensions/prefixes
*.[568vq]
[568vq].out
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*
_testmain.go
*.exe
*.test
*.prof
.idea/
.vscode/

View file

@ -1,9 +0,0 @@
language: go
go:
- 1.8
install:
- go get github.com/golang/lint/golint
- go get github.com/fzipp/gocyclo
- go get github.com/client9/misspell/...
- go get github.com/gordonklaus/ineffassign
script: ./hooks/pre-commit

View file

@ -1,7 +1,7 @@
// Package gomatrix implements the Matrix Client-Server API.
// Package mautrix implements the Matrix Client-Server API.
//
// Specification can be found at http://matrix.org/docs/spec/client_server/r0.2.0.html
package gomatrix
// Specification can be found at http://matrix.org/docs/spec/client_server/r0.4.0.html
package mautrix
import (
"bytes"

View file

@ -1,4 +1,5 @@
package gomatrix
// Copyright 2018 Tulir Asokan
package mautrix
import (
"encoding/json"

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
package gomatrix
package mautrix
import "errors"

View file

@ -1,3 +1,4 @@
// Copyright 2018 Tulir Asokan
package format
import (

View file

@ -1,12 +1,13 @@
// Copyright 2018 Tulir Asokan
package format
import (
"gopkg.in/russross/blackfriday.v2"
"maunium.net/go/gomatrix"
"maunium.net/go/mautrix"
"strings"
)
func RenderMarkdown(text string) gomatrix.Content {
func RenderMarkdown(text string) mautrix.Content {
parser := blackfriday.New(
blackfriday.WithExtensions(blackfriday.NoIntraEmphasis |
blackfriday.Tables |
@ -28,10 +29,10 @@ func RenderMarkdown(text string) gomatrix.Content {
renderer.RenderFooter(&buf, ast)
htmlBody := buf.String()
return gomatrix.Content{
return mautrix.Content{
FormattedBody: htmlBody,
Format: gomatrix.FormatHTML,
MsgType: gomatrix.MsgText,
Format: mautrix.FormatHTML,
MsgType: mautrix.MsgText,
Body: HTMLToText(htmlBody),
}
}

View file

@ -1,4 +1,5 @@
package gomatrix
// Copyright 2018 Tulir Asokan
package mautrix
import (
"fmt"

View file

@ -1,4 +1,4 @@
package gomatrix
package mautrix
// ReqRegister is the JSON request for http://matrix.org/docs/spec/client_server/r0.2.0.html#post-matrix-client-r0-register
type ReqRegister struct {

View file

@ -1,4 +1,4 @@
package gomatrix
package mautrix
// RespError is the standard JSON error response from Homeservers. It also implements the Golang "error" interface.
// See http://matrix.org/docs/spec/client_server/r0.2.0.html#api-standards

View file

@ -1,4 +1,4 @@
package gomatrix
package mautrix
// Room represents a single Matrix room.
type Room struct {

View file

@ -1,4 +1,4 @@
package gomatrix
package mautrix
// Storer is an interface which must be satisfied to store client data.
//

View file

@ -1,4 +1,4 @@
package gomatrix
package mautrix
import (
"encoding/json"

View file

@ -1,4 +1,4 @@
package gomatrix
package mautrix
import (
"bytes"

View file

@ -1,4 +1,4 @@
package gomatrix
package mautrix
import (
"testing"