Merge pull request #243 from OpenFactorioServerManager/update-imports

Renamed go package
This commit is contained in:
knoxfighter 2021-01-28 02:08:44 +01:00 committed by GitHub
commit 9acf80ab6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 63 additions and 47 deletions

View File

@ -2,13 +2,14 @@ package api
import (
"encoding/base64"
"log"
"net/http"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/gorilla/sessions"
"github.com/mroote/factorio-server-manager/bootstrap"
"golang.org/x/crypto/bcrypt"
"gorm.io/driver/sqlite"
"gorm.io/gorm"
"log"
"net/http"
)
type User bootstrap.User

View File

@ -4,9 +4,6 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/gorilla/sessions"
"github.com/mroote/factorio-server-manager/bootstrap"
"github.com/mroote/factorio-server-manager/factorio"
"io"
"io/ioutil"
"log"
@ -17,6 +14,10 @@ import (
"sync"
"time"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/factorio-server-manager/factorio"
"github.com/gorilla/sessions"
"github.com/gorilla/mux"
)

View File

@ -4,14 +4,15 @@ import (
"archive/zip"
"errors"
"fmt"
"github.com/gorilla/mux"
"github.com/mroote/factorio-server-manager/bootstrap"
"github.com/mroote/factorio-server-manager/factorio"
"io"
"log"
"net/http"
"os"
"path/filepath"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/factorio-server-manager/factorio"
"github.com/gorilla/mux"
)
func CheckModPackExists(modPackMap factorio.ModPackMap, modPackName string, w http.ResponseWriter) (resp interface{}, err error) {

View File

@ -3,10 +3,6 @@ package api
import (
"bytes"
"encoding/json"
"github.com/gorilla/mux"
"github.com/mroote/factorio-server-manager/bootstrap"
"github.com/mroote/factorio-server-manager/factorio"
"github.com/stretchr/testify/assert"
"io"
"mime/multipart"
"net/http"
@ -15,6 +11,11 @@ import (
"path/filepath"
"strings"
"testing"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/factorio-server-manager/factorio"
"github.com/gorilla/mux"
"github.com/stretchr/testify/assert"
)
func SetupModPacks(t *testing.T, empty bool, emptyMods bool) {

View File

@ -2,10 +2,11 @@ package api
import (
"fmt"
"github.com/gorilla/mux"
"github.com/mroote/factorio-server-manager/factorio"
"log"
"net/http"
"github.com/OpenFactorioServerManager/factorio-server-manager/factorio"
"github.com/gorilla/mux"
)
func ModPortalListModsHandler(w http.ResponseWriter, r *http.Request) {

View File

@ -4,14 +4,15 @@ import (
"archive/zip"
"encoding/json"
"fmt"
"github.com/mroote/factorio-server-manager/bootstrap"
"github.com/mroote/factorio-server-manager/factorio"
"github.com/mroote/factorio-server-manager/lockfile"
"io"
"log"
"net/http"
"os"
"path/filepath"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/factorio-server-manager/factorio"
"github.com/OpenFactorioServerManager/factorio-server-manager/lockfile"
)
func CreateNewMods(w http.ResponseWriter) (modList factorio.Mods, resp interface{}, err error) {

View File

@ -2,12 +2,6 @@ package api
import (
"bytes"
"github.com/gorilla/mux"
"github.com/joho/godotenv"
"github.com/mroote/factorio-server-manager/bootstrap"
"github.com/mroote/factorio-server-manager/factorio"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io"
"log"
"mime/multipart"
@ -17,6 +11,13 @@ import (
"path/filepath"
"strings"
"testing"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/factorio-server-manager/factorio"
"github.com/gorilla/mux"
"github.com/joho/godotenv"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestMain(m *testing.M) {

View File

@ -1,9 +1,10 @@
package api
import (
"github.com/mroote/factorio-server-manager/api/websocket"
"net/http"
"github.com/OpenFactorioServerManager/factorio-server-manager/api/websocket"
"github.com/gorilla/mux"
)

View File

@ -1,8 +1,9 @@
package websocket
import (
"github.com/mroote/factorio-server-manager/bootstrap"
"reflect"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
)
// the hub, that is exported and can be used anywhere to work with the websocket

View File

@ -3,10 +3,11 @@ package factorio
import (
"encoding/json"
"errors"
"github.com/mroote/factorio-server-manager/bootstrap"
"io/ioutil"
"log"
"os"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
)
type Credentials struct {

View File

@ -1,9 +1,10 @@
package factorio
import (
"github.com/hpcloud/tail"
"github.com/mroote/factorio-server-manager/bootstrap"
"log"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/hpcloud/tail"
)
func TailLog() ([]string, error) {

View File

@ -5,13 +5,14 @@ import (
"bytes"
"errors"
"fmt"
"github.com/mroote/factorio-server-manager/lockfile"
"io"
"io/ioutil"
"log"
"mime/multipart"
"net/http"
"path/filepath"
"github.com/OpenFactorioServerManager/factorio-server-manager/lockfile"
)
type Mods struct {

View File

@ -4,13 +4,14 @@ import (
"archive/zip"
"encoding/json"
"errors"
"github.com/mroote/factorio-server-manager/lockfile"
"io"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"github.com/OpenFactorioServerManager/factorio-server-manager/lockfile"
)
type ModInfoList struct {

View File

@ -2,12 +2,13 @@ package factorio
import (
"errors"
"github.com/mroote/factorio-server-manager/bootstrap"
"io"
"io/ioutil"
"log"
"os"
"path/filepath"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
)
type ModPackMap map[string]*ModPack

View File

@ -5,12 +5,13 @@ import (
"bytes"
"encoding/json"
"errors"
"github.com/mroote/factorio-server-manager/bootstrap"
"io/ioutil"
"log"
"os"
"path/filepath"
"strings"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
)
type LoginErrorResponse struct {

View File

@ -1,11 +1,12 @@
package factorio
import (
"github.com/mroote/factorio-server-manager/bootstrap"
"log"
"strconv"
"github.com/majormjr/rcon"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/rcon"
)
func connectRC() error {

View File

@ -3,12 +3,13 @@ package factorio
import (
"errors"
"fmt"
"github.com/mroote/factorio-server-manager/bootstrap"
"log"
"os"
"os/exec"
"path/filepath"
"time"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
)
type Save struct {

View File

@ -14,10 +14,9 @@ import (
"strings"
"sync"
"github.com/mroote/factorio-server-manager/api/websocket"
"github.com/mroote/factorio-server-manager/bootstrap"
"github.com/majormjr/rcon"
"github.com/OpenFactorioServerManager/factorio-server-manager/api/websocket"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/rcon"
)
type Server struct {

View File

@ -1,8 +1,9 @@
module github.com/mroote/factorio-server-manager
module github.com/OpenFactorioServerManager/factorio-server-manager
go 1.13
require (
github.com/OpenFactorioServerManager/rcon v0.0.0-20120923215419-8fbb8268b60a
github.com/go-ini/ini v1.49.0
github.com/golang/protobuf v1.3.1 // indirect
github.com/gorilla/mux v1.7.3
@ -12,7 +13,6 @@ require (
github.com/hpcloud/tail v1.0.0
github.com/jessevdk/go-flags v1.4.0
github.com/joho/godotenv v1.3.0
github.com/majormjr/rcon v0.0.0-20120923215419-8fbb8268b60a
github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect
github.com/stretchr/testify v1.6.1
github.com/syndtr/goleveldb v1.0.0

View File

@ -1,3 +1,5 @@
github.com/OpenFactorioServerManager/rcon v0.0.0-20120923215419-8fbb8268b60a h1:BExxUM1IlQh7ba2D7ZTQ/aHe65YLI0GHgoPe1c3IIdA=
github.com/OpenFactorioServerManager/rcon v0.0.0-20120923215419-8fbb8268b60a/go.mod h1:ttMDbVLzmIWHIVGL6Wa+QG+hCzURs5gZDT12l5spIlg=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I=
@ -32,8 +34,6 @@ github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc=
github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/majormjr/rcon v0.0.0-20120923215419-8fbb8268b60a h1:rXEd7/SA5sJvgl2zxM/nNblGa9kkpnx2phQATclw9Xk=
github.com/majormjr/rcon v0.0.0-20120923215419-8fbb8268b60a/go.mod h1:RNVV4T548mxgb643odZHF+pWh/YmGLxiKvtkbI1vRYE=
github.com/mattn/go-sqlite3 v1.14.5 h1:1IdxlwTNazvbKJQSxoJ5/9ECbEeaTTyeU7sEAZ5KKTQ=
github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

View File

@ -5,9 +5,9 @@ import (
"net/http"
"os"
"github.com/mroote/factorio-server-manager/api"
"github.com/mroote/factorio-server-manager/bootstrap"
"github.com/mroote/factorio-server-manager/factorio"
"github.com/OpenFactorioServerManager/factorio-server-manager/api"
"github.com/OpenFactorioServerManager/factorio-server-manager/bootstrap"
"github.com/OpenFactorioServerManager/factorio-server-manager/factorio"
)
func main() {