ktateish / gottani

A tool for combining Go source code into a single .go file
BSD 2-Clause "Simplified" License
9 stars 1 forks source link

Failed to rename PackageName identities when the name is used only in FieldDecls #5

Closed ktateish closed 3 years ago

ktateish commented 3 years ago

When a file is like:

import (
    gobytes "bytes"
)

type T struct {
    ident *gobytes.Buffer
}

and the gobytes is not used in the rest of the file, the gobytes will remain in the combined source. The renaming is failed because the gobytes is not marked as used.