@@ -5,6 +5,7 @@ package casparser
55import (
66 "context"
77 "net/http"
8+ "slices"
89 "time"
910
1011 "github.com/CASParser/cas-parser-go/internal/apijson"
@@ -37,7 +38,7 @@ func NewCasParserService(opts ...option.RequestOption) (r CasParserService) {
3738// Statement) PDF files and returns data in a unified format. Use this endpoint
3839// when you know the PDF is from CAMS or KFintech.
3940func (r * CasParserService ) CamsKfintech (ctx context.Context , body CasParserCamsKfintechParams , opts ... option.RequestOption ) (res * UnifiedResponse , err error ) {
40- opts = append (r .Options [:] , opts ... )
41+ opts = slices . Concat (r .Options , opts )
4142 path := "v4/cams_kfintech/parse"
4243 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
4344 return
@@ -47,7 +48,7 @@ func (r *CasParserService) CamsKfintech(ctx context.Context, body CasParserCamsK
4748// files and returns data in a unified format. Use this endpoint when you know the
4849// PDF is from CDSL.
4950func (r * CasParserService ) Cdsl (ctx context.Context , body CasParserCdslParams , opts ... option.RequestOption ) (res * UnifiedResponse , err error ) {
50- opts = append (r .Options [:] , opts ... )
51+ opts = slices . Concat (r .Options , opts )
5152 path := "v4/cdsl/parse"
5253 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
5354 return
@@ -57,7 +58,7 @@ func (r *CasParserService) Cdsl(ctx context.Context, body CasParserCdslParams, o
5758// files and returns data in a unified format. Use this endpoint when you know the
5859// PDF is from NSDL.
5960func (r * CasParserService ) Nsdl (ctx context.Context , body CasParserNsdlParams , opts ... option.RequestOption ) (res * UnifiedResponse , err error ) {
60- opts = append (r .Options [:] , opts ... )
61+ opts = slices . Concat (r .Options , opts )
6162 path := "v4/nsdl/parse"
6263 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
6364 return
@@ -68,7 +69,7 @@ func (r *CasParserService) Nsdl(ctx context.Context, body CasParserNsdlParams, o
6869// CAS type and transforms the data into a consistent structure regardless of the
6970// source.
7071func (r * CasParserService ) SmartParse (ctx context.Context , body CasParserSmartParseParams , opts ... option.RequestOption ) (res * UnifiedResponse , err error ) {
71- opts = append (r .Options [:] , opts ... )
72+ opts = slices . Concat (r .Options , opts )
7273 path := "v4/smart/parse"
7374 err = requestconfig .ExecuteNewRequest (ctx , http .MethodPost , path , body , & res , opts ... )
7475 return
0 commit comments