search

package
v1.0.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClusterExists

func ClusterExists(c *opsmngr.AutomationConfig, name string) bool

ClusterExists return true if a cluster exists for the given name

Example

This example demonstrates searching a cluster in an automation config.

package main

import (
	"fmt"

	"github.com/mongodb/mongocli/internal/fixture"
	"github.com/mongodb/mongocli/internal/search"
)

func main() {
	a := fixture.AutomationConfig()
	x := "myReplicaSet"
	found := search.ClusterExists(a, x)
	if found {
		fmt.Printf("found %v\n", x)
	} else {
		fmt.Printf("%s not found\n", x)
	}
}
Output:

found myReplicaSet

func StringInSlice

func StringInSlice(a []string, x string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL