Go to file
northernSage fffd6ae426 fix formatting 2021-02-25 07:25:59 -03:00
hooks Run CI using golangci-lint, Go 1.13.10 (#78) 2020-05-01 13:17:22 +01:00
.gitignore add initial docs 2021-02-25 07:21:37 -03:00
.golangci.yml Run CI using golangci-lint, Go 1.13.10 (#78) 2020-05-01 13:17:22 +01:00
.travis.yml Run CI using golangci-lint, Go 1.13.10 (#78) 2020-05-01 13:17:22 +01:00
CHANGELOG.md add initial docs 2021-02-25 07:21:37 -03:00
LICENSE Initial commit 2016-11-29 16:35:32 +00:00
README.md fix formatting 2021-02-25 07:25:59 -03:00
client.go Support sending formatted text (r0.6.0). (#82) 2020-08-27 13:09:29 +01:00
client_examples_test.go Run CI using golangci-lint, Go 1.13.10 (#78) 2020-05-01 13:17:22 +01:00
client_test.go Add test 2019-12-21 22:48:51 +00:00
events.go support for ephemeral events and more message types (#69) 2020-08-27 13:22:06 +01:00
filter.go Added default filter values & filter validation (#46) 2018-05-09 13:37:21 +01:00
go.mod Add go.mod 2020-04-08 16:53:10 +01:00
identifier.go Update Login() Logout() and LogoutAll() to r0.6.0 (#73) 2020-08-27 13:05:45 +01:00
requests.go Update Login() Logout() and LogoutAll() to r0.6.0 (#73) 2020-08-27 13:05:45 +01:00
responses.go support for ephemeral events and more message types (#69) 2020-08-27 13:22:06 +01:00
room.go Run CI using golangci-lint, Go 1.13.10 (#78) 2020-05-01 13:17:22 +01:00
store.go Make the rooms map 2016-12-01 14:52:55 +00:00
sync.go support for ephemeral events and more message types (#69) 2020-08-27 13:22:06 +01:00
tags.go Tag->TagContent 2019-03-26 22:25:57 +05:30
userids.go Run gofmt 2019-04-25 15:16:37 -07:00
userids_examples_test.go Add userid example functions 2016-12-08 17:41:35 +00:00
userids_test.go Add user ID handling methods 2016-12-06 14:24:27 +00:00

README.md

gomatrix

GoDoc

A Golang Matrix client.

THIS IS UNDER ACTIVE DEVELOPMENT: BREAKING CHANGES ARE FREQUENT.

Contributing

All contributions are greatly appreciated!

How to report issues

Obs. it's important to check the current open issues for similar reports in order to avoid duplicates.

Some general guidelines:

  • Include a minimal reproducible example when possible.
  • Describe the expected behaviour and what actually happened including a full trace-back in case of exceptions.
  • Make sure to list details about your environment

Setting up your environment

If you intend to contribute to gomatrix you'll first need Go installed on your machine (version 1.12+ is required). Also, make sure to have golangci-lint properly set up since we use it for pre-commit hooks (for instructions on how to install it, check the official docs).

  • Fork gomatrix to your GitHub account by clicking the Fork button.

  • Clone the main repository (not your fork) to your local machine.

    $ git clone https://github.com/matrix-org/gomatrix
    $ cd gomatrix
    
  • Add your fork as a remote to push your contributions.Replace {username} with your username.

    git remote add fork https://github.com/{username}/gomatrix
    
  • Create a new branch to identify what feature you are working on.

    $ git fetch origin
    $ git checkout -b your-branch-name origin/master
    
  • Make your changes, including tests that cover any code changes you make, and run them as described below.

  • Execute pre-commit hooks by running

    <gomatrix dir>/hooks/pre-commit
    
  • Push your changes to your fork and create a pull request describing your changes.

    $ git push --set-upstream fork your-branch-name
    
  • Finally, create a pull request

How to run tests

You can run the test suite and example code with $ go test -v

Running Coverage

To run coverage, first generate the coverage report using go test

go test -v -cover -coverprofile=coverage.out

You can now show the generated report as a html page with go tool

go tool cover -html=coverage.out