Simplify variable initializations

pull/198/head
Simon Roberts 3 years ago
parent f687e63fed
commit b911c1af29
No known key found for this signature in database
GPG Key ID: 0F30F99E6B771FD4

@ -15,14 +15,14 @@ import (
// ServerCmd ...
func ServerCmd() *cobra.Command {
var port uint = 22
var address = "0.0.0.0"
address := "0.0.0.0"
var idleTimeout uint = 0
var maxTimeout uint = 0
var maxSessions uint = 0
var executableBinary = "cointop"
var hostKeyFile = cssh.DefaultHostKeyFile
var userConfigType = cssh.UserConfigTypePublicKey
var colorsDir = os.Getenv("COINTOP_COLORS_DIR")
hostKeyFile := cssh.DefaultHostKeyFile
userConfigType := cssh.UserConfigTypePublicKey
colorsDir := os.Getenv("COINTOP_COLORS_DIR")
serverCmd := &cobra.Command{
Use: "server",

@ -227,9 +227,9 @@ func (ct *Cointop) ConfigToToml() ([]byte, error) {
if !ok || entry.Coin == "" {
continue
}
var amount = strconv.FormatFloat(entry.Holdings, 'f', -1, 64)
var coinName = entry.Coin
var tuple = []string{coinName, amount}
amount := strconv.FormatFloat(entry.Holdings, 'f', -1, 64)
coinName := entry.Coin
tuple := []string{coinName, amount}
holdingsIfc = append(holdingsIfc, tuple)
}
sort.Slice(holdingsIfc, func(i, j int) bool {

@ -37,7 +37,7 @@ type Service struct {
// NewCoinGecko new service
func NewCoinGecko(config *Config) *Service {
var maxResultsPerPage uint = 250 // absolute max
maxResultsPerPage := 250 // absolute max
var maxResults uint = 0
var maxPages uint = 10
var perPage uint = 100

Loading…
Cancel
Save