github.com/weaviate/weaviate@v1.24.6/usecases/configbase/config_base.go (about)

     1  //                           _       _
     2  // __      _____  __ ___   ___  __ _| |_ ___
     3  // \ \ /\ / / _ \/ _` \ \ / / |/ _` | __/ _ \
     4  //  \ V  V /  __/ (_| |\ V /| | (_| | ||  __/
     5  //   \_/\_/ \___|\__,_| \_/ |_|\__,_|\__\___|
     6  //
     7  //  Copyright © 2016 - 2024 Weaviate B.V. All rights reserved.
     8  //
     9  //  CONTACT: hello@weaviate.io
    10  //
    11  
    12  package configbase
    13  
    14  func Enabled(value string) bool {
    15  	if value == "" {
    16  		return false
    17  	}
    18  
    19  	if value == "on" ||
    20  		value == "enabled" ||
    21  		value == "1" ||
    22  		value == "true" {
    23  		return true
    24  	}
    25  
    26  	return false
    27  }