summaryrefslogtreecommitdiff
path: root/src/nslcd_proto/struct_null_backend.go.sh
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-08-26 23:58:22 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-08-26 23:58:22 -0600
commitc8ba46c9f9afb482052e018a0ed5c1c67b896c57 (patch)
tree877db8d318b7a2ccf5ef22795f20006fa7c612e9 /src/nslcd_proto/struct_null_backend.go.sh
parent4ab446ed2a12e4f8b599f5912b9d4aabf20e2975 (diff)
wip
Diffstat (limited to 'src/nslcd_proto/struct_null_backend.go.sh')
-rwxr-xr-xsrc/nslcd_proto/struct_null_backend.go.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nslcd_proto/struct_null_backend.go.sh b/src/nslcd_proto/struct_null_backend.go.sh
new file mode 100755
index 0000000..99788aa
--- /dev/null
+++ b/src/nslcd_proto/struct_null_backend.go.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+# -*- Mode: Go -*-
+interface=$1
+cat <<EOF | gofmt
+package nslcd_proto
+
+type NullBackend struct{}
+
+$(< "$interface" sed -rn 's/^\t(.*\) (\S+)_Enumerator)$/func (o NullBackend) \1 { return \2_Ø{} }/p')
+
+var _ Backend = NullBackend{}
+EOF