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

Revert "feat: export event regex utility" #163

Merged
merged 1 commit into from
Mar 12, 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
6 changes: 3 additions & 3 deletions messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@
}

func (msg *Message) FindEventStringSubMatch() string {
return FindEventStringSubMatch(msg.Destination)
return findEventStringSubMatch(msg.Destination)

Check warning on line 167 in messages.go

View check run for this annotation

Codecov / codecov/patch

messages.go#L167

Added line #L167 was not covered by tests
}

func (msg *Message) MessageType() MessageType {
Expand Down Expand Up @@ -255,7 +255,7 @@
}

func (msg *SimpleRequestResponse) FindEventStringSubMatch() string {
return FindEventStringSubMatch(msg.Destination)
return findEventStringSubMatch(msg.Destination)

Check warning on line 258 in messages.go

View check run for this annotation

Codecov / codecov/patch

messages.go#L258

Added line #L258 was not covered by tests
}

// SetStatus simplifies setting the optional Status field, which is a pointer type tagged with omitempty.
Expand Down Expand Up @@ -489,7 +489,7 @@
return nil
}

func FindEventStringSubMatch(s string) string {
func findEventStringSubMatch(s string) string {
var match = eventPattern.FindStringSubmatch(s)

event := "unknown"
Expand Down
2 changes: 1 addition & 1 deletion messages_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestFindStringSubMatch(t *testing.T) {

var result string
for i := 0; i < len(events); i++ {
result = FindEventStringSubMatch(events[i])
result = findEventStringSubMatch(events[i])
if result != expected[i] {
t.Errorf("\ntesting %v:\ninput: %v\nexpected: %v\ngot: %v\n\n", i, spew.Sprintf(events[i]), spew.Sprintf(expected[i]), spew.Sprintf(result))
}
Expand Down
Loading