Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Oct 24, 2022
1 parent 5f88043 commit 2dc5216
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions interfaces.go
Expand Up @@ -94,12 +94,12 @@ func (b *Breadcrumb) MarshalJSON() ([]byte, error) {
// an ID or an IP address should be provided.
type User struct {
Data map[string]string `json:"data,omitempty"`
Email string `json:"email,omitempty"`
ID string `json:"id,omitempty"`
IPAddress string `json:"ip_address,omitempty"`
Name string `json:"name,omitempty"`
Segment string `json:"segment,omitempty"`
Username string `json:"username,omitempty"`
Email string `json:"email,omitempty"`
ID string `json:"id,omitempty"`
IPAddress string `json:"ip_address,omitempty"`
Name string `json:"name,omitempty"`
Segment string `json:"segment,omitempty"`
Username string `json:"username,omitempty"`
}

// Request contains information on a HTTP request related to the event.
Expand Down
4 changes: 2 additions & 2 deletions scope_test.go
Expand Up @@ -37,8 +37,8 @@ func fillEventWithData(event *Event) *Event {

func TestScopeSetUser(t *testing.T) {
scope := NewScope()
scope.SetUser(User{Data: map[string]string{"foo": "bar"}, Email: "foo@example.com", ID: "foo", IPAddress: "127.0.0.1", Name: "My Name", Segment: "My Segment", Username: "My Username"})
assertEqual(t, User{Data: map[string]string{"foo": "bar"}, Email: "foo@example.com", ID: "foo", IPAddress: "127.0.0.1", Name: "My Name", Segment: "My Segment", Username: "My Username"}, scope.user)
scope.SetUser(User{Data: map[string]string{"foo": "bar"}, Email: "foo@example.com", ID: "foo", IPAddress: "127.0.0.1", Name: "My Name", Segment: "My Segment", Username: "My Username"})
assertEqual(t, User{Data: map[string]string{"foo": "bar"}, Email: "foo@example.com", ID: "foo", IPAddress: "127.0.0.1", Name: "My Name", Segment: "My Segment", Username: "My Username"}, scope.user)
}

func TestScopeSetUserOverrides(t *testing.T) {
Expand Down

0 comments on commit 2dc5216

Please sign in to comment.