Skip to content

Releases: DevNewbie1826/bind

Release v1.1.0

Choose a tag to compare

@DevNewbie1826 DevNewbie1826 released this 10 Aug 11:30

English Version

🎉 bind v1.1.0 Release

This release focuses on improving documentation, enhancing code quality, and officially applying the MIT license. These are important updates
to improve user experience and project reliability.

🚀 What's Changed

  • Code Style Standardization: All Go source files (.go) have been formatted with gofmt -s to improve code style consistency and readability.

📝 Documentation

📄 License

  • MIT License Applied: Officially applied the MIT License by adding a LICENSE file to the project and stating the license in the README.md. This
    ensures proper license detection by external tools like pkg.go.dev.

한국어 버전

🎉 bind v1.1.0 릴리즈

이번 릴리즈는 문서 개선, 코드 품질 향상, 그리고 공식적인 MIT 라이선스 적용에 중점을 두었습니다. 사용자 경험과 프로젝트의 신뢰도를 높이기 위한
중요한 업데이트입니다.

🚀 주요 변경사항

  • 코드 스타일 표준화: 모든 Go 소스 파일(.go)을 gofmt -s로 포맷하여 코드 스타일을 일관성 있게 개선하고 가독성을 높였습니다.

📝 문서

📄 라이선스

  • MIT 라이선스 적용: 프로젝트에 LICENSE 파일을 추가하고 README.md에 라이선스 정보를 명시하여, 누구나 자유롭게 사용할 수 있도록 MIT 라이선스를
    공식적으로 적용했습니다. 이를 통해 pkg.go.dev와 같은 외부 도구에서 라이선스를 정확하게 인식할 수 있습니다.

Release v1.0.0

Choose a tag to compare

@DevNewbie1826 DevNewbie1826 released this 09 Aug 14:24

This is a significant feature and stability release, introducing file uploads, major performance
improvements, and enhanced security.

✨ New Features

  • File Upload Support: Natively binds single (*multipart.FileHeader) and multiple
    ([]*multipart.FileHeader) files from multipart/form-data requests.
  • Detailed Error Paths: Errors are now wrapped in bind.BindError which includes the full field
    path (e.g., Parent.Child.Field), making debugging significantly easier.
  • Configurable Multipart Memory: Added bind.SetMaxMultipartMemory() to allow global configuration
    of the maximum memory used for parsing multipart forms.
  • Recursion Depth Limit: A recursion limit has been introduced to prevent stack overflows from
    malicious or deeply nested request bodies.

🚀 Performance & Stability

  • Reflection Caching: Struct analysis results are now cached using sync.Map, dramatically reducing
    reflection overhead on hot paths.
  • Concurrency Safety: The internal decoder registry is now fully thread-safe using sync.RWMutex.
  • Increased Test Coverage: Test coverage has been significantly increased to 86.8%, covering many
    edge cases and ensuring higher reliability.

🐛 Bug Fixes

  • Nil Error Panic: Fixed a panic that occurred when ErrorToJSON or ErrorToMap was called with a
    nil error.
  • HTTP Resource Leaks: Ensured that the request body is always fully read and closed across all
    decoders to allow for HTTP connection reuse.

✨ 새로운 기능

  • 파일 업로드 지원: multipart/form-data 요청으로부터 단일(*multipart.FileHeader) 및
    다중([]*multipart.FileHeader) 파일을 자동으로 바인딩합니다.
  • 상세한 오류 경로 추적: 이제 오류 발생 시 전체 필드 경로(예: Parent.Child.Field)가 포함된
    bind.BindError를 반환하여 디버깅이 훨씬 쉬워졌습니다.
  • 멀티파트 메모리 설정: bind.SetMaxMultipartMemory() 함수를 추가하여 멀티파트 폼 파싱에 사용되는
    최대 메모리를 전역적으로 설정할 수 있습니다.
  • 재귀 깊이 제한: 악의적이거나 깊이가 매우 깊은 요청으로 인한 스택 오버플로우를 방지하기 위해
    재귀 호출 제한 기능이 도입되었습니다.

🚀 성능 및 안정성

  • 리플렉션 캐싱: 구조체 분석 결과를 sync.Map에 캐싱하여, 자주 호출되는 코드 경로의 리플렉션
    오버헤드를 크게 줄였습니다.
  • 동시성 안전성: 내부 디코더 레지스트리를 sync.RWMutex를 사용하여 완전히
    스레드-세이프(thread-safe)하게 만들었습니다.
  • 테스트 커버리지 향상: 테스트 커버리지를 86.8%까지 크게 향상시켜 다양한 엣지 케이스를 검증하고
    신뢰도를 높였습니다.

🐛 버그 수정

  • Nil 에러 패닉 방지: ErrorToJSON 또는 ErrorToMap 함수에 nil 에러가 전달되었을 때 발생하던 패닉을
    수정했습니다.
  • HTTP 리소스 누수 방지: 모든 디코더에서 요청 본문을 완전히 읽고 닫도록 보장하여 HTTP 커넥션이
    올바르게 재사용되도록 수정했습니다.