mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-11 18:11:21 +08:00
change: RoundToOneDecimal
This commit is contained in:
@@ -374,6 +374,11 @@ func ConvertToStringSlice(val interface{}) ([]string, error) {
|
||||
return stringSlice, nil
|
||||
}
|
||||
|
||||
// RoundToOneDecimal rounds a float64 value to 1 decimal place
|
||||
func RoundToOneDecimal(val float64) float64 {
|
||||
return math.Round(val*10) / 10.0
|
||||
}
|
||||
|
||||
func GetFreePort() (int, error) {
|
||||
minPort := 20000
|
||||
maxPort := 50000
|
||||
|
||||
Reference in New Issue
Block a user