From bf12e54283864b1736dba5ae7068c4dcd28d3c0a Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Wed, 30 Oct 2024 13:07:09 -0400 Subject: [PATCH] chore: move src/ -> internal/ (#29) Move code from src/ to internal/, since the code is only meant for use within this module, per https://go.dev/doc/go1.4#internalpackages. --- generator/cmd/protoc-gen-gclient/main.go | 4 ++-- generator/{src => internal}/genclient/genclient.go | 0 .../genclient/language/internal/golang/golang.go | 2 +- .../genclient/language/internal/rust/rust.go | 2 +- generator/{src => internal}/genclient/language/language.go | 6 +++--- generator/{src => internal}/genclient/model.go | 0 generator/{src => internal}/genclient/templatedata.go | 0 .../genclient/translator/protobuf/annotations.go | 2 +- .../genclient/translator/protobuf/protobuf.go | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) rename generator/{src => internal}/genclient/genclient.go (100%) rename generator/{src => internal}/genclient/language/internal/golang/golang.go (98%) rename generator/{src => internal}/genclient/language/internal/rust/rust.go (98%) rename generator/{src => internal}/genclient/language/language.go (86%) rename generator/{src => internal}/genclient/model.go (100%) rename generator/{src => internal}/genclient/templatedata.go (100%) rename generator/{src => internal}/genclient/translator/protobuf/annotations.go (96%) rename generator/{src => internal}/genclient/translator/protobuf/protobuf.go (98%) diff --git a/generator/cmd/protoc-gen-gclient/main.go b/generator/cmd/protoc-gen-gclient/main.go index cd5d93ced..cc21e5c62 100644 --- a/generator/cmd/protoc-gen-gclient/main.go +++ b/generator/cmd/protoc-gen-gclient/main.go @@ -25,8 +25,8 @@ import ( "strings" "time" - "github.com/googleapis/google-cloud-rust/generator/src/genclient" - "github.com/googleapis/google-cloud-rust/generator/src/genclient/translator/protobuf" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient/translator/protobuf" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/pluginpb" ) diff --git a/generator/src/genclient/genclient.go b/generator/internal/genclient/genclient.go similarity index 100% rename from generator/src/genclient/genclient.go rename to generator/internal/genclient/genclient.go diff --git a/generator/src/genclient/language/internal/golang/golang.go b/generator/internal/genclient/language/internal/golang/golang.go similarity index 98% rename from generator/src/genclient/language/internal/golang/golang.go rename to generator/internal/genclient/language/internal/golang/golang.go index fae9d9b97..178e3146f 100644 --- a/generator/src/genclient/language/internal/golang/golang.go +++ b/generator/internal/genclient/language/internal/golang/golang.go @@ -18,7 +18,7 @@ import ( "log/slog" "strings" - "github.com/googleapis/google-cloud-rust/generator/src/genclient" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient" "github.com/iancoleman/strcase" ) diff --git a/generator/src/genclient/language/internal/rust/rust.go b/generator/internal/genclient/language/internal/rust/rust.go similarity index 98% rename from generator/src/genclient/language/internal/rust/rust.go rename to generator/internal/genclient/language/internal/rust/rust.go index e31ba5f74..3f3b21d6a 100644 --- a/generator/src/genclient/language/internal/rust/rust.go +++ b/generator/internal/genclient/language/internal/rust/rust.go @@ -17,7 +17,7 @@ package rust import ( "log/slog" - "github.com/googleapis/google-cloud-rust/generator/src/genclient" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient" "github.com/iancoleman/strcase" ) diff --git a/generator/src/genclient/language/language.go b/generator/internal/genclient/language/language.go similarity index 86% rename from generator/src/genclient/language/language.go rename to generator/internal/genclient/language/language.go index c3f310b5a..370ce36d9 100644 --- a/generator/src/genclient/language/language.go +++ b/generator/internal/genclient/language/language.go @@ -18,9 +18,9 @@ import ( "fmt" "strings" - "github.com/googleapis/google-cloud-rust/generator/src/genclient" - "github.com/googleapis/google-cloud-rust/generator/src/genclient/language/internal/golang" - "github.com/googleapis/google-cloud-rust/generator/src/genclient/language/internal/rust" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient/language/internal/golang" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient/language/internal/rust" ) // language is a supported programming language of the generator. diff --git a/generator/src/genclient/model.go b/generator/internal/genclient/model.go similarity index 100% rename from generator/src/genclient/model.go rename to generator/internal/genclient/model.go diff --git a/generator/src/genclient/templatedata.go b/generator/internal/genclient/templatedata.go similarity index 100% rename from generator/src/genclient/templatedata.go rename to generator/internal/genclient/templatedata.go diff --git a/generator/src/genclient/translator/protobuf/annotations.go b/generator/internal/genclient/translator/protobuf/annotations.go similarity index 96% rename from generator/src/genclient/translator/protobuf/annotations.go rename to generator/internal/genclient/translator/protobuf/annotations.go index 607e7cae8..b50d0403a 100644 --- a/generator/src/genclient/translator/protobuf/annotations.go +++ b/generator/internal/genclient/translator/protobuf/annotations.go @@ -17,7 +17,7 @@ package protobuf import ( "log/slog" - "github.com/googleapis/google-cloud-rust/generator/src/genclient" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient" "google.golang.org/genproto/googleapis/api/annotations" "google.golang.org/protobuf/proto" ) diff --git a/generator/src/genclient/translator/protobuf/protobuf.go b/generator/internal/genclient/translator/protobuf/protobuf.go similarity index 98% rename from generator/src/genclient/translator/protobuf/protobuf.go rename to generator/internal/genclient/translator/protobuf/protobuf.go index 6f576b1d6..d7eecc531 100644 --- a/generator/src/genclient/translator/protobuf/protobuf.go +++ b/generator/internal/genclient/translator/protobuf/protobuf.go @@ -18,8 +18,8 @@ import ( "log/slog" "strings" - "github.com/googleapis/google-cloud-rust/generator/src/genclient" - "github.com/googleapis/google-cloud-rust/generator/src/genclient/language" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient" + "github.com/googleapis/google-cloud-rust/generator/internal/genclient/language" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/descriptorpb" "google.golang.org/protobuf/types/pluginpb"