From f54d364ab4e47185d9391268e9a23d14fcaf604f Mon Sep 17 00:00:00 2001 From: Frieder Schlesier Date: Sun, 20 Mar 2016 10:35:23 +0100 Subject: [PATCH] add scripts to run go, gofmt in docker --- bin/go | 10 ++++++++++ bin/gofmt | 18 ++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100755 bin/go create mode 100755 bin/gofmt diff --git a/bin/go b/bin/go new file mode 100755 index 0000000..525c7da --- /dev/null +++ b/bin/go @@ -0,0 +1,10 @@ +#!/bin/bash + +# execute go command inside a container +# + +set -o pipefail + +source $HOME/.dockerfunc + +go $@ diff --git a/bin/gofmt b/bin/gofmt new file mode 100755 index 0000000..a93f17d --- /dev/null +++ b/bin/gofmt @@ -0,0 +1,18 @@ +#!/bin/bash + +# execute go command inside a container +# + +set -o pipefail +set -x + +source $HOME/.dockerfunc + +# TODO: increase performance for go commands +# check directory calling from +# USE LABELS https://docs.docker.com/engine/userguide/labels-custom-metadata/#query-labels +# run a go-dev container for that go application +# check if maybe there is already a container running for this app +# if so, just docker exec the command inside this app container + +go fmt $@