All Projects → s1s1ty → goin

s1s1ty / goin

Licence: MIT license
`in` operator for go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to goin

google streetview
A command line tool and module for Google Street View Image API
Stars: ✭ 77 (+352.94%)
Mutual labels:  map, interface
poplar-trie
C++17 implementation of memory-efficient dynamic tries
Stars: ✭ 47 (+176.47%)
Mutual labels:  map, string
Kind Of
Get the native JavaScript type of a value, fast. Used by superstruct, micromatch and many others!
Stars: ✭ 268 (+1476.47%)
Mutual labels:  map, string
VestaWebInterface
PHP interface for VestaCP, providing a beautiful UI, UX, features & integrations.
Stars: ✭ 92 (+441.18%)
Mutual labels:  interface
MapCompose
A fast, memory efficient Jetpack Compose library to display tiled maps, with support for markers, paths, and rotation.
Stars: ✭ 82 (+382.35%)
Mutual labels:  map
jest-serializer-html-string
A better Jest snapshot serializer for plain html strings
Stars: ✭ 17 (+0%)
Mutual labels:  string
chunks tutorial
Small demo showing how to load and manage tilemap chunks on the fly with Phaser 3
Stars: ✭ 41 (+141.18%)
Mutual labels:  map
comment-mark
Interpolate strings with HTML comment markers!
Stars: ✭ 21 (+23.53%)
Mutual labels:  string
as-string-sink
An efficient dynamically sized string buffer (aka String Builder) for AssemblyScript
Stars: ✭ 23 (+35.29%)
Mutual labels:  string
laravel-auto-morph-map
THIS PACKAGE HAS BEEN DEPRECATED — Automatically alias and map the polymorphic types of Eloquent models.
Stars: ✭ 55 (+223.53%)
Mutual labels:  map
aeternum-map
https://aeternum-map.gg - Interactive map for New World
Stars: ✭ 72 (+323.53%)
Mutual labels:  map
YuanshenMap
https://gitee.com/blacklotusccw/yuanshenditu 的访问优化版(原版闭源了,本仓库停止更新)
Stars: ✭ 16 (-5.88%)
Mutual labels:  map
simple-world-map
A simple SVG world map with ISO 3166-1 annotations
Stars: ✭ 59 (+247.06%)
Mutual labels:  map
leaflet-layer-tree-plugin
No description or website provided.
Stars: ✭ 31 (+82.35%)
Mutual labels:  map
freemap-mapnik
Outdoor map mainly for https://www.freemap.sk/
Stars: ✭ 16 (-5.88%)
Mutual labels:  map
running-on-streetview
Virtual Running on Google Street View.
Stars: ✭ 20 (+17.65%)
Mutual labels:  map
ets2-dashboard-skin
Packaged application in VueJs to run on a Windows computer It allows to deport some information of the video games Eurotruck simulator and Americantruck simulator on another device (via the web browser). And thus have an increased immersion in these games.
Stars: ✭ 37 (+117.65%)
Mutual labels:  map
gracidea
🌺 A Pokémon 2D live map gathering all regions, including wandering pokémons and characters and animated tiles!
Stars: ✭ 163 (+858.82%)
Mutual labels:  map
xlbaidumap flutter
flutter 集成百度地图
Stars: ✭ 27 (+58.82%)
Mutual labels:  map
Teyvat.moe
A flexible, community-driven interactive website for Genshin Impact.
Stars: ✭ 137 (+705.88%)
Mutual labels:  map

goin

Go Report Card Build Status license GoDoc

goin Evaluates to true if it finds a variable in the specified sequence and false otherwise.

  • goin package is built inspired by python in operator

Installation and Usage

Install the package with:

go get github.com/s1s1ty/goin

Import it with:

import "github.com/s1s1ty/goin"

Quick Start

func main() {
	ar := []int{1, 2, 4, 7, 8, 3}
	found, _ := goin.Value(7).In(ar)
	fmt.Println(found) // true

	seq := []float64{1.11, 3.20, 5.89, 2.90}
	found, _ = goin.Value(2.9).In(seq)
	fmt.Println(found) // true

	dict := map[string]string{"name": "shaon", "id": "110"}
	found, _ = goin.Value("fullname").InKey(dict)
	fmt.Println(found) // false
}

Available Methods

  • In(arr interface{})
  • InKey(arr interface{})

License

Licenced under MIT Licence
Any Suggestions and Bug Report will be gladly appreciated.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].