Skip to content

This is a package to search for legal typifications related to a given subject. The package uses a searchable index of legal typifications. The goal of this package is to provide a simple and efficient way to find legal information related to specific subjects.

License

Notifications You must be signed in to change notification settings

DanielFillol/laws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laws

This package provides functionality to retrieve legal typification's related to a given subject. The package includes functions to read and parse a CSV file containing legal information and then store it in memory to provide quick access.

Install

To install this package, use go get:

go get github.com/DanielFillol/laws

Usage

Import the laws package and call the GetLawsBySubject function to retrieve legal typifications for a given subject.

package main

import (
	"fmt"
	"github.com/DanielFillol/laws"
)

func main() {
	typifications := laws.GetLawsBySubject("Crimes contra a vida / Homicídio Simples")
	fmt.Println(typifications)
}

This will be the output:

[{[{Artigo 121 do Decreto Lei nº 2.848 de 07 de Dezembro de 1940}] Homicídio} {[{Parágrafo 1 Artigo 205 do Decreto Lei nº 1.001 de 21 de Outubro de 1969}] Homicídio simples}]

Testing

This package includes a test file getLawsBySubject_test.go that tests the GetLawsBySubject function with various inputs. To run the tests, use go test:

go test

Contributing

Contributions are welcome! If you find a bug or would like to add a feature, please open an issue or pull request.

About

This is a package to search for legal typifications related to a given subject. The package uses a searchable index of legal typifications. The goal of this package is to provide a simple and efficient way to find legal information related to specific subjects.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages