Skip to content

Commit

Permalink
Removed banner
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <vr@labstack.com>
  • Loading branch information
vishr committed Jan 15, 2017
1 parent 04a7fc6 commit 82e4605
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 39 deletions.
35 changes: 2 additions & 33 deletions echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,30 +123,6 @@ type (
}
)

// Banner
const (
// http://patorjk.com/software/taag/#p=display&f=Small%20Slant&t=Echo
banner = `
____ __
/ __/___/ / ___
/ _// __/ _ \/ _ \
/___/\__/_//_/\___/
%s %s
High performance, minimalist Go web framework
______________________________________O/_____
O\
⇛ %s server started on %s
`
)

const (
website = "https://echo.labstack.com"
version = "3.1.0.master"
)

// HTTP methods
const (
CONNECT = "CONNECT"
Expand Down Expand Up @@ -592,15 +568,6 @@ func (e *Echo) StartServer(s *http.Server) error {
e.colorer.SetOutput(e.Logger.Output())
s.Handler = e
s.ErrorLog = e.stdLogger
args := []interface{}{e.colorer.Blue(website), e.colorer.Red("v" + version), "http", e.colorer.Green(s.Addr)}
if s.TLSConfig != nil {
args[2] = "https"
}

// Banner
if !e.HideBanner {
e.colorer.Printf(banner, args...)
}

l, err := net.Listen("tcp", s.Addr)
if err != nil {
Expand All @@ -610,11 +577,13 @@ func (e *Echo) StartServer(s *http.Server) error {
if e.Listener == nil {
e.Listener = tcpKeepAliveListener{l.(*net.TCPListener)}
}
e.colorer.Printf("⇛ https server started on %s\n", e.colorer.Green(s.Addr))
return s.Serve(e.Listener)
}
if e.TLSListener == nil {
e.TLSListener = tls.NewListener(tcpKeepAliveListener{l.(*net.TCPListener)}, s.TLSConfig)
}
e.colorer.Printf("⇛ https server started on %s\n", e.colorer.Green(s.Addr))
return s.Serve(e.TLSListener)
}

Expand Down
4 changes: 2 additions & 2 deletions website/content/examples/twitter.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ curl \

`201 - Created`

```sh
```js
{
"id": "584661b9a6fe8871a3804cba",
"to": "58465b4ea6fe886d3215c6df",
Expand Down Expand Up @@ -183,7 +183,7 @@ curl \

`200 - OK`

```sh
```js
[
{
"id": "584661b9a6fe8871a3804cba",
Expand Down
4 changes: 0 additions & 4 deletions website/content/guide/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ Default value is `OFF`. Possible values:
Logging is implemented using `echo.Logger` interface which allows you to register
a custom logger using `Echo#Logger`.

### Hide Banner

`Echo#HideBanner` can be used to hide the startup banner.

## Custom Server

### Using `Echo#StartServer()`
Expand Down

0 comments on commit 82e4605

Please sign in to comment.