dabb5f1ef3b2

More
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Sun, 28 Apr 2019 11:57:51 -0400
parents 819deb5fee25
children 780d6c03adaf
branches/tags (none)
files fish/config.fish go/Makefile go/cp437-to-utf8.go go/encconv.go

Changes

--- a/fish/config.fish	Sun Apr 28 08:36:07 2019 -0700
+++ b/fish/config.fish	Sun Apr 28 11:57:51 2019 -0400
@@ -117,6 +117,11 @@
 set PYTHONPATH "$HOME/lib/hg/hg:$PYTHONPATH"
 
 # }}}
+# Go {{{
+
+set -g -x GOPATH "$HOME/.go"
+
+# }}}
 # Z {{{
 
 . ~/src/z-fish/z.fish
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/go/Makefile	Sun Apr 28 11:57:51 2019 -0400
@@ -0,0 +1,16 @@
+files := $(shell ls *.go)
+names := $(files:.go=)
+
+.PHONY: all clean $(names)
+
+all: $(names)
+
+$(names): %: bin/%
+
+bin/%: %.go
+	mkdir -p bin
+	go build $<
+	mv $(@F) bin/
+
+clean:
+	rm -rf bin
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/go/cp437-to-utf8.go	Sun Apr 28 11:57:51 2019 -0400
@@ -0,0 +1,14 @@
+package main
+
+import (
+	"io"
+	"os"
+
+	"golang.org/x/text/encoding/charmap"
+	"golang.org/x/text/transform"
+)
+
+func main() {
+	r := transform.NewReader(os.Stdin, charmap.CodePage437.NewDecoder())
+	io.Copy(os.Stdout, r)
+}
--- a/go/encconv.go	Sun Apr 28 08:36:07 2019 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-package main
-
-import (
-	"io"
-	"os"
-
-	"golang.org/x/text/encoding/charmap"
-	"golang.org/x/text/transform"
-)
-
-func main() {
-	r := transform.NewReader(os.Stdin, charmap.CodePage437.NewDecoder())
-	io.Copy(os.Stdout, r)
-}