gorobots

package module
v0.0.0-...-26fdf00 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2019 License: MIT Imports: 6 Imported by: 0

README

Robots.txt Gin's middleware

Gin middleware to support robots.txt.

based on https://github.com/thinkerou/favicon

Usage

Start using it

Download and install it:

$ go get github.com/vasiliyaltunin/gorobots

Import it in your code:

import "github.com/vasiliyaltunin/gorobots"
Canonical example:
package main
            
import (
    "github.com/gin-gonic/gin"
    "github.com/vasiliyaltunin/gorobots"
)
            
func main() {
    r := gin.Default()
    r.Use(gorobots.New("./static/robots/robots.txt"))

    r.Run(":8080")
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(path string) gin.HandlerFunc

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL