1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
7 func itoa(val
int) string { // do it here rather than with fmt to avoid dependency
9 return "-" + itoa(-val
)
11 var buf
[32]byte // big enough for int64
14 buf
[i
] = byte(val%10
+ '0')
18 buf
[i
] = byte(val
+ '0')
19 return string(buf
[i
:])