github.com/ipld/go-ipld-prime@v0.21.0/fluent/doc.go (about) 1 /* 2 The fluent package offers helper utilities for using NodeAssembler 3 more tersely by providing an interface that handles all errors for you, 4 and allows use of closures for any recursive assembly 5 so that creating trees of data results in indentation for legibility. 6 7 Note that the fluent package creates wrapper objects in order to provide 8 the API conveniences that it does, and this comes at some cost to performance. 9 If you're optimizing for performance, using some of the features of the 10 fluent package may be inadvisable (and some moreso than others). 11 However, as with any performance questions, benchmark before making decisions; 12 its entirely possible that your performance bottlenecks will be elsewhere 13 and there's no reason to deny yourself syntactic sugar if the costs don't 14 detectably affect the bottom line. 15 Various feature of the package will also attempt to document how costly they are in relative terms 16 (e.g. the fluent.Reflect helper methods are very costly; 17 */ 18 package fluent