Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for validUserType (0.14 sec)

  1. src/encoding/gob/type.go

    )
    
    var userTypeCache sync.Map // map[reflect.Type]*userTypeInfo
    
    // validUserType returns, and saves, the information associated with user-provided type rt.
    // If the user type is not valid, err will be non-nil. To be used when the error handler
    // is not set up.
    func validUserType(rt reflect.Type) (*userTypeInfo, error) {
    	if ui, ok := userTypeCache.Load(rt); ok {
    		return ui.(*userTypeInfo), nil
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  2. src/encoding/gob/encoder.go

    	// goroutines can share an encoder.
    	enc.mutex.Lock()
    	defer enc.mutex.Unlock()
    
    	// Remove any nested writers remaining due to previous errors.
    	enc.w = enc.w[0:1]
    
    	ut, err := validUserType(value.Type())
    	if err != nil {
    		return err
    	}
    
    	enc.err = nil
    	enc.byteBuf.Reset()
    	enc.byteBuf.Write(spaceForLength)
    	state := enc.newEncoderState(&enc.byteBuf)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:04:28 UTC 2023
    - 7.8K bytes
    - Viewed (0)
Back to top