https://github.com/kasworld/prettystring
make pretty string(like python) golang struct
https://github.com/kasworld/prettystring
golang pretty-print python-like reflection
Last synced: 5 months ago
JSON representation
make pretty string(like python) golang struct
- Host: GitHub
- URL: https://github.com/kasworld/prettystring
- Owner: kasworld
- License: apache-2.0
- Created: 2019-11-06T08:03:48.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-03-13T05:42:25.000Z (almost 6 years ago)
- Last Synced: 2025-02-25T13:30:29.861Z (10 months ago)
- Topics: golang, pretty-print, python-like, reflection
- Language: Go
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prettystring
make pretty string(like python) golang struct
reflect 를 사용해서 golang object들을 string으로 만들어 줍니다.
object가 다른 object를 포함 하고 있는 경우 재귀적으로 처리 하며
이 회수를 제한 하기 위한 인자를 받습니다.
## struct field tag 로 printstring 사용법
hide : 필드 처리를 생략
hidevalue : 필드 내용을 숨김
simple : 필드 처리를 간단히 - 내부로 재귀 하지 않음.
example/main.go 참고