diff options
Diffstat (limited to 'src/nslcd_proto/struct_backend.go.sh')
-rwxr-xr-x | src/nslcd_proto/struct_backend.go.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nslcd_proto/struct_backend.go.sh b/src/nslcd_proto/struct_backend.go.sh new file mode 100755 index 0000000..792ae84 --- /dev/null +++ b/src/nslcd_proto/struct_backend.go.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash +requests=$1 +cat <<EOF | gofmt +package nslcd_proto + +type Backend interface { + $(sed -rn 's/([^_]+)(.*)/\1\2(Request_\1\2) \1_Enumerator/p' "$requests" | grep -v PAM) + $(sed -rn 's/(PAM)(.*)/\1\2(Request_\1\2) \1\2_Enumerator/p' "$requests") +} +EOF |