Skip to content

Commit

Permalink
Remove panic from gcp options (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
ktong authored Feb 26, 2024
1 parent b96071f commit 8497a5f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 59 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.2] - 2024-02-26

### Removed
- Remove panic from gcp options (#23).

## [0.2.1] - 2024-02-25

### Changed
Expand Down
8 changes: 0 additions & 8 deletions gcp/option.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ func WithWriter(writer io.Writer) Option {
// [trace information]: https://cloud.google.com/trace/docs/trace-log-integration
// [GCP Cloud Trace]: https://cloud.google.com/trace
func WithTrace(project string) Option {
if project == "" {
panic("cannot add trace information with empty project")
}

return func(options *options) {
options.project = project
}
Expand All @@ -60,10 +56,6 @@ func WithTraceContext(provider func(context.Context) (traceID [16]byte, spanID [
// [error events]: https://cloud.google.com/error-reporting/docs/formatting-error-messages
// [GCP Error Reporting]: https://cloud.google.com/error-reporting
func WithErrorReporting(service, version string) Option {
if service == "" {
panic("cannot add error information with empty service")
}

return func(options *options) {
options.service = service
options.version = version
Expand Down
51 changes: 0 additions & 51 deletions gcp/option_test.go

This file was deleted.

0 comments on commit 8497a5f

Please sign in to comment.