update import paths
update Readme with shields
This commit is contained in:
parent
271e4fb5ef
commit
7055f0c9b2
|
@ -1,2 +1,2 @@
|
||||||
# pterodactyld
|
# wings.go ![travis](https://img.shields.io/travis/schrej/wings.svg?style=flat-square) ![codacy quality](https://img.shields.io/codacy/grade/27a1576bda86450f853b1052b12fa570.svg?style=flat-square) ![codacy coverage](https://img.shields.io/codacy/coverage/27a1576bda86450f853b1052b12fa570.svg?style=flat-square)
|
||||||
A new generation of the Pterodactyl daemon, written in go
|
A new generation of the Pterodactyl daemon, written in go
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"html"
|
"html"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
|
|
||||||
"github.com/schrej/wings.go/config"
|
"github.com/schrej/wings/config"
|
||||||
)
|
)
|
||||||
|
|
||||||
// API is a grouping struct for the api
|
// API is a grouping struct for the api
|
||||||
|
|
|
@ -9,7 +9,7 @@ func NewDockerEnvironment() *DockerEnvironment {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (env *DockerEnvironment) Exec() error {
|
func (env *DockerEnvironment) Exec() error {
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (env *DockerEnvironment) Create() error {
|
func (env *DockerEnvironment) Create() error {
|
||||||
|
|
17
main.go
17
main.go
|
@ -1,10 +1,12 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
log "github.com/Sirupsen/logrus"
|
"fmt"
|
||||||
"github.com/schrej/wings.go/api"
|
|
||||||
"github.com/schrej/wings.go/config"
|
"github.com/schrej/wings/api"
|
||||||
"github.com/schrej/wings.go/tools"
|
"github.com/schrej/wings/config"
|
||||||
|
"github.com/schrej/wings/tools"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -13,15 +15,16 @@ const (
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
fmt.Println("Loading configuration")
|
||||||
|
if err := config.LoadConfiguration(); err != nil {
|
||||||
|
log.WithError(err).Fatal("Failed to find configuration file")
|
||||||
|
}
|
||||||
tools.ConfigureLogging()
|
tools.ConfigureLogging()
|
||||||
|
|
||||||
log.Info("Starting wings.go version ", Version)
|
log.Info("Starting wings.go version ", Version)
|
||||||
|
|
||||||
// Load configuration
|
// Load configuration
|
||||||
log.Info("Loading configuration...")
|
log.Info("Loading configuration...")
|
||||||
if err := config.LoadConfiguration(); err != nil {
|
|
||||||
log.WithError(err).Fatal("Failed to find configuration file")
|
|
||||||
}
|
|
||||||
|
|
||||||
log.Info("Starting api webserver")
|
log.Info("Starting api webserver")
|
||||||
api := api.NewAPI()
|
api := api.NewAPI()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package services
|
package services
|
||||||
|
|
||||||
import "github.com/schrej/wings.go/environments"
|
import "github.com/schrej/wings/environments"
|
||||||
|
|
||||||
type Service struct {
|
type Service struct {
|
||||||
Environment environments.Environment
|
Environment environments.Environment
|
||||||
|
|
|
@ -5,10 +5,11 @@ import (
|
||||||
|
|
||||||
rotatelogs "github.com/lestrrat/go-file-rotatelogs"
|
rotatelogs "github.com/lestrrat/go-file-rotatelogs"
|
||||||
"github.com/rifflock/lfshook"
|
"github.com/rifflock/lfshook"
|
||||||
log "github.com/Sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
func ConfigureLogging() {
|
// ConfigureLogging configures logrus to our needs
|
||||||
|
func ConfigureLogging() error {
|
||||||
|
|
||||||
log.SetFormatter(&log.TextFormatter{
|
log.SetFormatter(&log.TextFormatter{
|
||||||
DisableTimestamp: true,
|
DisableTimestamp: true,
|
||||||
|
@ -28,4 +29,6 @@ func ConfigureLogging() {
|
||||||
log.FatalLevel: writer,
|
log.FatalLevel: writer,
|
||||||
log.PanicLevel: writer,
|
log.PanicLevel: writer,
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user