dtimm: host a friendly greeting
This change adds a `dtimm` binary that hosts a nice message on port
:8080
Change-Id: Ia770d7adf93aa649c6bee378937b6e826b1862a5
Reviewed-on: https://go-review.googlesource.com/132257
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/dtimm/main.go b/dtimm/main.go
new file mode 100644
index 0000000..7dffa2e
--- /dev/null
+++ b/dtimm/main.go
@@ -0,0 +1,20 @@
+// Copyright 2018 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// dtimm command hosts a friendly message on port :8080.
+package main
+
+import (
+ "io"
+ "log"
+ "net/http"
+)
+
+func main() {
+ http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+ io.WriteString(w, "Hello from GopherCon 2018!")
+ })
+
+ log.Fatal(http.ListenAndServe(":8080", nil))
+}