Skip to content

cfhamlet/os-go-netloc-rule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

os-go-netloc-rule

Build Status codecov go.dev reference

A common library for netloc rule use case.

Python Version

Install

You can get the library with go get

go get -u github.com/cfhamlet/os-go-netloc-rule

Usage

package main

import (
	"fmt"

	"github.com/cfhamlet/os-go-netloc-rule/matcher"
	"github.com/cfhamlet/os-go-netloc-rule/netloc"
)

func main() {
	matcher := matcher.New()
	matcher.Load(netloc.New(".google.com", "80", "http"), 1)
	fmt.Println(matcher.MatchURL("http://www.google.com:80/test/"))
}

License

MIT licensed.