all: correct typo and grammar issues in comments

Changes applied only to Go comments.

Change-Id: I0019ebe895186aed16daf252d7817c5e095c4b94
Reviewed-on: https://go-review.googlesource.com/c/build/+/469456
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Oleksandr Redko 2023-02-18 15:01:28 +02:00 коммит произвёл Gopher Robot
Родитель d65475a9c9
Коммит f03e733dd2
24 изменённых файлов: 46 добавлений и 46 удалений

Просмотреть файл

@ -1065,7 +1065,7 @@ func pathEnv(goos string, env, path []string, workDir string) (kv string, ok boo
"$EMPTY", "", "$EMPTY", "",
) )
// Apply substitions to a copy of the path argument. // Apply substitutions to a copy of the path argument.
subst := make([]string, 0, len(path)) subst := make([]string, 0, len(path))
for _, elem := range path { for _, elem := range path {
if s := r.Replace(elem); s != "" { if s := r.Replace(elem); s != "" {

Просмотреть файл

@ -50,7 +50,7 @@ func coordinatorServer() (*http.Server, net.Listener, error) {
return srv, ln, nil return srv, ln, nil
} }
// testReverseDial verfies that a revdial connection can be established and // testReverseDial verifies that a revdial connection can be established and
// registered in the coordinator reverse pool at coordAddr. // registered in the coordinator reverse pool at coordAddr.
func testReverseDial(t *testing.T, coordAddr, hostType string) { func testReverseDial(t *testing.T, coordAddr, hostType string) {
t.Helper() t.Helper()
@ -112,7 +112,7 @@ func testReverseDial(t *testing.T, coordAddr, hostType string) {
} }
} }
// TestReverseDial verfies that a revdial connection can be established and // TestReverseDial verifies that a revdial connection can be established and
// registered in the coordinator reverse pool. // registered in the coordinator reverse pool.
func TestReverseDial(t *testing.T) { func TestReverseDial(t *testing.T) {
pool.SetBuilderMasterKey([]byte(devMasterKey)) pool.SetBuilderMasterKey([]byte(devMasterKey))
@ -128,7 +128,7 @@ func TestReverseDial(t *testing.T) {
testReverseDial(t, srv.Addr, hostType) testReverseDial(t, srv.Addr, hostType)
} }
// TestReverseDialRedirect verfies that a revdial connection works with a 307 // TestReverseDialRedirect verifies that a revdial connection works with a 307
// redirect to the endpoints. The coordinator will do this in dev mode. // redirect to the endpoints. The coordinator will do this in dev mode.
func TestReverseDialRedirect(t *testing.T) { func TestReverseDialRedirect(t *testing.T) {
pool.SetBuilderMasterKey([]byte(devMasterKey)) pool.SetBuilderMasterKey([]byte(devMasterKey))

Просмотреть файл

@ -1586,7 +1586,7 @@ func (ts *trySet) awaitTryBuild(idx int, bs *buildStatus, brev buildgo.BuilderRe
// wanted reports whether this trySet is still active. // wanted reports whether this trySet is still active.
// //
// If the commmit has been submitted, or change abandoned, or the // If the commit has been submitted, or change abandoned, or the
// checkbox unchecked, wanted returns false. // checkbox unchecked, wanted returns false.
func (ts *trySet) wanted() bool { func (ts *trySet) wanted() bool {
statusMu.Lock() statusMu.Lock()

Просмотреть файл

@ -139,7 +139,7 @@ var (
// mustInitMasterKeyCache populates the masterKeyCache // mustInitMasterKeyCache populates the masterKeyCache
// with the master key. If no master key is found it will // with the master key. If no master key is found it will
// log an error and exit. If `masterKey()` is called before // log an error and exit. If `masterKey()` is called before
// the key is initialzed then it will log an error and exit. // the key is initialized then it will log an error and exit.
func mustInitMasterKeyCache(sc *secret.Client) { func mustInitMasterKeyCache(sc *secret.Client) {
keyOnce.Do(func() { loadKey(sc) }) keyOnce.Do(func() { loadKey(sc) })
} }

Просмотреть файл

@ -763,7 +763,7 @@ func getActiveBuilds(ctx context.Context) (builds []types.ActivePostSubmitBuild)
// URLs of builds which are currently in progress. // URLs of builds which are currently in progress.
func (td *uiTemplateData) populateBuildingURLs(ctx context.Context, activeBuilds []types.ActivePostSubmitBuild) { func (td *uiTemplateData) populateBuildingURLs(ctx context.Context, activeBuilds []types.ActivePostSubmitBuild) {
// active maps from a build record with its status URL zeroed // active maps from a build record with its status URL zeroed
// out to to the actual value of that status URL. // out to the actual value of that status URL.
active := map[types.ActivePostSubmitBuild]string{} active := map[types.ActivePostSubmitBuild]string{}
for _, rec := range activeBuilds { for _, rec := range activeBuilds {
statusURL := rec.StatusURL statusURL := rec.StatusURL

Просмотреть файл

@ -758,7 +758,7 @@ var emptyGerritCommentOpts gerritCommentOpts
// addGerritComment adds the given comment to the CL specified by the changeID // addGerritComment adds the given comment to the CL specified by the changeID
// and the patch set identified by the version. // and the patch set identified by the version.
// //
// As an idempotence check, before adding the comment the comment and the list // As an idempotence check, before adding the comment and the list
// of oldPhrases are checked against the CL to ensure that no phrase in the list // of oldPhrases are checked against the CL to ensure that no phrase in the list
// has already been added to the list as a comment. // has already been added to the list as a comment.
func (b *gopherbot) addGerritComment(ctx context.Context, changeID, comment string, opts *gerritCommentOpts) error { func (b *gopherbot) addGerritComment(ctx context.Context, changeID, comment string, opts *gerritCommentOpts) error {
@ -2651,7 +2651,7 @@ func fetchCodeOwners(ctx context.Context, oReq *owners.Request) (*owners.Respons
// primary and secondary users into a single entry. // primary and secondary users into a single entry.
// If a user is a primary in one entry but secondary on another, they are // If a user is a primary in one entry but secondary on another, they are
// primary in the returned entry. // primary in the returned entry.
// If a users email matches the authorEmail, the the user is omitted from the // If a users email matches the authorEmail, the user is omitted from the
// result. // result.
// The resulting order of the entries is non-deterministic. // The resulting order of the entries is non-deterministic.
func mergeOwnersEntries(entries []*owners.Entry, authorEmail string) *owners.Entry { func mergeOwnersEntries(entries []*owners.Entry, authorEmail string) *owners.Entry {

Просмотреть файл

@ -61,7 +61,7 @@ type EC2VMConfiguration struct {
// ImageID is the ID of the image used to launch the instance. It is a required field. // ImageID is the ID of the image used to launch the instance. It is a required field.
ImageID string ImageID string
// Name is a user defined name for the instance. It is displayed on the AWS UI. It is // Name is a user defined name for the instance. It is displayed on the AWS UI. It is
// is an optional field. // an optional field.
Name string Name string
// SSHKeyID is the name of the SSH key pair to use for access. It is a required field. // SSHKeyID is the name of the SSH key pair to use for access. It is a required field.
SSHKeyID string SSHKeyID string
@ -96,7 +96,7 @@ type Instance struct {
IPAddressInternal string IPAddressInternal string
// ImageID is The ID of the AMI(image) used to launch the instance. // ImageID is The ID of the AMI(image) used to launch the instance.
ImageID string ImageID string
// Name is a user defined name for the instance instance. // Name is a user defined name for the instance.
Name string Name string
// SSHKeyID is the name of the SSH key pair to use for access. It is a required field. // SSHKeyID is the name of the SSH key pair to use for access. It is a required field.
SSHKeyID string SSHKeyID string
@ -212,7 +212,7 @@ func (ac *AWSClient) DestroyInstances(ctx context.Context, instIDs ...string) er
// WaitUntilInstanceRunning waits until a stopping condition is met. The stopping conditions are: // WaitUntilInstanceRunning waits until a stopping condition is met. The stopping conditions are:
// - The requested instance state is `running`. // - The requested instance state is `running`.
// - The passed in context is cancelled or the deadline expires. // - The passed in context is cancelled or the deadline expires.
// - 40 requests are made made with a 15 second delay between each request. // - 40 requests are made with a 15 second delay between each request.
func (ac *AWSClient) WaitUntilInstanceRunning(ctx context.Context, instID string) error { func (ac *AWSClient) WaitUntilInstanceRunning(ctx context.Context, instID string) error {
err := ac.ec2Client.WaitUntilInstanceRunningWithContext(ctx, &ec2.DescribeInstancesInput{ err := ac.ec2Client.WaitUntilInstanceRunningWithContext(ctx, &ec2.DescribeInstancesInput{
InstanceIds: []*string{aws.String(instID)}, InstanceIds: []*string{aws.String(instID)},

Просмотреть файл

@ -48,7 +48,7 @@ func NewFakeAWSClient() *FakeAWSClient {
} }
} }
// Instance returns the `Instance` record for the rquested instance. The instance record will // Instance returns the `Instance` record for the requested instance. The instance record will
// return records for recently terminated instances. If an instance is not found an error will // return records for recently terminated instances. If an instance is not found an error will
// be returned. // be returned.
func (f *FakeAWSClient) Instance(ctx context.Context, instID string) (*Instance, error) { func (f *FakeAWSClient) Instance(ctx context.Context, instID string) (*Instance, error) {

Просмотреть файл

@ -62,7 +62,7 @@ type awsClient interface {
RunningInstances(ctx context.Context) ([]*cloud.Instance, error) RunningInstances(ctx context.Context) ([]*cloud.Instance, error)
} }
// EC2Opt is optional configuration for the the buildlet. // EC2Opt is optional configuration for the buildlet.
type EC2Opt func(*EC2Buildlet) type EC2Opt func(*EC2Buildlet)
// EC2Buildlet manages a pool of AWS EC2 buildlets. // EC2Buildlet manages a pool of AWS EC2 buildlets.

Просмотреть файл

@ -274,7 +274,7 @@ func (c *GCEConfiguration) GoDSClient() *datastore.Client {
return goDSClient return goDSClient
} }
// TryDepsErr retrives any Trybot dependency error. // TryDepsErr retrieves any Trybot dependency error.
func (c *GCEConfiguration) TryDepsErr() error { func (c *GCEConfiguration) TryDepsErr() error {
return errTryDeps return errTryDeps
} }

Просмотреть файл

@ -55,7 +55,7 @@ func newLedger() *ledger {
} }
// ReserveResources attempts to reserve the resources required for an instance to be created. // ReserveResources attempts to reserve the resources required for an instance to be created.
// It will attempt to reserve the resourses that an instance type would require. This will // It will attempt to reserve the resources that an instance type would require. This will
// attempt to reserve the resources until the context deadline is reached. // attempt to reserve the resources until the context deadline is reached.
func (l *ledger) ReserveResources(ctx context.Context, instName, vmType string, si *queue.SchedItem) error { func (l *ledger) ReserveResources(ctx context.Context, instName, vmType string, si *queue.SchedItem) error {
instType, err := l.PrepareReservationRequest(instName, vmType) instType, err := l.PrepareReservationRequest(instName, vmType)
@ -188,7 +188,7 @@ type resources struct {
CPULimit int64 CPULimit int64
} }
// Resources retrives the resource usage and limits for instances in the // Resources retrieves the resource usage and limits for instances in the
// store. // store.
func (l *ledger) Resources() *resources { func (l *ledger) Resources() *resources {
l.mu.RLock() l.mu.RLock()

Просмотреть файл

@ -64,7 +64,7 @@ func (c *getBuildletCall) start(t *testing.T, s *Scheduler) {
close(c.done) close(c.done)
}() }()
// Wait for si to be enqueued, or this call to be satisified. // Wait for si to be enqueued, or this call to be satisfied.
if !trueSoon(func() bool { if !trueSoon(func() bool {
select { select {
case <-c.done: case <-c.done:

Просмотреть файл

@ -42,7 +42,7 @@ func (s *Span) OptText() string {
return s.optText return s.optText
} }
// Start is the start time for the span.. // Start is the start time for the span.
func (s *Span) Start() time.Time { func (s *Span) Start() time.Time {
return s.start return s.start
} }

Просмотреть файл

@ -333,7 +333,7 @@ func (s *Server) ExecuteCommand(req *protos.ExecuteCommandRequest, stream protos
Path: req.GetPath(), Path: req.GetPath(),
}) })
if execErr != nil { if execErr != nil {
// there were system errors preventing the command from being started or seen to completition. // there were system errors preventing the command from being started or seen to completion.
return status.Errorf(codes.Aborted, "unable to execute command: %s", execErr) return status.Errorf(codes.Aborted, "unable to execute command: %s", execErr)
} }
if remoteErr != nil { if remoteErr != nil {
@ -501,7 +501,7 @@ func (s *Server) WriteFileFromURL(ctx context.Context, req *protos.WriteFileFrom
} }
var rc io.ReadCloser var rc io.ReadCloser
// objects stored in the gomote staging bucket are only accessible when you have been granted explicit permissions. A builder // objects stored in the gomote staging bucket are only accessible when you have been granted explicit permissions. A builder
// requires a signed URL in order to access objects stored in the the gomote staging bucket. // requires a signed URL in order to access objects stored in the gomote staging bucket.
if onObjectStore(s.gceBucketName, req.GetUrl()) { if onObjectStore(s.gceBucketName, req.GetUrl()) {
object, err := objectFromURL(s.gceBucketName, req.GetUrl()) object, err := objectFromURL(s.gceBucketName, req.GetUrl())
if err != nil { if err != nil {
@ -572,7 +572,7 @@ func (s *Server) WriteTGZFromURL(ctx context.Context, req *protos.WriteTGZFromUR
return &protos.WriteTGZFromURLResponse{}, nil return &protos.WriteTGZFromURLResponse{}, nil
} }
// session is a helper function that retreives a session associated with the gomoteID and ownerID. // session is a helper function that retrieves a session associated with the gomoteID and ownerID.
func (s *Server) session(gomoteID, ownerID string) (*remote.Session, error) { func (s *Server) session(gomoteID, ownerID string) (*remote.Session, error) {
session, err := s.buildlets.Session(gomoteID) session, err := s.buildlets.Session(gomoteID)
if err != nil { if err != nil {

Просмотреть файл

@ -110,7 +110,7 @@ func TestAddBootstrapAlive(t *testing.T) {
func TestAddBootstrapError(t *testing.T) { func TestAddBootstrapError(t *testing.T) {
// This test will create a gomote instance and attempt to call AddBootstrap. // This test will create a gomote instance and attempt to call AddBootstrap.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -255,7 +255,7 @@ func TestInstanceAlive(t *testing.T) {
func TestInstanceAliveError(t *testing.T) { func TestInstanceAliveError(t *testing.T) {
// This test will create a gomote instance and attempt to call InstanceAlive. // This test will create a gomote instance and attempt to call InstanceAlive.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -323,7 +323,7 @@ func TestListDirectory(t *testing.T) {
func TestListDirectoryError(t *testing.T) { func TestListDirectoryError(t *testing.T) {
// This test will create a gomote instance and attempt to call ListDirectory. // This test will create a gomote instance and attempt to call ListDirectory.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -428,7 +428,7 @@ func TestDestroyInstance(t *testing.T) {
func TestDestroyInstanceError(t *testing.T) { func TestDestroyInstanceError(t *testing.T) {
// This test will create a gomote instance and attempt to call DestroyInstance. // This test will create a gomote instance and attempt to call DestroyInstance.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -519,7 +519,7 @@ func TestExecuteCommand(t *testing.T) {
func TestExecuteCommandError(t *testing.T) { func TestExecuteCommandError(t *testing.T) {
// This test will create a gomote instance and attempt to call TestExecuteCommand. // This test will create a gomote instance and attempt to call TestExecuteCommand.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -595,7 +595,7 @@ func TestExecuteCommandError(t *testing.T) {
func TestReadTGZToURLError(t *testing.T) { func TestReadTGZToURLError(t *testing.T) {
// This test will create a gomote instance and attempt to call ReadTGZToURL. // This test will create a gomote instance and attempt to call ReadTGZToURL.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -667,7 +667,7 @@ func TestRemoveFiles(t *testing.T) {
func TestRemoveFilesError(t *testing.T) { func TestRemoveFilesError(t *testing.T) {
// This test will create a gomote instance and attempt to call RemoveFiles. // This test will create a gomote instance and attempt to call RemoveFiles.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -747,7 +747,7 @@ func TestSignSSHKey(t *testing.T) {
func TestSignSSHKeyError(t *testing.T) { func TestSignSSHKeyError(t *testing.T) {
// This test will create a gomote instance and attempt to call SignSSHKey. // This test will create a gomote instance and attempt to call SignSSHKey.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -823,7 +823,7 @@ func TestUploadFile(t *testing.T) {
func TestUploadFileError(t *testing.T) { func TestUploadFileError(t *testing.T) {
// This test will create a gomote instance and attempt to call UploadFile. // This test will create a gomote instance and attempt to call UploadFile.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -875,7 +875,7 @@ func TestWriteFileFromURL(t *testing.T) {
func TestWriteFileFromURLError(t *testing.T) { func TestWriteFileFromURLError(t *testing.T) {
// This test will create a gomote instance and attempt to call TestWriteFileFromURL. // This test will create a gomote instance and attempt to call TestWriteFileFromURL.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string
@ -967,7 +967,7 @@ func TestWriteTGZFromURLGomoteStaging(t *testing.T) {
func TestWriteTGZFromURLError(t *testing.T) { func TestWriteTGZFromURLError(t *testing.T) {
// This test will create a gomote instance and attempt to call TestWriteTGZFromURL. // This test will create a gomote instance and attempt to call TestWriteTGZFromURL.
// If overrideID is set to true, the test will use a different gomoteID than the // If overrideID is set to true, the test will use a different gomoteID than
// the one created for the test. // the one created for the test.
testCases := []struct { testCases := []struct {
desc string desc string

Просмотреть файл

@ -45,7 +45,7 @@ func NewServer() *SigningServer {
} }
} }
// UpdateSigningStatus uses a bidirectional streaming connection to send signing requests to the client and // UpdateSigningStatus uses a bidirectional streaming connection to send signing requests to the client
// and receive status updates on signing requests. There is no specific order which the requests or responses // and receive status updates on signing requests. There is no specific order which the requests or responses
// need to occur in. The connection returns an error once the context is canceled or an error is encountered. // need to occur in. The connection returns an error once the context is canceled or an error is encountered.
func (rs *SigningServer) UpdateSigningStatus(stream protos.ReleaseService_UpdateSigningStatusServer) error { func (rs *SigningServer) UpdateSigningStatus(stream protos.ReleaseService_UpdateSigningStatusServer) error {

Просмотреть файл

@ -83,7 +83,7 @@ func signRequestSeries(t *testing.T, ctx context.Context, id string, server *Sig
} }
// fakeSigningServerClient is a simple implementation of how we expect the client side to perform. // fakeSigningServerClient is a simple implementation of how we expect the client side to perform.
// A signing request initiates a signing job. The first status update should return return a status of // A signing request initiates a signing job. The first status update should return a status of
// running. The second status request will return a status of Completed. // running. The second status request will return a status of Completed.
func fakeSigningServerClient(t *testing.T, ctx context.Context, client protos.ReleaseServiceClient) { func fakeSigningServerClient(t *testing.T, ctx context.Context, client protos.ReleaseServiceClient) {
stream, err := client.UpdateSigningStatus(ctx) stream, err := client.UpdateSigningStatus(ctx)

Просмотреть файл

@ -115,7 +115,7 @@ type secretClient interface {
// Client is used to interact with the GCP Secret Management service. // Client is used to interact with the GCP Secret Management service.
type Client struct { type Client struct {
client secretClient client secretClient
projectID string // projectID specifies the ID of the GCP project where secrets are retreived from. projectID string // projectID specifies the ID of the GCP project where secrets are retrieved from.
} }
// NewClient creates a Secret Manager Client // NewClient creates a Secret Manager Client
@ -176,7 +176,7 @@ func buildNamePath(projectID, name, version string) string {
} }
// MustNewClient instantiates an instance of the Secret Manager Client. If there is an error // MustNewClient instantiates an instance of the Secret Manager Client. If there is an error
// this fuction will exit. // this function will exit.
func MustNewClient() *Client { func MustNewClient() *Client {
c, err := NewClient() c, err := NewClient()
if err != nil { if err != nil {

Просмотреть файл

@ -137,7 +137,7 @@ var dropPatterns = []string{
// Remove pkg/${GOOS}_${GOARCH}/cmd. This saves a bunch of // Remove pkg/${GOOS}_${GOARCH}/cmd. This saves a bunch of
// space, and users don't typically rebuild cmd/compile, // space, and users don't typically rebuild cmd/compile,
// cmd/link, etc. If they want to, they still can, but they'll // cmd/link, etc. If they want to, they still can, but they'll
// have to pay the cost of rebuilding dependent libaries. No // have to pay the cost of rebuilding dependent libraries. No
// need to ship them just in case. // need to ship them just in case.
`pkg/[^/]+/cmd/.*`, `pkg/[^/]+/cmd/.*`,
// Clean up .exe~ files; see go.dev/issue/23894. // Clean up .exe~ files; see go.dev/issue/23894.

Просмотреть файл

@ -53,7 +53,7 @@ package api
// IANA_SVC_NAME: This is a string, no more than 15 characters long, that // IANA_SVC_NAME: This is a string, no more than 15 characters long, that
// conforms to the definition of IANA service name in RFC 6335. // conforms to the definition of IANA service name in RFC 6335.
// It must contains at least one letter [a-z] and it must contains only [a-z0-9-]. // It must contains at least one letter [a-z] and it must contains only [a-z0-9-].
// Hypens ('-') cannot be leading or trailing character of the string // Hyphens ('-') cannot be leading or trailing character of the string
// and cannot be adjacent to other hyphens. // and cannot be adjacent to other hyphens.
// TypeMeta describes an individual object in an API response or request // TypeMeta describes an individual object in an API response or request
@ -370,7 +370,7 @@ type PersistentVolumeSpec struct {
ClaimRef *ObjectReference `json:"claimRef,omitempty"` ClaimRef *ObjectReference `json:"claimRef,omitempty"`
// What happens to a persistent volume when released from its claim. // What happens to a persistent volume when released from its claim.
// Valid options are Retain (default) and Recycle. // Valid options are Retain (default) and Recycle.
// Recyling must be supported by the volume plugin underlying this persistent volume. // Recycling must be supported by the volume plugin underlying this persistent volume.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy // More info: http://releases.k8s.io/HEAD/docs/user-guide/persistent-volumes.md#recycling-policy
PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"` PersistentVolumeReclaimPolicy PersistentVolumeReclaimPolicy `json:"persistentVolumeReclaimPolicy,omitempty"`
} }
@ -1370,7 +1370,7 @@ type ReplicationControllerSpec struct {
// ReplicationControllerStatus represents the current status of a replication // ReplicationControllerStatus represents the current status of a replication
// controller. // controller.
type ReplicationControllerStatus struct { type ReplicationControllerStatus struct {
// Replicas is the most recently oberved number of replicas. // Replicas is the most recently observed number of replicas.
// More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller // More info: http://releases.k8s.io/HEAD/docs/user-guide/replication-controller.md#what-is-a-replication-controller
Replicas int `json:"replicas"` Replicas int `json:"replicas"`

Просмотреть файл

@ -70,7 +70,7 @@ func (c *Client) nsEndpoint() string {
// RunLongLivedPod creates a new pod resource in the default pod namespace with // RunLongLivedPod creates a new pod resource in the default pod namespace with
// the given pod API specification. It assumes the pod runs a // the given pod API specification. It assumes the pod runs a
// long-lived server (i.e. if the container exit quickly quickly, even // long-lived server (i.e. if the container exit quickly, even
// with success, then that is an error). // with success, then that is an error).
// //
// It returns the pod status once it has entered the Running phase. // It returns the pod status once it has entered the Running phase.
@ -335,7 +335,7 @@ func (c *Client) _WatchPod(ctx context.Context, podName, podResourceVersion stri
// bufio.Reader.ReadBytes is blocking, so we watch for // bufio.Reader.ReadBytes is blocking, so we watch for
// context timeout or cancellation in a goroutine // context timeout or cancellation in a goroutine
// and close the response body when see see it. The // and close the response body when see it. The
// response body is also closed via defer when the // response body is also closed via defer when the
// request is made, but closing twice is OK. // request is made, but closing twice is OK.
go func() { go func() {

Просмотреть файл

@ -44,7 +44,7 @@ func (f clientOptFunc) modify(o *clientOpt) { f(o) }
// OptProject returns an option setting the GCE Project ID to projectName. // OptProject returns an option setting the GCE Project ID to projectName.
// This is the named project ID, not the numeric ID. // This is the named project ID, not the numeric ID.
// If unspecified, the current active project ID is used, if the program is running // If unspecified, the current active project ID is used, if the program is running
// on a GCE intance. // on a GCE instance.
func OptProject(projectName string) ClientOpt { func OptProject(projectName string) ClientOpt {
return clientOptFunc(func(o *clientOpt) { return clientOptFunc(func(o *clientOpt) {
o.Project = projectName o.Project = projectName

Просмотреть файл

@ -505,7 +505,7 @@ func (cl *GerritCL) Subject() string {
return strings.Replace(cl.Commit.Msg, "\n", " ", -1) return strings.Replace(cl.Commit.Msg, "\n", " ", -1)
} }
// CommitAtVersion returns the git commit of the specifid version of this CL. // CommitAtVersion returns the git commit of the specified version of this CL.
// It returns nil if version is not in the range [1, cl.Version]. // It returns nil if version is not in the range [1, cl.Version].
func (cl *GerritCL) CommitAtVersion(version int32) *GitCommit { func (cl *GerritCL) CommitAtVersion(version int32) *GitCommit {
if version < 1 || version > cl.Version { if version < 1 || version > cl.Version {

Просмотреть файл

@ -234,7 +234,7 @@ func (c *Corpus) Initialize(ctx context.Context, src MutationSource) error {
return c.update(ctx, nil) return c.update(ctx, nil)
} }
// ErrSplit is returned when the the client notices the leader's // ErrSplit is returned when the client notices the leader's
// mutation log has changed. This can happen if the leader restarts // mutation log has changed. This can happen if the leader restarts
// with uncommitted transactions. (The leader only commits mutations // with uncommitted transactions. (The leader only commits mutations
// periodically.) // periodically.)