1
0
forked from MTSR/mapserver

static assets

This commit is contained in:
NatureFreshMilk 2019-01-11 10:49:19 +01:00
parent 1956bfa7f8
commit d02ef19d40
7 changed files with 16200 additions and 2 deletions

View File

@ -1,6 +1,12 @@
test:
STATIC_VFS=vfs/static.go
test: $(STATIC_VFS)
go test ./...
build:
$(STATIC_VFS):
go get -u github.com/mjibson/esc
${HOME}/go/bin/esc -o $@ -prefix="static/" -pkg vfs static
build: $(STATIC_VFS)
go build

View File

@ -1,5 +1,18 @@
package colormapping
import (
"mapserver/vfs"
)
type ColorMapping struct {
}
func (m *ColorMapping) LoadColors(filename string){
//TODO
}
func CreateColorMapping() {
//embedded colors
vfs.FSMustByte(false, "/colors.txt")
}

View File

@ -0,0 +1,9 @@
package colormapping
import (
"testing"
)
func TestNewMapping(t *testing.T) {
CreateColorMapping()
}

1
go.mod
View File

@ -2,6 +2,7 @@ module mapserver
require (
github.com/mattn/go-sqlite3 v1.10.0
github.com/mjibson/esc v0.1.0 // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/sirupsen/logrus v1.3.0
)

2
go.sum
View File

@ -3,6 +3,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/mattn/go-sqlite3 v1.10.0 h1:jbhqpg7tQe4SupckyijYiy0mJJ/pRyHvXf7JdWK860o=
github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc=
github.com/mjibson/esc v0.1.0 h1:5ch+murgrcwDFLOE2hwj0f7kE4xJfJhkSCAjSLY182o=
github.com/mjibson/esc v0.1.0/go.mod h1:9Hw9gxxfHulMF5OJKCyhYD7PzlSdhzXyaGEBRPH1OPs=
github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc=
github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

16166
static/colors.txt Normal file

File diff suppressed because it is too large Load Diff

1
vfs/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
static.go