Skip to content

magdkudama/go-search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-search

Build Status

"go-search" is a simple library to find elements in a slice. It accepts multiple input types. It's been written in 30 minutes (including travis, tests and doc), so bugs are likely to appear, yes :)

Click to view documentation (auto-generated)

Installation

go get github.com/magdkudama/go-search

Quick Start

package main

import (
	"github.com/magdkudama/search"
	"fmt"
)

func main() {
	elements := []string{"hey","gopher","you","rule"}
	found, pos, err := search.Search("gopher")

	fmt.Println("Was element found?: ", found)
	fmt.Println("In what position?: ", pos)
	fmt.Println("Any error?: ", err)
}

Contributors

  • Magd Kudama [magdkudama]

About

Search data in slices with ease

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages