FAQ
Hi! there;

will im trying to learn basic concept on building web App, i got a problem
( an expected behavior )
i follow the official GoLang Tutorials :
https://golang.org/doc/articles/wiki/part3.go?m=text , & then somethings
goes Wrong :

i start the server
i pointed on localhost:8080/edit or view or ...etc
then the server redirect me to something like :
http://www.localhost.com:8000/edit/
with error on the stack/log

i appreciate any help / advice : cause i'm new on Go Lang Programming,
this will probably affect my learning path.


.....
goroutine 9 [running]:
net/http.func·011()
     /Users/nix/Git_Repos/go/src/net/http/server.go:1130 +0xbb
text/template.errRecover(0xc208089b20)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:100 +0xbc
text/template.(*state).evalArg(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
0x0, 0x0, 0x58e398, 0xc20805c3c0, 0x0, 0x0, ...)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:642 +0x4d6
text/template.(*state).evalChainNode(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
0x16, 0xc20805c400, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:422 +0x139
text/template.(*state).evalArg(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
0x588a68, 0x24a360, 0x58e3e0, 0xc20805c400, 0x0, 0x0, ...)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:640 +0x32d
text/template.(*state).evalCall(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
0x274160, 0x3cf4d0, 0x13, 0x58e4e0, 0xc2080434d0, 0xc2080b4262, ...)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:556 +0x814
text/template.(*state).evalFunction(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
0x16, 0xc208043680, 0x58e4e0, 0xc2080434d0, 0xc20801e600, 0x2, 0x2, ...)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:459 +0x33b
text/template.(*state).evalCommand(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
0x16, 0xc2080434d0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:359 +0x210
text/template.(*state).evalPipeline(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
0x16, 0xc208044780, 0x0, 0x0, 0x0)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:332 +0x1a8
text/template.(*state).walk(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
0x58e308, 0xc2080436b0)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:167 +0x145
text/template.(*state).walk(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
0x58e450, 0xc2080432f0)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:175 +0x862
text/template.(*Template).Execute(0xc20805c280, 0x58e428, 0xc20804c280,
0x2b3940, 0xc208042fc0, 0x0, 0x0)
     /Users/nix/Git_Repos/go/src/text/template/exec.go:155 +0x3f2
html/template.(*Template).Execute(0xc208043050, 0x58e428, 0xc20804c280,
0x2b3940, 0xc208042fc0, 0x0, 0x0)
     /Users/nix/Git_Repos/go/src/html/template/template.go:78 +0xa3
main.renderTemplate(0x58e178, 0xc20804c280, 0x330b70, 0x4, 0xc208042fc0)

/Users/nix/Desktop/Annex/GoLang_programming/exercicesFiles/helloworld/src/hello/webprog/wiki.go:34
+0x170
main.editHandler(0x58e178, 0xc20804c280, 0xc20803a410)

/Users/nix/Desktop/Annex/GoLang_programming/exercicesFiles/helloworld/src/hello/webprog/wiki.go:49
+0x109
net/http.HandlerFunc.ServeHTTP(0x3cf5f8, 0x58e178, 0xc20804c280,
0xc20803a410)
     /Users/nix/Git_Repos/go/src/net/http/server.go:1265 +0x41
net/http.(*ServeMux).ServeHTTP(0xc2080426c0, 0x58e178, 0xc20804c280,
0xc20803a410)
     /Users/nix/Git_Repos/go/src/net/http/server.go:1541 +0x17d
net/http.serverHandler.ServeHTTP(0xc208064060, 0x58e178, 0xc20804c280,
0xc20803a410)
     /Users/nix/Git_Repos/go/src/net/http/server.go:1703 +0x19a
net/http.(*conn).serve(0xc20804c000)
     /Users/nix/Git_Repos/go/src/net/http/server.go:1204 +0xb57
created by net/http.(*Server).Serve
     /Users/nix/Git_Repos/go/src/net/http/server.go:1751 +0x35e

--
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/d/optout.

Search Discussions

  • Matt Silverlock at Mar 9, 2015 at 4:02 am
    Can you post your code - ideally on somewhere like http://play.golang.org/
    or https://gist.gisthub.com/ - so we can help?

    As a hint, it's lines 34 and 49 of wiki.go that are causing the problem:

      /Users/nix/Desktop/Annex/GoLang_programming/exercicesFiles/helloworld/src/hello/webprog/wiki.go:34
    +0x170
    main.editHandler(0x58e178, 0xc20804c280, 0xc20803a410)

    /Users/nix/Desktop/Annex/GoLang_programming/exercicesFiles/helloworld/src/hello/webprog/wiki.go:49
    +0x109
    net/http.HandlerFunc.ServeHTTP(0x3cf5f8, 0x58e178, 0xc20804c280,
    0xc20803a410)

    (based on those parts of the trace)
    On Friday, March 6, 2015 at 11:52:06 PM UTC+8, Abdel Ali Harchaoui wrote:

    Hi! there;

    will im trying to learn basic concept on building web App, i got a problem
    ( an expected behavior )
    i follow the official GoLang Tutorials :
    https://golang.org/doc/articles/wiki/part3.go?m=text , & then somethings
    goes Wrong :

    i start the server
    i pointed on localhost:8080/edit or view or ...etc
    then the server redirect me to something like :
    http://www.localhost.com:8000/edit/
    with error on the stack/log

    i appreciate any help / advice : cause i'm new on Go Lang Programming,
    this will probably affect my learning path.


    .....
    goroutine 9 [running]:
    net/http.func·011()
    /Users/nix/Git_Repos/go/src/net/http/server.go:1130 +0xbb
    text/template.errRecover(0xc208089b20)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:100 +0xbc
    text/template.(*state).evalArg(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
    0x0, 0x0, 0x58e398, 0xc20805c3c0, 0x0, 0x0, ...)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:642 +0x4d6
    text/template.(*state).evalChainNode(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
    0x16, 0xc20805c400, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:422 +0x139
    text/template.(*state).evalArg(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
    0x588a68, 0x24a360, 0x58e3e0, 0xc20805c400, 0x0, 0x0, ...)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:640 +0x32d
    text/template.(*state).evalCall(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
    0x16, 0x274160, 0x3cf4d0, 0x13, 0x58e4e0, 0xc2080434d0, 0xc2080b4262, ...)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:556 +0x814
    text/template.(*state).evalFunction(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
    0x16, 0xc208043680, 0x58e4e0, 0xc2080434d0, 0xc20801e600, 0x2, 0x2, ...)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:459 +0x33b
    text/template.(*state).evalCommand(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
    0x16, 0xc2080434d0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:359 +0x210
    text/template.(*state).evalPipeline(0xc20805c4c0, 0x2b3940, 0xc208042fc0,
    0x16, 0xc208044780, 0x0, 0x0, 0x0)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:332 +0x1a8
    text/template.(*state).walk(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
    0x58e308, 0xc2080436b0)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:167 +0x145
    text/template.(*state).walk(0xc20805c4c0, 0x2b3940, 0xc208042fc0, 0x16,
    0x58e450, 0xc2080432f0)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:175 +0x862
    text/template.(*Template).Execute(0xc20805c280, 0x58e428, 0xc20804c280,
    0x2b3940, 0xc208042fc0, 0x0, 0x0)
    /Users/nix/Git_Repos/go/src/text/template/exec.go:155 +0x3f2
    html/template.(*Template).Execute(0xc208043050, 0x58e428, 0xc20804c280,
    0x2b3940, 0xc208042fc0, 0x0, 0x0)
    /Users/nix/Git_Repos/go/src/html/template/template.go:78 +0xa3
    main.renderTemplate(0x58e178, 0xc20804c280, 0x330b70, 0x4, 0xc208042fc0)

    /Users/nix/Desktop/Annex/GoLang_programming/exercicesFiles/helloworld/src/hello/webprog/wiki.go:34
    +0x170
    main.editHandler(0x58e178, 0xc20804c280, 0xc20803a410)

    /Users/nix/Desktop/Annex/GoLang_programming/exercicesFiles/helloworld/src/hello/webprog/wiki.go:49
    +0x109
    net/http.HandlerFunc.ServeHTTP(0x3cf5f8, 0x58e178, 0xc20804c280,
    0xc20803a410)
    /Users/nix/Git_Repos/go/src/net/http/server.go:1265 +0x41
    net/http.(*ServeMux).ServeHTTP(0xc2080426c0, 0x58e178, 0xc20804c280,
    0xc20803a410)
    /Users/nix/Git_Repos/go/src/net/http/server.go:1541 +0x17d
    net/http.serverHandler.ServeHTTP(0xc208064060, 0x58e178, 0xc20804c280,
    0xc20803a410)
    /Users/nix/Git_Repos/go/src/net/http/server.go:1703 +0x19a
    net/http.(*conn).serve(0xc20804c000)
    /Users/nix/Git_Repos/go/src/net/http/server.go:1204 +0xb57
    created by net/http.(*Server).Serve
    /Users/nix/Git_Repos/go/src/net/http/server.go:1751 +0x35e
    --
    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/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 6, '15 at 3:52p
activeMar 9, '15 at 4:02a
posts2
users2
websitegolang.org

People

Translate

site design / logo © 2022 Grokbase