Guest User

Untitled

a guest
Dec 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. package main
  2.  
  3. import (
  4. "fmt"
  5. "strconv"
  6. )
  7.  
  8. func main() {
  9. intToString()
  10. }
  11.  
  12.  
  13. func intToString() {
  14. // create an int
  15. num := 747
  16. // try to convert int to string
  17. str := strconv.Itoa(num)
  18. // here we using PrintF so we can show the value of the string and data type
  19. fmt.Printf("%v - %T\n", str, str)
  20. }
Add Comment
Please, Sign In to add comment