use go 1.16 new package io/fs

Unify the interface for reading web statics. Now it could read an
OS directory or get the content on live

One could use

//go:embed static
var webFiles embed.FS

anywhere and config dex server to take the file system by setting

WebConfig{WebFS: webFiles}

Signed-off-by: Rui Yang <ruiya@vmware.com>
Co-authored-by: Aidan Oldershaw <aoldershaw@pivotal.io>
This commit is contained in:
Rui Yang
2020-10-15 10:50:39 -04:00
committed by CI Bot
parent 7b50cbf0ac
commit 4e569024fd
11 changed files with 243 additions and 128 deletions

View File

@@ -24,7 +24,6 @@ build: bin/dex
bin/dex:
@mkdir -p bin/
@go generate ./...
@go install -v -ldflags $(LD_FLAGS) $(REPO_PATH)/cmd/dex
examples: bin/grpc-client bin/example-app