gofmt
This commit is contained in:
parent
dc7db298bd
commit
89ae122fc3
9 changed files with 113 additions and 114 deletions
|
|
@ -1,16 +1,16 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gofrs/uuid"
|
|
||||||
"github.com/robfig/cron"
|
|
||||||
"net/http"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"github.com/gofrs/uuid"
|
||||||
|
"github.com/gorilla/mux"
|
||||||
|
"github.com/robfig/cron"
|
||||||
"gopkg.in/yaml.v2"
|
"gopkg.in/yaml.v2"
|
||||||
"log"
|
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
|
"log"
|
||||||
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
"github.com/gorilla/mux"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var config = ConfigFile{}
|
var config = ConfigFile{}
|
||||||
|
|
@ -108,7 +108,7 @@ func loadSpaceData() {
|
||||||
timestamp := time.Now().Unix()
|
timestamp := time.Now().Unix()
|
||||||
|
|
||||||
for _, spaceUrl := range spaceUrls {
|
for _, spaceUrl := range spaceUrls {
|
||||||
if spaceUrl.Validated && int64(spaceUrl.LastUpdated + 60) < timestamp {
|
if spaceUrl.Validated && int64(spaceUrl.LastUpdated+60) < timestamp {
|
||||||
spaceData := SpaceData{}
|
spaceData := SpaceData{}
|
||||||
err := getJson(spaceUrl.Url, &spaceData)
|
err := getJson(spaceUrl.Url, &spaceData)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
type DataObject interface {
|
type DataObject interface {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
|
||||||
"github.com/gorilla/mux"
|
"github.com/gorilla/mux"
|
||||||
"log"
|
"log"
|
||||||
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewRouter() *mux.Router {
|
func NewRouter() *mux.Router {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ type Route struct {
|
||||||
Handler http.HandlerFunc
|
Handler http.HandlerFunc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
type Routes []Route
|
type Routes []Route
|
||||||
|
|
||||||
var IndexRoutes = Routes{
|
var IndexRoutes = Routes{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue