We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting error when trying the retrieve dividends http: panic serving 127.0.0.1:54063: 403 Forbidden: Forbidden
package main import ( "fmt" "html/template" "net/http" "github.com/timpalpant/go-iex" ) func process(w http.ResponseWriter, r *http.Request) { client := iex.NewClient(&http.Client{}) var s []string symbols := []string{"AAPL", "SPY"} for _, symb := range symbols { stat, err := client.GetKeyStats(symb) if err != nil { panic(err) } s = append(s, fmt.Sprintf("DividendYield: %s", stat.DividendYield)) } t, _ := template.ParseFiles("Dividends.html") t.Execute(w, s) } //// func main() { server := http.Server{ Addr: "127.0.0.1:8080", } http.HandleFunc("/process", process) server.ListenAndServe() }
2020/01/27 03:34:59 http: panic serving 127.0.0.1:54063: 403 Forbidden: Forbidden
goroutine 19 [running]: net/http.(*conn).serve.func1(0xc000162820) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002defb0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0001ba000, 0xc0001a8000) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0001ba000, 0xc0001a8000) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0001ba000, 0xc0001a8000) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0001ba000, 0xc0001a8000) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000162820, 0x158dce0, 0xc00019e000) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:34:59 http: panic serving 127.0.0.1:54064: 403 Forbidden: Forbidden goroutine 20 [running]: net/http.(*conn).serve.func1(0xc0001628c0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0003cab90) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022d420, 0xc0001a6000) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022d420, 0xc0001a6000) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022d420, 0xc0001a6000) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022d420, 0xc0001a6000) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0001628c0, 0x158dce0, 0xc0000a0340) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:34:59 http: panic serving 127.0.0.1:54066: 403 Forbidden: Forbidden goroutine 47 [running]: net/http.(*conn).serve.func1(0xc0002da820) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0003e2070) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0002e4700, 0xc0001a6100) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0002e4700, 0xc0001a6100) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0002e4700, 0xc0001a6100) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0002e4700, 0xc0001a6100) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0002da820, 0x158dce0, 0xc0002141c0) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:00 http: panic serving 127.0.0.1:54067: 403 Forbidden: Forbidden goroutine 23 [running]: net/http.(*conn).serve.func1(0xc000326140) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0003e20e0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0002e48c0, 0xc0001a6300) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0002e48c0, 0xc0001a6300) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0002e48c0, 0xc0001a6300) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0002e48c0, 0xc0001a6300) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000326140, 0x158dce0, 0xc000214380) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:00 http: panic serving 127.0.0.1:54068: 403 Forbidden: Forbidden goroutine 24 [running]: net/http.(*conn).serve.func1(0xc0003261e0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002df1c0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022d5e0, 0xc0001a8200) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022d5e0, 0xc0001a8200) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022d5e0, 0xc0001a8200) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022d5e0, 0xc0001a8200) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0003261e0, 0x158dce0, 0xc000030040) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:00 http: panic serving 127.0.0.1:54069: 403 Forbidden: Forbidden goroutine 25 [running]: net/http.(*conn).serve.func1(0xc000326280) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0003e2250) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc000338000, 0xc0001a8300) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc000338000, 0xc0001a8300) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc000338000, 0xc0001a8300) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc000338000, 0xc0001a8300) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000326280, 0x158dce0, 0xc0000300c0) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:01 http: panic serving 127.0.0.1:54070: 403 Forbidden: Forbidden goroutine 28 [running]: net/http.(*conn).serve.func1(0xc000326460) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002df3a0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0002e4a80, 0xc0001a6500) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0002e4a80, 0xc0001a6500) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0002e4a80, 0xc0001a6500) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0002e4a80, 0xc0001a6500) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000326460, 0x158dce0, 0xc000214580) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:01 http: panic serving 127.0.0.1:54071: 403 Forbidden: Forbidden goroutine 29 [running]: net/http.(*conn).serve.func1(0xc000326500) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0003cb060) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0002e4d20, 0xc0001a8500) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0002e4d20, 0xc0001a8500) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0002e4d20, 0xc0001a8500) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0002e4d20, 0xc0001a8500) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000326500, 0x158dce0, 0xc000030280) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:01 http: panic serving 127.0.0.1:54072: 403 Forbidden: Forbidden goroutine 30 [running]: net/http.(*conn).serve.func1(0xc000326d20) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0003e23f0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0003381c0, 0xc0001a8600) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0003381c0, 0xc0001a8600) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0003381c0, 0xc0001a8600) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0003381c0, 0xc0001a8600) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000326d20, 0x158dce0, 0xc000030300) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:06 http: panic serving 127.0.0.1:54083: 403 Forbidden: Forbidden goroutine 10 [running]: net/http.(*conn).serve.func1(0xc0002275e0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002df510) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022d960, 0xc0001a8800) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022d960, 0xc0001a8800) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022d960, 0xc0001a8800) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022d960, 0xc0001a8800) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0002275e0, 0x158dce0, 0xc0000304c0) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:06 http: panic serving 127.0.0.1:54084: 403 Forbidden: Forbidden goroutine 11 [running]: net/http.(*conn).serve.func1(0xc000227900) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002df760) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022dc00, 0xc0002c4300) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022dc00, 0xc0002c4300) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022dc00, 0xc0002c4300) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022dc00, 0xc0002c4300) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000227900, 0x158dce0, 0xc00043f700) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:06 http: panic serving 127.0.0.1:54085: 403 Forbidden: Forbidden goroutine 16 [running]: net/http.(*conn).serve.func1(0xc000227c20) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0003e2480) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022dea0, 0xc0002c4600) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022dea0, 0xc0002c4600) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022dea0, 0xc0002c4600) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022dea0, 0xc0002c4600) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000227c20, 0x158dce0, 0xc00043fa00) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:25 http: panic serving 127.0.0.1:54092: 403 Forbidden: Forbidden goroutine 33 [running]: net/http.(*conn).serve.func1(0xc000327040) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0004dc1b0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0004da1c0, 0xc0005f8000) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0004da1c0, 0xc0005f8000) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0004da1c0, 0xc0005f8000) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0004da1c0, 0xc0005f8000) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000327040, 0x158dce0, 0xc000030540) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:26 http: panic serving 127.0.0.1:54110: 403 Forbidden: Forbidden goroutine 103 [running]: net/http.(*conn).serve.func1(0xc0004e03c0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002fa080) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022c1c0, 0xc0002c4000) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022c1c0, 0xc0002c4000) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022c1c0, 0xc0002c4000) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022c1c0, 0xc0002c4000) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0004e03c0, 0x158dce0, 0xc00043e040) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:26 http: panic serving 127.0.0.1:54115: 403 Forbidden: Forbidden goroutine 106 [running]: net/http.(*conn).serve.func1(0xc0004e0820) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0004dc370) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0004da380, 0xc0002c4300) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0004da380, 0xc0002c4300) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0004da380, 0xc0002c4300) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0004da380, 0xc0002c4300) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0004e0820, 0x158dce0, 0xc00043e1c0) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:26 http: panic serving 127.0.0.1:54117: 403 Forbidden: Forbidden goroutine 109 [running]: net/http.(*conn).serve.func1(0xc0004e0dc0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002c0050) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022c700, 0xc0005f8200) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022c700, 0xc0005f8200) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022c700, 0xc0005f8200) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022c700, 0xc0005f8200) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0004e0dc0, 0x158dce0, 0xc000030180) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:26 http: panic serving 127.0.0.1:54118: 403 Forbidden: Forbidden goroutine 110 [running]: net/http.(*conn).serve.func1(0xc0004e0fa0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc00046c4d0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022ca80, 0xc0002c4500) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022ca80, 0xc0002c4500) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022ca80, 0xc0002c4500) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022ca80, 0xc0002c4500) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0004e0fa0, 0x158dce0, 0xc00043e380) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:26 http: panic serving 127.0.0.1:54119: 403 Forbidden: Forbidden goroutine 114 [running]: net/http.(*conn).serve.func1(0xc00037a000) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002c0230) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0003ae1c0, 0xc0001b8000) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0003ae1c0, 0xc0001b8000) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0003ae1c0, 0xc0001b8000) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0003ae1c0, 0xc0001b8000) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc00037a000, 0x158dce0, 0xc000214080) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:31 http: panic serving 127.0.0.1:54125: 403 Forbidden: Forbidden goroutine 117 [running]: net/http.(*conn).serve.func1(0xc00037a3c0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002c0530) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0003ae8c0, 0xc0002c4600) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0003ae8c0, 0xc0002c4600) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0003ae8c0, 0xc0002c4600) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0003ae8c0, 0xc0002c4600) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc00037a3c0, 0x158dce0, 0xc00043e400) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:31 http: panic serving 127.0.0.1:54126: 403 Forbidden: Forbidden goroutine 118 [running]: net/http.(*conn).serve.func1(0xc00037a820) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0004dc4c0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022d420, 0xc0001b8200) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022d420, 0xc0001b8200) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022d420, 0xc0001b8200) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022d420, 0xc0001b8200) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc00037a820, 0x158dce0, 0xc000214240) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 03:35:31 http: panic serving 127.0.0.1:54127: 403 Forbidden: Forbidden goroutine 121 [running]: net/http.(*conn).serve.func1(0xc00037aa00) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0002c06c0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0003aee00, 0xc0001b8400) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0003aee00, 0xc0001b8400) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0003aee00, 0xc0001b8400) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0003aee00, 0xc0001b8400) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc00037aa00, 0x158dce0, 0xc000214440) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 07:44:10 http: panic serving 127.0.0.1:58136: 403 Forbidden: Forbidden goroutine 124 [running]: net/http.(*conn).serve.func1(0xc0004e03c0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0004dc170) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0004da1c0, 0xc0000f6000) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0004da1c0, 0xc0000f6000) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0004da1c0, 0xc0000f6000) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0004da1c0, 0xc0000f6000) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc0004e03c0, 0x158dce0, 0xc00043e000) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 07:44:41 http: panic serving 127.0.0.1:58177: 403 Forbidden: Forbidden goroutine 166 [running]: net/http.(*conn).serve.func1(0xc000227ae0) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc0004dc230) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022d5e0, 0xc000196100) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022d5e0, 0xc000196100) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022d5e0, 0xc000196100) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022d5e0, 0xc000196100) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000227ae0, 0x158dce0, 0xc000030180) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 07:44:41 http: panic serving 127.0.0.1:58178: 403 Forbidden: Forbidden goroutine 167 [running]: net/http.(*conn).serve.func1(0xc000227b80) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc00046d9c0) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc0004da380, 0xc000254000) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc0004da380, 0xc000254000) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc0004da380, 0xc000254000) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc0004da380, 0xc000254000) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000227b80, 0x158dce0, 0xc0002142c0) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384 2020/01/27 07:44:41 http: panic serving 127.0.0.1:58183: 403 Forbidden: Forbidden goroutine 169 [running]: net/http.(*conn).serve.func1(0xc000326140) /usr/local/opt/go/libexec/src/net/http/server.go:1767 +0x139 panic(0x1442140, 0xc00046db30) /usr/local/opt/go/libexec/src/runtime/panic.go:679 +0x1b2 main.process(0x158d1e0, 0xc00022d960, 0xc000254200) /Users/ed/Documents/Coding/Golang/src/web/web.go:18 +0x373 net/http.HandlerFunc.ServeHTTP(0x150b0d0, 0x158d1e0, 0xc00022d960, 0xc000254200) /usr/local/opt/go/libexec/src/net/http/server.go:2007 +0x44 net/http.(*ServeMux).ServeHTTP(0x18d3180, 0x158d1e0, 0xc00022d960, 0xc000254200) /usr/local/opt/go/libexec/src/net/http/server.go:2387 +0x1bd net/http.serverHandler.ServeHTTP(0xc0001640e0, 0x158d1e0, 0xc00022d960, 0xc000254200) /usr/local/opt/go/libexec/src/net/http/server.go:2802 +0xa4 net/http.(*conn).serve(0xc000326140, 0x158dce0, 0xc000214400) /usr/local/opt/go/libexec/src/net/http/server.go:1890 +0x875 created by net/http.(*Server).Serve /usr/local/opt/go/libexec/src/net/http/server.go:2928 +0x384
The text was updated successfully, but these errors were encountered:
Per GoTeam: "The reason you're getting a panic is due to raising a panic directly in this function:
for _, symb := range symbols { stat, err := client.GetKeyStats(symb) if err != nil { panic(err) } s = append(s, fmt.Sprintf("DividendYield: %s", stat.DividendYield)) }
The error as can be seen is the 403 Forbidden being returned by the client.GetKeyStats function. Do you need to authenticate this client in some way?
Either way this doesn't seem like a relevant issue to Go as a language."
Sorry, something went wrong.
No branches or pull requests
Getting error when trying the retrieve dividends
http: panic serving 127.0.0.1:54063: 403 Forbidden: Forbidden
The text was updated successfully, but these errors were encountered: