fmt.print参数规约
printf输出规约是按照预定义好的参数格式输出的,参数和对应说明如下表所示。
parameter | description |
---|---|
%d | decimal integer |
%x, %o, %b | integer in hexade cimal, octal, binar y |
%f, %g, %e | floating-p oint number: 3.141593 3.141592653589793 3.141593e+00 |
%t | boole an: true or false |
%c | rune (Unico de co de point) |
%s | string |
%q | quoted str ing “abc” or rune ‘c’ |
%v | any value in a natural format |
%T | type of any value |
%% | literal percent sig n (no operand) |
@author weixin public account