From 5c0e9a1fbe0c76e25af161ad8fdc535d2b649fcd Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Mon, 2 Feb 2015 10:45:41 +0100 Subject: [PATCH] Rename search.IGetRecentPermanodes to search.GetRecentPermanoder Better Go style. Plus Permanoder is funny. And IFoo looks like C#. Change-Id: Ie418117c15a145c6c61a2f7e5fb31ae53a5d8bb6 --- pkg/client/client.go | 4 ++-- pkg/search/handler.go | 9 +++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/pkg/client/client.go b/pkg/client/client.go index 1ca6f11d8..f7c602764 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -440,9 +440,9 @@ func (c *Client) SyncHandlers() ([]*SyncInfo, error) { return c.syncHandlers, nil } -var _ search.IGetRecentPermanodes = (*Client)(nil) +var _ search.GetRecentPermanoder = (*Client)(nil) -// GetRecentPermanodes implements search.IGetRecentPermanodes against a remote server over HTTP. +// GetRecentPermanodes implements search.GetRecentPermanoder against a remote server over HTTP. func (c *Client) GetRecentPermanodes(req *search.RecentRequest) (*search.RecentResponse, error) { sr, err := c.SearchRoot() if err != nil { diff --git a/pkg/search/handler.go b/pkg/search/handler.go index de00a85a0..9c3ddbb65 100644 --- a/pkg/search/handler.go +++ b/pkg/search/handler.go @@ -67,18 +67,15 @@ type Handler struct { wsHub *wsHub } -// IGetRecentPermanodes is the interface encapsulating the GetRecentPermanodes query. -type IGetRecentPermanodes interface { +// GetRecentPermanoder is the interface containing the GetRecentPermanodes method. +type GetRecentPermanoder interface { // GetRecentPermanodes returns recently-modified permanodes. // This is a higher-level query returning more metadata than the index.GetRecentPermanodes, // which only scans the blobrefs but doesn't return anything about the permanodes. - // TODO: rename this one? GetRecentPermanodes(*RecentRequest) (*RecentResponse, error) } -var ( - _ IGetRecentPermanodes = (*Handler)(nil) -) +var _ GetRecentPermanoder = (*Handler)(nil) func NewHandler(index index.Interface, owner blob.Ref) *Handler { sh := &Handler{