Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 703 for Bool (0.17 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. 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)
  5. cmd/lock-rest-client.go

    	return c.call(ctx, lockRPCRLock, &args)
    }
    
    // Lock calls lock REST API.
    func (c *lockRESTClient) Lock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    	return c.call(ctx, lockRPCLock, &args)
    }
    
    // RUnlock calls read unlock REST API.
    func (c *lockRESTClient) RUnlock(ctx context.Context, args dsync.LockArgs) (reply bool, err error) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Nov 24 17:07:14 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  6. 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)
  7. 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)
  8. src/cmd/asm/internal/arch/arm.go

    	"BLT":  true,
    	"BGT":  true,
    	"BLE":  true,
    	"CALL": true,
    	"JMP":  true,
    }
    
    func jumpArm(word string) bool {
    	return armJump[word]
    }
    
    // IsARMCMP reports whether the op (as defined by an arm.A* constant) is
    // one of the comparison instructions that require special handling.
    func IsARMCMP(op obj.As) bool {
    	switch op {
    	case arm.ACMN, arm.ACMP, arm.ATEQ, arm.ATST:
    		return true
    	}
    	return false
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Nov 18 17:59:44 GMT 2022
    - 6.1K bytes
    - Viewed (0)
  9. tests/test_router_events.py

    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class State(BaseModel):
        app_startup: bool = False
        app_shutdown: bool = False
        router_startup: bool = False
        router_shutdown: bool = False
        sub_router_startup: bool = False
        sub_router_shutdown: bool = False
    
    
    @pytest.fixture
    def state() -> State:
        return State()
    
    
    @pytest.mark.filterwarnings(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Oct 18 12:36:40 GMT 2023
    - 3.2K bytes
    - Viewed (0)
  10. cmd/storage-interface.go

    	// of this function is to know if the "drive" has "format.json" or not
    	// if it has a "format.json" then is it correct "format.json" or not.
    	IsOnline() bool
    
    	// Returns the last time this disk (re)-connected
    	LastConn() time.Time
    
    	// Indicates if disk is local or not.
    	IsLocal() bool
    
    	// Returns hostname if disk is remote.
    	Hostname() string
    
    	// Returns the entire endpoint.
    	Endpoint() Endpoint
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Apr 23 17:15:52 GMT 2024
    - 4.9K bytes
    - Viewed (0)
Back to top