INNER CODE UNIT · Go

renderAccountAuth

dropbox/dbxcli · cmd/account.go:118

func renderAccountAuth(out io.Writer, auth *accountAuth) {
	if auth == nil {
		return
	}

	authFile := auth.AuthFile
	if authFile == "" {
		authFile = authFileNone
	}
	fmt.Fprintf(out, "\nAuth:\n  Source:\t%s\n  Refreshable:\t%t\n  Auth File:\t%s\n", accountAuthSourceText(auth.Source), auth.Refreshable, authFile)
}

func accountAuthSourceText(source string) string {
	switch source {
	case authSourceSaved:
		return "saved credentials"
	case authSourceEnv:
		return envAccessToken

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…