You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: jitter.go
    path of file: ./repos/corteza/server/vendor/github.com/lestrrat-go/backoff/v2
    
    the code of the file until where you have to start completion: package backoff

import (
	"math/rand"
	"time"
)

type jitter interface {
	apply(interval float64) float64
}

func newJitter(jitterFactor float64, rng Random) jitter {
	if jitterFactor <= 0 || jitterFactor >= 1 {
		return newNopJitter()
	}
	return newRandomJitter(jitterFactor, rng)
}

type nopJitter struct{}

f
    
func newRandomJitter(jitterFactor float64, rng Random) *randomJitter {
	if rng == nil {
		// if we have a jitter factor, and no RNG is provided, create one.
		// This is definitely not "secure", but well, if you care enough,
		// you would provide one
		rng = rand.New(rand.NewSource(time.Now().UnixNano()))
	}

	return &randomJitter{
		jitterFactor: jitterFactor,
		rng:          rng,
	}
}