Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,239 for bool (0.18 sec)

  1. internal/config/bool-flag.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package config
    
    import (
    	"encoding/json"
    	"fmt"
    	"strconv"
    	"strings"
    )
    
    // BoolFlag - wrapper bool type.
    type BoolFlag bool
    
    // String - returns string of BoolFlag.
    func (bf BoolFlag) String() string {
    	if bf {
    		return "on"
    	}
    
    	return "off"
    }
    
    // MarshalJSON - converts BoolFlag into JSON data.
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Apr 07 15:10:40 GMT 2022
    - 2.3K bytes
    - Viewed (0)
  2. internal/config/bool-flag_test.go

    		}
    	}
    }
    
    // Test BoolFlag.UnmarshalJSON()
    func TestBoolFlagUnmarshalJSON(t *testing.T) {
    	testCases := []struct {
    		data           []byte
    		expectedResult BoolFlag
    		expectedErr    bool
    	}{
    		{[]byte(`{}`), BoolFlag(false), true},
    		{[]byte(`["on"]`), BoolFlag(false), true},
    		{[]byte(`"junk"`), BoolFlag(false), true},
    		{[]byte(`""`), BoolFlag(true), false},
    		{[]byte(`"on"`), BoolFlag(true), false},
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Jun 01 21:59:40 GMT 2021
    - 3.5K bytes
    - Viewed (0)
  3. tests/test_additional_properties_bool.py

    Sebastián Ramírez <******@****.***> 1688749933 +0200
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 4.2K bytes
    - Viewed (0)
  4. cmd/erasure-server-pool-decom.go

    			CmdLine:    pool.endpoints.CmdLine,
    			ID:         idx,
    			LastUpdate: UTCNow(),
    		})
    	}
    	return newMeta
    }
    
    func (z *erasureServerPools) IsDecommissionRunning() bool {
    	z.poolMetaMutex.RLock()
    	defer z.poolMetaMutex.RUnlock()
    	meta := z.poolMeta
    	for _, pool := range meta.Pools {
    		if pool.Decommission != nil &&
    			!pool.Decommission.Complete &&
    			!pool.Decommission.Failed &&
    			!pool.Decommission.Canceled {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Mon Apr 22 17:49:30 GMT 2024
    - 41.3K bytes
    - Viewed (1)
  5. internal/s3select/sql/value.go

    // conversion succeeded.
    func (v Value) ToBool() (val bool, ok bool) {
    	val, ok = v.value.(bool)
    	return
    }
    
    // ToTimestamp returns the timestamp value if present.
    func (v Value) ToTimestamp() (t time.Time, ok bool) {
    	t, ok = v.value.(time.Time)
    	return
    }
    
    // ToBytes returns the value if byte-slice.
    func (v Value) ToBytes() (val []byte, ok bool) {
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Feb 25 20:31:19 GMT 2022
    - 20.2K bytes
    - Viewed (0)
  6. cmd/object-api-interface.go

    	LockEnabled       bool
    	VersioningEnabled bool
    	ForceCreate       bool      // Create buckets even if they are already created.
    	CreatedAt         time.Time // only for site replication
    	NoLock            bool      // does not lock the make bucket call if set to 'true'
    }
    
    // DeleteBucketOptions provides options for DeleteBucket calls.
    type DeleteBucketOptions struct {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sat Apr 20 09:05:54 GMT 2024
    - 16.9K bytes
    - Viewed (0)
  7. migrator.go

    	ColumnType() (columnType string, ok bool) // varchar(64)
    	PrimaryKey() (isPrimaryKey bool, ok bool)
    	AutoIncrement() (isAutoIncrement bool, ok bool)
    	Length() (length int64, ok bool)
    	DecimalSize() (precision int64, scale int64, ok bool)
    	Nullable() (nullable bool, ok bool)
    	Unique() (unique bool, ok bool)
    	ScanType() reflect.Type
    	Comment() (value string, ok bool)
    	DefaultValue() (value string, ok bool)
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Oct 30 09:15:49 GMT 2023
    - 3.1K bytes
    - Viewed (0)
  8. gorm.go

    type Session struct {
    	DryRun                   bool
    	PrepareStmt              bool
    	NewDB                    bool
    	Initialized              bool
    	SkipHooks                bool
    	SkipDefaultTransaction   bool
    	DisableNestedTransaction bool
    	AllowGlobalUpdate        bool
    	FullSaveAssociations     bool
    	QueryFields              bool
    	Context                  context.Context
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Sun Aug 20 11:46:56 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  9. migrator/column_type.go

    // PrimaryKey returns the column is primary key or not.
    func (ct ColumnType) PrimaryKey() (isPrimaryKey bool, ok bool) {
    	return ct.PrimaryKeyValue.Bool, ct.PrimaryKeyValue.Valid
    }
    
    // AutoIncrement returns the column is auto increment or not.
    func (ct ColumnType) AutoIncrement() (isAutoIncrement bool, ok bool) {
    	return ct.AutoIncrementValue.Bool, ct.AutoIncrementValue.Valid
    }
    
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Mar 24 01:31:58 GMT 2022
    - 3.3K bytes
    - Viewed (0)
  10. tests/helper_test.go

    	"strconv"
    	"strings"
    	"testing"
    	"time"
    
    	"gorm.io/gorm"
    
    	. "gorm.io/gorm/utils/tests"
    )
    
    type Config struct {
    	Account   bool
    	Pets      int
    	Toys      int
    	Company   bool
    	Manager   bool
    	Team      int
    	Languages int
    	Friends   int
    	NamedPet  bool
    	Tools     int
    }
    
    func GetUser(name string, config Config) *User {
    	var (
    		birthday = time.Now().Round(time.Second)
    		user     = User{
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Tue Mar 19 03:50:28 GMT 2024
    - 8K bytes
    - Viewed (0)
Back to top