Re: [go-nuts] imported and not used "errors"

2022-09-27 Thread Kurtis Rader
I find the Gin documentation (and the examples provided by the project) to be, ahem, lacking in important details. As you can see from the source ( https://github.com/gin-gonic/gin/blob/78dad9d77d8c2d679dedea1fbef5fc8a54372efd/gin.go#L372) the Run() function returns an error that will tell you

Re: [go-nuts] imported and not used "errors"

2022-09-27 Thread Steven Hartland
Something is already running on localhost port 8080. use a different port. On Tue, 27 Sept 2022 at 16:15, Conor O'Neill wrote: > I am following a tutorial to great an API in Go with a framework called > Gin. > > I have imported errors and created a function like so; > > func createBook(c

[go-nuts] imported and not used "errors"

2022-09-27 Thread Conor O'Neill
I am following a tutorial to great an API in Go with a framework called Gin. I have imported errors and created a function like so; func createBook(c *gin.Context) { var newBook book if err := c.BindJSON(); err != nil { return } books = append(books, newBook)