Add basic development instructions

This commit is contained in:
Tulir Asokan 2018-10-18 15:55:17 +03:00 committed by GitHub
parent 6790203958
commit e0e2b4f2f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,20 @@ or compile from source:
1. Run `go get -u maunium.net/go/gomuks` 1. Run `go get -u maunium.net/go/gomuks`
2. gomuks should now be in `$GOPATH/bin/gomuks` 2. gomuks should now be in `$GOPATH/bin/gomuks`
## Developing
Running `go install` in `$GOPATH/src/maunium.net/go/gomuks` will recompile the project and dependencies into `$GOPATH/bin/gomuks`.
For debugging, use `tail -f /tmp/gomuks-debug.log` and write to it using the methods in the `maunium.net/go/gomuks/debug` package:
```go
import (
"maunium.net/go/gomuks/debug"
)
...
func Foo() {
debug.Print("WHY ISN'T IT WORKING?!?!?")
}
```
## Usage ## Usage
- switch rooms - `Ctrl + ↑` `Ctrl + ↓` `Alt + ↑` `Alt + ↓` - switch rooms - `Ctrl + ↑` `Ctrl + ↓` `Alt + ↑` `Alt + ↓`
- scroll chat (line) - `↑` `↓` - scroll chat (line) - `↑` `↓`
@ -41,4 +55,4 @@ or compile from source:
* `/toggle <rooms/users/baremessages/images/typingnotif>` - Change user preferences * `/toggle <rooms/users/baremessages/images/typingnotif>` - Change user preferences
* `/logout` - Log out, clear caches and go back to the login view * `/logout` - Log out, clear caches and go back to the login view
* `/send <room id> <event type> <content>` - Send a custom event * `/send <room id> <event type> <content>` - Send a custom event
* `/setstate <room id> <event type> <state key/`-`> <content>` - Change room state * `/setstate <room id> <event type> <state key/-> <content>` - Change room state