View in.go
package main
func main() {
log := NewLogger()
log.Info("Foo")
log.Info("Bar")
log.Error("Boom")
}
func NewLogger() Logger {
View snippets.coffee
'.source.go':
'Options':
'prefix': 'options'
'body': '''
// Option function.
type Option func(*$1)
// New with the given options.
func New(options ...Option) *$1 {
View output
#!/bin/sh
eval `go build -work -a 2>&1` && find $WORK -type f -name "*.a" | xargs -I{} du -hxs "{}" | gsort -rh | sed -e s:${WORK}/::g
View index.md

Setup

Static files and 404 pages.

{{ mkdir "build" }}
{{ copy "static/*" "build" }}
{{ render "404" | write "build/404.html" }}
View input.go
// grab time spent
sum := Agg("duration_sum", Sum("duration"))
// grab time spent per label
labels := Agg("labels",
Terms("issue.labels.keyword", 100),
Aggs(sum))
// grab time spent per day, and per label
View preact.go
// Package preact provides bindings to the preact library.
package preact
import "github.com/gopherjs/gopherjs/js"
var preact = js.Global.Get("preact")
// Attrs of an element.
type Attrs map[string]interface{}
View status.html
{{ define "content" }}
{{ partial "back" (dict "url" "//apex.sh") }}
<section class="Content full center">
<div class="Container small">
<div class="Title center margin">
<span class="text">Status</span>
<span class="subtext">Apex service status.</span>
</div>
View images.css
.Images.three {
--size: 450px;
--size-ratio: .75;
--size-small: calc(var(--size) * var(--size-ratio));
--inset: 150px;
--bottom: 25px;
display: flex;
justify-content: center;
align-items: flex-end;
}
View main.go
package main
import (
"fmt"
"net/http"
"github.com/apex/go-apex"
"github.com/apex/go-apex/proxy"
)