Skip to content

Commit 43a8b31

Browse files
committed
Un-publish Hosts from the Config interface
It's not being depended on anywhere right now, so this minimizes the public interface.
1 parent 84ecf32 commit 43a8b31

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

internal/config/config_type.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const defaultGitProtocol = "https"
1212

1313
// This interface describes interacting with some persistent configuration for gh.
1414
type Config interface {
15-
Hosts() ([]*HostConfig, error)
1615
Get(string, string) (string, error)
1716
Set(string, string, string) error
1817
Write() error
@@ -145,7 +144,7 @@ func (c *fileConfig) Set(hostname, key, value string) error {
145144
}
146145

147146
func (c *fileConfig) configForHost(hostname string) (*HostConfig, error) {
148-
hosts, err := c.Hosts()
147+
hosts, err := c.hostEntries()
149148
if err != nil {
150149
return nil, fmt.Errorf("failed to parse hosts config: %w", err)
151150
}
@@ -167,7 +166,7 @@ func (c *fileConfig) Write() error {
167166
return WriteConfigFile(ConfigFile(), marshalled)
168167
}
169168

170-
func (c *fileConfig) Hosts() ([]*HostConfig, error) {
169+
func (c *fileConfig) hostEntries() ([]*HostConfig, error) {
171170
if len(c.hosts) > 0 {
172171
return c.hosts, nil
173172
}

0 commit comments

Comments
 (0)