Appendix F: Self-referential options

June 24, 2025 ยท View on GitHub

This appendix covers Rob Pike's self-referential options pattern and compares it with other approaches.

Sections

Section 1: Struct options

  • This section has no listings.

Section 2: Option functions

  • Listing F.1: Using option functions
  • Listing F.2: Declaring options
  • Listing F.3: Applying options

Contents

  1. 1Sections
  2. 1.1Section 1: Struct options
  3. 1.2Section 2: Option functions