Skip to content

x/website: wrong url in web-service-gin tutorial #72941

@ravipatelctf

Description

@ravipatelctf

What is the URL of the page with the issue?

https://go.dev/doc/tutorial/web-service-gin

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36

Screenshot

Image

What did you do?

When running the following command to create a new JSON entry , I got an error:

command :

$ curl http://localhost:8080/albums
--include
--header "Content-Type: application/json"
--request "POST"
--data '{"id": "4","title": "The Modern Sound of Betty Carter","artist": "Betty Carter","price": 49.99}'

Error :

$: command not found

/fix : In the above command

Replace

$ curl http://localhost:8080/albums \

with following

$ curl http://localhost:8080/albums/:id \

What did you expect to see?

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Date: Wed, 19 Mar 2025 05:01:50 GMT
Content-Length: 116

{
"id": "4",
"title": "The Modern Sound of Betty Carter",
"artist": "Betty Carter",
"price": 49.99
}

What did you see instead?

$: command not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.website

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions