Hi new in Go and am using the ebook (and excercises) from
http://www.miek.nl/downloads/Go/Learning-Go-latest.pdf. And am still at chapter 1.
Though am getting the error ... when running go run adrihello.go.
[root@localhost GoTutorial]# go run adrihello.go
# command-line-arguments
./adrihello.go:8: non-name c[0] on left side of :=
[root@localhost GoTutorial]#
And here is the code
[root@localhost GoTutorial]# cat adrihello.go
package main
import "fmt"
func main() {
s := "hello";
c := []rune(s);
c[0] := 'c';
s2 := string(c);
fmt.Printf("%s\n", s2);
}
[root@localhost GoTutorial]#
Thanks and really appreciate for the time and assistance.
Regards,
SGTItlog