func WithBuildDate(s string) Option {
	return func(bc *Context) error {
		// default to 0 for reproducibility
		if s == "" {
			bc.Options.SourceDateEpoch = time.Unix(0, 0)
			return nil
		}

		t, err := time.Parse(time.RFC3339, s)
		if err != nil {
			return err
		}

		bc.Options.SourceDateEpoch = t

		return nil
	}
}
// WithBuildDate sets the timestamps for the build context.
// The string is parsed according to RFC3339.
// An empty string is a special case and will default to
// the unix epoch.
WithBuildDate sets the timestamps for the build context.
The string is parsed according to RFC3339.
An empty string is a special case and will default to
the unix epoch.
// WithBuildDate sets the timestamps for the build context . // The string is parsed according to RFC3339 . // An empty string is a special case and will default to // the unix epoch .
func WithBuildDate(s string) Option {
	return func(bc *Context) error {
		if s == "" {
			bc.Options.SourceDateEpoch = time.Unix(0, 0)
			return nil
		}
		t, err := time.Parse(time.RFC3339, s)
		if err != nil {
			return err
		}
		bc.Options.SourceDateEpoch = t
		return nil
	}
}
func WithBuildDate ( s string ) Option { return func ( bc * Context ) error { if s == " " { bc . Options . SourceDateEpoch = time . Unix ( 0 , 0 ) return nil } t , err := time . Parse ( time . RFC3339 , s ) if err != nil { return err } bc . Options . SourceDateEpoch = t return nil } }
WithBuildDate sets the timestamps for the build context.
WithBuildDate sets the timestamps for the build context .
// default to 0 for reproducibility