Skip to content

Commit

Permalink
feat: rename NewClient to New
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Feb 12, 2024
1 parent 0d23211 commit 16a3717
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions mailinabox.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ type Client struct {
System *SystemService
}

// NewClient creates a new Client.
func NewClient(apiURL, email, password string) (*Client, error) {
// New creates a new Client.
func New(apiURL, email, password string) (*Client, error) {
baseURL, err := url.Parse(apiURL)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion mailinabox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func setupTest(t *testing.T) (*Client, *http.ServeMux) {
server := httptest.NewServer(mux)
t.Cleanup(server.Close)

client, err := NewClient(server.URL, "example@example.com", "secret")
client, err := New(server.URL, "example@example.com", "secret")
require.NoError(t, err)

client.httpClient = server.Client()
Expand Down

0 comments on commit 16a3717

Please sign in to comment.