We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main
import ( "fmt" "github.com/kr/pretty" )
type Foo struct { S []string }
func main() { actual := Foo{ S: []string{"a", "b", "c"}, }
fmt.Println(pretty.Sprint(actual)) /* Prints: main.Foo{ S: {"a", "b", "c"}, } */ // Would error: /* result := Foo{ S: {"a", "b", "c"}, } */
}
The text was updated successfully, but these errors were encountered:
The output of this package is for humans, not compilers.
I admit, this purpose isn't clearly stated anywhere. I consider this a documentation bug.
Sorry, something went wrong.
I've been using this package to print complex objects, visually verify them, and copy-paste them into a unit test as an expected result.
Would you accept a PR for this, or should I fork the repo for my needs? On Jun 22, 2016 3:21 PM, "Keith Rarick" notifications@github.com wrote:
The output of this package is for humans, not compilers. I admit, this purpose isn't clearly stated anywhere. I consider this a documentation bug. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub #36 (comment), or mute the thread https://github.com/notifications/unsubscribe/AB1OLsPK7E1kRoPi4NftgQbAo-Y_pnWYks5qObVTgaJpZM4I8QXL .
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub #36 (comment), or mute the thread https://github.com/notifications/unsubscribe/AB1OLsPK7E1kRoPi4NftgQbAo-Y_pnWYks5qObVTgaJpZM4I8QXL .
Successfully merging a pull request may close this issue.
package main
import (
"fmt"
"github.com/kr/pretty"
)
type Foo struct {
S []string
}
func main() {
actual := Foo{
S: []string{"a", "b", "c"},
}
}
The text was updated successfully, but these errors were encountered: