Every line of 'bhop bind' 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.
33 func (this *AbstractBootstrap) Bind0(local net.Addr, remote net.Addr) { 34 35 }
37 func (b *TLSBinder) Bind(rawOpts interface{}) (net.Listener, string, error) { 38 var opts proto.TLSOptions 39 if err := proto.UnpackInterfaceField(rawOpts, &opts); err != nil { 40 return nil, "", err 41 } 42 43 return b.BindOpts(&opts) 44 }
155 func (b *bound) bind(c Cell) binding { 156 if c == b.s { 157 return b 158 } 159 return NewBound(b.r, c) 160 }
103 func (b *Bound) Bind(c Context) Binding { 104 if c == b.context { 105 return b 106 } 107 return NewBound(b.ref, c) 108 }
131 func (bb FlagBinders) Bind(cmd *cobra.Command, c *Config) { 132 for i := range bb { 133 bb[i](cmd, c) 134 } 135 }
29 func (f *FuncToBool) Bind(args []interface{}) error { 30 if got, want := len(args), 0; got != want { 31 return fmt.Errorf( 32 "rfunc: invalid number of bind arguments (got=%d, want=%d)", 33 got, want, 34 ) 35 } 36 return nil 37 }
84 func (f *FuncF64sToF64s) Bind(args []interface{}) error { 85 if got, want := len(args), 1; got != want { 86 return fmt.Errorf( 87 "rfunc: invalid number of bind arguments (got=%d, want=%d)", 88 got, want, 89 ) 90 } 91 { 92 ptr, ok := args[0].(*[]float64) 93 if !ok { 94 return fmt.Errorf( 95 "rfunc: argument type 0 (name=%s) mismatch: got=%T, want=*[]float64", 96 f.rvars[0], args[0], 97 ) 98 } 99 f.arg0 = ptr 100 } 101 return nil 102 }
314 func (f *FuncF64F64ToBool) Bind(args []interface{}) error { 315 if got, want := len(args), 2; got != want { 316 return fmt.Errorf( 317 "rfunc: invalid number of bind arguments (got=%d, want=%d)", 318 got, want, 319 ) 320 } 321 { 322 ptr, ok := args[0].(*float64) 323 if !ok { 324 return fmt.Errorf( 325 "rfunc: argument type 0 (name=%s) mismatch: got=%T, want=*float64", 326 f.rvars[0], args[0], 327 ) 328 } 329 f.arg0 = ptr 330 } 331 { 332 ptr, ok := args[1].(*float64) 333 if !ok { 334 return fmt.Errorf( 335 "rfunc: argument type 1 (name=%s) mismatch: got=%T, want=*float64", 336 f.rvars[1], args[1], 337 ) 338 } 339 f.arg1 = ptr 340 } 341 return nil 342 }
69 func (f *FuncI64ToI64) Bind(args []interface{}) error { 70 if got, want := len(args), 1; got != want { 71 return fmt.Errorf( 72 "rfunc: invalid number of bind arguments (got=%d, want=%d)", 73 got, want, 74 ) 75 } 76 { 77 ptr, ok := args[0].(*int64) 78 if !ok { 79 return fmt.Errorf( 80 "rfunc: argument type 0 (name=%s) mismatch: got=%T, want=*int64", 81 f.rvars[0], args[0], 82 ) 83 } 84 f.arg0 = ptr 85 } 86 return nil 87 }
113 func Bind(iface, to interface{}) Binding { 114 return Binding{} 115 }