Skip to content

Commit a8cae26

Browse files
Sah, NandeshwarSah, Nandeshwar
authored andcommitted
Updated README
1 parent 712be0a commit a8cae26

File tree

1 file changed

+46
-37
lines changed

1 file changed

+46
-37
lines changed

README.md

Lines changed: 46 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ go install github.com/logic-building/functional-go/gofp
2121
```
2222
[[constraint]]
2323
name = "github.com/logic-building/functional-go"
24-
version = "8.8.0"
24+
version = "8.9.0"
2525
```
2626

2727
### Quick Start
@@ -171,13 +171,16 @@ Note:
171171
B. employee : package name
172172
C. "Employee, Teacher" : User defined data types
173173
174-
Note: Another option : -mapfun "true"
175-
This allows to include function - merge,zip
176-
Caution: It will complain at runtime if struct contains slice or array
177-
178-
Note: Another option: -sort go generate sorting related methods
179-
Ex.
180-
//go:generate gofp -destination fp.go -pkg employee -type "Employee" -sort "Employee:Name, Employee:Salary"
174+
Options on go:generate :
175+
A. -sort: to generate sorting functions for struct
176+
//go:generate gofp -destination fp.go -pkg employee -type "Employee" -sort "Employee:Name, Employee:Salary"
177+
178+
B. -set: to generate set functions-Union, Intersection, Difference, Set, Superset, Subset for struct
179+
//go:generate gofp -destination fp.go -pkg employee -type "Employee" -set "Employee:Name:string"
180+
181+
C. -mapfun: To generate Merge & Zip functions for struct
182+
//go:generate gofp -destination fp.go -pkg employee -type "Employee" -mapfun "true"
183+
Caution: It will complain at runtime if struct contains slice or array
181184
182185
3. Generate functional code
183186
go generate ./...
@@ -234,35 +237,41 @@ Ex.
234237

235238
### All Standard FP Function
236239
```
237-
1. Distinct<Type>
238-
2. Drop<Type>
239-
3. DropWhile<Type>
240-
4. Every<Type>
241-
5. Exists<Type>
242-
6. Filter<Type>
243-
7. FilterMap<Type>
244-
8. FilterMap<InputType><OutputType>
245-
9. Keys<Type>
246-
10. Map<Type>
247-
11. Map<InputType><OutputType>
248-
12. Max<Type>
249-
13. Merge<Type>
250-
14. Merge<Type1><Type2>
251-
15. Min<Type>
252-
16. MinMax<Type>
253-
17. PMap<Type>
254-
18. PMap<InputType><OutputType>
255-
19. Range<Type>
256-
20. Remove<Type>
257-
21. Reduce<Type>
258-
22. Rest<Type>
259-
23. Reverse<Type>
260-
24. Some<Type>
261-
25. Sort<Type>s
262-
26. Take<Type>
263-
27. TakeWhile<Type>
264-
28. Zip<Type>
265-
29. Zip<Type1><Type2>
240+
1. Difference<Type>
241+
2. Distinct<Type>
242+
3. Drop<Type>
243+
4. DropWhile<Type>
244+
5. Every<Type>
245+
6. Exists<Type>
246+
7. Filter<Type>
247+
8. FilterMap<Type>
248+
9. FilterMap<InputType><OutputType>
249+
10. Intersection<Type>
250+
11. Keys<Type>
251+
12. Map<Type>
252+
13. Map<InputType><OutputType>
253+
14. Max<Type>
254+
15. Merge<Type>
255+
16. Merge<Type1><Type2>
256+
17. Min<Type>
257+
18. MinMax<Type>
258+
19. PMap<Type>
259+
20. PMap<InputType><OutputType>
260+
21. Range<Type>
261+
22. Remove<Type>
262+
23. Reduce<Type>
263+
24. Rest<Type>
264+
25. Reverse<Type>
265+
26. Set<Type>
266+
27. Some<Type>
267+
28. Subset<Type>
268+
29. Superset<Type>
269+
30. Sort<Type>s
270+
31. Take<Type>
271+
32. TakeWhile<Type>
272+
33. Union<Type>
273+
34. Zip<Type>
274+
35. Zip<Type1><Type2>
266275
```
267276

268277
### Contains functions

0 commit comments

Comments
 (0)