Skip to content

Commit

Permalink
minor corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
javierdelapuente committed Oct 4, 2024
1 parent cbce355 commit c810f0f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/code/go/main.go.time
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func helloWorldHandler(w http.ResponseWriter, req *http.Request) {
func timeHandler(w http.ResponseWriter, req *http.Request) {
log.Printf("new time request")
now := time.Now()
fmt.Println(w, now.Format("2006/01/02 15:04:05") + "\n")
fmt.Fprintf(w, now.Format("2006-01-02 15:04:05") + "\n")
}

func main() {
Expand Down
1 change: 1 addition & 0 deletions docs/tutorial/code/go/task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ execute: |
# [docs:curl-time]
curl --fail localhost:8000/time
# [docs:curl-time-end]
[ "$(curl localhost:8000/time)" != "Hello, world!" ]
# [docs:stop-docker-updated]
sudo docker stop go-hello-world
Expand Down
4 changes: 2 additions & 2 deletions docs/tutorial/go.rst
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ The updated application should respond with the current date and time (e.g.

.. note::

If you are getting a ``404`` for the ``/time`` endpoint, check the
:ref:`troubleshooting-go` steps below.
If you are not getting the current date and time from the ``/time`` endpoint,
check the :ref:`troubleshooting-go` steps below.


Cleanup
Expand Down

0 comments on commit c810f0f

Please sign in to comment.