github gofr-dev/gofr v1.50.0

9 hours ago

Release v1.50.0

🚀Features

🔹 Azure File Storage Support — New File-Store Provider

GoFr now introduces native Azure File Storage integration through a new provider at
gofr.dev/pkg/gofr/datasource/file/azure.

Key Highlights:

  • Supports configuration via AccountName, AccountKey, and ShareName (optional: Endpoint)
  • Automatic connection retry loop with connection-status logging
  • Native directory supportChdir, ReadDir, and Stat behave like a real filesystem
  • Automatic parent-directory creation for nested file paths
  • Built-in content-type detection based on extension (json, txt, csv, xml, html, pdf, etc.)
  • One file share per file-store instance (explicitly documented)
  • Complete documentation & examples added under Official File Handling in GoFr Documentation

Example

// Create Azure File Storage filesystem
fs, err := azure.New(&azure.Config{
    AccountName: "mystorageaccount",
    AccountKey:  "myaccountkey",
    ShareName:   "myshare",
    // Endpoint is optional, defaults to https://{AccountName}.file.core.windows.net
    // Endpoint: "https://custom-endpoint.file.core.windows.net",
})

if err != nil {
    app.Logger().Fatalf("Failed to initialize Azure File Storage: %v", err)
}

app.AddFileStore(fs)

app.Run()

🔹 CLI Improvements

  • More helpful ErrCommandNotFound message showing the invalid command entered
  • Better help formatting with aligned command–description columns
  • Enhanced behavior for no-command scenarios: prints help + clearer messaging if added.

Bug Fixes

  • Basic Auth Header Normalization
    Authorization header now correctly uses "Basic " instead of "basic " adhering to RFC standard for Basic Authorization Headers.

Don't miss a new gofr release

NewReleases is sending notifications on new releases.