FAQ
Hello everyone, I am novice, when I build my Go project, I got an error
below:

I hava two source file in my "main" package: main.go and periodic_stat.go,
and a http request handler file unregapp_handler.go in "biz" package,
when I compile it with "go install" in command line, the error comes:

biz\unregapp_handler.go:16: undefined: protocol.UnRegAppsBody
biz\unregapp_handler.go:26: undefined: protocol.BuildNonOKUnRegResp
biz\unregapp_handler.go:32: undefined: protocol.BuildNonOKUnRegResp
biz\unregapp_handler.go:49: undefined: db.UnRegisterMcApps
biz\unregapp_handler.go:52: undefined: protocol.BuildNonOKUnRegResp
biz\unregapp_handler.go:57: undefined: protocol.UnRegAppsResponse

package "protocol" declare some struct such as 'UnRegAppsBody",
"UnRegAppsResponse" and functions sucn as "BuildNonOKUnRegResp" and
"UnRegisterMcApps",
I can't fix the error, can anyone help me ?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Konstantin Khomoutov at Sep 5, 2013 at 3:02 pm

    On Wed, 4 Sep 2013 21:43:36 -0700 (PDT) yuanjun Li wrote:

    Hello everyone, I am novice, when I build my Go project, I got an
    error below:

    I hava two source file in my "main" package: main.go and
    periodic_stat.go, and a http request handler file unregapp_handler.go
    in "biz" package, when I compile it with "go install" in command
    line, the error comes:

    biz\unregapp_handler.go:16: undefined: protocol.UnRegAppsBody
    biz\unregapp_handler.go:26: undefined: protocol.BuildNonOKUnRegResp
    biz\unregapp_handler.go:32: undefined: protocol.BuildNonOKUnRegResp
    biz\unregapp_handler.go:49: undefined: db.UnRegisterMcApps
    biz\unregapp_handler.go:52: undefined: protocol.BuildNonOKUnRegResp
    biz\unregapp_handler.go:57: undefined: protocol.UnRegAppsResponse

    package "protocol" declare some struct such as 'UnRegAppsBody",
    "UnRegAppsResponse" and functions sucn as "BuildNonOKUnRegResp" and
    "UnRegisterMcApps",
    I can't fix the error, can anyone help me ?
    Supposedly you forgot to import that package (using a proper `import`
    declaration [1]) in all the source files which refer to the symbols
    provided by that package.

    1. http://golang.org/ref/spec#Import_declarations

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedSep 5, '13 at 2:39p
activeSep 5, '13 at 3:02p
posts2
users2
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase