How to modify a slice element which is a struct in golang?
Try
s[0].value = 5
This gets to the backing store of the slice. Also
p := &s[1]
p.value = 6
You can also take the address of the slice element directly and de-reference it:
func main() {
s := []Type{{0}, {0}}
// Prints [{0} {0}]
fmt.Println(s)
// De-reference the address of the slice element
(&s[0]).value = 5
// Prints [{5} {0}]
fmt.Println(s)
}