Skip to content

Commit

Permalink
Split examples to alone repo (#1776)
Browse files Browse the repository at this point in the history
* split examples to alone repo

* vendor

* fix package error

* add examples/README.md
  • Loading branch information
thinkerou committed Mar 1, 2019
1 parent ccb9e90 commit 0feaf8c
Show file tree
Hide file tree
Showing 64 changed files with 25 additions and 2,393 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ go_import_path: github.com/gin-gonic/gin
script:
- make vet
- make fmt-check
- make embedmd
- make misspell-check
- make test

Expand Down
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ deps:
@hash govendor > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/kardianos/govendor; \
fi
@hash embedmd > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
$(GO) get -u github.com/campoy/embedmd; \
fi

embedmd:
embedmd -d *.md

.PHONY: lint
lint:
Expand All @@ -83,5 +77,4 @@ misspell:
.PHONY: tools
tools:
go install golang.org/x/lint/golint; \
go install github.com/client9/misspell/cmd/misspell; \
go install github.com/campoy/embedmd;
go install github.com/client9/misspell/cmd/misspell;
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,6 @@ When running the above example using the above the `curl` command, it returns er

It is also possible to register custom validators. See the [example code](examples/custom-validation/server.go).

[embedmd]:# (examples/custom-validation/server.go go)
```go
package main

Expand Down Expand Up @@ -1501,7 +1500,6 @@ func main() {

example for 1-line LetsEncrypt HTTPS servers.

[embedmd]:# (examples/auto-tls/example1/main.go go)
```go
package main

Expand All @@ -1526,7 +1524,6 @@ func main() {

example for custom autocert manager.

[embedmd]:# (examples/auto-tls/example2/main.go go)
```go
package main

Expand Down Expand Up @@ -1560,7 +1557,6 @@ func main() {

See the [question](https://github.com/gin-gonic/gin/issues/346) and try the following example:

[embedmd]:# (examples/multiple-service/main.go go)
```go
package main

Expand Down Expand Up @@ -1660,7 +1656,6 @@ An alternative to endless:

If you are using Go 1.8, you may not need to use this library! Consider using http.Server's built-in [Shutdown()](https://golang.org/pkg/net/http/#Server.Shutdown) method for graceful shutdowns. See the full [graceful-shutdown](./examples/graceful-shutdown) example with gin.

[embedmd]:# (examples/graceful-shutdown/graceful-shutdown/server.go go)
```go
// +build go1.8

Expand Down Expand Up @@ -1919,7 +1914,6 @@ performance (See [#1341](https://github.com/gin-gonic/gin/pull/1341)).

http.Pusher is supported only **go1.8+**. See the [golang blog](https://blog.golang.org/h2push) for detail information.

[embedmd]:# (examples/http-pusher/main.go go)
```go
package main

Expand Down
3 changes: 3 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Gin Examples

## TODO
8 changes: 0 additions & 8 deletions examples/app-engine/README.md

This file was deleted.

8 changes: 0 additions & 8 deletions examples/app-engine/app.yaml

This file was deleted.

24 changes: 0 additions & 24 deletions examples/app-engine/hello.go

This file was deleted.

33 changes: 0 additions & 33 deletions examples/assets-in-binary/README.md

This file was deleted.

34 changes: 0 additions & 34 deletions examples/assets-in-binary/assets.go

This file was deleted.

4 changes: 0 additions & 4 deletions examples/assets-in-binary/html/bar.tmpl

This file was deleted.

4 changes: 0 additions & 4 deletions examples/assets-in-binary/html/index.tmpl

This file was deleted.

48 changes: 0 additions & 48 deletions examples/assets-in-binary/main.go

This file was deleted.

19 changes: 0 additions & 19 deletions examples/auto-tls/example1/main.go

This file was deleted.

26 changes: 0 additions & 26 deletions examples/auto-tls/example2/main.go

This file was deleted.

65 changes: 0 additions & 65 deletions examples/basic/main.go

This file was deleted.

20 changes: 0 additions & 20 deletions examples/basic/main_test.go

This file was deleted.

Loading

0 comments on commit 0feaf8c

Please sign in to comment.