Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for prepareUpdateMessage (0.3 sec)

  1. cmd/update-notifier.go

    	"runtime"
    	"strings"
    	"time"
    
    	"github.com/cheggaaa/pb"
    	humanize "github.com/dustin/go-humanize"
    	"github.com/minio/minio/internal/color"
    )
    
    // prepareUpdateMessage - prepares the update message, only if a
    // newer version is available.
    func prepareUpdateMessage(downloadURL string, older time.Duration) string {
    	if downloadURL == "" || older <= 0 {
    		return ""
    	}
    
    	// Compute friendly duration string to indicate time
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Mar 09 03:07:08 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  2. cmd/update-notifier_test.go

    		{2 * 365 * 24 * time.Hour, "my_download_url", "2 years before the latest release"},
    	}
    
    	plainMsg := "You are running an older version of MinIO released"
    
    	for i, testCase := range testCases {
    		output := prepareUpdateMessage(testCase.dlURL, testCase.older)
    		line1 := fmt.Sprintf("%s %s", plainMsg, color.YellowBold(testCase.expectedSubStr))
    		line2 := fmt.Sprintf("Update: %s", color.CyanBold(testCase.dlURL))
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Jul 31 15:36:19 GMT 2023
    - 4.1K bytes
    - Viewed (0)
  3. cmd/common-main.go

    		older = lrTime.Sub(currentReleaseTime)
    		downloadURL = getDownloadURL(releaseTimeToReleaseTag(lrTime))
    	}
    
    	updateMsg := prepareUpdateMessage(downloadURL, older)
    	if updateMsg == "" {
    		return
    	}
    
    	logger.Info(prepareUpdateMessage("Run `mc admin update ALIAS`", lrTime.Sub(currentReleaseTime)))
    }
    
    func newConfigDir(dir string, dirSet bool, getDefaultDir func() string) (*ConfigDir, error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 35.5K bytes
    - Viewed (2)
Back to top