HOME/Articles/

Golang golang-slice (snippet)

Article Outline

Go programming example 'golang-slice'

golang-slice

Golang beginners example: golang-slice

package main

// import required modules
import (
    "fmt"
)

// main function
func main() {
    var str string = "Lorem ipsum dolor sit amet"
    fmt.Println(str[6:11])
}