From 39b6ec8aec41141e122a0f68fb2bc5b42642742c Mon Sep 17 00:00:00 2001 From: vilmibm Date: Fri, 11 Sep 2020 17:37:45 -0500 Subject: [PATCH] share gist getting --- pkg/cmd/gist/{view/http.go => shared/shared.go} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename pkg/cmd/gist/{view/http.go => shared/shared.go} (85%) diff --git a/pkg/cmd/gist/view/http.go b/pkg/cmd/gist/shared/shared.go similarity index 85% rename from pkg/cmd/gist/view/http.go rename to pkg/cmd/gist/shared/shared.go index 617fa2ec5..7cfbc5866 100644 --- a/pkg/cmd/gist/view/http.go +++ b/pkg/cmd/gist/shared/shared.go @@ -1,4 +1,4 @@ -package view +package shared import ( "fmt" @@ -19,7 +19,7 @@ type Gist struct { Files map[string]GistFile } -func getGist(client *http.Client, hostname, gistID string) (*Gist, error) { +func GetGist(client *http.Client, hostname, gistID string) (*Gist, error) { gist := Gist{} path := fmt.Sprintf("gists/%s", gistID)