Get returns the value of the property with the given name.
(name string)
| 368 | |
| 369 | // Get returns the value of the property with the given name. |
| 370 | func (v *Value) Get(name string) *Value { |
| 371 | if !v.hasValidContext() { |
| 372 | return nil |
| 373 | } |
| 374 | var namePtr *C.char |
| 375 | if len(name) > 0 { |
| 376 | namePtr = (*C.char)(unsafe.Pointer(unsafe.StringData(name))) |
| 377 | } |
| 378 | return &Value{ctx: v.ctx, ref: C.GetPropertyByNameLen(v.ctx.ref, v.ref, namePtr, C.size_t(len(name)))} |
| 379 | } |
| 380 | |
| 381 | // GetIdx returns the value of the property with the given index. |
| 382 | func (v *Value) GetIdx(idx int64) *Value { |