From b217d5e6b24b149b385ae8a5bda1c42f09f6c52b Mon Sep 17 00:00:00 2001 From: anitarua Date: Mon, 18 Dec 2023 10:24:52 -0800 Subject: [PATCH] chore: rename topics doc sample snippets --- Examples/doc-example-apis/Sources/main.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Examples/doc-example-apis/Sources/main.swift b/Examples/doc-example-apis/Sources/main.swift index 6ca6c97..30df095 100644 --- a/Examples/doc-example-apis/Sources/main.swift +++ b/Examples/doc-example-apis/Sources/main.swift @@ -117,7 +117,7 @@ func example_API_InstantiateTopicClient() { } @available(macOS 10.15, iOS 13, *) -func example_API_Publish(topicClient: TopicClient, cacheName: String) async { +func example_API_TopicPublish(topicClient: TopicClient, cacheName: String) async { let result = await topicClient.publish( cacheName: cacheName, topicName: "topic", @@ -133,7 +133,7 @@ func example_API_Publish(topicClient: TopicClient, cacheName: String) async { } @available(macOS 10.15, iOS 13, *) -func example_API_Subscribe(topicClient: TopicClient, cacheName: String) async { +func example_API_TopicSubscribe(topicClient: TopicClient, cacheName: String) async { let result = await topicClient.subscribe(cacheName: cacheName, topicName: "topic") switch result { case .subscription(let subscription): @@ -180,11 +180,11 @@ func main() async { await example_API_Delete(cacheClient: cacheClient, cacheName: cacheName) example_API_InstantiateTopicClient() - await example_API_Publish(topicClient: topicClient, cacheName: cacheName) + await example_API_TopicPublish(topicClient: topicClient, cacheName: cacheName) // make sure to timeout, else this example will cause the program to hang let subscribeTask = Task { - await example_API_Subscribe(topicClient: topicClient, cacheName: cacheName) + await example_API_TopicSubscribe(topicClient: topicClient, cacheName: cacheName) } // timeout in 3 seconds let timeoutTask = Task {