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: timestamp.go
    path of file: ./repos/podman/vendor/github.com/docker/docker/api/types/time
    
    the code of the file until where you have to start completion: package time // import "github.com/docker/docker/api/types/time"

import (
	"fmt"
	"math"
	"strconv"
	"strings"
	"time"
)

// These are additional predefined layouts for use in Time.Format and Time.Parse
// with --since and --until parameters for `docker logs` and
    
func parseTimestamp(value string) (sec int64, nsec int64, err error) {
	s, n, ok := strings.Cut(value, ".")
	sec, err = strconv.ParseInt(s, 10, 64)
	if err != nil {
		return sec, 0, err
	}
	if !ok {
		return sec, 0, nil
	}
	nsec, err = strconv.ParseInt(n, 10, 64)
	if err != nil {
		return sec, nsec, err
	}
	// should already be in nanoseconds but just in case convert n to nanoseconds
	nsec = int64(float64(nsec) * math.Pow(float64(10), float64(9-len(n))))
	return sec, nsec, nil
}