From 5f4e2f65402b9aa611f93b2fa14ea69bf7b26d2d Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 18 May 2019 08:08:21 -0400 Subject: Generalize awk script that produces doc.go --- doc/go.awk | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/go.awk b/doc/go.awk index a325362..bcd4a7c 100644 --- a/doc/go.awk +++ b/doc/go.awk @@ -1,12 +1,6 @@ -BEGIN { - show = 0 - print "/*" -} +BEGIN { show = 0 ; print "/*" } -/^\-/ { - trim = 1 - print "" -} +/^\-/ { trim = 1 ; print "" } /^Package/ { show = 1 } @@ -16,4 +10,4 @@ trim { sub("^ +", "", $0) } show { print $0 } -END { print "*/\npackage gofpdf" } +END { print "*/\npackage " package_name } -- cgit v1.2.1-24-ge1ad