• Agniva De Sarker's avatar
    cmd/doc: show the package clause always · d22b5735
    Agniva De Sarker authored
    If no writes to the package buffer happen, then the package clause
    does not get printed. This is a bug for cases where a file just contains
    the package clause.
    
    We fix this by separating the printing of package clause to a new
    function and calling it from (*pkgBuffer).Write as well as (*Package).flush.
    
    Updates #31457
    
    Change-Id: Ia3bd0ea3963274c460a45d1e37fafc6ee0a197f0
    Reviewed-on: https://go-review.googlesource.com/c/go/+/206128
    
    
    Run-TryBot: Agniva De Sarker <agniva.quicksilver@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarRob Pike <r@golang.org>
    d22b5735
pkg.go 30 KB