## Overview Implement the new `ParseOptions` structure and update all parser APIs to accept it as part of gofeed v2. ## Tasks - [ ] Create `ParseOptions` struct with the following fields: - `KeepOriginalFeed bool` - Retain reference to original format-specific feed - `StrictnessOptions` - Sub-struct for parsing strictness controls - `RequestOptions` - HTTP request configuration for ParseURL - `UserAgent string` - `Timeout time.Duration` - `IfNoneMatch string` (ETag support) - `IfModifiedSince time.Time` (conditional requests) - `Client *http.Client` (custom HTTP client support) - Other parsing toggles (e.g., `ParseDates bool`) - [ ] Update universal parser (`gofeed.Parser`) methods: - `Parse(io.Reader, *ParseOptions) (*Feed, error)` - `ParseURL(string, *ParseOptions) (*Feed, error)` - `ParseString(string, *ParseOptions) (*Feed, error)` - [ ] Implement `DefaultParseOptions()` function for common use cases ## Related Issues - #199 (MaxItems support) - #111 (Conditional requests) - #165 (Proxy/custom HTTP client support) - #229, #235 (KeepOriginalFeed) ## Parent Issue - #241 (RFC: gofeed v2)
Overview
Implement the new
ParseOptionsstructure and update all parser APIs to accept it as part of gofeed v2.Tasks
Create
ParseOptionsstruct with the following fields:KeepOriginalFeed bool- Retain reference to original format-specific feedStrictnessOptions- Sub-struct for parsing strictness controlsRequestOptions- HTTP request configuration for ParseURLUserAgent stringTimeout time.DurationIfNoneMatch string(ETag support)IfModifiedSince time.Time(conditional requests)Client *http.Client(custom HTTP client support)ParseDates bool)Update universal parser (
gofeed.Parser) methods:Parse(io.Reader, *ParseOptions) (*Feed, error)ParseURL(string, *ParseOptions) (*Feed, error)ParseString(string, *ParseOptions) (*Feed, error)Implement
DefaultParseOptions()function for common use casesRelated Issues
Parent Issue