From 1272a81ab758516fea2b285cafb35ce28960b419 Mon Sep 17 00:00:00 2001 From: Philipp Rosenkranz Date: Thu, 4 Apr 2019 11:00:34 +0200 Subject: [PATCH] code style: renamed MiteApi interface to Api Interfaces should not start with the package name --- cmd/cmd.go | 4 ++-- mite/api.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index 824f275..5c27539 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -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() } diff --git a/mite/api.go b/mite/api.go index 496e29c..786abea 100644 --- a/mite/api.go +++ b/mite/api.go @@ -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) @@ -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{}} }