Skip to content

Commit

Permalink
Minor formatting changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
botond-sipos committed Apr 9, 2023
1 parent fc68acd commit 2e96f21
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion hist.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ package thist

import (
"fmt"
terminal "golang.org/x/crypto/ssh/terminal"
"math"
"os"
"sort"
"strconv"
"strings"

terminal "golang.org/x/crypto/ssh/terminal"
)

// Hist is a struct holding the parameters and internal state of a histogram object.
Expand Down
3 changes: 2 additions & 1 deletion plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ package thist

import (
"fmt"
terminal "golang.org/x/crypto/ssh/terminal"
"os"
"strconv"
"strings"

terminal "golang.org/x/crypto/ssh/terminal"
)

// Plot is a general plotting function for bar plots. It is used by Bar and BarSimple.
Expand Down
5 changes: 3 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func max(s []float64) float64 {
return max
}

//min calculates the minimum of a float64 slice.
// min calculates the minimum of a float64 slice.
func min(s []float64) float64 {
if len(s) == 0 {
return math.NaN()
Expand Down Expand Up @@ -185,7 +185,8 @@ func rightPad2Len(s string, padStr string, overallLen int) string {
return retStr[:overallLen]
}

// centerPad2Len center pads a string to a given length.
// centerPad2Len center pads a string to a given length.
//
// https://www.socketloop.com/tutorials/golang-aligning-strings-to-right-left-and-center-with-fill-example
func centerPad2Len(s string, fill string, n int) string {
if len(s) >= n {
Expand Down

0 comments on commit 2e96f21

Please sign in to comment.