diff --git a/.travis.yml b/.travis.yml index 04c745b7..daf48d6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,18 +4,14 @@ os: - windows go: - - 1.10.x - 1.11.x - 1.12.x + - 1.13.x - 1.x -install: - - go get github.com/apexskier/httpauth - - go get github.com/go-ini/ini - - go get github.com/gorilla/mux - - go get github.com/hpcloud/tail - - go get github.com/gorilla/websocket - - go get github.com/majormjr/rcon +env: + - GO111MODULE=on script: - - go test -v ./... + - cd src/ + - go test -v ./... diff --git a/Makefile b/Makefile index 8ffdf73d..3a366e8c 100644 --- a/Makefile +++ b/Makefile @@ -12,41 +12,41 @@ endif build: $(release) -$(shell mkdir -p build) -build/factorio-server-manager-%.zip: app/bundle factorio-server-manager-% +build/factorio-server-manager-%.zip: clean app/bundle factorio-server-manager-% + @mkdir -p build/ @echo "Packaging Build - $@" @cp -r app/ factorio-server-manager/ @cp conf.json.example factorio-server-manager/conf.json @zip -r $@ factorio-server-manager > /dev/null - @rm -r factorio-server-manager app/bundle: @echo "Building Frontend" @npm install && npm run build -factorio-server-manager-linux: godeps +factorio-server-manager-linux: @echo "Building Backend - Linux" - @GOPATH="${GOPATH}:${PDW}" @mkdir -p factorio-server-manager - @GOOS=linux GOARCH=amd64 go build -o factorio-server-manager/factorio-server-manager ./src + @cd src; \ + GOOS=linux GOARCH=amd64 go build -o ../factorio-server-manager/factorio-server-manager . -factorio-server-manager-windows: godeps +factorio-server-manager-windows: @echo "Building Backend - Windows" - @GOPATH="${GOPATH}:${PDW}" @mkdir -p factorio-server-manager - @GOOS=windows GOARCH=386 go build -o factorio-server-manager/factorio-server-manager.exe ./src - -godeps: - @echo "Installing Packages" - @cat gopkglist | xargs go get + @cd src; \ + GOOS=windows GOARCH=386 go build -o ../factorio-server-manager/factorio-server-manager.exe . gen_release: build/factorio-server-manager-linux.zip build/factorio-server-manager-windows.zip @echo "Done" clean: @echo "Cleaning" - @rm -r build/ - @rm app/bundle.js - @rm app/bundle.css - @rm app/fonts/vendor - @rm app/images/vendor + @-rm -r build/ + @-rm app/bundle.js + @-rm app/bundle.js.map + @-rm app/style.css + @-rm app/style.css.map + @-rm -r app/fonts/vendor/ + @-rm -r app/images/vendor/ + @-rm -r node_modules/ + @-rm -r pkg/ + @-rm -r factorio-server-manager diff --git a/README.md b/README.md index efd00a0d..2addb371 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ This tool runs on a Factorio server and allows management of the Factorio server 4. Visit [localhost:8080](localhost:8080) in your web browser. ## Usage -Run the UI server and specify the directory of your Factorio server installation and the interface to run the HTTP server on. Edit the conf.json file with your desired credentials for authentication. +Run the UI server and specify the directory of your Factorio server installation and the interface to run the HTTP server on. Edit the conf.json file with your desired credentials for authentication. ``` Usage of ./factorio-server-manager: -bin string @@ -99,8 +99,8 @@ It also acts as the webserver to serve the front end react application All api actions are accessible with the /api route. The frontend is accessible from /. #### Requirements -+ Go 1.7 -+ NodeJS 4.2.6 ++ Go 1.11 ++ NodeJS #### Building Releases Creates a release zip for windows and linux: (this will install the dependencies listed in gopkgdeps) @@ -131,7 +131,7 @@ make app/bundle ``` ##### For development -The frontend is completly build by npm with laravel-mix. All plugins are buld into the compiled files. No plugins need to be load fro external sources. +The frontend is completely build by npm with laravel-mix. All plugins are build into the compiled files. No plugins need to be load fro external sources. It has different variants to build the frontend, provided by laravel-mix: - `npm run dev` Build the code for development. This will also generate map-files, so the browser, can show, what line and file causes the output. @@ -144,31 +144,16 @@ In every of those cases, also images and fonts will be copied to the app-folder. 1. Download the latest release source zip file * [https://github.com/mroote/factorio-server-manager/releases](https://github.com/mroote/factorio-server-manager/releases) 2. Unzip the Factorio Standalone server and move it to a known directory. -3. Download and install Go 1.7 or newer. https://golang.org/dl/ -4. Download and install NodeJS 4.2.6 64-bit or 32-bit depending on your operating system, if unsure download 32-bit - * https://nodejs.org/download/release/v4.2.6/node-v4.2.6-x64.msi 64-bit - * https://nodejs.org/download/release/v4.2.6/node-v4.2.6-x86.msi 32-bit -5. Download and install NVM, when asked if you want it to use NodeJS 4.2.6 accept - * https://github.com/coreybutler/nvm-windows/releases/download/1.1.1/nvm-setup.zip -6. You will need to setup GOPATH in environmental settings in windows. You will want to go into Control Panel\System and Security\System From there on the left hand side click "Advanced system settings". A window will open and you need to click Environment Variables. -7. Under System Variables click New. For Variable name use GOPATH and Variable value C:\Go\ +3. Download and install Go 1.11 or newer. https://golang.org/dl/ +4. Download and install NodeJS 64-bit or 32-bit depending on your operating system, most users need 64-bit nowadays. + * https://nodejs.org/dist/v12.13.0/node-v12.13.0-x64.msi 64-bit + * https://nodejs.org/dist/v12.13.0/node-v12.13.0-x86.msi 32-bit Once everything is installed and ready to go you will need to compile the source for windows 1. Open the folder where ever you unzipped from step #2 above. 2. My folder structure is like this "C:\FS\factorio-server-manager\" C:\FS is where my factorio files are located C:\FS\factorio-server-manager\ is where the server manager files are. -3. You will now need to install some dependencies for Go. You will need to open up a command prompt and one at a time type each of these and hit enter before typing the next one. - -``` -go get github.com/apexskier/httpauth -go get github.com/go-ini/ini -go get github.com/gorilla/mux -go get github.com/hpcloud/tail -go get github.com/gorilla/websocket -go get github.com/majormjr/rcon -``` - -3. Now you will want to go into the src folder for example "C:\FS\factorio-server-manager\src" once there hold down left shift and right click an empty area of the folder. Then click "Open command windows here" +3. Now you will want to go into the src folder for example "C:\FS\factorio-server-manager\src" once there hold down shift and right click an empty area of the folder. Then click "Open command windows here" 4. Type this into the command prompt then hit enter: ``` @@ -176,14 +161,14 @@ go build ``` 5. Once finished you will now see src.exe or src file inside the folder. You need to move that file to the C:\FS\factorio-server-manager\ or the folder that is before your src folder. -6. From here you need to build the web front-end by going into your ui folder for me its C:\FS\factorio-server-manager\ui\ and again hold shift and left click in an empty area then select open command prompt here. You then need to type this: +6. From here you need to build the web front-end. Again hold shift and right click in an empty area then select open command prompt here. You then need to type this: ``` npm install npm run build ``` -7. Now execute the src file created in step #4 above +7. Now execute the src file created in step #4 above. You have to specify the directory, where the factorio-server is located, as parameter. More about the parameter under [Usage](#Usage) 8. You can now Visit [localhost:8080](localhost:8080) in your web browser to start using the Factorio server Manager ## Contributing diff --git a/gopkglist b/gopkglist deleted file mode 100644 index fd98cb49..00000000 --- a/gopkglist +++ /dev/null @@ -1,6 +0,0 @@ -github.com/apexskier/httpauth -github.com/go-ini/ini -github.com/gorilla/mux -github.com/gorilla/websocket -github.com/hpcloud/tail -github.com/majormjr/rcon \ No newline at end of file diff --git a/src/go.mod b/src/go.mod new file mode 100644 index 00000000..942c3121 --- /dev/null +++ b/src/go.mod @@ -0,0 +1,22 @@ +module github.com/mroote/factorio-server-manager + +go 1.13 + +require ( + github.com/apexskier/httpauth v1.3.2 + github.com/go-ini/ini v1.49.0 + github.com/go-sql-driver/mysql v1.4.1 // indirect + github.com/gorilla/mux v1.7.3 + github.com/gorilla/sessions v1.2.0 // indirect + github.com/gorilla/websocket v1.4.1 + github.com/hpcloud/tail v1.0.0 + github.com/lib/pq v1.2.0 // indirect + github.com/majormjr/rcon v0.0.0-20120923215419-8fbb8268b60a + github.com/mattn/go-sqlite3 v1.11.0 // indirect + github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 // indirect + github.com/syndtr/goleveldb v1.0.0 // indirect + golang.org/x/crypto v0.0.0-20191029031824-8986dd9e96cf // indirect + google.golang.org/appengine v1.6.5 // indirect + gopkg.in/ini.v1 v1.49.0 // indirect + gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect +) diff --git a/src/go.sum b/src/go.sum new file mode 100644 index 00000000..9f7d8481 --- /dev/null +++ b/src/go.sum @@ -0,0 +1,80 @@ +github.com/apexskier/httpauth v1.3.2 h1:PHwrq/eBRBLIrUthchpbDVTVR/ofBrj2LUcukCRhfXw= +github.com/apexskier/httpauth v1.3.2/go.mod h1:aEHd6x648VCocEK0vTsPKkjJ1sBPab3Z4V4MJs9YZAE= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/go-ini/ini v1.49.0 h1:ymWFBUkwN3JFPjvjcJJ5TSTwh84M66QrH+8vOytLgRY= +github.com/go-ini/ini v1.49.0/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= +github.com/go-sql-driver/mysql v1.4.1 h1:g24URVg0OFbNUTx9qqY1IRZ9D9z3iPyi5zKhQZpNwpA= +github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= +github.com/golang/protobuf v1.2.0 h1:P3YflyNX/ehuJFLhxviNdFxQPkGK5cDcApsge1SqnvM= +github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db h1:woRePGFeVFfLKN/pOkfl+p/TAqKOfFu+7KPlMVpok/w= +github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= +github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= +github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= +github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= +github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= +github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ= +github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= +github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= +github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +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/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= +github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +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.11.0 h1:LDdKkqtYlom37fkvqs8rMPFKAMe8+SgjbwZ6ex1/A/Q= +github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/ginkgo v1.7.0 h1:WSHQ+IS43OoUrWtD1/bbclrwK8TTH5hzp+umCiuxHgs= +github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= +github.com/onsi/gomega v1.4.3 h1:RE1xgDvH7imwFD45h+u2SgIfERHlS2yNG4DObb5BSKU= +github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= +github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= +github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337 h1:WN9BUFbdyOsSH/XohnWpXOlq9NBD5sGAB2FciQMUEe8= +github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= +github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= +github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20191029031824-8986dd9e96cf h1:fnPsqIDRbCSgumaMCRpoIoF2s4qxv0xSSS0BVZUE/ss= +golang.org/x/crypto v0.0.0-20191029031824-8986dd9e96cf/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 h1:0GoQqolDA55aaLxZyTzK/Y2ePZzZTUrRacwib7cNsYQ= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65 h1:+rhAzEzT3f4JtomfC371qB+0Ola2caSKcY69NUBZrRQ= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f h1:wMNYb4v58l5UBM7MYRLPG6ZhfOqbKu7X5eyFl8ZhKvA= +golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d h1:+R4KGOnez64A81RvjARKc4UT5/tI9ujCIVX+P5KiHuI= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +google.golang.org/appengine v1.6.5 h1:tycE03LOZYQNhDpS27tcQdAzLCVMaj7QT2SXxebnpCM= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= +gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/ini.v1 v1.49.0 h1:MW0aLMiezbm/Ray0gJJ+nQFE2uOC9EpK2p5zPN3NqpM= +gopkg.in/ini.v1 v1.49.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw= +gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= +gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= +gopkg.in/yaml.v2 v2.2.1 h1:mUhvW9EsL+naU5Q3cakzfE91YhliOondGd6ZrsDBHQE= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= diff --git a/src/vendor/lockfile/lockfile.go b/src/lockfile/lockfile.go similarity index 100% rename from src/vendor/lockfile/lockfile.go rename to src/lockfile/lockfile.go diff --git a/src/mod_Mods.go b/src/mod_Mods.go index 9b56d7f7..0bc75407 100644 --- a/src/mod_Mods.go +++ b/src/mod_Mods.go @@ -5,9 +5,9 @@ import ( "bytes" "errors" "fmt" + "github.com/mroote/factorio-server-manager/lockfile" "io" "io/ioutil" - "lockfile" "log" "mime/multipart" "net/http" diff --git a/src/mod_modInfo.go b/src/mod_modInfo.go index c2f3941e..4ac0c1cb 100644 --- a/src/mod_modInfo.go +++ b/src/mod_modInfo.go @@ -4,9 +4,9 @@ import ( "archive/zip" "encoding/json" "errors" + "github.com/mroote/factorio-server-manager/lockfile" "io" "io/ioutil" - "lockfile" "log" "os" "path/filepath" diff --git a/src/mods_handler.go b/src/mods_handler.go index 4ae1ce6e..57330aef 100644 --- a/src/mods_handler.go +++ b/src/mods_handler.go @@ -5,8 +5,8 @@ import ( "encoding/json" "errors" "fmt" + "github.com/mroote/factorio-server-manager/lockfile" "io" - "lockfile" "log" "net/http" "os"