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
+5.6k PHP : Convert CSV to JSON with YQL example
+6.3k Golang : Selection sort example
+13.9k Golang : convert(cast) string to float value
+11.9k Golang : Setup API server or gateway with Caddy and http.ListenAndServe() function example
+7.3k Golang : How to iterate a slice without using for loop?
+9.2k Golang : Generate Codabar
+28.8k Golang : Detect (OS) Operating System
+29.5k Golang : Login(Authenticate) with Facebook example
+11.3k Golang : Byte format example
+29.9k Golang : How to get HTTP request header information?
+11k Golang : Generate random elements without repetition or duplicate
+7k Web : How to see your website from different countries?