Socket
Socket
Sign inDemoInstall

github.com/thinkerou/favicon

Package Overview
Dependencies
19
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/thinkerou/favicon


Version published

Readme

Source

Favicon Gin's middleware

Gin middleware to support favicon.

Usage

Start using it

Download and install it:

$ go get github.com/thinkerou/favicon

Import it in your code:

import "github.com/thinkerou/favicon"

Canonical example:

package main
            
import (
    "github.com/gin-gonic/gin"
    "github.com/thinkerou/favicon"
)
            
func main() {
    r := gin.Default()
    r.Use(favicon.New("./favicon.ico")) // set favicon middleware 

    r.GET("/ping", func(c *gin.Context) {
        c.String(200, "Hello favicon.")
    })

    r.Run(":8080")
}

FAQs

Last updated on 10 Feb 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc