Skip to content

suggestion for add testit on sample code in doc/progs/strings.go #1455

@dlintw

Description

@dlintw
The source code of tutorial were put on doc/progs.
I found there is a unix script run which could do simple unit test.
But, there are only part source code have testit.
I suggest let all source code have some output, and unittest.
Otherwise, there is at least one source code can not build now.

What steps will reproduce the problem?
1. 8g /opt/go/doc/progs/strings.go

What is the expected output?

without compile error

What do you see instead?
strings.go:7: imported and not used: fmt

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
linux i686

Which revision are you using?  (hg identify)
6789

Please provide any additional information below.
I put my patch file here.

Attachments:

  1. dlin_patch.tar.gz (1237 bytes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions