Extend LogMe instance parameters (#438)

* Extend LogMe instance parameters

* Update acc test

* Add more field descriptions

* Improve code and tests

* Add more fields to acc test

* Fix linter

* Add float parameter
This commit is contained in:
João Palet 2024-07-01 12:09:26 +01:00 committed by GitHub
parent e553628b5e
commit a08dbd8926
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 868 additions and 200 deletions

View file

@ -78,6 +78,16 @@ func Int64ValueToPointer(s basetypes.Int64Value) *int64 {
return &value
}
// Float64ValueToPointer converts basetypes.Float64Value to a pointer to float64.
// It returns nil if the value is null or unknown.
func Float64ValueToPointer(s basetypes.Float64Value) *float64 {
if s.IsNull() || s.IsUnknown() {
return nil
}
value := s.ValueFloat64()
return &value
}
// BoolValueToPointer converts basetypes.BoolValue to a pointer to bool.
// It returns nil if the value is null or unknown.
func BoolValueToPointer(s basetypes.BoolValue) *bool {