Skip to content
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
This repository was archived by the owner on Mar 17, 2026. It is now read-only.

Samples style refresh #733

@anguillanneuf

Description

@anguillanneuf
  • Please split large files that contain more than one sample into small files that contain a single sample per file.

  • Please make code that's enclosed in a pair of region tags runnable as is by following the updated style guide.

function main(arg1 = 'default_value_one', arg2 = 1234) {
  // [START your_region_tag]
  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  // const arg1 = 'default_value_one';
  // const arg2 = 1234;

  // Imports the Google Cloud Some API library
  const {SomeApiClient} = require('@google-cloud/some-api');

  // Instantiates a client
  const someApiClient = new SomeApiClient();

  async function doSomething() {
    // Construct request
    const request = {
      value1: arg1,
      value2: arg2,
      value3: 'hard-coded value',
    };

    const [response] = await someApiClient.doSomething(request);

    ...
  }

  doSomething();
  // [END your_region_tag]
}

main(...process.argv.slice(2));

Metadata

Metadata

Labels

api: pubsubIssues related to the googleapis/nodejs-pubsub API.type: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions