Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(gengapic): move top-level package doc links to top #1175

Merged
merged 3 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions internal/gengapic/doc_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ func (g *generator) genDocFile(year int, scopes []string, serv *descriptor.Servi
p("// NOTE: This package is in beta. It is not stable, and may be subject to changes.")
}

p("//")
p("// General documentation")
p("//")
p("// For information about setting deadlines, reusing contexts, and more")
p("// please visit https://pkg.go.dev/cloud.google.com/go.")
p("//")
p("// Example usage")
p("//")
Expand Down Expand Up @@ -103,9 +108,6 @@ func (g *generator) genDocFile(year int, scopes []string, serv *descriptor.Servi
p("// Individual methods on the client use the ctx given to them.")
p("//")
p("// To close the open connection, use the Close() method.")
p("//")
p("// For information about setting deadlines, reusing contexts, and more")
p("// please visit https://pkg.go.dev/cloud.google.com/go.")
p("package %s // import %q", g.opts.pkgName, g.opts.pkgPath)
p("")

Expand Down
8 changes: 5 additions & 3 deletions internal/gengapic/testdata/doc_file.want
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
// (at https://api.foo.com) with Buz (at https://api.buz.com) and Baz (at
// https://api.baz.com) to acclerate bar.
//
// General documentation
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
//
// Example usage
//
// To get started with this package, create a client.
Expand Down Expand Up @@ -74,9 +79,6 @@
// Individual methods on the client use the ctx given to them.
//
// To close the open connection, use the Close() method.
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
package awesome // import "path/to/awesome"

import (
Expand Down
8 changes: 5 additions & 3 deletions internal/gengapic/testdata/doc_file_alpha.want
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
//
// NOTE: This package is in alpha. It is not stable, and is likely to change.
//
// General documentation
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
//
// Example usage
//
// To get started with this package, create a client.
Expand Down Expand Up @@ -76,9 +81,6 @@
// Individual methods on the client use the ctx given to them.
//
// To close the open connection, use the Close() method.
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
package awesome // import "path/to/awesome"

import (
Expand Down
8 changes: 5 additions & 3 deletions internal/gengapic/testdata/doc_file_alpha_emptyservice.want
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
//
// NOTE: This package is in alpha. It is not stable, and is likely to change.
//
// General documentation
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
//
// Example usage
//
// To get started with this package, create a client.
Expand All @@ -49,9 +54,6 @@
// Individual methods on the client use the ctx given to them.
//
// To close the open connection, use the Close() method.
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
package awesome // import "path/to/awesome"

import (
Expand Down
8 changes: 5 additions & 3 deletions internal/gengapic/testdata/doc_file_beta.want
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
//
// NOTE: This package is in beta. It is not stable, and may be subject to changes.
//
// General documentation
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
//
// Example usage
//
// To get started with this package, create a client.
Expand Down Expand Up @@ -76,9 +81,6 @@
// Individual methods on the client use the ctx given to them.
//
// To close the open connection, use the Close() method.
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
package awesome // import "path/to/awesome"

import (
Expand Down
8 changes: 5 additions & 3 deletions internal/gengapic/testdata/doc_file_beta_emptyservice.want
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
//
// NOTE: This package is in beta. It is not stable, and may be subject to changes.
//
// General documentation
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
//
// Example usage
//
// To get started with this package, create a client.
Expand All @@ -49,9 +54,6 @@
// Individual methods on the client use the ctx given to them.
//
// To close the open connection, use the Close() method.
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
package awesome // import "path/to/awesome"

import (
Expand Down
8 changes: 5 additions & 3 deletions internal/gengapic/testdata/doc_file_emptyservice.want
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
// (at https://api.foo.com) with Buz (at https://api.buz.com) and Baz (at
// https://api.baz.com) to acclerate bar.
//
// General documentation
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
//
// Example usage
//
// To get started with this package, create a client.
Expand All @@ -47,9 +52,6 @@
// Individual methods on the client use the ctx given to them.
//
// To close the open connection, use the Close() method.
//
// For information about setting deadlines, reusing contexts, and more
// please visit https://pkg.go.dev/cloud.google.com/go.
package awesome // import "path/to/awesome"

import (
Expand Down