fastgogi

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2018 License: LGPL-3.0 Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

fastgogi

A Golang gitignore.io fetching library using fasthttp 🏃

Build Status Go Report Card GoDoc Codacy Badge

Example
package main

import "github.com/gofunky/fastgogi"
import "fmt"

func main() {
	myGogi := fastgogi.NewClient()
	
	// Get the list of available types.
	availableTypes, err := myGogi.List()
	if err != nil {
		panic(err)
	}
	fmt.Printf("Available Types:\n%s", availableTypes)
	
	// Get the gitignore template for Go and IntelliJ.
	gitignoreContent, err := myGogi.Get("go", "IntelliJ")
	if err != nil {
		panic(err)
	}
	fmt.Printf("Available Types:\n%s", gitignoreContent)
}
Why is there no cmd version?

Check out this generator: gogigen

Documentation

Index

Constants

View Source
const (
	// Version of FastGogi
	Version = "1.0.0"
	// StartComment indicates the beginning of the gitignore template
	StartComment = "# Created by "
	// EndComment indicates the end of the gitignore template
	EndComment = "# End of "
)

Variables

This section is empty.

Functions

func NewClient

func NewClient() (client *fastGogiClient)

NewClient returns a default fastGogiClient.

func NewClientWithOptions

func NewClientWithOptions(options FastGogiOptions) (client *fastGogiClient)

NewClientWithOptions is the factory for a new fastGogiClient.

func UseLogger

func UseLogger(logger *onelog.Logger)

UseLogger sets a custom Logger for the package.

Types

type FastGogiOptions

type FastGogiOptions struct {
	UserAgent string
	Host      string
}

FastGogiOptions contain the http client parameters.

Jump to

Keyboard shortcuts

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