github.com/egonelbre/exp@v0.0.0-20240430123955-ed1d3aa93911/const/main.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  )
     6  
     7  var (
     8  	_            = Const(&exampleTable)
     9  	exampleTable = []int{
    10  		1, 2, 3, 4, 5, 6,
    11  	}
    12  )
    13  
    14  func main() {
    15  	fmt.Println(exampleTable)
    16  	exampleTable[2] = 123
    17  	fmt.Println(exampleTable[2])
    18  }