gopdf/doc/go.awk

14 lines
197 B
Awk
Raw Normal View History

2021-03-02 13:27:45 +01:00
BEGIN { show = 0 ; print "/*" }
/^\-/ { trim = 1 ; print "" }
/^Package/ { show = 1 }
!NF { trim = 0 }
trim { sub("^ +", "", $0) }
show { print $0 }
END { print "*/\npackage " package_name }