by borman@google.com:
What steps will reproduce the problem?
Use /* */ for block comments. Example:
func f() {
/*
* don't do this right now
fmt.Printf(`a
multi-line
string`)
*/
return
}
Gofmt alters the content of the comment (which includes the /* and */). The first time
gofmt is called it produces:
func f() {
/*
* don't do this right now
fmt.Printf(`a
multi-line
string`)
*/
return
}
and if called again it produces:
func f() {
/*
* don't do this right now
fmt.Printf(`a
multi-line
string`)
*/
return
}
gofmt should not have altered the comment in the first place. The /* was indented
correctly up front.
by borman@google.com:
What steps will reproduce the problem? Use /* */ for block comments. Example: func f() { /* * don't do this right now fmt.Printf(`a multi-line string`) */ return } Gofmt alters the content of the comment (which includes the /* and */). The first time gofmt is called it produces: func f() { /* * don't do this right now fmt.Printf(`a multi-line string`) */ return } and if called again it produces: func f() { /* * don't do this right now fmt.Printf(`a multi-line string`) */ return } gofmt should not have altered the comment in the first place. The /* was indented correctly up front.