We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
LoadSplitSpec
1 parent 321bac1 commit 16505d1Copy full SHA for 16505d1
btf/btf.go
@@ -500,6 +500,20 @@ func (s *Spec) TypeByName(name string, typ interface{}) error {
500
return nil
501
}
502
503
+// LoadSplitSpec loads split BTF from the given file.
504
+//
505
+// Types from base are used to resolve references in the split BTF.
506
+// The returned Spec only contains types from the split BTF, not from the base.
507
+func LoadSplitSpec(file string, base *Spec) (*Spec, error) {
508
+ fh, err := os.Open(file)
509
+ if err != nil {
510
+ return nil, err
511
+ }
512
+ defer fh.Close()
513
+
514
+ return LoadSplitSpecFromReader(fh, base)
515
+}
516
517
// LoadSplitSpecFromReader loads split BTF from a reader.
518
//
519
// Types from base are used to resolve references in the split BTF.
0 commit comments