Start refactor how qemu-system commands are built
This commit is contained in:
parent
153d1b5e1f
commit
fc7fe2e6c0
8 changed files with 427 additions and 0 deletions
15
utils/int.go
Normal file
15
utils/int.go
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package utils
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"golang.org/x/exp/constraints"
|
||||
)
|
||||
|
||||
func IntToStr[T constraints.Signed](v T) string {
|
||||
return strconv.FormatInt(int64(v), 10)
|
||||
}
|
||||
|
||||
func UintToStr[T constraints.Unsigned](v T) string {
|
||||
return strconv.FormatUint(uint64(v), 10)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue