Skip to content

Commit 2e6abf1

Browse files
committed
Move main method to top of file
1 parent ac083ef commit 2e6abf1

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

src/main/java/AggregateSnippets.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,21 @@
77
import java.util.*;
88

99
public final class AggregateSnippets {
10+
public static void main(String[] args) throws Throwable {
11+
final var repoRoot = Paths.get("").toAbsolutePath();
12+
final var snippetsSrcRoot = repoRoot.resolve("src/main/java/com/vonage/quickstart");
13+
final var aggregator = new AggregateSnippets(snippetsSrcRoot);
14+
aggregator.computeContents();
15+
var destPath = repoRoot.resolve("SNIPPETS.md");
16+
aggregator.saveToFile(destPath);
17+
}
18+
19+
1020
public record CodeSnippetFile(
1121
Path file,
1222
int mainStartIndex, int mainEndIndex,
1323
int clientStartIndex, int clientEndIndex
14-
) {
15-
16-
}
24+
) { }
1725

1826
private StringBuilder sb;
1927
private final Path snippetsSrcRoot;
@@ -150,13 +158,4 @@ private static String toHeadingTitle(String title) {
150158
}
151159
return result;
152160
}
153-
154-
public static void main(String[] args) throws Throwable {
155-
final var repoRoot = Paths.get("").toAbsolutePath();
156-
final var snippetsSrcRoot = repoRoot.resolve("src/main/java/com/vonage/quickstart");
157-
final var aggregator = new AggregateSnippets(snippetsSrcRoot);
158-
aggregator.computeContents();
159-
var destPath = repoRoot.resolve("SNIPPETS.md");
160-
aggregator.saveToFile(destPath);
161-
}
162161
}

0 commit comments

Comments
 (0)