Giter Club home page Giter Club logo

golang-web-dev's People

Contributors

angelk avatar antonellamarengo avatar cxhercules avatar dennisssdev avatar di-reu avatar goestoeleven avatar markrosemaker avatar matus-dubrava avatar naxmefy avatar raccoondev avatar rravishankar avatar sajattack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

golang-web-dev's Issues

panic: pq: password authentication failed for user "bond"

I keep getting the following error: panic: pq: password authentication failed for user "bond"

I cannot find what's wrong with the code, as it's the one that was used in the course, and in the course it ran perfectly.
Can you find the problem?

GO CODE:

package main

import (
"database/sql"
"fmt"

_ "github.com/lib/pq"

)

func main() {
db, err := sql.Open("postgres", "postgres://bond:password@localhost/bookstore?sslmode=disable")
if err != nil {
panic(err)
}
defer db.Close()

err = db.Ping() //"Ping" checks if a connection to a database is still live, and returns an error if it isnt (so if theres no error it means its connected).
if err != nil {
	panic(err)
}
fmt.Println("You've connected to your database")

}

postgreSQL CODE:

postgres=# CREATE DATABASE bookstore;
CREATE DATABASE
postgres=# CREATE USER bond WITH PASSWORD 'password';
CREATE ROLE
postgres=# GRANT ALL PRIVILEGES ON DATABASE bookstore to bond;
GRANT

package github.com/GoesToEleven/golang-web-dev: exit status 128 because of EoF error

When trying to go get or git clone this repo I get the following errors

Cloning into 'C:\GoWorkspace\src\github.com\GoesToEleven\golang-web-dev'...
fatal: early EOF
fatal: the remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
package github.com/GoesToEleven/golang-web-dev: exit status 128

I tried to goolge around on this but didn't get very far is it something that can be fixed ay the repo end . Thanks

I'm having trouble in connecting html, go and postgresql simultaneously.

Can anyone Update the code in 44th folder. I'm having trouble in connecting in these three simultaneously. When I try to connect go and html, it works fine. When I try to connect go and postgresql it works fine but doesnt work simultaneously. I get this error when i try curl -i localhost:8080/books after running the go file. Here's th error:
http: panic serving 127.0.0.1:56720: runtime error: invalid memory address or nil pointer dereference follwed by a 2 page of some errors

i think i am doing somthing wrong

ishwar@warewolf:/crud$ go run main.go

command-line-arguments

./main.go:13:28: undefined: books
./main.go:15:33: undefined: books
./main.go:16:35: undefined: books
./main.go:17:43: undefined: books
./main.go:18:35: undefined: books
./main.go:19:43: undefined: books
./main.go:20:43: undefined: books

Inquiry about Project Maintenance and Pull Requests

Hi,

I have some updates to the code that I'd like to contribute. However, I couldn't find any recent activity on the repository, and I wanted to confirm whether the project is still actively maintained.

Could you please provide some information on the current status of the project and whether contributions are welcome? I'd appreciate any guidance on how to proceed.

Thank you for your time!

Use existing cookie to authenticate an API request

Is there any way to authenticate using existing cookie and gets details from the API request? I am very new to golang, Also went through the Chapter 29 but couldn't relate to the case I am working on. If you have reading on that can you please point it out?

My Case:
I want to connect to the REST API of remote server via golang. However the authentication to the api is via cookie only. So need to pass the existing cookie information to get authenticated and pull out the details.

012_hands-on/04_solution/03/main.go : minor data coding error

In the data definitions for this solution, each region has its own title (e.g., 'Northern', 'Central', but the region values are all coded as 'southern' in the data structure. For example:

		region{
			Region: "Northern",
			Hotels: []hotel{
				hotel{
					Name:    "Hotel California",
					Address: "42 Sunset Boulevard",
					City:    "Los Angeles",
					Zip:     "95612",
					Region:  "southern",   <!-- s/b northern -->
				},
				hotel{
					Name:    "H",
					Address: "4",
					City:    "L",
					Zip:     "95612",
					Region:  "southern",  <!-- s/b northern -->
				},
			},
		},

Session signup can't find session.go func methods "getUser" , "alreadyLoggedIn" 030sessions 03_signup

Hi Todd,

if I run the code as is then i get this error back on the command line:

# command-line-arguments
./main.go:33:7: undefined: getUser
./main.go:38:7: undefined: getUser
./main.go:39:6: undefined: alreadyLoggedIn
./main.go:47:5: undefined: alreadyLoggedIn

I know you deliberately wanted to keep session.go separate but I can only get this e.g. to work if i copy and paste the 2 funcs "getUser" and "alreadyLoggedIn" and place them in main.go while commenting out session.go completely.

have fun voting today & keep up the good work,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.