-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes from statik to go:embed for examples serving
There's currently a glitch because go.mod isn't allowed in the go:embed path. Signed-off-by: Adrian Cole <adrian@tetrate.io>
- Loading branch information
Adrian Cole
committed
Mar 24, 2021
1 parent
aef7e79
commit ed15f0d
Showing
22 changed files
with
65 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,4 @@ vendor | |
dist | ||
/getenvoy | ||
/build/ | ||
|
||
# code generated by `github.com/rakyll/statik` | ||
statik.go | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2021 Tetrate | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package init | ||
// ^^ last path in the directory relative from the project root data/extension/init | ||
|
||
import ( | ||
"embed" | ||
"io/fs" | ||
) | ||
|
||
// templatesFs includes only the relative path of "templates". | ||
// | ||
// Assets must be in this directory because go:embed doesn't support navigation outside (ex. ../) | ||
// See https://pkg.go.dev/embed#hdr-Directives | ||
//go:embed templates/* | ||
var templatesFs embed.FS | ||
|
||
// GetTemplates returns the templates directory as a filesystem | ||
func GetTemplates() fs.FS { | ||
fs, err := fs.Sub(templatesFs, "templates") | ||
if err != nil { | ||
panic(err) // unexpected or a typo | ||
} | ||
return fs | ||
} |
8 changes: 0 additions & 8 deletions
8
data/extension/init/templates/tinygo/envoy.access_loggers/default/go.mod
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
data/extension/init/templates/tinygo/envoy.access_loggers/default/go.sum
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
data/extension/init/templates/tinygo/envoy.access_loggers/default/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package init | ||
|
||
import ( | ||
"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm" | ||
|
8 changes: 0 additions & 8 deletions
8
data/extension/init/templates/tinygo/envoy.filters.http/default/go.mod
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
data/extension/init/templates/tinygo/envoy.filters.http/default/go.sum
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
data/extension/init/templates/tinygo/envoy.filters.http/default/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package init | ||
|
||
import ( | ||
"bufio" | ||
|
2 changes: 1 addition & 1 deletion
2
data/extension/init/templates/tinygo/envoy.filters.http/default/main_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package init | ||
|
||
import ( | ||
"testing" | ||
|
8 changes: 0 additions & 8 deletions
8
data/extension/init/templates/tinygo/envoy.filters.network/default/go.mod
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
data/extension/init/templates/tinygo/envoy.filters.network/default/go.sum
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
data/extension/init/templates/tinygo/envoy.filters.network/default/main.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package init | ||
|
||
import ( | ||
"github.com/tetratelabs/proxy-wasm-go-sdk/proxywasm" | ||
|
2 changes: 1 addition & 1 deletion
2
data/extension/init/templates/tinygo/envoy.filters.network/default/main_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package main | ||
package init | ||
|
||
import ( | ||
"testing" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.