mirror of
https://mau.dev/mautrix/go.git
synced 2026-03-14 14:25:53 +01:00
Rename package
This commit is contained in:
parent
e1d9c9b869
commit
8154c462e1
15 changed files with 24 additions and 51 deletions
26
.gitignore
vendored
26
.gitignore
vendored
|
|
@ -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/
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
package gomatrix
|
||||
// Copyright 2018 Tulir Asokan
|
||||
package mautrix
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package gomatrix
|
||||
package mautrix
|
||||
|
||||
import "errors"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// Copyright 2018 Tulir Asokan
|
||||
package format
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
3
reply.go
3
reply.go
|
|
@ -1,4 +1,5 @@
|
|||
package gomatrix
|
||||
// Copyright 2018 Tulir Asokan
|
||||
package mautrix
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
2
room.go
2
room.go
|
|
@ -1,4 +1,4 @@
|
|||
package gomatrix
|
||||
package mautrix
|
||||
|
||||
// Room represents a single Matrix room.
|
||||
type Room struct {
|
||||
|
|
|
|||
2
store.go
2
store.go
|
|
@ -1,4 +1,4 @@
|
|||
package gomatrix
|
||||
package mautrix
|
||||
|
||||
// Storer is an interface which must be satisfied to store client data.
|
||||
//
|
||||
|
|
|
|||
2
sync.go
2
sync.go
|
|
@ -1,4 +1,4 @@
|
|||
package gomatrix
|
||||
package mautrix
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package gomatrix
|
||||
package mautrix
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
package gomatrix
|
||||
package mautrix
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue