Go fmt
This commit is contained in:
parent
531b59bf95
commit
a4dd3b310d
9 changed files with 142 additions and 144 deletions
|
@ -240,4 +240,3 @@ func (a *Account) eventInternal(event *Event) error {
|
||||||
return mxSendMessageAs(mx_room_id, typ, event.Text, mx_user_id)
|
return mxSendMessageAs(mx_room_id, typ, event.Text, mx_user_id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,14 @@ package appservice
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
|
||||||
"github.com/jinzhu/gorm"
|
"github.com/jinzhu/gorm"
|
||||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
_ "github.com/jinzhu/gorm/dialects/mysql"
|
||||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib"
|
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector"
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector"
|
||||||
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib"
|
||||||
)
|
)
|
||||||
|
|
||||||
var db *gorm.DB
|
var db *gorm.DB
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package appservice
|
package appservice
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"net/url"
|
|
||||||
"net/http"
|
|
||||||
"time"
|
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"net/url"
|
||||||
|
"time"
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
|
|
|
@ -3,14 +3,14 @@ package appservice
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib"
|
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector"
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector"
|
||||||
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
|
@ -21,7 +21,6 @@ type Config struct {
|
||||||
MatrixDomain string
|
MatrixDomain string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var registration *mxlib.Registration
|
var registration *mxlib.Registration
|
||||||
var config *Config
|
var config *Config
|
||||||
|
|
||||||
|
|
|
@ -82,6 +82,7 @@ type Handler interface {
|
||||||
}
|
}
|
||||||
|
|
||||||
type EventType int
|
type EventType int
|
||||||
|
|
||||||
const (
|
const (
|
||||||
EVENT_JOIN EventType = iota
|
EVENT_JOIN EventType = iota
|
||||||
EVENT_LEAVE
|
EVENT_LEAVE
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package irc
|
package irc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"time"
|
"fmt"
|
||||||
_ "os"
|
_ "os"
|
||||||
"strings"
|
"strings"
|
||||||
"fmt"
|
"time"
|
||||||
|
|
||||||
"github.com/lrstanley/girc"
|
"github.com/lrstanley/girc"
|
||||||
|
|
||||||
|
|
8
main.go
8
main.go
|
@ -1,25 +1,25 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
|
"encoding/json"
|
||||||
"flag"
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
_ "fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"os"
|
"os"
|
||||||
_ "strings"
|
_ "strings"
|
||||||
_ "time"
|
_ "time"
|
||||||
_ "fmt"
|
|
||||||
"encoding/json"
|
|
||||||
|
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
|
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib"
|
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/appservice"
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/appservice"
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector"
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector"
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector/irc"
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector/irc"
|
||||||
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector/xmpp"
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/connector/xmpp"
|
||||||
|
"git.deuxfleurs.fr/Deuxfleurs/easybridge/mxlib"
|
||||||
)
|
)
|
||||||
|
|
||||||
type ConfigAccount struct {
|
type ConfigAccount struct {
|
||||||
|
|
|
@ -84,4 +84,3 @@ type RoomJoinResponse struct {
|
||||||
type RoomSendResponse struct {
|
type RoomSendResponse struct {
|
||||||
EventId string `json:"event_id"`
|
EventId string `json:"event_id"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue