Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated code #790

Merged
merged 2 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions builtin/json.go

This file was deleted.

15 changes: 0 additions & 15 deletions option.go
Original file line number Diff line number Diff line change
Expand Up @@ -755,18 +755,6 @@ func WaitTimeout(d time.Duration) Option {
}
}

// HTTPOpenApi3 - Set the path of OpenAPI Document for HTTP runners.
// Deprecated: Use HTTPOpenApi3s instead.
func HTTPOpenApi3(l string) Option {
return func(bk *book) error {
if bk == nil {
return ErrNilBook
}
bk.openApi3DocLocations = []string{l}
return nil
}
}

// HTTPOpenApi3s - Set the path of OpenAPI Document for HTTP runners.
func HTTPOpenApi3s(locations []string) Option {
return func(bk *book) error {
Expand Down Expand Up @@ -1077,8 +1065,6 @@ func setupBuiltinFunctions(opts ...Option) []Option {
// NOTE: Please add here the built-in functions you want to enable.
Func("url", func(v string) *url.URL { return builtin.Url(v) }),
Func("urlencode", url.QueryEscape),
Func("base64encode", func(v any) string { panic("base64encode() is deprecated. Use toBase64() instead.") }),
Func("base64decode", func(v any) string { panic("base64decode() is deprecated. Use fromBase64() instead.") }),
Func("bool", func(v any) bool { return cast.ToBool(v) }),
Func("time", builtin.Time),
Func("compare", builtin.Compare),
Expand All @@ -1102,7 +1088,6 @@ func setupBuiltinFunctions(opts ...Option) []Option {
}),
Func("basename", filepath.Base),
Func("faker", builtin.NewFaker()),
Func("json", builtin.NewJSON()),
},
opts...,
)
Expand Down
2 changes: 0 additions & 2 deletions option_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -923,8 +923,6 @@ func TestSetupBuiltinFunctions(t *testing.T) {
}{
{"url"},
{"urlencode"},
{"base64encode"},
{"base64decode"},
{"bool"},
{"time"},
{"compare"},
Expand Down