Skip to content

x/website: Getting started tutorial errors out on TLS handshake due to out of date package #59259

@Jesse-Culver

Description

@Jesse-Culver

The "Tutorial: Get started with Go" recommends the wrong package version of rsc.io/quote. Using the standard 1.5.2 version results in TLS handshake errors. Switching to v4 gives the expected results.

Related Issues

#51188

Raised this as a separate issue as that issue is in regards to the wording surrounding searching for the package. This issue is in regards to the code now completely failing to work as it is written in the tutorial.

What is the URL of the page with the issue?

https://golang.google.cn/doc/tutorial/getting-started

What is your user agent?

Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0

Screenshot

Website:
image
Terminal trying v1.5.2 of risc.io/quote showing error out on mod tidy
image
Terminal trying v4 and it successfully downloading and executing the program
image

Code

Original Code:

package main

import "fmt"

import "rsc.io/quote"

func main() {
    fmt.Println(quote.Go())
}

Changed Code:

package main

import "fmt"

import "rsc.io/quote/v4"

func main() {
    fmt.Println(quote.Go())
}

Go Version

go version go1.20.2 linux/amd64

OS

Ubuntu 20.04.6 LTS running under WSL

What did you do?

Followed the tutorial as it was written. Adding /v4 to the import and rerunning mod tidy corrected the error.

What did you expect to see?

Mod tidy should have executed with downloading the module.

What did you see instead?

Mod tidy error-ed out a TLS handshake.

Error Messages Seen

rsc.io/quote: rsc.io/quote@v1.5.2: verifying module: rsc.io/quote@v1.5.2: Get "https://sum.golang.org/lookup/rsc.io/quote@v1.5.2": remote error: tls: handshake failure

rsc.io/quote: module rsc.io/quote: Get "https://proxy.golang.org/rsc.io/quote/@v/list": remote error: tls: handshake failure

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions