From ad3a8c4987bd0ed888b346d5d0036fe95307cd31 Mon Sep 17 00:00:00 2001 From: Haim Kastner Date: Wed, 4 Dec 2024 00:52:25 +0200 Subject: [PATCH] Reorder unit and package --- README.md | 34 ++++++++--------- tests/test_unit_arithmetics_test.go | 4 +- tests/test_unit_comparing_test.go | 4 +- tests/test_unit_conversion_test.go | 6 +-- tests/test_unit_creation_test.go | 6 +-- tests/test_unit_dto_test.go | 18 ++++----- tests/test_unit_formatting_test.go | 38 +++++++++---------- ...ed_dose_of_ionizing_radiation_generated.go | 4 +- .../acceleration_generated.go | 4 +- .../amount_of_substance_generated.go | 4 +- .../amplitude_ratio_generated.go | 4 +- .../angle.go => units/angle_generated.go | 4 +- .../apparent_energy_generated.go | 4 +- .../apparent_power_generated.go | 4 +- .../area_density_generated.go | 4 +- .../area.go => units/area_generated.go | 4 +- .../area_moment_of_inertia_generated.go | 4 +- .../bit_rate_generated.go | 4 +- ...ake_specific_fuel_consumption_generated.go | 4 +- .../capacitance_generated.go | 4 +- ...fficient_of_thermal_expansion_generated.go | 4 +- .../compressibility_generated.go | 4 +- .../density.go => units/density_generated.go | 4 +- .../duration_generated.go | 4 +- .../dynamic_viscosity_generated.go | 4 +- .../electric_admittance_generated.go | 4 +- .../electric_charge_density_generated.go | 4 +- .../electric_charge_generated.go | 4 +- .../electric_conductance_generated.go | 4 +- .../electric_conductivity_generated.go | 4 +- .../electric_current_density_generated.go | 4 +- .../electric_current_generated.go | 4 +- .../electric_current_gradient_generated.go | 4 +- .../electric_field_generated.go | 4 +- .../electric_inductance_generated.go | 4 +- .../electric_potential_ac_generated.go | 4 +- ...lectric_potential_change_rate_generated.go | 4 +- .../electric_potential_dc_generated.go | 4 +- .../electric_potential_generated.go | 4 +- .../electric_resistance_generated.go | 4 +- .../electric_resistivity_generated.go | 4 +- ...ectric_surface_charge_density_generated.go | 4 +- .../energy_density_generated.go | 4 +- .../energy.go => units/energy_generated.go | 4 +- .../entropy.go => units/entropy_generated.go | 4 +- .../force_change_rate_generated.go | 4 +- .../force.go => units/force_generated.go | 4 +- .../force_per_length_generated.go | 4 +- .../frequency_generated.go | 4 +- .../fuel_efficiency_generated.go | 4 +- .../heat_flux_generated.go | 4 +- .../heat_transfer_coefficient_generated.go | 4 +- .../illuminance_generated.go | 4 +- .../impulse.go => units/impulse_generated.go | 4 +- .../information_generated.go | 4 +- .../irradiance_generated.go | 4 +- .../irradiation_generated.go | 4 +- .../jerk.go => units/jerk_generated.go | 4 +- .../kinematic_viscosity_generated.go | 4 +- .../leak_rate_generated.go | 4 +- .../length.go => units/length_generated.go | 4 +- .../level.go => units/level_generated.go | 4 +- .../linear_density_generated.go | 4 +- .../linear_power_density_generated.go | 4 +- .../luminance_generated.go | 4 +- .../luminosity_generated.go | 4 +- .../luminous_flux_generated.go | 4 +- .../luminous_intensity_generated.go | 4 +- .../magnetic_field_generated.go | 4 +- .../magnetic_flux_generated.go | 4 +- .../magnetization_generated.go | 4 +- .../mass_concentration_generated.go | 4 +- .../mass_flow_generated.go | 4 +- .../mass_flux_generated.go | 4 +- .../mass_fraction_generated.go | 4 +- .../mass.go => units/mass_generated.go | 4 +- .../mass_moment_of_inertia_generated.go | 4 +- .../molality_generated.go | 4 +- .../molar_energy_generated.go | 4 +- .../molar_entropy_generated.go | 4 +- .../molar_flow_generated.go | 4 +- .../molar_mass_generated.go | 4 +- .../molarity_generated.go | 4 +- .../permeability_generated.go | 4 +- .../permittivity_generated.go | 4 +- .../porous_medium_permeability_generated.go | 4 +- .../power_density_generated.go | 4 +- .../power.go => units/power_generated.go | 4 +- .../power_ratio_generated.go | 4 +- .../pressure_change_rate_generated.go | 4 +- .../pressure_generated.go | 4 +- .../radiation_equivalent_dose_generated.go | 4 +- .../radiation_exposure_generated.go | 4 +- .../radioactivity_generated.go | 4 +- .../ratio_change_rate_generated.go | 4 +- .../ratio.go => units/ratio_generated.go | 4 +- .../reactive_energy_generated.go | 4 +- .../reactive_power_generated.go | 4 +- .../reciprocal_area_generated.go | 4 +- .../reciprocal_length_generated.go | 4 +- .../relative_humidity_generated.go | 4 +- .../rotational_acceleration_generated.go | 4 +- .../rotational_speed_generated.go | 4 +- .../rotational_stiffness_generated.go | 4 +- ...tational_stiffness_per_length_generated.go | 4 +- .../scalar.go => units/scalar_generated.go | 4 +- .../solid_angle_generated.go | 4 +- .../specific_energy_generated.go | 4 +- .../specific_entropy_generated.go | 4 +- .../specific_fuel_consumption_generated.go | 4 +- .../specific_volume_generated.go | 4 +- .../specific_weight_generated.go | 4 +- .../speed.go => units/speed_generated.go | 4 +- .../standard_volume_flow_generated.go | 4 +- .../temperature_change_rate_generated.go | 4 +- .../temperature_delta_generated.go | 4 +- .../temperature_generated.go | 4 +- .../temperature_gradient_generated.go | 4 +- .../thermal_conductivity_generated.go | 4 +- .../thermal_resistance_generated.go | 4 +- .../torque.go => units/torque_generated.go | 4 +- .../torque_per_length_generated.go | 4 +- .../turbidity_generated.go | 4 +- .../vitamin_a_generated.go | 4 +- .../volume_concentration_generated.go | 4 +- .../volume_flow_generated.go | 4 +- .../volume_flow_per_area_generated.go | 4 +- .../volume.go => units/volume_generated.go | 4 +- .../volume_per_length_generated.go | 4 +- .../volumetric_heat_capacity_generated.go | 4 +- .../warping_moment_of_inertia_generated.go | 4 +- .../generators/generate_unit_class.py | 2 +- .../templates/unit_template.jinja2 | 4 +- 133 files changed, 431 insertions(+), 181 deletions(-) rename unitsnet_go/absorbed_dose_of_ionizing_radiation.go => units/absorbed_dose_of_ionizing_radiation_generated.go (99%) rename unitsnet_go/acceleration.go => units/acceleration_generated.go (99%) rename unitsnet_go/amount_of_substance.go => units/amount_of_substance_generated.go (99%) rename unitsnet_go/amplitude_ratio.go => units/amplitude_ratio_generated.go (99%) rename unitsnet_go/angle.go => units/angle_generated.go (99%) rename unitsnet_go/apparent_energy.go => units/apparent_energy_generated.go (99%) rename unitsnet_go/apparent_power.go => units/apparent_power_generated.go (99%) rename unitsnet_go/area_density.go => units/area_density_generated.go (99%) rename unitsnet_go/area.go => units/area_generated.go (99%) rename unitsnet_go/area_moment_of_inertia.go => units/area_moment_of_inertia_generated.go (99%) rename unitsnet_go/bit_rate.go => units/bit_rate_generated.go (99%) rename unitsnet_go/brake_specific_fuel_consumption.go => units/brake_specific_fuel_consumption_generated.go (99%) rename unitsnet_go/capacitance.go => units/capacitance_generated.go (99%) rename unitsnet_go/coefficient_of_thermal_expansion.go => units/coefficient_of_thermal_expansion_generated.go (99%) rename unitsnet_go/compressibility.go => units/compressibility_generated.go (99%) rename unitsnet_go/density.go => units/density_generated.go (99%) rename unitsnet_go/duration.go => units/duration_generated.go (99%) rename unitsnet_go/dynamic_viscosity.go => units/dynamic_viscosity_generated.go (99%) rename unitsnet_go/electric_admittance.go => units/electric_admittance_generated.go (99%) rename unitsnet_go/electric_charge_density.go => units/electric_charge_density_generated.go (99%) rename unitsnet_go/electric_charge.go => units/electric_charge_generated.go (99%) rename unitsnet_go/electric_conductance.go => units/electric_conductance_generated.go (99%) rename unitsnet_go/electric_conductivity.go => units/electric_conductivity_generated.go (99%) rename unitsnet_go/electric_current_density.go => units/electric_current_density_generated.go (99%) rename unitsnet_go/electric_current.go => units/electric_current_generated.go (99%) rename unitsnet_go/electric_current_gradient.go => units/electric_current_gradient_generated.go (99%) rename unitsnet_go/electric_field.go => units/electric_field_generated.go (99%) rename unitsnet_go/electric_inductance.go => units/electric_inductance_generated.go (99%) rename unitsnet_go/electric_potential_ac.go => units/electric_potential_ac_generated.go (99%) rename unitsnet_go/electric_potential_change_rate.go => units/electric_potential_change_rate_generated.go (99%) rename unitsnet_go/electric_potential_dc.go => units/electric_potential_dc_generated.go (99%) rename unitsnet_go/electric_potential.go => units/electric_potential_generated.go (99%) rename unitsnet_go/electric_resistance.go => units/electric_resistance_generated.go (99%) rename unitsnet_go/electric_resistivity.go => units/electric_resistivity_generated.go (99%) rename unitsnet_go/electric_surface_charge_density.go => units/electric_surface_charge_density_generated.go (99%) rename unitsnet_go/energy_density.go => units/energy_density_generated.go (99%) rename unitsnet_go/energy.go => units/energy_generated.go (99%) rename unitsnet_go/entropy.go => units/entropy_generated.go (99%) rename unitsnet_go/force_change_rate.go => units/force_change_rate_generated.go (99%) rename unitsnet_go/force.go => units/force_generated.go (99%) rename unitsnet_go/force_per_length.go => units/force_per_length_generated.go (99%) rename unitsnet_go/frequency.go => units/frequency_generated.go (99%) rename unitsnet_go/fuel_efficiency.go => units/fuel_efficiency_generated.go (99%) rename unitsnet_go/heat_flux.go => units/heat_flux_generated.go (99%) rename unitsnet_go/heat_transfer_coefficient.go => units/heat_transfer_coefficient_generated.go (99%) rename unitsnet_go/illuminance.go => units/illuminance_generated.go (99%) rename unitsnet_go/impulse.go => units/impulse_generated.go (99%) rename unitsnet_go/information.go => units/information_generated.go (99%) rename unitsnet_go/irradiance.go => units/irradiance_generated.go (99%) rename unitsnet_go/irradiation.go => units/irradiation_generated.go (99%) rename unitsnet_go/jerk.go => units/jerk_generated.go (99%) rename unitsnet_go/kinematic_viscosity.go => units/kinematic_viscosity_generated.go (99%) rename unitsnet_go/leak_rate.go => units/leak_rate_generated.go (99%) rename unitsnet_go/length.go => units/length_generated.go (99%) rename unitsnet_go/level.go => units/level_generated.go (99%) rename unitsnet_go/linear_density.go => units/linear_density_generated.go (99%) rename unitsnet_go/linear_power_density.go => units/linear_power_density_generated.go (99%) rename unitsnet_go/luminance.go => units/luminance_generated.go (99%) rename unitsnet_go/luminosity.go => units/luminosity_generated.go (99%) rename unitsnet_go/luminous_flux.go => units/luminous_flux_generated.go (99%) rename unitsnet_go/luminous_intensity.go => units/luminous_intensity_generated.go (99%) rename unitsnet_go/magnetic_field.go => units/magnetic_field_generated.go (99%) rename unitsnet_go/magnetic_flux.go => units/magnetic_flux_generated.go (99%) rename unitsnet_go/magnetization.go => units/magnetization_generated.go (99%) rename unitsnet_go/mass_concentration.go => units/mass_concentration_generated.go (99%) rename unitsnet_go/mass_flow.go => units/mass_flow_generated.go (99%) rename unitsnet_go/mass_flux.go => units/mass_flux_generated.go (99%) rename unitsnet_go/mass_fraction.go => units/mass_fraction_generated.go (99%) rename unitsnet_go/mass.go => units/mass_generated.go (99%) rename unitsnet_go/mass_moment_of_inertia.go => units/mass_moment_of_inertia_generated.go (99%) rename unitsnet_go/molality.go => units/molality_generated.go (99%) rename unitsnet_go/molar_energy.go => units/molar_energy_generated.go (99%) rename unitsnet_go/molar_entropy.go => units/molar_entropy_generated.go (99%) rename unitsnet_go/molar_flow.go => units/molar_flow_generated.go (99%) rename unitsnet_go/molar_mass.go => units/molar_mass_generated.go (99%) rename unitsnet_go/molarity.go => units/molarity_generated.go (99%) rename unitsnet_go/permeability.go => units/permeability_generated.go (99%) rename unitsnet_go/permittivity.go => units/permittivity_generated.go (99%) rename unitsnet_go/porous_medium_permeability.go => units/porous_medium_permeability_generated.go (99%) rename unitsnet_go/power_density.go => units/power_density_generated.go (99%) rename unitsnet_go/power.go => units/power_generated.go (99%) rename unitsnet_go/power_ratio.go => units/power_ratio_generated.go (99%) rename unitsnet_go/pressure_change_rate.go => units/pressure_change_rate_generated.go (99%) rename unitsnet_go/pressure.go => units/pressure_generated.go (99%) rename unitsnet_go/radiation_equivalent_dose.go => units/radiation_equivalent_dose_generated.go (99%) rename unitsnet_go/radiation_exposure.go => units/radiation_exposure_generated.go (99%) rename unitsnet_go/radioactivity.go => units/radioactivity_generated.go (99%) rename unitsnet_go/ratio_change_rate.go => units/ratio_change_rate_generated.go (99%) rename unitsnet_go/ratio.go => units/ratio_generated.go (99%) rename unitsnet_go/reactive_energy.go => units/reactive_energy_generated.go (99%) rename unitsnet_go/reactive_power.go => units/reactive_power_generated.go (99%) rename unitsnet_go/reciprocal_area.go => units/reciprocal_area_generated.go (99%) rename unitsnet_go/reciprocal_length.go => units/reciprocal_length_generated.go (99%) rename unitsnet_go/relative_humidity.go => units/relative_humidity_generated.go (99%) rename unitsnet_go/rotational_acceleration.go => units/rotational_acceleration_generated.go (99%) rename unitsnet_go/rotational_speed.go => units/rotational_speed_generated.go (99%) rename unitsnet_go/rotational_stiffness.go => units/rotational_stiffness_generated.go (99%) rename unitsnet_go/rotational_stiffness_per_length.go => units/rotational_stiffness_per_length_generated.go (99%) rename unitsnet_go/scalar.go => units/scalar_generated.go (99%) rename unitsnet_go/solid_angle.go => units/solid_angle_generated.go (99%) rename unitsnet_go/specific_energy.go => units/specific_energy_generated.go (99%) rename unitsnet_go/specific_entropy.go => units/specific_entropy_generated.go (99%) rename unitsnet_go/specific_fuel_consumption.go => units/specific_fuel_consumption_generated.go (99%) rename unitsnet_go/specific_volume.go => units/specific_volume_generated.go (99%) rename unitsnet_go/specific_weight.go => units/specific_weight_generated.go (99%) rename unitsnet_go/speed.go => units/speed_generated.go (99%) rename unitsnet_go/standard_volume_flow.go => units/standard_volume_flow_generated.go (99%) rename unitsnet_go/temperature_change_rate.go => units/temperature_change_rate_generated.go (99%) rename unitsnet_go/temperature_delta.go => units/temperature_delta_generated.go (99%) rename unitsnet_go/temperature.go => units/temperature_generated.go (99%) rename unitsnet_go/temperature_gradient.go => units/temperature_gradient_generated.go (99%) rename unitsnet_go/thermal_conductivity.go => units/thermal_conductivity_generated.go (99%) rename unitsnet_go/thermal_resistance.go => units/thermal_resistance_generated.go (99%) rename unitsnet_go/torque.go => units/torque_generated.go (99%) rename unitsnet_go/torque_per_length.go => units/torque_per_length_generated.go (99%) rename unitsnet_go/turbidity.go => units/turbidity_generated.go (99%) rename unitsnet_go/vitamin_a.go => units/vitamin_a_generated.go (99%) rename unitsnet_go/volume_concentration.go => units/volume_concentration_generated.go (99%) rename unitsnet_go/volume_flow.go => units/volume_flow_generated.go (99%) rename unitsnet_go/volume_flow_per_area.go => units/volume_flow_per_area_generated.go (99%) rename unitsnet_go/volume.go => units/volume_generated.go (99%) rename unitsnet_go/volume_per_length.go => units/volume_per_length_generated.go (99%) rename unitsnet_go/volumetric_heat_capacity.go => units/volumetric_heat_capacity_generated.go (99%) rename unitsnet_go/warping_moment_of_inertia.go => units/warping_moment_of_inertia_generated.go (99%) diff --git a/README.md b/README.md index e6c5817..4a4fda5 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ It offers support for more than 100 unit types across various unit categories, i The API is designed to be user-friendly and straightforward to use. -The library is built on top of the [Units.NET](https://github.com/angularsen/UnitsNet) project and leverages their [definitions sources](https://github.com/angularsen/UnitsNet/tree/master/Common/UnitDefinitions) to generate the Python unit classes. +The library is built on top of the [Units.NET](https://github.com/angularsen/UnitsNet) project and leverages their [definitions sources](https://github.com/angularsen/UnitsNet/tree/master/Common/UnitDefinitions) to generate the Golang units. ###### The unitsnet-go package does not require any external dependencies or packages to function. @@ -28,22 +28,22 @@ go get github.com/haimkastner/unitsnet-go ## Example Usage -```go +```golang package main import ( "log" - "github.com/haimkastner/unitsnet-go" + "github.com/haimkastner/unitsnet-go/units" ) func main() { // Create a factory instance - af := unitsnet_go.AngleFactory{} + af := units.AngleFactory{} angle, _ := af.FromDegrees(180) // equals to - angle, _ := af.CreateAngle(180, unitsnet_go.AngleDegree) + angle, _ := af.CreateAngle(180, units.AngleDegree) log.Println(angle.Radians()) // 3.141592653589793 log.Println(angle.Microradians()) // 3141592.65358979 @@ -51,17 +51,17 @@ func main() { log.Println(angle.Microdegrees()) // 180000000 // As an alternative, a convert style method are also available - log.Println(angle.Convert(unitsnet_go.AngleRadian)) // 3.141592653589793 - log.Println(angle.Convert(unitsnet_go.AngleMicroradian)) // 3141592.65358979 - log.Println(angle.Convert(unitsnet_go.AngleGradian)) // 200 - log.Println(angle.Convert(unitsnet_go.AngleMicrodegree)) // 180000000 + log.Println(angle.Convert(units.AngleRadian)) // 3.141592653589793 + log.Println(angle.Convert(units.AngleMicroradian)) // 3141592.65358979 + log.Println(angle.Convert(units.AngleGradian)) // 200 + log.Println(angle.Convert(units.AngleMicrodegree)) // 180000000 // Print the default unit to_string (The default for angle is degrees) log.Println(angle) // 180.00 ° // Specify unit and fraction digits max length - log.Println(angle.ToString(unitsnet_go.AngleDegree, 0)) // 180 ° - log.Println(angle.ToString(unitsnet_go.AngleRadian, 3)) // 3.141 rad + log.Println(angle.ToString(units.AngleDegree, 0)) // 180 ° + log.Println(angle.ToString(units.AngleRadian, 3)) // 3.141 rad } ``` @@ -70,8 +70,8 @@ func main() { Check, compare, calculate etc. with unitsnet: -```go -lf := unitsnet_go.LengthFactory{} +```golang +lf := units.LengthFactory{} length1, _ := lf.FromMeters(10) length2, _ := lf.FromDecimeters(100) @@ -103,8 +103,8 @@ log.Println(results4) // 3.33 m As UnitsNet provides a convenient way to work within a running service, there are occasions where the data needs to be exposed outside of the service, typically through an API containing the unit value or consumed from an API. To support this with a clear API schema and make it easy to convert to and from this schema to the specific format, it's recommended to use DTOs and the UnitsNet flavor converters. -```go -lf := unitsnet_go.LengthFactory{} +```golang +lf := units.LengthFactory{} length, _ := lf.FromMeters(100.01) // Obtain the DTO object as json, represented by the default unit - meter @@ -112,7 +112,7 @@ lengthDtoJson, _ := length.ToDtoJSON(nil) log.Println(string(lengthDtoJson)) // {"value":100.01,"unit":"Meter"} // Obtain the same value but represent DTO in KM -lengthKilometer := unitsnet_go.LengthKilometer // Default value +lengthKilometer := units.LengthKilometer // Default value lengthDtoRepresentsInKmJson, _ := length.ToDtoJSON(&lengthKilometer) log.Println(string(lengthDtoRepresentsInKmJson)) // {"value":0.10001,"unit":"Kilometer"} @@ -130,7 +130,7 @@ lengthDto := length.ToDto(nil) // # Get the json representation of the DTO lengthJson, _ := lengthDto.ToJSON() // {"value":100.01,"unit":"Meter"} // # Obtain DTO instance from a json representation -lengthDtoFromJson, _ := unitsnet_go.LengthDtoFactory{}.FromJSON(lengthJson) +lengthDtoFromJson, _ := units.LengthDtoFactory{}.FromJSON(lengthJson) // # Obtain Length unit from a DTO instance lengthFromJson, _ := lf.FromDto(*lengthDtoFromJson) log.Println(lengthFromJson) // 100.01 m diff --git a/tests/test_unit_arithmetics_test.go b/tests/test_unit_arithmetics_test.go index 3853f2d..7aae278 100644 --- a/tests/test_unit_arithmetics_test.go +++ b/tests/test_unit_arithmetics_test.go @@ -3,11 +3,11 @@ package unitsnet_go_test import ( "testing" - "github.com/haimkastner/unitsnet-go/unitsnet_go" + "github.com/haimkastner/unitsnet-go/units" ) func TestUnitArithmetics(t *testing.T) { - lf := unitsnet_go.LengthFactory{} + lf := units.LengthFactory{} length1, _ := lf.FromMeters(10) length2, _ := lf.FromMeters(3) diff --git a/tests/test_unit_comparing_test.go b/tests/test_unit_comparing_test.go index 91da602..0fda6a1 100644 --- a/tests/test_unit_comparing_test.go +++ b/tests/test_unit_comparing_test.go @@ -3,11 +3,11 @@ package unitsnet_go_test import ( "testing" - "github.com/haimkastner/unitsnet-go/unitsnet_go" + "github.com/haimkastner/unitsnet-go/units" ) func TestUnitComparing(t *testing.T) { - lf := unitsnet_go.LengthFactory{} + lf := units.LengthFactory{} length1, _ := lf.FromMeters(10) length2, _ := lf.FromDecimeters(100) length3, _ := lf.FromMeters(3) diff --git a/tests/test_unit_conversion_test.go b/tests/test_unit_conversion_test.go index 30b5501..a7a914b 100644 --- a/tests/test_unit_conversion_test.go +++ b/tests/test_unit_conversion_test.go @@ -4,11 +4,11 @@ import ( "math" "testing" - "github.com/haimkastner/unitsnet-go/unitsnet_go" + "github.com/haimkastner/unitsnet-go/units" ) -var af = unitsnet_go.AngleFactory{} -var inf = unitsnet_go.InformationFactory{} +var af = units.AngleFactory{} +var inf = units.InformationFactory{} var maxDelta = 0.0000001 func TestConvertFromBaseToOtherUnit(t *testing.T) { diff --git a/tests/test_unit_creation_test.go b/tests/test_unit_creation_test.go index 48d8546..89b55fa 100644 --- a/tests/test_unit_creation_test.go +++ b/tests/test_unit_creation_test.go @@ -3,14 +3,14 @@ package unitsnet_go_test import ( "testing" - "github.com/haimkastner/unitsnet-go/unitsnet_go" + "github.com/haimkastner/unitsnet-go/units" ) func TestUnitCreation(t *testing.T) { // Create a factory instance - af := unitsnet_go.AngleFactory{} + af := units.AngleFactory{} - angleCreateDriven, _ := af.CreateAngle(180, unitsnet_go.AngleDegree) + angleCreateDriven, _ := af.CreateAngle(180, units.AngleDegree) angleFromDriven, _ := af.FromDegrees(180) if angleCreateDriven.BaseValue() != angleFromDriven.BaseValue() { diff --git a/tests/test_unit_dto_test.go b/tests/test_unit_dto_test.go index 61af66d..db78df9 100644 --- a/tests/test_unit_dto_test.go +++ b/tests/test_unit_dto_test.go @@ -3,11 +3,11 @@ package unitsnet_go_test import ( "testing" - "github.com/haimkastner/unitsnet-go/unitsnet_go" + "github.com/haimkastner/unitsnet-go/units" ) func TestUnitDto(t *testing.T) { - lf := unitsnet_go.LengthFactory{} + lf := units.LengthFactory{} // Create a length instance from meters length1, _ := lf.FromMeters(100.01) @@ -23,7 +23,7 @@ func TestUnitDto(t *testing.T) { // Test: Create JSON from a specific unit (Centimeter) t.Run("Test Create JSON From Specific Unit", func(t *testing.T) { - lengthInCm := unitsnet_go.LengthCentimeter + lengthInCm := units.LengthCentimeter dtoJson, _ := length1.ToDtoJSON(&lengthInCm) expected := `{"value":10001,"unit":"Centimeter"}` if string(dtoJson) != expected { @@ -42,7 +42,7 @@ func TestUnitDto(t *testing.T) { // Test: Directly create JSON from a specific unit t.Run("Test Directly Create JSON From Specific Unit", func(t *testing.T) { - lengthInCm := unitsnet_go.LengthCentimeter + lengthInCm := units.LengthCentimeter dtoJson, _ := length1.ToDtoJSON(&lengthInCm) expected := `{"value":10001,"unit":"Centimeter"}` if string(dtoJson) != expected { @@ -60,7 +60,7 @@ func TestUnitDto(t *testing.T) { // Test: Create DTO from a specific unit t.Run("Test Create DTO From Specific Unit", func(t *testing.T) { - lengthInCm := unitsnet_go.LengthCentimeter + lengthInCm := units.LengthCentimeter dto := length1.ToDto(&lengthInCm) if dto.Value != 10001 || dto.Unit != "Centimeter" { t.Errorf("Expected {10001, Centimeter}, got {%f, %s}", dto.Value, dto.Unit) @@ -78,7 +78,7 @@ func TestUnitDto(t *testing.T) { // Test: Load from specific unit JSON t.Run("Test Load From Specific Unit JSON", func(t *testing.T) { - lengthInCm := unitsnet_go.LengthCentimeter + lengthInCm := units.LengthCentimeter dtoJson, _ := length1.ToDtoJSON(&lengthInCm) lengthFromJson, _ := lf.FromDtoJSON(dtoJson) if lengthFromJson.Decimeters() != 1000.1 { @@ -97,7 +97,7 @@ func TestUnitDto(t *testing.T) { // Test: Load from specific unit DTO t.Run("Test Load From Specific Unit DTO", func(t *testing.T) { - lengthInCm := unitsnet_go.LengthCentimeter + lengthInCm := units.LengthCentimeter dto := length1.ToDto(&lengthInCm) lengthFromDto, _ := lf.FromDto(dto) if lengthFromDto.Decimeters() != 1000.1 { @@ -134,13 +134,13 @@ func TestUnitDto(t *testing.T) { // Test: Should be similar values from two DTO representations t.Run("Test Should Be Similar Values From Two DTO Representations", func(t *testing.T) { - length, _ := unitsnet_go.LengthFactory{}.FromMeters(100.01) + length, _ := units.LengthFactory{}.FromMeters(100.01) // Obtain DTO object as JSON, represented by default unit (Meter) lengthDtoJson, _ := length.ToDtoJSON(nil) // Obtain same value represented in kilometers - lengthKilometer := unitsnet_go.LengthKilometer + lengthKilometer := units.LengthKilometer lengthDtoRepresentsInKmJson, _ := length.ToDtoJSON(&lengthKilometer) // Load JSON to DTO, and load diff --git a/tests/test_unit_formatting_test.go b/tests/test_unit_formatting_test.go index 602a3ae..d0b8936 100644 --- a/tests/test_unit_formatting_test.go +++ b/tests/test_unit_formatting_test.go @@ -4,11 +4,11 @@ import ( "fmt" "testing" - "github.com/haimkastner/unitsnet-go/unitsnet_go" + "github.com/haimkastner/unitsnet-go/units" ) func TestFmtFormatDefault(t *testing.T) { - angle, _ := unitsnet_go.AngleFactory{}.FromDegrees(180) + angle, _ := units.AngleFactory{}.FromDegrees(180) expected := "180.00 °" if fmt.Sprintf("%v", angle) != expected { t.Errorf("Expected '%s', got '%s'", expected, fmt.Sprintf("%v", angle)) @@ -16,58 +16,58 @@ func TestFmtFormatDefault(t *testing.T) { } func TestFormatBase(t *testing.T) { - angle, _ := unitsnet_go.AngleFactory{}.FromDegrees(180) - if angle.ToString(unitsnet_go.AngleDegree, 0) != "180 °" { - t.Errorf("Expected '180 °', got '%s'", angle.ToString(unitsnet_go.AngleDegree, 0)) + angle, _ := units.AngleFactory{}.FromDegrees(180) + if angle.ToString(units.AngleDegree, 0) != "180 °" { + t.Errorf("Expected '180 °', got '%s'", angle.ToString(units.AngleDegree, 0)) } } func TestFormatOtherUnit(t *testing.T) { - angle, _ := unitsnet_go.AngleFactory{}.FromDegrees(180) + angle, _ := units.AngleFactory{}.FromDegrees(180) - if angle.ToString(unitsnet_go.AngleDegree, 0) != "180 °" { - t.Errorf("Expected '180 °', got '%s'", angle.ToString(unitsnet_go.AngleDegree, 0)) + if angle.ToString(units.AngleDegree, 0) != "180 °" { + t.Errorf("Expected '180 °', got '%s'", angle.ToString(units.AngleDegree, 0)) } - if angle.ToString(unitsnet_go.AngleRadian, -1) != "3.141592653589793 rad" { - t.Errorf("Expected '3.141592653589793 rad', got '%s'", angle.ToString(unitsnet_go.AngleRadian, -1)) + if angle.ToString(units.AngleRadian, -1) != "3.141592653589793 rad" { + t.Errorf("Expected '3.141592653589793 rad', got '%s'", angle.ToString(units.AngleRadian, -1)) } - if angle.ToString(unitsnet_go.AngleMilliradian, -1) != "3141.592653589793 mrad" { - t.Errorf("Expected '3141.592653589793 mrad', got '%s'", angle.ToString(unitsnet_go.AngleRadian, -1)) + if angle.ToString(units.AngleMilliradian, -1) != "3141.592653589793 mrad" { + t.Errorf("Expected '3141.592653589793 mrad', got '%s'", angle.ToString(units.AngleRadian, -1)) } } func TestFormatWithDigitsLimit(t *testing.T) { - angle, _ := unitsnet_go.AngleFactory{}.FromDegrees(180) + angle, _ := units.AngleFactory{}.FromDegrees(180) // Without limit - if result := angle.ToString(unitsnet_go.AngleRadian, -1); result != "3.141592653589793 rad" { + if result := angle.ToString(units.AngleRadian, -1); result != "3.141592653589793 rad" { t.Errorf("Expected '3.141592653589793 rad', got '%s'", result) } // Without limit - random negative number - if result := angle.ToString(unitsnet_go.AngleRadian, -10); result != "3.141592653589793 rad" { + if result := angle.ToString(units.AngleRadian, -10); result != "3.141592653589793 rad" { t.Errorf("Expected '3.141592653589793 rad', got '%s'", result) } // Limit to 0 digits - if result := angle.ToString(unitsnet_go.AngleRadian, 0); result != "3 rad" { + if result := angle.ToString(units.AngleRadian, 0); result != "3 rad" { t.Errorf("Expected '3 rad', got '%s'", result) } // Limit to 1 digit - if result := angle.ToString(unitsnet_go.AngleRadian, 1); result != "3.1 rad" { + if result := angle.ToString(units.AngleRadian, 1); result != "3.1 rad" { t.Errorf("Expected '3.1 rad', got '%s'", result) } // Limit to 2 digits - if result := angle.ToString(unitsnet_go.AngleRadian, 2); result != "3.14 rad" { + if result := angle.ToString(units.AngleRadian, 2); result != "3.14 rad" { t.Errorf("Expected '3.14 rad', got '%s'", result) } // No change if it's already formatted correctly - if result := angle.ToString(unitsnet_go.AngleDegree, 2); result != "180.00 °" { + if result := angle.ToString(units.AngleDegree, 2); result != "180.00 °" { t.Errorf("Expected '180.00 °', got '%s'", result) } } diff --git a/unitsnet_go/absorbed_dose_of_ionizing_radiation.go b/units/absorbed_dose_of_ionizing_radiation_generated.go similarity index 99% rename from unitsnet_go/absorbed_dose_of_ionizing_radiation.go rename to units/absorbed_dose_of_ionizing_radiation_generated.go index 01e99a8..da1b40b 100644 --- a/unitsnet_go/absorbed_dose_of_ionizing_radiation.go +++ b/units/absorbed_dose_of_ionizing_radiation_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/acceleration.go b/units/acceleration_generated.go similarity index 99% rename from unitsnet_go/acceleration.go rename to units/acceleration_generated.go index 60e4117..8a2d17f 100644 --- a/unitsnet_go/acceleration.go +++ b/units/acceleration_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/amount_of_substance.go b/units/amount_of_substance_generated.go similarity index 99% rename from unitsnet_go/amount_of_substance.go rename to units/amount_of_substance_generated.go index ea3a464..03e9be0 100644 --- a/unitsnet_go/amount_of_substance.go +++ b/units/amount_of_substance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/amplitude_ratio.go b/units/amplitude_ratio_generated.go similarity index 99% rename from unitsnet_go/amplitude_ratio.go rename to units/amplitude_ratio_generated.go index 127a704..8edb3f4 100644 --- a/unitsnet_go/amplitude_ratio.go +++ b/units/amplitude_ratio_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/angle.go b/units/angle_generated.go similarity index 99% rename from unitsnet_go/angle.go rename to units/angle_generated.go index c125ef2..448dec7 100644 --- a/unitsnet_go/angle.go +++ b/units/angle_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/apparent_energy.go b/units/apparent_energy_generated.go similarity index 99% rename from unitsnet_go/apparent_energy.go rename to units/apparent_energy_generated.go index bfd2c3c..c7596fe 100644 --- a/unitsnet_go/apparent_energy.go +++ b/units/apparent_energy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/apparent_power.go b/units/apparent_power_generated.go similarity index 99% rename from unitsnet_go/apparent_power.go rename to units/apparent_power_generated.go index 3e25209..2316ecb 100644 --- a/unitsnet_go/apparent_power.go +++ b/units/apparent_power_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/area_density.go b/units/area_density_generated.go similarity index 99% rename from unitsnet_go/area_density.go rename to units/area_density_generated.go index 59cea8d..5a17892 100644 --- a/unitsnet_go/area_density.go +++ b/units/area_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/area.go b/units/area_generated.go similarity index 99% rename from unitsnet_go/area.go rename to units/area_generated.go index 6163f5a..d7abd06 100644 --- a/unitsnet_go/area.go +++ b/units/area_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/area_moment_of_inertia.go b/units/area_moment_of_inertia_generated.go similarity index 99% rename from unitsnet_go/area_moment_of_inertia.go rename to units/area_moment_of_inertia_generated.go index 847e13f..65557bf 100644 --- a/unitsnet_go/area_moment_of_inertia.go +++ b/units/area_moment_of_inertia_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/bit_rate.go b/units/bit_rate_generated.go similarity index 99% rename from unitsnet_go/bit_rate.go rename to units/bit_rate_generated.go index 935bce6..543051b 100644 --- a/unitsnet_go/bit_rate.go +++ b/units/bit_rate_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/brake_specific_fuel_consumption.go b/units/brake_specific_fuel_consumption_generated.go similarity index 99% rename from unitsnet_go/brake_specific_fuel_consumption.go rename to units/brake_specific_fuel_consumption_generated.go index 0c52a68..9799aed 100644 --- a/unitsnet_go/brake_specific_fuel_consumption.go +++ b/units/brake_specific_fuel_consumption_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/capacitance.go b/units/capacitance_generated.go similarity index 99% rename from unitsnet_go/capacitance.go rename to units/capacitance_generated.go index f81a49a..afe992d 100644 --- a/unitsnet_go/capacitance.go +++ b/units/capacitance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/coefficient_of_thermal_expansion.go b/units/coefficient_of_thermal_expansion_generated.go similarity index 99% rename from unitsnet_go/coefficient_of_thermal_expansion.go rename to units/coefficient_of_thermal_expansion_generated.go index 26c86c7..03a011c 100644 --- a/unitsnet_go/coefficient_of_thermal_expansion.go +++ b/units/coefficient_of_thermal_expansion_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/compressibility.go b/units/compressibility_generated.go similarity index 99% rename from unitsnet_go/compressibility.go rename to units/compressibility_generated.go index bde2d0d..9aaaf18 100644 --- a/unitsnet_go/compressibility.go +++ b/units/compressibility_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/density.go b/units/density_generated.go similarity index 99% rename from unitsnet_go/density.go rename to units/density_generated.go index 0bc2da4..b727b85 100644 --- a/unitsnet_go/density.go +++ b/units/density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/duration.go b/units/duration_generated.go similarity index 99% rename from unitsnet_go/duration.go rename to units/duration_generated.go index 5e30095..4e4302f 100644 --- a/unitsnet_go/duration.go +++ b/units/duration_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/dynamic_viscosity.go b/units/dynamic_viscosity_generated.go similarity index 99% rename from unitsnet_go/dynamic_viscosity.go rename to units/dynamic_viscosity_generated.go index b6a2730..a0cdf6e 100644 --- a/unitsnet_go/dynamic_viscosity.go +++ b/units/dynamic_viscosity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_admittance.go b/units/electric_admittance_generated.go similarity index 99% rename from unitsnet_go/electric_admittance.go rename to units/electric_admittance_generated.go index f92661a..7be8190 100644 --- a/unitsnet_go/electric_admittance.go +++ b/units/electric_admittance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_charge_density.go b/units/electric_charge_density_generated.go similarity index 99% rename from unitsnet_go/electric_charge_density.go rename to units/electric_charge_density_generated.go index 91232aa..e8c15f9 100644 --- a/unitsnet_go/electric_charge_density.go +++ b/units/electric_charge_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_charge.go b/units/electric_charge_generated.go similarity index 99% rename from unitsnet_go/electric_charge.go rename to units/electric_charge_generated.go index 053dfba..27bd886 100644 --- a/unitsnet_go/electric_charge.go +++ b/units/electric_charge_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_conductance.go b/units/electric_conductance_generated.go similarity index 99% rename from unitsnet_go/electric_conductance.go rename to units/electric_conductance_generated.go index 56d6027..2153b26 100644 --- a/unitsnet_go/electric_conductance.go +++ b/units/electric_conductance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_conductivity.go b/units/electric_conductivity_generated.go similarity index 99% rename from unitsnet_go/electric_conductivity.go rename to units/electric_conductivity_generated.go index b4a0c66..8a78c79 100644 --- a/unitsnet_go/electric_conductivity.go +++ b/units/electric_conductivity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_current_density.go b/units/electric_current_density_generated.go similarity index 99% rename from unitsnet_go/electric_current_density.go rename to units/electric_current_density_generated.go index 2821008..34e27cc 100644 --- a/unitsnet_go/electric_current_density.go +++ b/units/electric_current_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_current.go b/units/electric_current_generated.go similarity index 99% rename from unitsnet_go/electric_current.go rename to units/electric_current_generated.go index 01becbc..a27db3f 100644 --- a/unitsnet_go/electric_current.go +++ b/units/electric_current_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_current_gradient.go b/units/electric_current_gradient_generated.go similarity index 99% rename from unitsnet_go/electric_current_gradient.go rename to units/electric_current_gradient_generated.go index ac80e36..bf734d2 100644 --- a/unitsnet_go/electric_current_gradient.go +++ b/units/electric_current_gradient_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_field.go b/units/electric_field_generated.go similarity index 99% rename from unitsnet_go/electric_field.go rename to units/electric_field_generated.go index d63bcd1..224037d 100644 --- a/unitsnet_go/electric_field.go +++ b/units/electric_field_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_inductance.go b/units/electric_inductance_generated.go similarity index 99% rename from unitsnet_go/electric_inductance.go rename to units/electric_inductance_generated.go index 5cdc2ec..f8cbdb3 100644 --- a/unitsnet_go/electric_inductance.go +++ b/units/electric_inductance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_potential_ac.go b/units/electric_potential_ac_generated.go similarity index 99% rename from unitsnet_go/electric_potential_ac.go rename to units/electric_potential_ac_generated.go index 98e8e22..638bd80 100644 --- a/unitsnet_go/electric_potential_ac.go +++ b/units/electric_potential_ac_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_potential_change_rate.go b/units/electric_potential_change_rate_generated.go similarity index 99% rename from unitsnet_go/electric_potential_change_rate.go rename to units/electric_potential_change_rate_generated.go index 795cd1d..8235079 100644 --- a/unitsnet_go/electric_potential_change_rate.go +++ b/units/electric_potential_change_rate_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_potential_dc.go b/units/electric_potential_dc_generated.go similarity index 99% rename from unitsnet_go/electric_potential_dc.go rename to units/electric_potential_dc_generated.go index c11f8d2..eadbabc 100644 --- a/unitsnet_go/electric_potential_dc.go +++ b/units/electric_potential_dc_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_potential.go b/units/electric_potential_generated.go similarity index 99% rename from unitsnet_go/electric_potential.go rename to units/electric_potential_generated.go index ec24e6d..fa64682 100644 --- a/unitsnet_go/electric_potential.go +++ b/units/electric_potential_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_resistance.go b/units/electric_resistance_generated.go similarity index 99% rename from unitsnet_go/electric_resistance.go rename to units/electric_resistance_generated.go index 3c0ccbb..276692c 100644 --- a/unitsnet_go/electric_resistance.go +++ b/units/electric_resistance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_resistivity.go b/units/electric_resistivity_generated.go similarity index 99% rename from unitsnet_go/electric_resistivity.go rename to units/electric_resistivity_generated.go index 940a5b4..f272a17 100644 --- a/unitsnet_go/electric_resistivity.go +++ b/units/electric_resistivity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/electric_surface_charge_density.go b/units/electric_surface_charge_density_generated.go similarity index 99% rename from unitsnet_go/electric_surface_charge_density.go rename to units/electric_surface_charge_density_generated.go index 641abe9..6324511 100644 --- a/unitsnet_go/electric_surface_charge_density.go +++ b/units/electric_surface_charge_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/energy_density.go b/units/energy_density_generated.go similarity index 99% rename from unitsnet_go/energy_density.go rename to units/energy_density_generated.go index a99c611..2b8f19d 100644 --- a/unitsnet_go/energy_density.go +++ b/units/energy_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/energy.go b/units/energy_generated.go similarity index 99% rename from unitsnet_go/energy.go rename to units/energy_generated.go index da843e1..4b3518c 100644 --- a/unitsnet_go/energy.go +++ b/units/energy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/entropy.go b/units/entropy_generated.go similarity index 99% rename from unitsnet_go/entropy.go rename to units/entropy_generated.go index 8cde4e8..99fe990 100644 --- a/unitsnet_go/entropy.go +++ b/units/entropy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/force_change_rate.go b/units/force_change_rate_generated.go similarity index 99% rename from unitsnet_go/force_change_rate.go rename to units/force_change_rate_generated.go index 99d5e8d..80d83b2 100644 --- a/unitsnet_go/force_change_rate.go +++ b/units/force_change_rate_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/force.go b/units/force_generated.go similarity index 99% rename from unitsnet_go/force.go rename to units/force_generated.go index c1dc90d..f2ae498 100644 --- a/unitsnet_go/force.go +++ b/units/force_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/force_per_length.go b/units/force_per_length_generated.go similarity index 99% rename from unitsnet_go/force_per_length.go rename to units/force_per_length_generated.go index ed1d9f4..81358ae 100644 --- a/unitsnet_go/force_per_length.go +++ b/units/force_per_length_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/frequency.go b/units/frequency_generated.go similarity index 99% rename from unitsnet_go/frequency.go rename to units/frequency_generated.go index 6639542..c84925e 100644 --- a/unitsnet_go/frequency.go +++ b/units/frequency_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/fuel_efficiency.go b/units/fuel_efficiency_generated.go similarity index 99% rename from unitsnet_go/fuel_efficiency.go rename to units/fuel_efficiency_generated.go index d2f4dce..f194ba2 100644 --- a/unitsnet_go/fuel_efficiency.go +++ b/units/fuel_efficiency_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/heat_flux.go b/units/heat_flux_generated.go similarity index 99% rename from unitsnet_go/heat_flux.go rename to units/heat_flux_generated.go index ac1b089..02120cb 100644 --- a/unitsnet_go/heat_flux.go +++ b/units/heat_flux_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/heat_transfer_coefficient.go b/units/heat_transfer_coefficient_generated.go similarity index 99% rename from unitsnet_go/heat_transfer_coefficient.go rename to units/heat_transfer_coefficient_generated.go index 4f01f00..a000b16 100644 --- a/unitsnet_go/heat_transfer_coefficient.go +++ b/units/heat_transfer_coefficient_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/illuminance.go b/units/illuminance_generated.go similarity index 99% rename from unitsnet_go/illuminance.go rename to units/illuminance_generated.go index 9de6c83..2c581d3 100644 --- a/unitsnet_go/illuminance.go +++ b/units/illuminance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/impulse.go b/units/impulse_generated.go similarity index 99% rename from unitsnet_go/impulse.go rename to units/impulse_generated.go index 0565716..4f01352 100644 --- a/unitsnet_go/impulse.go +++ b/units/impulse_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/information.go b/units/information_generated.go similarity index 99% rename from unitsnet_go/information.go rename to units/information_generated.go index c289315..8f12dea 100644 --- a/unitsnet_go/information.go +++ b/units/information_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/irradiance.go b/units/irradiance_generated.go similarity index 99% rename from unitsnet_go/irradiance.go rename to units/irradiance_generated.go index 6a036b5..9ad0d50 100644 --- a/unitsnet_go/irradiance.go +++ b/units/irradiance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/irradiation.go b/units/irradiation_generated.go similarity index 99% rename from unitsnet_go/irradiation.go rename to units/irradiation_generated.go index 2817399..a9ec3c6 100644 --- a/unitsnet_go/irradiation.go +++ b/units/irradiation_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/jerk.go b/units/jerk_generated.go similarity index 99% rename from unitsnet_go/jerk.go rename to units/jerk_generated.go index a860ec2..a227861 100644 --- a/unitsnet_go/jerk.go +++ b/units/jerk_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/kinematic_viscosity.go b/units/kinematic_viscosity_generated.go similarity index 99% rename from unitsnet_go/kinematic_viscosity.go rename to units/kinematic_viscosity_generated.go index 7216406..d7326f1 100644 --- a/unitsnet_go/kinematic_viscosity.go +++ b/units/kinematic_viscosity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/leak_rate.go b/units/leak_rate_generated.go similarity index 99% rename from unitsnet_go/leak_rate.go rename to units/leak_rate_generated.go index b84dbe8..07ef4b8 100644 --- a/unitsnet_go/leak_rate.go +++ b/units/leak_rate_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/length.go b/units/length_generated.go similarity index 99% rename from unitsnet_go/length.go rename to units/length_generated.go index f44775c..75f39f5 100644 --- a/unitsnet_go/length.go +++ b/units/length_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/level.go b/units/level_generated.go similarity index 99% rename from unitsnet_go/level.go rename to units/level_generated.go index ddb56be..b601e0e 100644 --- a/unitsnet_go/level.go +++ b/units/level_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/linear_density.go b/units/linear_density_generated.go similarity index 99% rename from unitsnet_go/linear_density.go rename to units/linear_density_generated.go index 3a56139..a3888b7 100644 --- a/unitsnet_go/linear_density.go +++ b/units/linear_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/linear_power_density.go b/units/linear_power_density_generated.go similarity index 99% rename from unitsnet_go/linear_power_density.go rename to units/linear_power_density_generated.go index a6bae3f..5fc096b 100644 --- a/unitsnet_go/linear_power_density.go +++ b/units/linear_power_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/luminance.go b/units/luminance_generated.go similarity index 99% rename from unitsnet_go/luminance.go rename to units/luminance_generated.go index e8b5bdd..c0a87ec 100644 --- a/unitsnet_go/luminance.go +++ b/units/luminance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/luminosity.go b/units/luminosity_generated.go similarity index 99% rename from unitsnet_go/luminosity.go rename to units/luminosity_generated.go index 9a6df00..68fc12c 100644 --- a/unitsnet_go/luminosity.go +++ b/units/luminosity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/luminous_flux.go b/units/luminous_flux_generated.go similarity index 99% rename from unitsnet_go/luminous_flux.go rename to units/luminous_flux_generated.go index 522c2c8..953bb98 100644 --- a/unitsnet_go/luminous_flux.go +++ b/units/luminous_flux_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/luminous_intensity.go b/units/luminous_intensity_generated.go similarity index 99% rename from unitsnet_go/luminous_intensity.go rename to units/luminous_intensity_generated.go index 86a0600..e51d63b 100644 --- a/unitsnet_go/luminous_intensity.go +++ b/units/luminous_intensity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/magnetic_field.go b/units/magnetic_field_generated.go similarity index 99% rename from unitsnet_go/magnetic_field.go rename to units/magnetic_field_generated.go index b0cb6c1..9ee1559 100644 --- a/unitsnet_go/magnetic_field.go +++ b/units/magnetic_field_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/magnetic_flux.go b/units/magnetic_flux_generated.go similarity index 99% rename from unitsnet_go/magnetic_flux.go rename to units/magnetic_flux_generated.go index c2d4c1f..7b57586 100644 --- a/unitsnet_go/magnetic_flux.go +++ b/units/magnetic_flux_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/magnetization.go b/units/magnetization_generated.go similarity index 99% rename from unitsnet_go/magnetization.go rename to units/magnetization_generated.go index c792338..ca3ffaa 100644 --- a/unitsnet_go/magnetization.go +++ b/units/magnetization_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/mass_concentration.go b/units/mass_concentration_generated.go similarity index 99% rename from unitsnet_go/mass_concentration.go rename to units/mass_concentration_generated.go index 65f53c3..e79dce2 100644 --- a/unitsnet_go/mass_concentration.go +++ b/units/mass_concentration_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/mass_flow.go b/units/mass_flow_generated.go similarity index 99% rename from unitsnet_go/mass_flow.go rename to units/mass_flow_generated.go index 512396b..833d96e 100644 --- a/unitsnet_go/mass_flow.go +++ b/units/mass_flow_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/mass_flux.go b/units/mass_flux_generated.go similarity index 99% rename from unitsnet_go/mass_flux.go rename to units/mass_flux_generated.go index 60659bc..44f4351 100644 --- a/unitsnet_go/mass_flux.go +++ b/units/mass_flux_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/mass_fraction.go b/units/mass_fraction_generated.go similarity index 99% rename from unitsnet_go/mass_fraction.go rename to units/mass_fraction_generated.go index f6b72d5..dfd0c2a 100644 --- a/unitsnet_go/mass_fraction.go +++ b/units/mass_fraction_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/mass.go b/units/mass_generated.go similarity index 99% rename from unitsnet_go/mass.go rename to units/mass_generated.go index 1b678ea..e157469 100644 --- a/unitsnet_go/mass.go +++ b/units/mass_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/mass_moment_of_inertia.go b/units/mass_moment_of_inertia_generated.go similarity index 99% rename from unitsnet_go/mass_moment_of_inertia.go rename to units/mass_moment_of_inertia_generated.go index a0ae9da..019a592 100644 --- a/unitsnet_go/mass_moment_of_inertia.go +++ b/units/mass_moment_of_inertia_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/molality.go b/units/molality_generated.go similarity index 99% rename from unitsnet_go/molality.go rename to units/molality_generated.go index b2169b0..502fc61 100644 --- a/unitsnet_go/molality.go +++ b/units/molality_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/molar_energy.go b/units/molar_energy_generated.go similarity index 99% rename from unitsnet_go/molar_energy.go rename to units/molar_energy_generated.go index 8eb33ea..9aa7121 100644 --- a/unitsnet_go/molar_energy.go +++ b/units/molar_energy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/molar_entropy.go b/units/molar_entropy_generated.go similarity index 99% rename from unitsnet_go/molar_entropy.go rename to units/molar_entropy_generated.go index 57ddcf9..82778d3 100644 --- a/unitsnet_go/molar_entropy.go +++ b/units/molar_entropy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/molar_flow.go b/units/molar_flow_generated.go similarity index 99% rename from unitsnet_go/molar_flow.go rename to units/molar_flow_generated.go index 46f8b25..c6bf92f 100644 --- a/unitsnet_go/molar_flow.go +++ b/units/molar_flow_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/molar_mass.go b/units/molar_mass_generated.go similarity index 99% rename from unitsnet_go/molar_mass.go rename to units/molar_mass_generated.go index d54c01c..876228a 100644 --- a/unitsnet_go/molar_mass.go +++ b/units/molar_mass_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/molarity.go b/units/molarity_generated.go similarity index 99% rename from unitsnet_go/molarity.go rename to units/molarity_generated.go index 9dd8c32..e7a8aa8 100644 --- a/unitsnet_go/molarity.go +++ b/units/molarity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/permeability.go b/units/permeability_generated.go similarity index 99% rename from unitsnet_go/permeability.go rename to units/permeability_generated.go index 37d41e0..fe79d72 100644 --- a/unitsnet_go/permeability.go +++ b/units/permeability_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/permittivity.go b/units/permittivity_generated.go similarity index 99% rename from unitsnet_go/permittivity.go rename to units/permittivity_generated.go index bef0a31..9711245 100644 --- a/unitsnet_go/permittivity.go +++ b/units/permittivity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/porous_medium_permeability.go b/units/porous_medium_permeability_generated.go similarity index 99% rename from unitsnet_go/porous_medium_permeability.go rename to units/porous_medium_permeability_generated.go index 223febf..586ed53 100644 --- a/unitsnet_go/porous_medium_permeability.go +++ b/units/porous_medium_permeability_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/power_density.go b/units/power_density_generated.go similarity index 99% rename from unitsnet_go/power_density.go rename to units/power_density_generated.go index e4c2cc0..d1bd5ad 100644 --- a/unitsnet_go/power_density.go +++ b/units/power_density_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/power.go b/units/power_generated.go similarity index 99% rename from unitsnet_go/power.go rename to units/power_generated.go index a12b622..977bf62 100644 --- a/unitsnet_go/power.go +++ b/units/power_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/power_ratio.go b/units/power_ratio_generated.go similarity index 99% rename from unitsnet_go/power_ratio.go rename to units/power_ratio_generated.go index e2ea371..dc9e448 100644 --- a/unitsnet_go/power_ratio.go +++ b/units/power_ratio_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/pressure_change_rate.go b/units/pressure_change_rate_generated.go similarity index 99% rename from unitsnet_go/pressure_change_rate.go rename to units/pressure_change_rate_generated.go index 1a4552b..168cb3d 100644 --- a/unitsnet_go/pressure_change_rate.go +++ b/units/pressure_change_rate_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/pressure.go b/units/pressure_generated.go similarity index 99% rename from unitsnet_go/pressure.go rename to units/pressure_generated.go index 2f991f8..ddc3e82 100644 --- a/unitsnet_go/pressure.go +++ b/units/pressure_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/radiation_equivalent_dose.go b/units/radiation_equivalent_dose_generated.go similarity index 99% rename from unitsnet_go/radiation_equivalent_dose.go rename to units/radiation_equivalent_dose_generated.go index b090e56..95377ab 100644 --- a/unitsnet_go/radiation_equivalent_dose.go +++ b/units/radiation_equivalent_dose_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/radiation_exposure.go b/units/radiation_exposure_generated.go similarity index 99% rename from unitsnet_go/radiation_exposure.go rename to units/radiation_exposure_generated.go index 6eecae2..cdec9e6 100644 --- a/unitsnet_go/radiation_exposure.go +++ b/units/radiation_exposure_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/radioactivity.go b/units/radioactivity_generated.go similarity index 99% rename from unitsnet_go/radioactivity.go rename to units/radioactivity_generated.go index 44881aa..e2e1ed2 100644 --- a/unitsnet_go/radioactivity.go +++ b/units/radioactivity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/ratio_change_rate.go b/units/ratio_change_rate_generated.go similarity index 99% rename from unitsnet_go/ratio_change_rate.go rename to units/ratio_change_rate_generated.go index ab4a0bf..513607b 100644 --- a/unitsnet_go/ratio_change_rate.go +++ b/units/ratio_change_rate_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/ratio.go b/units/ratio_generated.go similarity index 99% rename from unitsnet_go/ratio.go rename to units/ratio_generated.go index aaa1144..ef69230 100644 --- a/unitsnet_go/ratio.go +++ b/units/ratio_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/reactive_energy.go b/units/reactive_energy_generated.go similarity index 99% rename from unitsnet_go/reactive_energy.go rename to units/reactive_energy_generated.go index 058c69f..e22eee1 100644 --- a/unitsnet_go/reactive_energy.go +++ b/units/reactive_energy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/reactive_power.go b/units/reactive_power_generated.go similarity index 99% rename from unitsnet_go/reactive_power.go rename to units/reactive_power_generated.go index 4ba62e4..7630460 100644 --- a/unitsnet_go/reactive_power.go +++ b/units/reactive_power_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/reciprocal_area.go b/units/reciprocal_area_generated.go similarity index 99% rename from unitsnet_go/reciprocal_area.go rename to units/reciprocal_area_generated.go index 1f754ef..d239833 100644 --- a/unitsnet_go/reciprocal_area.go +++ b/units/reciprocal_area_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/reciprocal_length.go b/units/reciprocal_length_generated.go similarity index 99% rename from unitsnet_go/reciprocal_length.go rename to units/reciprocal_length_generated.go index 7511ff2..3b88d0b 100644 --- a/unitsnet_go/reciprocal_length.go +++ b/units/reciprocal_length_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/relative_humidity.go b/units/relative_humidity_generated.go similarity index 99% rename from unitsnet_go/relative_humidity.go rename to units/relative_humidity_generated.go index 10226d2..00acecf 100644 --- a/unitsnet_go/relative_humidity.go +++ b/units/relative_humidity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/rotational_acceleration.go b/units/rotational_acceleration_generated.go similarity index 99% rename from unitsnet_go/rotational_acceleration.go rename to units/rotational_acceleration_generated.go index 0da5fe4..5e7a796 100644 --- a/unitsnet_go/rotational_acceleration.go +++ b/units/rotational_acceleration_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/rotational_speed.go b/units/rotational_speed_generated.go similarity index 99% rename from unitsnet_go/rotational_speed.go rename to units/rotational_speed_generated.go index 0ab14fb..a2f89b0 100644 --- a/unitsnet_go/rotational_speed.go +++ b/units/rotational_speed_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/rotational_stiffness.go b/units/rotational_stiffness_generated.go similarity index 99% rename from unitsnet_go/rotational_stiffness.go rename to units/rotational_stiffness_generated.go index 9bd756e..f9bf3ba 100644 --- a/unitsnet_go/rotational_stiffness.go +++ b/units/rotational_stiffness_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/rotational_stiffness_per_length.go b/units/rotational_stiffness_per_length_generated.go similarity index 99% rename from unitsnet_go/rotational_stiffness_per_length.go rename to units/rotational_stiffness_per_length_generated.go index d5247c0..38d1a3f 100644 --- a/unitsnet_go/rotational_stiffness_per_length.go +++ b/units/rotational_stiffness_per_length_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/scalar.go b/units/scalar_generated.go similarity index 99% rename from unitsnet_go/scalar.go rename to units/scalar_generated.go index 3126b22..f00f624 100644 --- a/unitsnet_go/scalar.go +++ b/units/scalar_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/solid_angle.go b/units/solid_angle_generated.go similarity index 99% rename from unitsnet_go/solid_angle.go rename to units/solid_angle_generated.go index e112e0c..b385e5a 100644 --- a/unitsnet_go/solid_angle.go +++ b/units/solid_angle_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/specific_energy.go b/units/specific_energy_generated.go similarity index 99% rename from unitsnet_go/specific_energy.go rename to units/specific_energy_generated.go index fbfe61e..b1dc7f1 100644 --- a/unitsnet_go/specific_energy.go +++ b/units/specific_energy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/specific_entropy.go b/units/specific_entropy_generated.go similarity index 99% rename from unitsnet_go/specific_entropy.go rename to units/specific_entropy_generated.go index 15daf01..f70c14d 100644 --- a/unitsnet_go/specific_entropy.go +++ b/units/specific_entropy_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/specific_fuel_consumption.go b/units/specific_fuel_consumption_generated.go similarity index 99% rename from unitsnet_go/specific_fuel_consumption.go rename to units/specific_fuel_consumption_generated.go index ebbedf5..efe4820 100644 --- a/unitsnet_go/specific_fuel_consumption.go +++ b/units/specific_fuel_consumption_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/specific_volume.go b/units/specific_volume_generated.go similarity index 99% rename from unitsnet_go/specific_volume.go rename to units/specific_volume_generated.go index 36b3bda..6e028b5 100644 --- a/unitsnet_go/specific_volume.go +++ b/units/specific_volume_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/specific_weight.go b/units/specific_weight_generated.go similarity index 99% rename from unitsnet_go/specific_weight.go rename to units/specific_weight_generated.go index 233a425..a016d23 100644 --- a/unitsnet_go/specific_weight.go +++ b/units/specific_weight_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/speed.go b/units/speed_generated.go similarity index 99% rename from unitsnet_go/speed.go rename to units/speed_generated.go index 6e9eba7..0c2d672 100644 --- a/unitsnet_go/speed.go +++ b/units/speed_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/standard_volume_flow.go b/units/standard_volume_flow_generated.go similarity index 99% rename from unitsnet_go/standard_volume_flow.go rename to units/standard_volume_flow_generated.go index 09f3f07..395fb19 100644 --- a/unitsnet_go/standard_volume_flow.go +++ b/units/standard_volume_flow_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/temperature_change_rate.go b/units/temperature_change_rate_generated.go similarity index 99% rename from unitsnet_go/temperature_change_rate.go rename to units/temperature_change_rate_generated.go index 6d9cc9d..d93c17b 100644 --- a/unitsnet_go/temperature_change_rate.go +++ b/units/temperature_change_rate_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/temperature_delta.go b/units/temperature_delta_generated.go similarity index 99% rename from unitsnet_go/temperature_delta.go rename to units/temperature_delta_generated.go index 115a11e..8ff583e 100644 --- a/unitsnet_go/temperature_delta.go +++ b/units/temperature_delta_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/temperature.go b/units/temperature_generated.go similarity index 99% rename from unitsnet_go/temperature.go rename to units/temperature_generated.go index a4be09d..b298228 100644 --- a/unitsnet_go/temperature.go +++ b/units/temperature_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/temperature_gradient.go b/units/temperature_gradient_generated.go similarity index 99% rename from unitsnet_go/temperature_gradient.go rename to units/temperature_gradient_generated.go index e8c50bb..dc3aaba 100644 --- a/unitsnet_go/temperature_gradient.go +++ b/units/temperature_gradient_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/thermal_conductivity.go b/units/thermal_conductivity_generated.go similarity index 99% rename from unitsnet_go/thermal_conductivity.go rename to units/thermal_conductivity_generated.go index fe0d9d5..6ebee55 100644 --- a/unitsnet_go/thermal_conductivity.go +++ b/units/thermal_conductivity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/thermal_resistance.go b/units/thermal_resistance_generated.go similarity index 99% rename from unitsnet_go/thermal_resistance.go rename to units/thermal_resistance_generated.go index f07bec6..3443f72 100644 --- a/unitsnet_go/thermal_resistance.go +++ b/units/thermal_resistance_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/torque.go b/units/torque_generated.go similarity index 99% rename from unitsnet_go/torque.go rename to units/torque_generated.go index cdb23e5..99cca5f 100644 --- a/unitsnet_go/torque.go +++ b/units/torque_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/torque_per_length.go b/units/torque_per_length_generated.go similarity index 99% rename from unitsnet_go/torque_per_length.go rename to units/torque_per_length_generated.go index 87b4248..9a488f5 100644 --- a/unitsnet_go/torque_per_length.go +++ b/units/torque_per_length_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/turbidity.go b/units/turbidity_generated.go similarity index 99% rename from unitsnet_go/turbidity.go rename to units/turbidity_generated.go index e054c11..9dc93bf 100644 --- a/unitsnet_go/turbidity.go +++ b/units/turbidity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/vitamin_a.go b/units/vitamin_a_generated.go similarity index 99% rename from unitsnet_go/vitamin_a.go rename to units/vitamin_a_generated.go index e203ef5..934fa36 100644 --- a/unitsnet_go/vitamin_a.go +++ b/units/vitamin_a_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/volume_concentration.go b/units/volume_concentration_generated.go similarity index 99% rename from unitsnet_go/volume_concentration.go rename to units/volume_concentration_generated.go index de6ecfd..ee3ddd8 100644 --- a/unitsnet_go/volume_concentration.go +++ b/units/volume_concentration_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/volume_flow.go b/units/volume_flow_generated.go similarity index 99% rename from unitsnet_go/volume_flow.go rename to units/volume_flow_generated.go index 9c020b1..83d8707 100644 --- a/unitsnet_go/volume_flow.go +++ b/units/volume_flow_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/volume_flow_per_area.go b/units/volume_flow_per_area_generated.go similarity index 99% rename from unitsnet_go/volume_flow_per_area.go rename to units/volume_flow_per_area_generated.go index 4142eda..4953b4a 100644 --- a/unitsnet_go/volume_flow_per_area.go +++ b/units/volume_flow_per_area_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/volume.go b/units/volume_generated.go similarity index 99% rename from unitsnet_go/volume.go rename to units/volume_generated.go index eb63e61..fddcb37 100644 --- a/unitsnet_go/volume.go +++ b/units/volume_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/volume_per_length.go b/units/volume_per_length_generated.go similarity index 99% rename from unitsnet_go/volume_per_length.go rename to units/volume_per_length_generated.go index e7d7200..02f19d4 100644 --- a/unitsnet_go/volume_per_length.go +++ b/units/volume_per_length_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/volumetric_heat_capacity.go b/units/volumetric_heat_capacity_generated.go similarity index 99% rename from unitsnet_go/volumetric_heat_capacity.go rename to units/volumetric_heat_capacity_generated.go index 248ee75..24e461a 100644 --- a/unitsnet_go/volumetric_heat_capacity.go +++ b/units/volumetric_heat_capacity_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/unitsnet_go/warping_moment_of_inertia.go b/units/warping_moment_of_inertia_generated.go similarity index 99% rename from unitsnet_go/warping_moment_of_inertia.go rename to units/warping_moment_of_inertia_generated.go index e166588..c34093f 100644 --- a/unitsnet_go/warping_moment_of_inertia.go +++ b/units/warping_moment_of_inertia_generated.go @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json" diff --git a/units_generator/generators/generate_unit_class.py b/units_generator/generators/generate_unit_class.py index 61fe044..00c5472 100644 --- a/units_generator/generators/generate_unit_class.py +++ b/units_generator/generators/generate_unit_class.py @@ -133,7 +133,7 @@ def unit_class_generator(unit_definition): code = template.render(template_data) with open( - f"unitsnet_go/{camel_to_snake(unit_name)}.go", "w", encoding="utf-8" + f"units/{camel_to_snake(unit_name)}_generated.go", "w", encoding="utf-8" ) as f: f.write(code) diff --git a/units_generator/templates/unit_template.jinja2 b/units_generator/templates/unit_template.jinja2 index 17a4a8b..ca96c9d 100644 --- a/units_generator/templates/unit_template.jinja2 +++ b/units_generator/templates/unit_template.jinja2 @@ -1,4 +1,6 @@ -package unitsnet_go +// Code generated - DO NOT EDIT. + +package units import ( "encoding/json"