fern-api / fern

Input OpenAPI. Output SDKs and Docs.
https://buildwithfern.com
Apache License 2.0
2.68k stars 151 forks source link

feat(go): Improve internal package layout #5186

Closed amckinney closed 6 days ago

amckinney commented 6 days ago

This adds an internal package, which now contains the internal functionality previously included in the core package (e.g. core.Caller -> internal.Caller). The new file layout is shown below:

.
├── core
│   ├── api_error.go
│   ├── http.go
│   ├── page.go
│   ├── request_option.go
│   └── stream.go
└── internal
    ├── caller.go
    ├── caller_test.go
    ├── extra_properties.go
    ├── extra_properties_test.go
    ├── http.go
    ├── multipart.go
    ├── multipart_test.go
    ├── pager.go
    ├── query.go
    ├── query_test.go
    ├── retrier.go
    ├── retrier_test.go
    ├── streamer.go
    ├── stringer.go
    └── time.go

Although technically a breaking change in terms of the module itself, this change was always the intention, and should have zero impact on users. Any core type that is meant for public consumption remains in the exported core package (e.g. core.APIError and core.RequestOption).

github-actions[bot] commented 6 days ago

🌿 Preview your docs: https://fern-preview-8d59671b-c2f7-43f9-ac0f-a7f8c0a55a17.docs.buildwithfern.com/learn