Skip to content

Commit 7093602

Browse files
committed
chore: respond to GCA findings
1 parent 353e7a0 commit 7093602

2 files changed

Lines changed: 2 additions & 12 deletions

File tree

internal/librariangen/protoc/protoc.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import (
2020
"path/filepath"
2121
"strings"
2222

23-
"cloud.google.com/java/internal/librariangen/request"
2423
)
2524

2625
// ConfigProvider is an interface that describes the configuration needed
@@ -36,7 +35,7 @@ type ConfigProvider interface {
3635
}
3736

3837
// Build constructs the full protoc command arguments for a given API.
39-
func Build(lib *request.Library, api *request.API, apiServiceDir string, config ConfigProvider, sourceDir, outputDir string) ([]string, error) {
38+
func Build(apiServiceDir string, config ConfigProvider, sourceDir, outputDir string) ([]string, error) {
4039
// Gather all .proto files in the API's source directory.
4140
entries, err := os.ReadDir(apiServiceDir)
4241
if err != nil {

internal/librariangen/protoc/protoc_test.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import (
1919
"strings"
2020
"testing"
2121

22-
"cloud.google.com/java/internal/librariangen/request"
2322
"github.com/google/go-cmp/cmp"
2423
)
2524

@@ -50,7 +49,6 @@ func TestBuild(t *testing.T) {
5049
tests := []struct {
5150
name string
5251
apiPath string
53-
apiServiceDir string
5452
reqID string
5553
config mockConfigProvider
5654
want []string
@@ -130,14 +128,7 @@ func TestBuild(t *testing.T) {
130128

131129
for _, tt := range tests {
132130
t.Run(tt.name, func(t *testing.T) {
133-
req := &request.Library{
134-
ID: tt.reqID,
135-
}
136-
api := &request.API{
137-
Path: tt.apiPath,
138-
}
139-
140-
got, err := Build(req, api, filepath.Join(sourceDir, tt.apiPath), &tt.config, sourceDir, "/output")
131+
got, err := Build(filepath.Join(sourceDir, tt.apiPath), &tt.config, sourceDir, "/output")
141132
if err != nil {
142133
t.Fatalf("Build() failed: %v", err)
143134
}

0 commit comments

Comments
 (0)