func putUuid(log logger.T, byteArray []byte, offset int, input uuid.UUID) (err error) {
	if input == nil {
		log.Error("putUuid failed: input is null.")
		return errors.New("putUuid failed: input is null.")
	}

	byteArrayLength := len(byteArray)
	if offset > byteArrayLength-1 || offset+16-1 > byteArrayLength-1 || offset < 0 {
		log.Error("putUuid failed: Offset is invalid.")
		return errors.New("Offset is outside the byte array.")
	}

	leastSignificantLong, err := bytesToLong(log, input.Bytes()[8:16])
	if err != nil {
		log.Error("putUuid failed: Failed to get leastSignificant Long value.")
		return errors.New("Failed to get leastSignificant Long value.")
	}

	mostSignificantLong, err := bytesToLong(log, input.Bytes()[0:8])
	if err != nil {
		log.Error("putUuid failed: Failed to get mostSignificantLong Long value.")
		return errors.New("Failed to get mostSignificantLong Long value.")
	}

	if err = putLong(log, byteArray, offset, leastSignificantLong); err != nil {
		log.Error("putUuid failed: Failed to put leastSignificantLong Long value.")
		return errors.New("Failed to put leastSignificantLong Long value.")
	}

	if err = putLong(log, byteArray, offset+8, mostSignificantLong); err != nil {
		log.Error("putUuid failed: Failed to put mostSignificantLong Long value.")
		return errors.New("Failed to put mostSignificantLong Long value.")
	}

	return nil
}
// putUuid puts the 128 bit uuid to an array of bytes starting from the offset.
putUuid puts the 128 bit uuid to an array of bytes starting from the offset.
// putUuid puts the 128 bit uuid to an array of bytes starting from the offset .
func putUuid(log logger.T, byteArray []byte, offset int, input uuid.UUID) (err error) {
	if input == nil {
		log.Error("putUuid failed: input is null.")
		return errors.New("putUuid failed: input is null.")
	}
	byteArrayLength := len(byteArray)
	if offset > byteArrayLength-1 || offset+16-1 > byteArrayLength-1 || offset < 0 {
		log.Error("putUuid failed: Offset is invalid.")
		return errors.New("Offset is outside the byte array.")
	}
	leastSignificantLong, err := bytesToLong(log, input.Bytes()[8:16])
	if err != nil {
		log.Error("putUuid failed: Failed to get leastSignificant Long value.")
		return errors.New("Failed to get leastSignificant Long value.")
	}
	mostSignificantLong, err := bytesToLong(log, input.Bytes()[0:8])
	if err != nil {
		log.Error("putUuid failed: Failed to get mostSignificantLong Long value.")
		return errors.New("Failed to get mostSignificantLong Long value.")
	}
	if err = putLong(log, byteArray, offset, leastSignificantLong); err != nil {
		log.Error("putUuid failed: Failed to put leastSignificantLong Long value.")
		return errors.New("Failed to put leastSignificantLong Long value.")
	}
	if err = putLong(log, byteArray, offset+8, mostSignificantLong); err != nil {
		log.Error("putUuid failed: Failed to put mostSignificantLong Long value.")
		return errors.New("Failed to put mostSignificantLong Long value.")
	}
	return nil
}
func putUuid ( log logger . T , byteArray [ ] byte , offset int , input uuid . UUID ) ( err error ) { if input == nil { log . Error ( " " ) return errors . New ( " " ) } byteArrayLength := len ( byteArray ) if offset > byteArrayLength - 1 || offset + 16 - 1 > byteArrayLength - 1 || offset < 0 { log . Error ( " " ) return errors . New ( " " ) } leastSignificantLong , err := bytesToLong ( log , input . Bytes ( ) [ 8 : 16 ] ) if err != nil { log . Error ( " " ) return errors . New ( " " ) } mostSignificantLong , err := bytesToLong ( log , input . Bytes ( ) [ 0 : 8 ] ) if err != nil { log . Error ( " " ) return errors . New ( " " ) } if err = putLong ( log , byteArray , offset , leastSignificantLong ) ; err != nil { log . Error ( " " ) return errors . New ( " " ) } if err = putLong ( log , byteArray , offset + 8 , mostSignificantLong ) ; err != nil { log . Error ( " " ) return errors . New ( " " ) } return nil }
putUuid puts the 128 bit uuid to an array of bytes starting from the offset.
putUuid puts the 128 bit uuid to an array of bytes starting from the offset .