Left: | ||
Right: |
OLD | NEW |
---|---|
1 // skip # used by private.go | 1 // skip # used by private.go |
iant
2012/10/10 20:08:00
You can remove the // skip comment.
remyoudompheng
2012/10/10 20:35:40
Done.
| |
2 | 2 |
3 // Copyright 2011 The Go Authors. All rights reserved. | 3 // Copyright 2011 The Go Authors. All rights reserved. |
4 // Use of this source code is governed by a BSD-style | 4 // Use of this source code is governed by a BSD-style |
5 // license that can be found in the LICENSE file. | 5 // license that can be found in the LICENSE file. |
6 | 6 |
7 // Imported by private.go, which should not be able to see the private method. | 7 // Imported by private.go, which should not be able to see the private method. |
8 | 8 |
9 package p | 9 package p |
10 | 10 |
11 type Exported interface { | 11 type Exported interface { |
12 private() | 12 private() |
13 } | 13 } |
14 | 14 |
15 type Implementation struct{} | 15 type Implementation struct{} |
16 | 16 |
17 func (p *Implementation) private() {} | 17 func (p *Implementation) private() {} |
18 | 18 |
19 var X = new(Implementation) | 19 var X = new(Implementation) |
20 | 20 |
OLD | NEW |