github.com/taubyte/tau-cli@v0.1.13-0.20240326000942-487f0d57edfc/lib/login/options.go (about)

     1  package loginLib
     2  
     3  import (
     4  	"github.com/taubyte/tau-cli/singletons/config"
     5  )
     6  
     7  func GetProfiles() (_default string, possible []string, err error) {
     8  	profiles := config.Profiles()
     9  
    10  	_profiles := profiles.List(true)
    11  
    12  	var x int
    13  	possible = make([]string, len(_profiles))
    14  	for name, profile := range _profiles {
    15  		possible[x] = name
    16  		x++
    17  
    18  		if profile.Default {
    19  			_default = name
    20  		}
    21  	}
    22  
    23  	return
    24  }