Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Fix pkger generating the wrong package name for pkger.go #80

Merged
merged 1 commit into from
Mar 11, 2020

Commits on Mar 11, 2020

  1. Fix pkger generating the wrong package name for pkger.go

    The issue is that, if pkger.go is created (empty) before the `go list
    -json` call it will fail and give the generic directory name instead of the
    actual package name under the directory. This is fine in most cases,
    except when the package name differs from the directory name - which is
    allowed. Then pkger.go will conflict and fail to compile with the rest
    of *.go under the same directory.
    
    To fix, we simply obtain the real package name before creating the dummy
    pkger.go file and then pass the name into the file.
    Eric Chen committed Mar 11, 2020
    Configuration menu
    Copy the full SHA
    9552dcf View commit details
    Browse the repository at this point in the history