33 | );
34 | }
35 | });
36 |
--------------------------------------------------------------------------------
/frontend/static/font-awesome/scss/_mixins.scss:
--------------------------------------------------------------------------------
1 | // Mixins
2 | // --------------------------
3 |
4 | @mixin fa-icon() {
5 | display: inline-block;
6 | font: normal normal normal 14px/1 FontAwesome; // shortening font declaration
7 | font-size: inherit; // can't have font-size inherit on line above, so need to override
8 | text-rendering: auto; // optimizelegibility throws things off #1094
9 | -webkit-font-smoothing: antialiased;
10 | -moz-osx-font-smoothing: grayscale;
11 | }
12 |
13 | @mixin fa-icon-rotate($degrees, $rotation) {
14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
15 | -webkit-transform: rotate($degrees);
16 | -ms-transform: rotate($degrees);
17 | transform: rotate($degrees);
18 | }
19 |
20 | @mixin fa-icon-flip($horiz, $vert, $rotation) {
21 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
22 | -webkit-transform: scale($horiz, $vert);
23 | -ms-transform: scale($horiz, $vert);
24 | transform: scale($horiz, $vert);
25 | }
26 |
--------------------------------------------------------------------------------
/Godeps/Godeps.json:
--------------------------------------------------------------------------------
1 | {
2 | "ImportPath": "github.com/nathanleclaire/tarzan",
3 | "GoVersion": "go1.2.1",
4 | "Deps": [
5 | {
6 | "ImportPath": "github.com/codegangsta/cli",
7 | "Comment": "1.2.0-26-gf7ebb76",
8 | "Rev": "f7ebb761e83e21225d1d8954fde853bf8edd46c4"
9 | },
10 | {
11 | "ImportPath": "github.com/codegangsta/negroni",
12 | "Comment": "v0.1-32-gc64702c",
13 | "Rev": "c64702ca03d0f858ab7866638b69e85f0d4c6ee7"
14 | },
15 | {
16 | "ImportPath": "github.com/davecgh/go-spew/spew",
17 | "Rev": "3fdaf5cea8d23107b993d363e98992fa529dd713"
18 | },
19 | {
20 | "ImportPath": "github.com/gorilla/context",
21 | "Rev": "14f550f51af52180c2eefed15e5fd18d63c0a64a"
22 | },
23 | {
24 | "ImportPath": "github.com/gorilla/mux",
25 | "Rev": "e444e69cbd2e2e3e0749a2f3c717cec491552bbf"
26 | },
27 | {
28 | "ImportPath": "github.com/op/go-logging",
29 | "Rev": "25891250fe98858f83506bc4411f82722d1be344"
30 | },
31 | {
32 | "ImportPath": "github.com/unrolled/render",
33 | "Rev": "cf57b1afa5d93abdbd356aad95d7c2720dad6d01"
34 | }
35 | ]
36 | }
37 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | DOCKER_IMAGE := nathanleclaire/tarzan
2 | DOCKER_CONTAINER := tarzan-build
3 | DOCKER_SRC_PATH := /go/src/github.com/nathanleclaire/tarzan
4 |
5 | default: dockerbuild
6 |
7 | dockerbuild: clean
8 | docker build -t $(DOCKER_IMAGE) .
9 | docker run --name $(DOCKER_CONTAINER) --entrypoint true $(DOCKER_IMAGE)
10 | docker cp $(DOCKER_CONTAINER):$(DOCKER_SRC_PATH)/tarzan .
11 | docker rm $(DOCKER_CONTAINER)
12 |
13 | cleanbinary:
14 | rm -f tarzan
15 |
16 | cleancontainers:
17 | docker rm $(DOCKER_CONTAINER) $(DOCKER_CONTAINER)-deps $(DOCKER_CONTAINER)-test 2>/dev/null || true
18 |
19 | deps: cleancontainers
20 | docker run --name $(DOCKER_CONTAINER)-deps \
21 | -v $(shell pwd):$(DOCKER_SRC_PATH) \
22 | $(DOCKER_IMAGE) sh -c "go get github.com/tools/godep && pwd && go get ./... && godep save"
23 | docker rm $(DOCKER_CONTAINER)-deps 2>/dev/null || true
24 |
25 | test: dockerbuild
26 | docker run --name $(DOCKER_CONTAINER)-test --entrypoint sh $(DOCKER_IMAGE) -c 'go test'
27 | docker rm $(DOCKER_CONTAINER)-test 2>/dev/null || true
28 |
29 | clean: cleanbinary cleancontainers
30 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/unrolled/render/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Cory Jacobsen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/codegangsta/negroni/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Jeremy Saenz
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/codegangsta/cli/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2013 Jeremy Saenz
2 | All Rights Reserved.
3 |
4 | MIT LICENSE
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy of
7 | this software and associated documentation files (the "Software"), to deal in
8 | the Software without restriction, including without limitation the rights to
9 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
10 | the Software, and to permit persons to whom the Software is furnished to do so,
11 | subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
18 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
19 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/codegangsta/cli/command_test.go:
--------------------------------------------------------------------------------
1 | package cli_test
2 |
3 | import (
4 | "flag"
5 | "testing"
6 |
7 | "github.com/codegangsta/cli"
8 | )
9 |
10 | func TestCommandDoNotIgnoreFlags(t *testing.T) {
11 | app := cli.NewApp()
12 | set := flag.NewFlagSet("test", 0)
13 | test := []string{"blah", "blah", "-break"}
14 | set.Parse(test)
15 |
16 | c := cli.NewContext(app, set, set)
17 |
18 | command := cli.Command{
19 | Name: "test-cmd",
20 | ShortName: "tc",
21 | Usage: "this is for testing",
22 | Description: "testing",
23 | Action: func(_ *cli.Context) {},
24 | }
25 | err := command.Run(c)
26 |
27 | expect(t, err.Error(), "flag provided but not defined: -break")
28 | }
29 |
30 | func TestCommandIgnoreFlags(t *testing.T) {
31 | app := cli.NewApp()
32 | set := flag.NewFlagSet("test", 0)
33 | test := []string{"blah", "blah"}
34 | set.Parse(test)
35 |
36 | c := cli.NewContext(app, set, set)
37 |
38 | command := cli.Command{
39 | Name: "test-cmd",
40 | ShortName: "tc",
41 | Usage: "this is for testing",
42 | Description: "testing",
43 | Action: func(_ *cli.Context) {},
44 | SkipFlagParsing: true,
45 | }
46 | err := command.Run(c)
47 |
48 | expect(t, err, nil)
49 | }
50 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/op/go-logging/backend.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013, Örjan Persson. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package logging
6 |
7 | // defaultBackend is the backend used for all logging calls.
8 | var defaultBackend LeveledBackend
9 |
10 | // Backend is the interface which a log backend need to implement to be able to
11 | // be used as a logging backend.
12 | type Backend interface {
13 | Log(Level, int, *Record) error
14 | }
15 |
16 | // Set backend replaces the backend currently set with the given new logging
17 | // backend.
18 | func SetBackend(backends ...Backend) LeveledBackend {
19 | var backend Backend
20 | if len(backends) == 1 {
21 | backend = backends[0]
22 | } else {
23 | backend = MultiLogger(backends...)
24 | }
25 |
26 | defaultBackend = AddModuleLevel(backend)
27 | return defaultBackend
28 | }
29 |
30 | // SetLevel sets the logging level for the specified module. The module
31 | // corresponds to the string specified in GetLogger.
32 | func SetLevel(level Level, module string) {
33 | defaultBackend.SetLevel(level, module)
34 | }
35 |
36 | // GetLevel returns the logging level for the specified module.
37 | func GetLevel(module string) Level {
38 | return defaultBackend.GetLevel(module)
39 | }
40 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/davecgh/go-spew/spew/dumpnocgo_test.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2013 Dave Collins
2 | //
3 | // Permission to use, copy, modify, and distribute this software for any
4 | // purpose with or without fee is hereby granted, provided that the above
5 | // copyright notice and this permission notice appear in all copies.
6 | //
7 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 |
15 | // NOTE: Due to the following build constraints, this file will only be compiled
16 | // when either cgo is not supported or "-tags testcgo" is not added to the go
17 | // test command line. This file intentionally does not setup any cgo tests in
18 | // this scenario.
19 | // +build !cgo !testcgo
20 |
21 | package spew_test
22 |
23 | func addCgoDumpTests() {
24 | // Don't add any tests for cgo since this file is only compiled when
25 | // there should not be any cgo tests.
26 | }
27 |
--------------------------------------------------------------------------------
/frontend/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | tarzan
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/op/go-logging/multi_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013, Örjan Persson. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package logging
6 |
7 | import "testing"
8 |
9 | func TestMultiLogger(t *testing.T) {
10 | log1 := NewMemoryBackend(8)
11 | log2 := NewMemoryBackend(8)
12 | SetBackend(MultiLogger(log1, log2))
13 |
14 | log := MustGetLogger("test")
15 | log.Debug("log")
16 |
17 | if "log" != MemoryRecordN(log1, 0).Formatted(0) {
18 | t.Errorf("log1: %v", MemoryRecordN(log1, 0).Formatted(0))
19 | }
20 | if "log" != MemoryRecordN(log2, 0).Formatted(0) {
21 | t.Errorf("log2: %v", MemoryRecordN(log2, 0).Formatted(0))
22 | }
23 | }
24 |
25 | func TestMultiLoggerLevel(t *testing.T) {
26 | log1 := NewMemoryBackend(8)
27 | log2 := NewMemoryBackend(8)
28 |
29 | leveled1 := AddModuleLevel(log1)
30 | leveled2 := AddModuleLevel(log2)
31 |
32 | multi := MultiLogger(leveled1, leveled2)
33 | multi.SetLevel(ERROR, "test")
34 | SetBackend(multi)
35 |
36 | log := MustGetLogger("test")
37 | log.Notice("log")
38 |
39 | if nil != MemoryRecordN(log1, 0) || nil != MemoryRecordN(log2, 0) {
40 | t.Errorf("unexpected log record")
41 | }
42 |
43 | leveled1.SetLevel(DEBUG, "test")
44 | log.Notice("log")
45 | if "log" != MemoryRecordN(log1, 0).Formatted(0) {
46 | t.Errorf("log1 not receieved")
47 | }
48 | if nil != MemoryRecordN(log2, 0) {
49 | t.Errorf("log2 receieved")
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/gorilla/context/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/gorilla/mux/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/op/go-logging/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2013 Örjan Persson. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/op/go-logging/examples/example.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "os"
5 |
6 | "github.com/op/go-logging"
7 | )
8 |
9 | var log = logging.MustGetLogger("example")
10 |
11 | // Example format string. Everything except the message has a custom color
12 | // which is dependent on the log level. Many fields have a custom output
13 | // formatting too, eg. the time returns the hour down to the milli second.
14 | var format = "%{color}%{time:15:04:05.000000} %{shortfunc} ▶ %{level:.4s} %{id:03x}%{color:reset} %{message}"
15 |
16 | // Password is just an example type implementing the Redactor interface. Any
17 | // time this is logged, the Redacted() function will be called.
18 | type Password string
19 |
20 | func (p Password) Redacted() interface{} {
21 | return logging.Redact(string(p))
22 | }
23 |
24 | func main() {
25 | // Setup one stderr and one syslog backend and combine them both into one
26 | // logging backend. By default stderr is used with the standard log flag.
27 | logBackend := logging.NewLogBackend(os.Stderr, "", 0)
28 | syslogBackend, err := logging.NewSyslogBackend("")
29 | if err != nil {
30 | log.Fatal(err)
31 | }
32 | logging.SetBackend(logBackend, syslogBackend)
33 | logging.SetFormatter(logging.MustStringFormatter(format))
34 |
35 | // For "example", set the log level to DEBUG and ERROR.
36 | for _, level := range []logging.Level{logging.DEBUG, logging.ERROR} {
37 | logging.SetLevel(level, "example")
38 |
39 | log.Debug("debug %s", Password("secret"))
40 | log.Info("info")
41 | log.Notice("notice")
42 | log.Warning("warning")
43 | log.Error("err")
44 | log.Critical("crit")
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/Godeps/_workspace/src/github.com/unrolled/render/doc.go:
--------------------------------------------------------------------------------
1 | /*Package render is a package that provides functionality for easily rendering JSON, XML, and HTML templates.
2 |
3 | package main
4 |
5 | import (
6 | "encoding/xml"
7 | "net/http"
8 |
9 | "gopkg.in/unrolled/render.v1"
10 | )
11 |
12 | type ExampleXml struct {
13 | XMLName xml.Name `xml:"example"`
14 | One string `xml:"one,attr"`
15 | Two string `xml:"two,attr"`
16 | }
17 |
18 | func main() {
19 | r := render.New(render.Options{})
20 | mux := http.NewServeMux()
21 |
22 | mux.HandleFunc("/", func(w http.ResponseWriter, req *http.Request) {
23 | w.Write([]byte("Welcome, visit sub pages now."))
24 | })
25 |
26 | mux.HandleFunc("/data", func(w http.ResponseWriter, req *http.Request) {
27 | r.Data(w, http.StatusOK, []byte("Some binary data here."))
28 | })
29 |
30 | mux.HandleFunc("/json", func(w http.ResponseWriter, req *http.Request) {
31 | r.JSON(w, http.StatusOK, map[string]string{"hello": "json"})
32 | })
33 |
34 | mux.HandleFunc("/xml", func(w http.ResponseWriter, req *http.Request) {
35 | r.XML(w, http.StatusOK, ExampleXml{One: "hello", Two: "xml"})
36 | })
37 |
38 | mux.HandleFunc("/html", func(w http.ResponseWriter, req *http.Request) {
39 | // Assumes you have a template in ./templates called "example.tmpl"
40 | // $ mkdir -p templates && echo "