Commit graph

21 commits

Author SHA1 Message Date
31d2bea9c6
Merge pull request #4 from wneessen/sonarqube-action
Add SonarQube integration for code analysis
2024-09-11 10:20:55 +02:00
e557e4caac
Add SonarQube integration for code analysis
Introduce a new SonarQube configuration to the project. This includes a GitHub action workflow for continuous integration on the main branch, setting up Go environment, running unit tests, and performing SonarQube analysis. This addition aims to ensure code quality and coverage are continuously monitored.
2024-09-11 10:19:00 +02:00
02d6e1f130
Merge pull request #3 from wneessen/marshalling
Some checks failed
Codecov workflow / run (push) Failing after 4s
golangci-lint / lint (push) Failing after 4s
REUSE Compliance Check / test (push) Failing after 3s
Add JSON marshaling support for Variable types
2024-09-02 12:19:23 +02:00
dee653ae88
Update README to include marshalling capability
Expanded the description and features to cover both marshalling and unmarshalling of JSON fields. This clarifies the package's functionality, making it clear that it handles not only null values during unmarshalling but also during marshalling.
2024-09-02 12:15:38 +02:00
05d806adff
Add JSON marshaling support for Variable types
Introduced a NewVariable function for creating generics-based Variable types. Added MarshalJSON methods to support JSON encoding for various Nil types, ensuring proper handling of nil values. Updated tests and examples to verify the new marshaling functionality.
2024-09-02 12:13:54 +02:00
25913bbf9f
Merge pull request #2 from wneessen/remove-redundant-get
Some checks failed
Codecov workflow / run (push) Failing after 3s
golangci-lint / lint (push) Failing after 3s
REUSE Compliance Check / test (push) Failing after 2s
Remove redundant Get() method
2024-09-01 21:17:50 +02:00
1150734ab0
Remove redundant Get() method
The Get() method was simply an alias for the Value() method and did not add any functionality. This simplification makes the code cleaner and reduces unnecessary duplication, improving maintainability.
2024-09-01 21:14:46 +02:00
b11f8257d8
Merge pull request #1 from wneessen/add_uint_tpes
Add uint types
2024-09-01 19:52:07 +02:00
89d0a3f00e
Add comprehensive nil type JSON unmarshal tests
This commit restructures and extends the JSON unmarshal tests for nil types to cover more data types, including boolean, byte slice, float32, float64, int, int64, string, and various unsigned integers. Each test ensures proper handling of value retrieval, nil checks, and reset behavior, enhancing the robustness of the unmarshal functionality.
2024-09-01 19:48:57 +02:00
63c28cbb9e
Add nullable unsigned integer types
Introduced new types: NilUInt, NilUInt8, NilUInt16, NilUInt32, and NilUInt64 to support nullable unsigned integers. This enhancement aligns with existing nullable types for better consistency and flexibility.
2024-09-01 19:24:45 +02:00
65168ce50b
Downgrade Go version to 1.18
This change updates the Go version in go.mod from 1.23 to 1.18. It ensures compatibility with the current development environment and resolves any version-specific issues.```
2024-09-01 19:23:55 +02:00
bdd7efec82
Refactor data processing and message formatting
Updated the JSON data structure for better readability and added more comprehensive output formatting in the main function. Utilized a single 'output' string to accumulate messages, improving code readability and efficiency.
2024-09-01 17:05:11 +02:00
ab747282c8
Add example for Nil value JSON unmarshaling
Introduced ExampleVariable_UnmarshalJSON to demonstrate unmarshaling of JSON with nil and non-nil fields. This includes handling for multiple custom types and provides a sample output. Added necessary imports and error handling for clarity.
2024-09-01 17:04:55 +02:00
80f2ea15a5
Add additional nil checks in niljson_test.go
Enhanced the test coverage by adding nil checks for ByteSlice and Float32 types after reset. This ensures that more types are adequately handled and validated for nil values in the tests. Additionally, included a check for the string using the Get method.
2024-09-01 16:51:10 +02:00
fcc4f5d0d0
Add CC0-1.0 and MIT license files
Introduced CC0-1.0 and MIT license texts to the project for clear legal guidelines and attribution. These additions help clarify usage rights and responsibilities for contributors and users of the software.
2024-09-01 16:49:27 +02:00
34fae8a109
Fix indentation issue in README.md
Corrected the indentation of the Float32 field in the JSONType struct. This change improves code readability and maintains consistent formatting throughout the documentation.
2024-09-01 16:49:08 +02:00
d6b359f1f5
Fix login method to avoid null pointer exceptions
This update adds null checks before accessing user credentials during the login process. It ensures the application does not crash when trying to authenticate with incomplete data.
2024-09-01 16:47:26 +02:00
d558f5dffb
Add detailed README documentation with examples.
Expand the README to include license information, badges, and detailed documentation. Also provide example usage of the `niljson` package to help users understand how to integrate and use nullable JSON fields in their Go applications.
2024-09-01 16:46:02 +02:00
4224968915
Add support for additional types in niljson
Enhanced the niljson package to include support for byte slices and float32 types. Updated the test cases to validate these new types and modified method names to be more consistent.
2024-09-01 16:41:53 +02:00
03f6fd14d1
Initial checkin 2024-09-01 16:01:58 +02:00
f3a9441638
Initial commit 2024-09-01 15:53:52 +02:00