Skip to content

janitorjeff/nogo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

nogo

Check if a hostname is blacklisted.

Wraps https://github.com/StevenBlack/hosts into an easy to use library.

Example

package main

import (
	"github.com/janitorjeff/nogo"
)

func main() {
	// Not turning any of the Fakenews, Gambling, Porn, Social flags on will
	// mean that it will only download the default adware + malware list
	ng, err := nogo.Init().Fakenews().Gambling().Porn().Social().Download()
	if err != nil {
		// ...
	}

	if !ng.Safe("google.com") {
		// ...
	}

	// to update the list just run download again
	ng, err = ng.Download()
	if err != nil {
		// ...
	}
}

About

Check if a hostname is blacklisted.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages