Skip to content

Commit 0176385

Browse files
committed
Moved examples to recipes
Signed-off-by: Vishal Rana <[email protected]>
1 parent 5587974 commit 0176385

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+412
-916
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
*.json text eol=lf
1515
LICENSE text eol=lf
1616

17-
# Exclude `website` and `examples` from Github's language statistics
17+
# Exclude `website` and `recipes` from Github's language statistics
1818
# https://github.com/github/linguist#using-gitattributes
19-
examples/* linguist-documentation
2019
recipes/* linguist-documentation
2120
website/* linguist-documentation

README.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# [Echo](http://echo.labstack.com) [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/labstack/echo) [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/labstack/echo/master/LICENSE) [![Build Status](http://img.shields.io/travis/labstack/echo.svg?style=flat-square)](https://travis-ci.org/labstack/echo) [![Coverage Status](http://img.shields.io/coveralls/labstack/echo.svg?style=flat-square)](https://coveralls.io/r/labstack/echo) [![Join the chat at https://gitter.im/labstack/echo](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg?style=flat-square)](https://gitter.im/labstack/echo)
1+
# [Echo](http://labstack.com/echo) [![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/labstack/echo) [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/labstack/echo/master/LICENSE) [![Build Status](http://img.shields.io/travis/labstack/echo.svg?style=flat-square)](https://travis-ci.org/labstack/echo) [![Coverage Status](http://img.shields.io/coveralls/labstack/echo.svg?style=flat-square)](https://coveralls.io/r/labstack/echo) [![Join the chat at https://gitter.im/labstack/echo](https://img.shields.io/badge/gitter-join%20chat-brightgreen.svg?style=flat-square)](https://gitter.im/labstack/echo)
22

33
A fast and unfancy micro web framework for Go.
44

@@ -87,17 +87,9 @@ BenchmarkZeus_GithubAll 2000 748827 ns/op 30068
8787
$ go get github.com/labstack/echo
8888
```
8989

90-
## [Recipes](https://github.com/labstack/echo/tree/master/recipes)
90+
## [Recipes](http://labstack.com/echo/recipes/hello-world)
9191

92-
- [File Upload](http://echo.labstack.com/recipes/file-upload)
93-
- [Streaming File Upload](http://echo.labstack.com/recipes/streaming-file-upload)
94-
- [Streaming Response](http://echo.labstack.com/recipes/streaming-response)
95-
- [WebSocket](http://echo.labstack.com/recipes/websocket)
96-
- [Subdomains](http://echo.labstack.com/recipes/subdomains)
97-
- [JWT Authentication](http://echo.labstack.com/recipes/jwt-authentication)
98-
- [Graceful Shutdown](http://echo.labstack.com/recipes/graceful-shutdown)
99-
100-
##[Guide](http://echo.labstack.com/guide)
92+
## [Guide](http://labstack.com/echo/guide)
10193

10294
## Echo System
10395

echo_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ func TestEcho(t *testing.T) {
4343

4444
func TestEchoIndex(t *testing.T) {
4545
e := New()
46-
e.Index("examples/website/public/index.html")
46+
e.Index("recipes/website/public/index.html")
4747
c, b := request(GET, "/", e)
4848
assert.Equal(t, http.StatusOK, c)
4949
assert.NotEmpty(t, b)
5050
}
5151

5252
func TestEchoFavicon(t *testing.T) {
5353
e := New()
54-
e.Favicon("examples/website/public/favicon.ico")
54+
e.Favicon("recipes/website/public/favicon.ico")
5555
c, b := request(GET, "/favicon.ico", e)
5656
assert.Equal(t, http.StatusOK, c)
5757
assert.NotEmpty(t, b)
@@ -61,23 +61,23 @@ func TestEchoStatic(t *testing.T) {
6161
e := New()
6262

6363
// OK
64-
e.Static("/scripts", "examples/website/public/scripts")
64+
e.Static("/scripts", "recipes/website/public/scripts")
6565
c, b := request(GET, "/scripts/main.js", e)
6666
assert.Equal(t, http.StatusOK, c)
6767
assert.NotEmpty(t, b)
6868

6969
// No file
70-
e.Static("/scripts", "examples/website/public/scripts")
70+
e.Static("/scripts", "recipes/website/public/scripts")
7171
c, _ = request(GET, "/scripts/index.js", e)
7272
assert.Equal(t, http.StatusNotFound, c)
7373

7474
// Directory
75-
e.Static("/scripts", "examples/website/public/scripts")
75+
e.Static("/scripts", "recipes/website/public/scripts")
7676
c, _ = request(GET, "/scripts", e)
7777
assert.Equal(t, http.StatusForbidden, c)
7878

7979
// Directory with index.html
80-
e.Static("/", "examples/website/public")
80+
e.Static("/", "recipes/website/public")
8181
c, r := request(GET, "/", e)
8282
assert.Equal(t, http.StatusOK, c)
8383
assert.Equal(t, true, strings.HasPrefix(r, "<!doctype html>"))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)