Skip to content

Commit f36bcd6

Browse files
committed
Fix usage examples
resolves google#31
1 parent a703efe commit f36bcd6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,22 @@ dependencies {
5454
}
5555
```
5656

57-
You can then use the formatter quite simply using the various `formatSource`
58-
methods. E.g.
57+
You can then use the formatter through the `formatSource` methods. E.g.
5958

6059
```java
61-
String formattedSource = Formatter.formatSource(sourceString);
60+
String formattedSource = new Formatter().formatSource(sourceString);
6261
```
6362

6463
or
6564

6665
```java
6766
CharSource source = ...
6867
CharSink output = ...
69-
Formatter.formatSource(source, output);
68+
new Formatter().formatSource(source, output);
7069
```
7170

72-
Generally speaking, your starting point should be the static methods found
73-
in `com.google.googlejavaformat.java.Formatter`.
71+
Generally speaking, your starting point should be the instance methods of
72+
`com.google.googlejavaformat.java.Formatter`.
7473

7574
Building from source
7675
--------------------

0 commit comments

Comments
 (0)