From 70bd3033eccda373294128e1b8a9e4919a3626ad Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 18 Dec 2017 14:21:44 -0500 Subject: type_nilbackend.go.gen: use variables to shorten crazy-long line --- nslcd_server/type_nilbackend.go.gen | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nslcd_server/type_nilbackend.go.gen b/nslcd_server/type_nilbackend.go.gen index 61077a0..0c6f4b5 100755 --- a/nslcd_server/type_nilbackend.go.gen +++ b/nslcd_server/type_nilbackend.go.gen @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (C) 2015 Luke Shumaker +# Copyright (C) 2015, 2017 Luke Shumaker # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -34,7 +34,11 @@ import ( // databases. type NilBackend struct{} -$(< "$interface" sed -rn 's/^\t([^(]+)\(unix.Ucred, ([^)]+)\) <-chan (\S+)$/func (o NilBackend) \1(unix.Ucred, \2) <-chan \3 { r := make(chan \3); close(r); return r }/p') +$( + re_in='^\t([^(]+)\(unix\.Ucred, ([^)]+)\) <-chan (\S+)$' + re_out='func (o NilBackend) \1(unix.Ucred, \2) <-chan \3 { r := make(chan \3); close(r); return r }' + < "$interface" sed -rn "s/$re_in/$re_out/p" +) var _ Backend = NilBackend{} EOF -- cgit v1.2.3-2-g168b