diff --git a/README.md b/README.md index 7113058d..d1a1ee25 100644 --- a/README.md +++ b/README.md @@ -272,7 +272,7 @@ id: 1234; page: 1; name: manu; message: this_is_great #### Single file -References issue [#774](https://github.com/gin-gonic/gin/issues/774) and detail [example code](examples/upload-file/single). +References issue [#774](https://github.com/gin-gonic/gin/issues/774) and detail [example code](_examples/upload-file/single). ```go func main() { @@ -303,7 +303,7 @@ curl -X POST http://localhost:8080/upload \ #### Multiple files -See the detail [example code](examples/upload-file/multiple). +See the detail [example code](_examples/upload-file/multiple). ```go func main() { @@ -527,9 +527,9 @@ $ curl -v -X POST \ ### Custom Validators -It is also possible to register custom validators. See the [example code](examples/custom-validation/server.go). +It is also possible to register custom validators. See the [example code](_examples/custom-validation/server.go). -[embedmd]:# (examples/custom-validation/server.go go) +[embedmd]:# (_examples/custom-validation/server.go go) ```go package main @@ -925,7 +925,7 @@ You may use custom delims #### Custom Template Funcs -See the detail [example code](examples/template). +See the detail [example code](_examples/template). main.go @@ -1133,7 +1133,7 @@ func main() { example for 1-line LetsEncrypt HTTPS servers. -[embedmd]:# (examples/auto-tls/example1.go go) +[embedmd]:# (_examples/auto-tls/example1.go go) ```go package main @@ -1158,7 +1158,7 @@ func main() { example for custom autocert manager. -[embedmd]:# (examples/auto-tls/example2.go go) +[embedmd]:# (_examples/auto-tls/example2.go go) ```go package main @@ -1192,7 +1192,7 @@ func main() { See the [question](https://github.com/gin-gonic/gin/issues/346) and try the folling example: -[embedmd]:# (examples/multiple-service/main.go go) +[embedmd]:# (_examples/multiple-service/main.go go) ```go package main @@ -1290,9 +1290,9 @@ An alternative to endless: * [graceful](https://github.com/tylerb/graceful): Graceful is a Go package enabling graceful shutdown of an http.Handler server. * [grace](https://github.com/facebookgo/grace): Graceful restart & zero downtime deploy for Go servers. -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. +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) +[embedmd]:# (_examples/graceful-shutdown/graceful-shutdown/server.go go) ```go // +build go1.8 diff --git a/examples/app-engine/README.md b/_examples/app-engine/README.md similarity index 87% rename from examples/app-engine/README.md rename to _examples/app-engine/README.md index 48505de8..d55cb924 100644 --- a/examples/app-engine/README.md +++ b/_examples/app-engine/README.md @@ -3,5 +3,5 @@ 1. Download, install and setup Go in your computer. (That includes setting your `$GOPATH`.) 2. Download SDK for your platform from here: `https://developers.google.com/appengine/downloads?hl=es#Google_App_Engine_SDK_for_Go` 3. Download Gin source code using: `$ go get github.com/gin-gonic/gin` -4. Navigate to examples folder: `$ cd $GOPATH/src/github.com/gin-gonic/gin/examples/` -5. Run it: `$ goapp serve app-engine/` \ No newline at end of file +4. Navigate to examples folder: `$ cd $GOPATH/src/github.com/gin-gonic/gin/_examples/` +5. Run it: `$ goapp serve app-engine/` diff --git a/examples/app-engine/app.yaml b/_examples/app-engine/app.yaml similarity index 100% rename from examples/app-engine/app.yaml rename to _examples/app-engine/app.yaml diff --git a/examples/app-engine/hello.go b/_examples/app-engine/hello.go similarity index 100% rename from examples/app-engine/hello.go rename to _examples/app-engine/hello.go diff --git a/examples/auto-tls/example1.go b/_examples/auto-tls/example1.go similarity index 100% rename from examples/auto-tls/example1.go rename to _examples/auto-tls/example1.go diff --git a/examples/auto-tls/example2.go b/_examples/auto-tls/example2.go similarity index 100% rename from examples/auto-tls/example2.go rename to _examples/auto-tls/example2.go diff --git a/examples/basic/main.go b/_examples/basic/main.go similarity index 100% rename from examples/basic/main.go rename to _examples/basic/main.go diff --git a/examples/custom-validation/server.go b/_examples/custom-validation/server.go similarity index 100% rename from examples/custom-validation/server.go rename to _examples/custom-validation/server.go diff --git a/examples/favicon/favicon.ico b/_examples/favicon/favicon.ico similarity index 100% rename from examples/favicon/favicon.ico rename to _examples/favicon/favicon.ico diff --git a/examples/favicon/main.go b/_examples/favicon/main.go similarity index 100% rename from examples/favicon/main.go rename to _examples/favicon/main.go diff --git a/examples/graceful-shutdown/close/server.go b/_examples/graceful-shutdown/close/server.go similarity index 100% rename from examples/graceful-shutdown/close/server.go rename to _examples/graceful-shutdown/close/server.go diff --git a/examples/graceful-shutdown/graceful-shutdown/server.go b/_examples/graceful-shutdown/graceful-shutdown/server.go similarity index 100% rename from examples/graceful-shutdown/graceful-shutdown/server.go rename to _examples/graceful-shutdown/graceful-shutdown/server.go diff --git a/examples/http2/README.md b/_examples/http2/README.md similarity index 100% rename from examples/http2/README.md rename to _examples/http2/README.md diff --git a/examples/http2/main.go b/_examples/http2/main.go similarity index 100% rename from examples/http2/main.go rename to _examples/http2/main.go diff --git a/examples/http2/testdata/ca.pem b/_examples/http2/testdata/ca.pem similarity index 100% rename from examples/http2/testdata/ca.pem rename to _examples/http2/testdata/ca.pem diff --git a/examples/http2/testdata/server.key b/_examples/http2/testdata/server.key similarity index 100% rename from examples/http2/testdata/server.key rename to _examples/http2/testdata/server.key diff --git a/examples/http2/testdata/server.pem b/_examples/http2/testdata/server.pem similarity index 100% rename from examples/http2/testdata/server.pem rename to _examples/http2/testdata/server.pem diff --git a/examples/multiple-service/main.go b/_examples/multiple-service/main.go similarity index 100% rename from examples/multiple-service/main.go rename to _examples/multiple-service/main.go diff --git a/examples/realtime-advanced/Makefile b/_examples/realtime-advanced/Makefile similarity index 100% rename from examples/realtime-advanced/Makefile rename to _examples/realtime-advanced/Makefile diff --git a/examples/realtime-advanced/main.go b/_examples/realtime-advanced/main.go similarity index 100% rename from examples/realtime-advanced/main.go rename to _examples/realtime-advanced/main.go diff --git a/examples/realtime-advanced/resources/room_login.templ.html b/_examples/realtime-advanced/resources/room_login.templ.html similarity index 96% rename from examples/realtime-advanced/resources/room_login.templ.html rename to _examples/realtime-advanced/resources/room_login.templ.html index 27dac387..52dd3056 100644 --- a/examples/realtime-advanced/resources/room_login.templ.html +++ b/_examples/realtime-advanced/resources/room_login.templ.html @@ -7,7 +7,7 @@ Server-Sent Events. Room "{{.roomid}}" - + @@ -23,7 +23,7 @@ @@ -49,7 +49,7 @@
  • W3 Standard
  • Browser Support
  • Gin Framework
  • -
  • Github
  • +
  • Github
  • @@ -59,7 +59,7 @@

    Server-Sent Events in Go

    Server-sent events (SSE) is a technology where a browser receives automatic updates from a server via HTTP connection. It is not websockets. Learn more.

    -

    The chat and the charts data is provided in realtime using the SSE implemention of Gin Framework.

    +

    The chat and the charts data is provided in realtime using the SSE implemention of Gin Framework.

    @@ -134,7 +134,7 @@

    MIT Open Sourced

    diff --git a/examples/realtime-advanced/resources/static/epoch.min.css b/_examples/realtime-advanced/resources/static/epoch.min.css similarity index 100% rename from examples/realtime-advanced/resources/static/epoch.min.css rename to _examples/realtime-advanced/resources/static/epoch.min.css diff --git a/examples/realtime-advanced/resources/static/epoch.min.js b/_examples/realtime-advanced/resources/static/epoch.min.js similarity index 100% rename from examples/realtime-advanced/resources/static/epoch.min.js rename to _examples/realtime-advanced/resources/static/epoch.min.js diff --git a/examples/realtime-advanced/resources/static/prismjs.min.css b/_examples/realtime-advanced/resources/static/prismjs.min.css similarity index 100% rename from examples/realtime-advanced/resources/static/prismjs.min.css rename to _examples/realtime-advanced/resources/static/prismjs.min.css diff --git a/examples/realtime-advanced/resources/static/prismjs.min.js b/_examples/realtime-advanced/resources/static/prismjs.min.js similarity index 100% rename from examples/realtime-advanced/resources/static/prismjs.min.js rename to _examples/realtime-advanced/resources/static/prismjs.min.js diff --git a/examples/realtime-advanced/resources/static/realtime.js b/_examples/realtime-advanced/resources/static/realtime.js similarity index 100% rename from examples/realtime-advanced/resources/static/realtime.js rename to _examples/realtime-advanced/resources/static/realtime.js diff --git a/examples/realtime-advanced/rooms.go b/_examples/realtime-advanced/rooms.go similarity index 100% rename from examples/realtime-advanced/rooms.go rename to _examples/realtime-advanced/rooms.go diff --git a/examples/realtime-advanced/routes.go b/_examples/realtime-advanced/routes.go similarity index 100% rename from examples/realtime-advanced/routes.go rename to _examples/realtime-advanced/routes.go diff --git a/examples/realtime-advanced/stats.go b/_examples/realtime-advanced/stats.go similarity index 100% rename from examples/realtime-advanced/stats.go rename to _examples/realtime-advanced/stats.go diff --git a/examples/realtime-chat/Makefile b/_examples/realtime-chat/Makefile similarity index 100% rename from examples/realtime-chat/Makefile rename to _examples/realtime-chat/Makefile diff --git a/examples/realtime-chat/main.go b/_examples/realtime-chat/main.go similarity index 100% rename from examples/realtime-chat/main.go rename to _examples/realtime-chat/main.go diff --git a/examples/realtime-chat/rooms.go b/_examples/realtime-chat/rooms.go similarity index 100% rename from examples/realtime-chat/rooms.go rename to _examples/realtime-chat/rooms.go diff --git a/examples/realtime-chat/template.go b/_examples/realtime-chat/template.go similarity index 100% rename from examples/realtime-chat/template.go rename to _examples/realtime-chat/template.go diff --git a/examples/template/main.go b/_examples/template/main.go similarity index 100% rename from examples/template/main.go rename to _examples/template/main.go diff --git a/examples/upload-file/multiple/main.go b/_examples/upload-file/multiple/main.go similarity index 100% rename from examples/upload-file/multiple/main.go rename to _examples/upload-file/multiple/main.go diff --git a/examples/upload-file/multiple/public/index.html b/_examples/upload-file/multiple/public/index.html similarity index 100% rename from examples/upload-file/multiple/public/index.html rename to _examples/upload-file/multiple/public/index.html diff --git a/examples/upload-file/single/main.go b/_examples/upload-file/single/main.go similarity index 100% rename from examples/upload-file/single/main.go rename to _examples/upload-file/single/main.go diff --git a/examples/upload-file/single/public/index.html b/_examples/upload-file/single/public/index.html similarity index 100% rename from examples/upload-file/single/public/index.html rename to _examples/upload-file/single/public/index.html diff --git a/binding/example/test.pb.go b/binding/_example/test.pb.go similarity index 100% rename from binding/example/test.pb.go rename to binding/_example/test.pb.go diff --git a/binding/example/test.proto b/binding/_example/test.proto similarity index 100% rename from binding/example/test.proto rename to binding/_example/test.proto