Skip to content

Update the go-version in the example as a string. #24926

@sijysn

Description

@sijysn

Code of Conduct

What article on docs.github.com is affected?

file: https://github.com/github/docs/blob/main/content/actions/automating-builds-and-tests/building-and-testing-go.md
page: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

スクリーンショット 2023-04-07 17 20 40

What changes are you suggesting?

Summary

We should update the go-version in the example as a string.

Before After
1.15 '1.15'

Detail

"go-version" accepts not only strings but also numbers. However, there are some numbers that may not be interpreted correctly.
For example, "1.20" may be interpreted as "1.2". This is because JavaScript omits the last character "0" after the decimal point.
In the current documentation example, "1.15" is written as a number. While numbers are not prohibited, we would prefer developers to write it as a string whenever possible. By writing "1.15" as a string, we hope to implicitly guide developers in that direction.

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions