mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
Move statik filesystem implemention to subpackage of statik package.
This commit is contained in:
parent
d6896ea0a5
commit
0a6f2d07f6
7 changed files with 9 additions and 10 deletions
4
Makefile
4
Makefile
|
|
@ -1,4 +1,4 @@
|
|||
.PHONY: dep docker pilosa release-build prerelease-build release prerelease prerelease-upload install generate statik test cover cover-pkg cover-viz clean docker-build docker-test
|
||||
.PHONY: dep docker pilosa release-build prerelease-build release prerelease prerelease-upload install generate generate-statik generate-protoc statik test cover cover-pkg cover-viz clean docker-build docker-test
|
||||
|
||||
DEP := $(shell command -v dep 2>/dev/null)
|
||||
STATIK := $(shell command -v statik 2>/dev/null)
|
||||
|
|
@ -103,7 +103,7 @@ generate-protoc: .protoc-gen-gofast
|
|||
go generate github.com/pilosa/pilosa/internal
|
||||
|
||||
generate-statik: statik
|
||||
go generate github.com/pilosa/pilosa
|
||||
go generate github.com/pilosa/pilosa/statik
|
||||
|
||||
generate: generate-protoc generate-statik
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
//go:generate statik -src=./webui
|
||||
|
||||
package pilosa
|
||||
|
||||
import (
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import (
|
|||
"github.com/pilosa/pilosa"
|
||||
"github.com/pilosa/pilosa/internal"
|
||||
"github.com/pilosa/pilosa/pql"
|
||||
"github.com/pilosa/pilosa/statikfs"
|
||||
statik "github.com/pilosa/pilosa/statik/filesystem"
|
||||
"github.com/pilosa/pilosa/test"
|
||||
)
|
||||
|
||||
|
|
@ -1854,7 +1854,7 @@ func TestHandler_WebUI(t *testing.T) {
|
|||
h := test.NewHandler()
|
||||
h.Holder = hldr.Holder
|
||||
h.Cluster = test.NewCluster(1)
|
||||
h.FileSystem = &statikfs.FileSystem{}
|
||||
h.FileSystem = &statik.FileSystem{}
|
||||
|
||||
w := httptest.NewRecorder()
|
||||
h.ServeHTTP(w, test.MustNewHTTPRequest("GET", "/", nil))
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import (
|
|||
"github.com/pilosa/pilosa"
|
||||
"github.com/pilosa/pilosa/gcnotify"
|
||||
"github.com/pilosa/pilosa/gossip"
|
||||
"github.com/pilosa/pilosa/statikfs"
|
||||
statik "github.com/pilosa/pilosa/statik/filesystem"
|
||||
"github.com/pilosa/pilosa/statsd"
|
||||
)
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ func (m *Command) SetupServer() error {
|
|||
m.Server.Cluster.RemoteClient = c
|
||||
|
||||
// Statik file system.
|
||||
m.Server.Handler.FileSystem = &statikfs.FileSystem{}
|
||||
m.Server.Handler.FileSystem = &statik.FileSystem{}
|
||||
|
||||
// Default coordintor to port 0 when not specified so that coordinator
|
||||
// can be set to the value of server.URI after server binds to a port.
|
||||
|
|
|
|||
2
statik/.gitignore
vendored
2
statik/.gitignore
vendored
|
|
@ -1 +1 @@
|
|||
statik.go
|
||||
/statik.go
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
// Package statik contains static assets for the Web UI. `go generate` will
|
||||
// produce statik.go, which is ignored by git.
|
||||
//go:generate statik -src=../webui -dest=..
|
||||
package statik
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package statikfs
|
||||
package filesystem
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
Loading…
Add table
Reference in a new issue