The Go Programming Language

Source file doc/progs/strings.go

     1	// Copyright 2009 The Go Authors. All rights reserved.
     2	// Use of this source code is governed by a BSD-style
     3	// license that can be found in the LICENSE file.
     4	
     5	package main
     6	
     7	import "os"
     8	
     9	func main() {
    10		s := "hello"
    11		if s[1] != 'e' {
    12			os.Exit(1)
    13		}
    14		s = "good bye"
    15		var p *string = &s
    16		*p = "ciao"
    17	}

release.r60.3. Except as noted, this content is licensed under a Creative Commons Attribution 3.0 License.