1
0
mirror of https://github.com/MADTeacher/go_basics.git synced 2025-11-23 21:34:47 +02:00
Files
go_basics/part_1/1.13/9.go
Stanislav Chernyshev 957812f20b 2-е издание
2025-08-09 10:53:13 +03:00

15 lines
222 B
Go

package main
import "fmt"
func main() {
str1 := "hello"
fmt.Println(str1) // hello
byteArray := []byte(str1)
fmt.Println(byteArray) // [104 101 108 108 111]
str2 := string(byteArray)
fmt.Println(str2) // hello
}