k0kubun/pp

Printf not work correctly

aj3423 opened this issue · 1 comments

func main() {
	pp.Printf("%d", 123)
	fmt.Println()
}

The code outputs

%!d(string=123)

I'm using the latest version: v3.1.1-0.20220216035903-af1e26e8087e

It might feel weird (please feel free to submit a pull request to correct the document or fix it if you think it's possible) but this is actually intentional. The format is supposed to take only %s. Because pp always interprets a type and the conversion outcome is always %s, there's actually no motivation to support specifiers other than %s.