This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A base template with the layout skeleton. | |
// {{block}} actions define placeholders. | |
{{define "base"}} | |
<html> | |
<head> | |
<title>{{block "title"}}</title> | |
</head> | |
<body> | |
{{block "content"}} | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package test | |
import ( | |
"net/http" | |
"github.com/gorilla/template/v0" | |
) | |
func helloHandler(w http.ResponseWriter, r *http.Request) { | |
set := template.Must(new(template.Set).Parse(`{{define "hello"}}Hello, world!{{end}}`)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo | |
import ( | |
"net/http" | |
) | |
type MethodHandler map[string]http.Handler | |
func (h MethodHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { | |
if handler, ok := h[req.Method]; ok { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File "/[...]/webapp/admin.py", line 23, in get | |
db.metadata.create_all() | |
File "/[...]/webapp/sqlalchemy/schema.py", line 2784, in create_all | |
tables=tables) | |
File "/[...]/webapp/sqlalchemy/engine/base.py", line 1487, in _run_visitor | |
conn._run_visitor(visitorcallable, element, **kwargs) | |
File "/[...]/webapp/sqlalchemy/engine/base.py", line 1130, in _run_visitor | |
**kwargs).traverse_single(element) | |
File "/[...]/webapp/sqlalchemy/sql/visitors.py", line 111, in traverse_single | |
return meth(obj, **kw) |
OlderNewer