Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
2aae3fcb
Commit
2aae3fcb
authored
Mar 08, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix grammar for struct and interface types to make final semicolon optional
SVN=111810
parent
e6626daf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
go_lang.txt
doc/go_lang.txt
+4
-4
No files found.
doc/go_lang.txt
View file @
2aae3fcb
...
...
@@ -601,8 +601,8 @@ Struct types are similar to C structs.
Each field of a struct represents a variable within the data
structure.
StructType = 'struct' '{'
{ FieldDecl }
'}' .
FieldDecl = IdentifierList Type
';'
.
StructType = 'struct' '{'
[ FieldDecl { ';' FieldDecl } [ ';' ] ]
'}' .
FieldDecl = IdentifierList Type .
// An empty struct.
struct {}
...
...
@@ -768,8 +768,8 @@ Interface types
An interface type denotes a set of methods.
InterfaceType = 'interface' '{'
{ MethodDecl }
'}' .
MethodDecl = identifier Parameters [ Result ]
';'
.
InterfaceType = 'interface' '{'
[ MethodDecl { ';' MethodDecl } [ ';' ] ]
'}' .
MethodDecl = identifier Parameters [ Result ] .
// A basic file interface.
type File interface {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment