{"modulePath":"github.com/oapi-codegen/oapi-codegen-exp/experimental","version":"v0.0.0-20260413235603-d24950bd28cc","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package runtimeextract\n\nPackage runtimeextract reads Go source files from the embedded runtime FS and extracts code bodies for inlining into generated output or assembling into standalone runtime packages.\n\n## Constants\n\n```go\nconst RuntimeModulePrefix = \"github.com/oapi-codegen/oapi-codegen-exp/experimental/codegen/internal/runtime/\"\n```\nRuntimeModulePrefix is the import path prefix for the internal runtime sub-packages. Used by the extractor to strip internal imports when inlining, and by the runtime generator to rewrite them to the target base path.\n\n## Types\n\n```go\ntype Import struct {\n\tPath  string\n\tAlias string\n}\n```\nImport represents a Go import with optional alias.\n\n```go\nfunc ExtractAllInline(fsys fs.FS) (code string, imports []Import, err error)\n```\nExtractAllInline reads ALL runtime .go files (types/\\*, params/\\*, helpers/\\*), strips package qualifiers for inlining (types.Date → Date, etc.), merges imports, and returns a single code body ready to be inserted into a generated file. Internal runtime import paths are removed from the import list.\n\nThe returned code is wrapped in marker comments so the DCE pass can identify which declarations are runtime candidates.\n\n```go\nfunc ExtractPackage(fsys fs.FS, dir string) (code string, imports []Import, err error)\n```\nExtractPackage reads all .go files from a sub-directory of the given FS that contain an //oapi-runtime:function annotation and returns the concatenated code bodies and merged imports. No qualifier substitution is performed — the output is suitable for a standalone runtime package.\n\n","path":"github.com/oapi-codegen/oapi-codegen-exp/experimental/codegen/internal/runtimeextract","name":"runtimeextract","synopsis":"Package runtimeextract reads Go source files from the embedded runtime FS and extracts code bodies for inlining into generated output or assembling into standalone runtime packages.","isRedistributable":true}
