Skip to content

Commit

Permalink
🦉 Updates from OwlBot post-processor
Browse files Browse the repository at this point in the history
  • Loading branch information
gcf-owl-bot[bot] committed Jul 27, 2023
1 parent 0ce0825 commit c2a0965
Show file tree
Hide file tree
Showing 30 changed files with 123 additions and 14,971 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ npm install @google-cloud/pubsub

```javascript
// Imports the Google Cloud client library
const {PubSub} = require('@google-cloud/pubsub');
const { PubSub } = require("@google-cloud/pubsub");

async function quickstart(
projectId = 'your-project-id', // Your Google Cloud Platform project ID
topicNameOrId = 'my-topic', // Name for the new topic to create
subscriptionName = 'my-sub' // Name for the new subscription to create
projectId = 'your-project-id', // Your Google Cloud Platform project ID
topicNameOrId = 'my-topic', // Name for the new topic to create
subscriptionName = 'my-sub' // Name for the new subscription to create
) {
// Instantiates a client
const pubsub = new PubSub({projectId});
const pubsub = new PubSub({ projectId });

// Creates a new topic
const [topic] = await pubsub.createTopic(topicNameOrId);
Expand All @@ -84,19 +84,19 @@ async function quickstart(
const [subscription] = await topic.createSubscription(subscriptionName);

// Receive callbacks for new messages on the subscription
subscription.on('message', message => {
subscription.on('message', (message) => {
console.log('Received message:', message.data.toString());
process.exit(0);
});

// Receive callbacks for errors on the subscription
subscription.on('error', error => {
subscription.on('error', (error) => {
console.error('Received error:', error);
process.exit(1);
});

// Send a message to the topic
topic.publishMessage({data: Buffer.from('Test message!')});
topic.publishMessage({ data: Buffer.from('Test message!') });
}

```
Expand Down
7 changes: 0 additions & 7 deletions owl-bot-staging/v1/.eslintignore

This file was deleted.

3 changes: 0 additions & 3 deletions owl-bot-staging/v1/.eslintrc.json

This file was deleted.

14 changes: 0 additions & 14 deletions owl-bot-staging/v1/.gitignore

This file was deleted.

55 changes: 0 additions & 55 deletions owl-bot-staging/v1/.jsdoc.js

This file was deleted.

33 changes: 0 additions & 33 deletions owl-bot-staging/v1/.mocharc.js

This file was deleted.

22 changes: 0 additions & 22 deletions owl-bot-staging/v1/.prettierrc.js

This file was deleted.

1 change: 0 additions & 1 deletion owl-bot-staging/v1/README.md

This file was deleted.

64 changes: 0 additions & 64 deletions owl-bot-staging/v1/package.json

This file was deleted.

Loading

0 comments on commit c2a0965

Please sign in to comment.