Skip to content
This repository was archived by the owner on May 14, 2023. It is now read-only.

Commit 20d3663

Browse files
committed
Add transform examples
1 parent 2560582 commit 20d3663

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

transform/transform_test.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,38 @@ func ExampleNewTitleConverter() {
4444
fmt.Println(tc.Title("the last of the mohicans"))
4545
// Output: The Last of the Mohicans
4646
}
47+
48+
func ExampleSimple() {
49+
fmt.Println(Simple("test string"))
50+
// Output: test string
51+
}
52+
53+
func ExampleDash() {
54+
fmt.Println(Dash("test string"))
55+
// Output: test-string
56+
}
57+
58+
func ExampleSnake() {
59+
fmt.Println(Snake("test string"))
60+
// Output: test_string
61+
}
62+
63+
func ExampleDot() {
64+
fmt.Println(Dot("test string"))
65+
// Output: test.string
66+
}
67+
68+
func ExampleConstant() {
69+
fmt.Println(Constant("test string"))
70+
// Output: TEST_STRING
71+
}
72+
73+
func ExamplePascal() {
74+
fmt.Println(Pascal("test string"))
75+
// Output: TestString
76+
}
77+
78+
func ExampleCamel() {
79+
fmt.Println(Camel("test string"))
80+
// Output: testString
81+
}

0 commit comments

Comments
 (0)