From 1290e823ca40471136d8dfccfe741c17a80c4d35 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Fri, 14 Jun 2019 18:37:20 +0000 Subject: docs --- cmd/appsluggr/main.go | 3 +++ cmd/dnsd/main.go | 7 ++++--- cmd/ff-primitive/main.go | 3 ++- cmd/genua/main.go | 1 + cmd/johaus/main.go | 1 + cmd/la-baujmi/main.go | 5 +++-- cmd/license/licenses/licenses.go | 3 ++- cmd/license/main.go | 3 ++- cmd/mainsanow/main.go | 3 +-- cmd/minipaas/main.go | 1 + cmd/mkapp/main.go | 1 + cmd/priorworkgen/main.go | 3 ++- cmd/quickserv/main.go | 1 + cmd/relayd/main.go | 1 + cmd/thumber/main.go | 3 ++- cmd/tlstestd/main.go | 7 ++++--- cmd/tor2web/main.go | 1 + cmd/whoisfront/main.go | 1 + cmd/within.website/main.go | 1 + 19 files changed, 34 insertions(+), 15 deletions(-) (limited to 'cmd') diff --git a/cmd/appsluggr/main.go b/cmd/appsluggr/main.go index 72257f4..9a90796 100644 --- a/cmd/appsluggr/main.go +++ b/cmd/appsluggr/main.go @@ -1,3 +1,6 @@ +// Command appsluggr packages a standard web and worker slug for Heroku/Dokku. +// +// This hard assumes that the binaries put into the slug will work on the target hardware. package main import ( diff --git a/cmd/dnsd/main.go b/cmd/dnsd/main.go index 6cbc442..3e2767d 100644 --- a/cmd/dnsd/main.go +++ b/cmd/dnsd/main.go @@ -1,20 +1,21 @@ +// Command dnsd is a simple DNS server for my network. It has O(n) lookup times. package main import ( "bufio" "flag" + "fmt" "log" "net/http" "os" "os/signal" "syscall" "time" - "fmt" - "within.website/x/web" - "within.website/x/internal" "github.com/miekg/dns" "github.com/mmikulicic/stringlist" + "within.website/x/internal" + "within.website/x/web" ) var ( diff --git a/cmd/ff-primitive/main.go b/cmd/ff-primitive/main.go index 3de83a6..3bd68c7 100644 --- a/cmd/ff-primitive/main.go +++ b/cmd/ff-primitive/main.go @@ -1,3 +1,4 @@ +// Command ff-primitive takes farbfeld data from standard in and applies http://primitive.lol to it. package main import ( @@ -8,9 +9,9 @@ import ( "runtime" "runtime/pprof" - "within.website/x/internal" "github.com/fogleman/primitive/primitive" farbfeld "github.com/hullerob/go.farbfeld" + "within.website/x/internal" ) var ( diff --git a/cmd/genua/main.go b/cmd/genua/main.go index 34fbde8..376dbe9 100644 --- a/cmd/genua/main.go +++ b/cmd/genua/main.go @@ -1,3 +1,4 @@ +// Command genua generates an example user agent. package main import ( diff --git a/cmd/johaus/main.go b/cmd/johaus/main.go index a3ca6cc..4b43d2a 100644 --- a/cmd/johaus/main.go +++ b/cmd/johaus/main.go @@ -1,3 +1,4 @@ +// Command johaus wraps the lojban parser camxes and presents the results over HTTP. package main import ( diff --git a/cmd/la-baujmi/main.go b/cmd/la-baujmi/main.go index 393b13c..cf37b17 100644 --- a/cmd/la-baujmi/main.go +++ b/cmd/la-baujmi/main.go @@ -1,3 +1,4 @@ +// Command la-baujmi is a simple language understander for Toki Pona. package main import ( @@ -5,11 +6,11 @@ import ( "os" "strings" + "github.com/mndrix/golog" + line "github.com/peterh/liner" "within.website/x/internal" _ "within.website/x/internal/tokipona" "within.website/x/web/tokiponatokens" - "github.com/mndrix/golog" - line "github.com/peterh/liner" ) func main() { diff --git a/cmd/license/licenses/licenses.go b/cmd/license/licenses/licenses.go index 297a8d6..cc4bd68 100644 --- a/cmd/license/licenses/licenses.go +++ b/cmd/license/licenses/licenses.go @@ -1,3 +1,4 @@ +// Package licenses is the list of licenses that this software supports. package licenses var List map[string]string @@ -32,7 +33,7 @@ func init() { "sqlite": SQLiteBlessing, "fair": FairLicense, "yolo": YoloLicense, - "icu996": ICU996License, + "icu996": ICU996License, } } diff --git a/cmd/license/main.go b/cmd/license/main.go index 56d639d..f593209 100644 --- a/cmd/license/main.go +++ b/cmd/license/main.go @@ -1,3 +1,4 @@ +// Command license is a simple software license generator. package main import ( @@ -10,8 +11,8 @@ import ( "text/template" "time" - "within.website/x/internal" "within.website/x/cmd/license/licenses" + "within.website/x/internal" ) var ( diff --git a/cmd/mainsanow/main.go b/cmd/mainsanow/main.go index f75ec49..5228593 100644 --- a/cmd/mainsanow/main.go +++ b/cmd/mainsanow/main.go @@ -1,7 +1,7 @@ +// Command mainsanow shows the current time in ma insa. package main import ( - "flag" "log" "time" @@ -10,7 +10,6 @@ import ( ) func main() { - flag.Parse() internal.HandleStartup() tn, err := mainsa.At(time.Now()) diff --git a/cmd/minipaas/main.go b/cmd/minipaas/main.go index 2a6e8e7..41ca72a 100644 --- a/cmd/minipaas/main.go +++ b/cmd/minipaas/main.go @@ -1,3 +1,4 @@ +// Command minipaas is a simple client for minipaas.xeserv.us. This is not useful without access to that server. package main import ( diff --git a/cmd/mkapp/main.go b/cmd/mkapp/main.go index 1827b9c..e856f5c 100644 --- a/cmd/mkapp/main.go +++ b/cmd/mkapp/main.go @@ -1,3 +1,4 @@ +// Command mkapp creates a mastodon app for a given -instance. package main import ( diff --git a/cmd/priorworkgen/main.go b/cmd/priorworkgen/main.go index 97fc6ce..f6b5bf9 100644 --- a/cmd/priorworkgen/main.go +++ b/cmd/priorworkgen/main.go @@ -1,3 +1,4 @@ +// Command priorworkgen generates the list of prior work (read: GitHub repositories) for contractual stuff. package main import ( @@ -7,10 +8,10 @@ import ( "log" "os" - "within.website/x/internal" "github.com/google/go-github/github" _ "github.com/joho/godotenv/autoload" "golang.org/x/oauth2" + "within.website/x/internal" ) var ( diff --git a/cmd/quickserv/main.go b/cmd/quickserv/main.go index caea45d..f774c5c 100644 --- a/cmd/quickserv/main.go +++ b/cmd/quickserv/main.go @@ -1,3 +1,4 @@ +// Command quickserv serves a folder of files over HTTP quickly. package main import ( diff --git a/cmd/relayd/main.go b/cmd/relayd/main.go index 3453fc0..fa66cd5 100644 --- a/cmd/relayd/main.go +++ b/cmd/relayd/main.go @@ -1,3 +1,4 @@ +// Command relayd is a simple TLS terminator using let's encrypt. package main import ( diff --git a/cmd/thumber/main.go b/cmd/thumber/main.go index 2da2ad6..bd67130 100644 --- a/cmd/thumber/main.go +++ b/cmd/thumber/main.go @@ -1,3 +1,4 @@ +// Command thumber creates 256x256 thumbnails for a folder/pile of them. package main import ( @@ -7,8 +8,8 @@ import ( "path/filepath" "strings" - "within.website/x/internal" "github.com/disintegration/imaging" + "within.website/x/internal" ) var ( diff --git a/cmd/tlstestd/main.go b/cmd/tlstestd/main.go index 660972f..8b1489e 100644 --- a/cmd/tlstestd/main.go +++ b/cmd/tlstestd/main.go @@ -1,16 +1,17 @@ +// Command tlstestd loads the given TLS cert/key and listens to the given port over HTTPS. package main import ( "flag" - "net/http" "log" + "net/http" "within.website/x/internal" ) var ( cert = flag.String("cert", "cert.pem", "TLS cert file") - key = flag.String("key", "key.pem", "TLS key") + key = flag.String("key", "key.pem", "TLS key") port = flag.String("port", "2848", "TCP port to listen on") ) @@ -23,7 +24,7 @@ func main() { internal.HandleStartup() http.HandleFunc("/", helloServer) - err := http.ListenAndServeTLS(":"+ *port, *cert, *key, nil) + err := http.ListenAndServeTLS(":"+*port, *cert, *key, nil) if err != nil { log.Fatal("ListenAndServe: ", err) } diff --git a/cmd/tor2web/main.go b/cmd/tor2web/main.go index a5e79d6..b6a03e6 100644 --- a/cmd/tor2web/main.go +++ b/cmd/tor2web/main.go @@ -1,3 +1,4 @@ +// Command tor2web is a simple caching proxy to tor onion sites. package main import ( diff --git a/cmd/whoisfront/main.go b/cmd/whoisfront/main.go index 30a49f4..73ec556 100644 --- a/cmd/whoisfront/main.go +++ b/cmd/whoisfront/main.go @@ -1,3 +1,4 @@ +// Command whoisfront is a simple CGI wrapper to switchcounter.science. This is used in some internal tooling. package main import ( diff --git a/cmd/within.website/main.go b/cmd/within.website/main.go index ecb2663..2a5e1e2 100644 --- a/cmd/within.website/main.go +++ b/cmd/within.website/main.go @@ -1,3 +1,4 @@ +// Command within.website is the vanity import server for https://within.website. package main import ( -- cgit v1.2.3