Every line of 'golang function' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Go code is secure.
119 func (mv *mooncakeVisitor) VisitFunction(ctx *parser.FunctionContext) interface{} { 120 log.Printf("VisitFunction - %v", ctx.GetText()) 121 return mv.Visit(ctx) 122 }
1353 func translateFunc(ut ut.Translator, fe validator.FieldError) string { 1354 1355 t, err := ut.T(fe.Tag(), fe.Field()) 1356 if err != nil { 1357 log.Printf("警告: 翻译字段错误: %#v", fe) 1358 return fe.(error).Error() 1359 } 1360 1361 return t 1362 }
94 func (v *Basegrulev3Visitor) VisitFunctionCall(ctx *FunctionCallContext) interface{} { 95 return v.VisitChildren(ctx) 96 }
182 func (u utils) function() string { 183 return functionRegex.ReplaceAllString(u.GoSyntax, "_") 184 }
127 func (s *ParseContext) Function() IFunctionContext { 128 var t = s.GetTypedRuleContext(reflect.TypeOf((*IFunctionContext)(nil)).Elem(), 0) 129 130 if t == nil { 131 return nil 132 } 133 134 return t.(IFunctionContext) 135 }
68 func (self *luaState) ToGoFunction(index int) GoFunction { 69 val := self.stack.get(index) 70 switch x := val.(type) { 71 case GoFunction: 72 return x 73 default: 74 return nil 75 } 76 }
144 func (o *Object) FunctionValue() FuncStub { 145 contract.Assertf(o.value != nil, "Expected Function object to carry a Value; got nil") 146 r, ok := o.value.(FuncStub) 147 contract.Assertf(ok, "Expected Function object's Value to be a Function") 148 return r 149 }
9 func fn2(x int) bool { 10 println(x) 11 if x > 10 { 12 return true 13 } 14 return fn2(x + 1) 15 }