Monday, November 28, 2022
HomeGolangFail to compile when transfer information to a sub-folder - Getting Assist

Fail to compile when transfer information to a sub-folder – Getting Assist


I’ve a folder named util, and it incorporates a number of information associated. So I wish to transfer them right into a sub-folder named worth. I don’t change their bundle title, so they’re nonetheless with “bundle util”

    renamed:    util/func.go -> util/worth/func.go
    renamed:    util/remodel.go -> util/worth/remodel.go
    renamed:    util/unit.go -> util/worth/unit.go

In util, there are callers in file conf.go to name capabilities in these information. However after transferring information to sub-folder, it will probably’t discover the capabilities in worth.

go construct
util/conf.go:227:2: undefined: loadConfigPluginData

I take advantage of
GOVERSION=“go1.18.1”
GOARCH=“amd64”

If the information are in a special folder, they’re in a special bundle, you want to import them then and in addition guarantee that the symbols you reference are exported (uppercase).

1 Like

This subject was mechanically closed 90 days after the final reply. New replies are now not allowed.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments