Golang go/ast.BranchStmt type example
package go/ast
A BranchStmt node represents a break, continue, goto, or fallthrough statement.
Golang go/ast.BranchStmt type usage example
func NodeDescription(n ast.Node) string {
switch n := n.(type) {
case *ast.ArrayType:
return "array type"
case *ast.AssignStmt:
return "assignment"
case *ast.BranchStmt:
switch n.Tok {
case token.BREAK:
return "break statement"
case token.CONTINUE:
return "continue statement"
case token.GOTO:
return "goto statement"
case token.FALLTHROUGH:
return "fall-through statement"
}
...
}
Reference :
Advertisement
Something interesting
Tutorials
+14.9k Golang : Submit web forms without browser by http.PostForm example
+40.5k Golang : Convert to io.ReadSeeker type
+12.3k Golang : Get month name from date example
+12.7k Golang : Remove or trim extra comma from CSV
+16.6k Golang : Merge video(OpenCV) and audio(PortAudio) into a mp4 file
+11.8k Golang : Verify Linux user password again before executing a program example
+7k Web : How to see your website from different countries?
+4.1k Javascript : Empty an array example
+8.6k Golang : Add text to image and get OpenCV's X, Y co-ordinates example
+9.9k Golang : Check if user agent is a robot or crawler example
+5.9k Golang : Generate multiplication table from an integer example
+11.7k Golang : Gorilla web tool kit secure cookie example