-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: use go embed for swagger (#15216)
- Loading branch information
1 parent
1273c05
commit d297747
Showing
18 changed files
with
14 additions
and
58 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package docs | ||
|
||
import "embed" | ||
|
||
//go:embed swagger-ui | ||
var SwaggerUI embed.FS |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -47,22 +47,15 @@ GITHUBDIR := $(GOPATH)$(FS)src$(FS)github.com | |
BUF_VERSION ?= 0.11.0 | ||
|
||
TOOLS_DESTDIR ?= $(GOPATH)/bin | ||
STATIK = $(TOOLS_DESTDIR)/statik | ||
RUNSIM = $(TOOLS_DESTDIR)/runsim | ||
|
||
tools: tools-stamp | ||
tools-stamp: statik runsim | ||
tools-stamp: runsim | ||
# Create dummy file to satisfy dependency and avoid | ||
# rebuilding when this Makefile target is hit twice | ||
# in a row. | ||
touch $@ | ||
|
||
# Install the runsim binary | ||
statik: $(STATIK) | ||
$(STATIK): | ||
@echo "Installing statik..." | ||
@go install github.com/rakyll/[email protected] | ||
|
||
# Install the runsim binary | ||
runsim: $(RUNSIM) | ||
$(RUNSIM): | ||
|
@@ -73,4 +66,4 @@ tools-clean: | |
rm -f $(STATIK) $(GOLANGCI_LINT) $(RUNSIM) | ||
rm -f tools-stamp | ||
|
||
.PHONY: tools-clean statik runsim | ||
.PHONY: tools-clean runsim |
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
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