Last active
July 29, 2023 15:06
-
-
Save sandipchitale/39355527688a35048daf6f32e713b017 to your computer and use it in GitHub Desktop.
Generate tree rows with emojis #tree
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.out.println(genIndent(0, "\uD83C\uDFD8\uFE0F") + " Contexts"); | |
System.out.println(genIndent(1, "\uD83C\uDFE0") + " Context: " + contextName); | |
System.out.println(genIndent(2, "β ") + " Positive Matches: "); | |
System.out.println(genIndent(2, "β") + " Negative Matches (at least one did not match): " + contextName); | |
System.out.println(genIndent(3, "\uD83D\uDC4D") + " Condition Name: " + conditionName); | |
System.out.println(genIndent(4, " \uD83D\uDEC8") + " Message: " + messageAndConditionDescriptor.getMessage()); | |
ποΈ Contexts | |
ββπ Context: application | |
β βββ Positive Matches: | |
β β ββπ Condition Name: AuditEventsEndpointAutoConfiguration | |
β β β βββ Matched Condition: OnAvailableEndpointCondition | |
β β β ββ π Message: @ConditionalOnAvailableEndpoint marked as exposed by a 'management.endpoints.jmx.exposure' property | |
private static String genIndent(int indent, String icon) { | |
if (indent == 0) { | |
return icon; | |
} | |
StringBuilder sb = new StringBuilder(" "); | |
for (int i = 0; i < (indent - 1); i++) { | |
sb.append("β "); | |
} | |
sb.append("ββ"); | |
sb.append(icon); | |
return sb.toString(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment