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

chore: api snippet formatting #92

Merged
merged 6 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/on-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

# Uncomment this step to verify the use of 'dart format' on each commit.
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
run: find lib/momento.dart lib/src example test -name "*.dart" -not -name doc_example_apis.dart -exec dart format --output=none --set-exit-if-changed {} \;

# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
Expand Down
15 changes: 5 additions & 10 deletions example/doc_example_apis/doc_example_apis.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ Future<void> example_API_InstantiateCacheClient() async {
}
}

Future<void> example_API_CreateCache(
CacheClient cacheClient, String cacheName) async {
Future<void> example_API_CreateCache(CacheClient cacheClient, String cacheName) async {
final result = await cacheClient.createCache(cacheName);
switch (result) {
case CreateCacheAlreadyExists():
Expand All @@ -37,8 +36,7 @@ Future<void> example_API_ListCaches(CacheClient cacheClient) async {
}
}

Future<void> example_API_DeleteCache(
CacheClient cacheClient, String cacheName) async {
Future<void> example_API_DeleteCache(CacheClient cacheClient, String cacheName) async {
final result = await cacheClient.deleteCache(cacheName);
switch (result) {
case DeleteCacheError():
Expand All @@ -49,8 +47,7 @@ Future<void> example_API_DeleteCache(
}
}

Future<void> example_API_Set(
CacheClient cacheClient, String cacheName, Value key, Value value) async {
Future<void> example_API_Set(CacheClient cacheClient, String cacheName, Value key, Value value) async {
final result = await cacheClient.set(cacheName, key, value);
switch (result) {
case SetError():
Expand All @@ -61,8 +58,7 @@ Future<void> example_API_Set(
}
}

Future<void> example_API_Get(
CacheClient cacheClient, String cacheName, Value key) async {
Future<void> example_API_Get(CacheClient cacheClient, String cacheName, Value key) async {
final result = await cacheClient.get(cacheName, key);
switch (result) {
case GetMiss():
Expand All @@ -74,8 +70,7 @@ Future<void> example_API_Get(
}
}

Future<void> example_API_Delete(
CacheClient cacheClient, String cacheName, Value key) async {
Future<void> example_API_Delete(CacheClient cacheClient, String cacheName, Value key) async {
final result = await cacheClient.delete(cacheName, key);
switch (result) {
case DeleteError():
Expand Down