2008-09-11 10:21:02 -07:00
|
|
|
// Copyright 2009 The Go Authors. All rights reserved.
|
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
2009-03-18 14:09:16 -07:00
|
|
|
import "fmt"
|
2009-05-08 15:21:41 -07:00
|
|
|
import "os"
|
2009-03-18 14:09:16 -07:00
|
|
|
|
2008-09-11 10:21:02 -07:00
|
|
|
func main() {
|
2009-12-16 10:29:53 +11:00
|
|
|
s := "hello"
|
2009-10-13 12:37:04 -07:00
|
|
|
if s[1] != 'e' { os.Exit(1) }
|
2009-12-16 10:29:53 +11:00
|
|
|
s = "good bye"
|
|
|
|
|
var p *string = &s
|
|
|
|
|
*p = "ciao"
|
2008-09-11 10:21:02 -07:00
|
|
|
}
|