Skip to content

Commit

Permalink
code style: renamed MiteApi interface to Api
Browse files Browse the repository at this point in the history
Interfaces should not start with the package name
  • Loading branch information
phiros committed Apr 4, 2019
1 parent 9852c3e commit 1272a81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (

type dependencies struct {
conf config.Config
miteApi mite.MiteApi
miteApi mite.Api
}

var deps dependencies

func HandleCommands(c config.Config, m mite.MiteApi) error {
func HandleCommands(c config.Config, m mite.Api) error {
deps = dependencies{conf: c, miteApi: m}
return rootCmd.Execute()
}
Expand Down
4 changes: 2 additions & 2 deletions mite/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
const contentType = "application/json"
const userAgent = "mite-go/0.1 (+github.com/leanovate/mite-go)"

type MiteApi interface {
type Api interface {
TimeEntries(query *TimeEntryQuery) ([]*TimeEntry, error)
TimeEntry(id string) (*TimeEntry, error)
CreateTimeEntry(command *TimeEntryCommand) (*TimeEntry, error)
Expand All @@ -27,7 +27,7 @@ type miteApi struct {
client *http.Client
}

func NewMiteApi(base string, key string) MiteApi {
func NewMiteApi(base string, key string) Api {
return &miteApi{base: base, key: key, client: &http.Client{}}
}

Expand Down

0 comments on commit 1272a81

Please sign in to comment.