Skip to content

Commit

Permalink
removed unneeded getters
Browse files Browse the repository at this point in the history
  • Loading branch information
inquestruss committed Jan 12, 2025
1 parent 4d7ce67 commit 66060d7
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 31 deletions.
5 changes: 0 additions & 5 deletions pkg/units/distance.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,3 @@ func (p Distance) Sub(o Distance) Distance {
func (p Distance) Multiply(by float32) Distance {
return NewDistance(p.Unit, p.Value*by)
}

// GetValue returns the value of the unit
func (p Distance) GetValue() *float32 {
return &p.Value
}
5 changes: 0 additions & 5 deletions pkg/units/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,3 @@ func (p Flow) Sub(o Flow) Flow {
v2, u2 := subTableUnits(flowConversions, p.Value, p.Unit, o.Value, o.Unit)
return NewFlow(u2, v2)
}

// GetValue returns the value of the unit
func (p Flow) GetValue() *float32 {
return &p.Value
}
5 changes: 0 additions & 5 deletions pkg/units/pressure.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,3 @@ func (p Pressure) Sub(o Pressure) Pressure {
v2, u2 := subTableUnits(pressureConversions, p.Value, p.Unit, o.Value, o.Unit)
return NewPressure(u2, v2)
}

// GetValue returns the value of the unit
func (p Pressure) GetValue() *float32 {
return &p.Value
}
5 changes: 0 additions & 5 deletions pkg/units/temperature.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,3 @@ func (p Temperature) Convert(newUnit TemperatureUnit) Temperature {
panic(fmt.Sprintf("Unknown new temperature unit %+v", newUnit))
}
}

// GetValue returns the value of the unit
func (p Temperature) GetValue() *float32 {
return &p.Value
}
1 change: 0 additions & 1 deletion pkg/units/units.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ type Unit[T ~int] struct {
// Units is a base interface for all unit structs
type Units interface {
MarshalJSON() ([]byte, error)
GetValue() *float32
}
5 changes: 0 additions & 5 deletions pkg/units/velocity.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,3 @@ func (v Velocity) TimesTime(seconds float32) Distance {
vKt := v.Convert(Knots)
return NewDistance(NauticalMile, vKt.Value*(seconds/3600.0))
}

// GetValue returns the value of the unit
func (p Velocity) GetValue() *float32 {
return &p.Value
}
5 changes: 0 additions & 5 deletions pkg/units/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,3 @@ func (p Volume) Sub(o Volume) Volume {
v2, u2 := subTableUnits(volumeConversions, p.Value, p.Unit, o.Value, o.Unit)
return NewVolume(u2, v2)
}

// GetValue returns the value of the unit
func (p Volume) GetValue() *float32 {
return &p.Value
}

0 comments on commit 66060d7

Please sign in to comment.