From dcec9f7485595ba79512329c103872522f6cb2cf Mon Sep 17 00:00:00 2001 From: Abhinav Gupta Date: Fri, 28 Apr 2023 05:33:20 -0700 Subject: config: Rename Package to PackageConfig, add docs (#84) Renames the Package struct to PackageConfig to make it clear that it is a configuration struct. This differentiation will help disconnect the configuration-level representation from the runtime representation of this information. This patch also adds documentation to the config package that was previously missing. --- config_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config_test.go') diff --git a/config_test.go b/config_test.go index e4146b1..6587295 100644 --- a/config_test.go +++ b/config_test.go @@ -29,7 +29,7 @@ packages: pkg, ok := config.Packages["grpc"] assert.True(t, ok) - assert.Equal(t, pkg, Package{Repo: "github.com/grpc/grpc-go", Branch: "main"}) + assert.Equal(t, pkg, PackageConfig{Repo: "github.com/grpc/grpc-go", Branch: "main"}) } func TestParseDefaultBranch(t *testing.T) { @@ -48,7 +48,7 @@ packages: pkg, ok := config.Packages["grpc"] assert.True(t, ok) - assert.Equal(t, pkg, Package{Repo: "github.com/grpc/grpc-go", Branch: "master"}) + assert.Equal(t, pkg, PackageConfig{Repo: "github.com/grpc/grpc-go", Branch: "master"}) } func TestParsePackageLevelURL(t *testing.T) { @@ -102,7 +102,7 @@ packages: pkg, ok := config.Packages["grpc"] assert.True(t, ok) - assert.Equal(t, Package{Repo: "github.com/grpc/grpc-go", Branch: "master"}, pkg) + assert.Equal(t, PackageConfig{Repo: "github.com/grpc/grpc-go", Branch: "master"}, pkg) }) } } -- cgit v1.2.3