src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

auth_scheme_preference.go (319B)


      1 package config
      2 
      3 import "strings"
      4 
      5 func toAuthSchemePreferenceList(cfg string) []string {
      6 	if len(cfg) == 0 {
      7 		return nil
      8 	}
      9 	parts := strings.Split(cfg, ",")
     10 	ids := make([]string, 0, len(parts))
     11 
     12 	for _, p := range parts {
     13 		if id := strings.TrimSpace(p); len(id) > 0 {
     14 			ids = append(ids, id)
     15 		}
     16 	}
     17 
     18 	return ids
     19 }