{"id":"eb3824f4e7cca48a","repo":"docker/cli","slug":"value-is-too-precise","errorCode":null,"errorMessage":"value is too precise","messagePattern":"value is too precise","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"opts/opts.go","lineNumber":366,"sourceCode":"// Type returns the type\nfunc (*NanoCPUs) Type() string {\n\treturn \"decimal\"\n}\n\n// Value returns the value in int64\nfunc (c *NanoCPUs) Value() int64 {\n\treturn int64(*c)\n}\n\n// ParseCPUs takes a string ratio and returns an integer value of nano cpus\nfunc ParseCPUs(value string) (int64, error) {\n\tcpu, ok := new(big.Rat).SetString(value)\n\tif !ok {\n\t\treturn 0, fmt.Errorf(\"failed to parse %v as a rational number\", value)\n\t}\n\tnano := cpu.Mul(cpu, big.NewRat(1e9, 1))\n\tif !nano.IsInt() {\n\t\treturn 0, errors.New(\"value is too precise\")\n\t}\n\treturn nano.Num().Int64(), nil\n}\n\n// ParseLink parses and validates the specified string as a link format (name:alias)\nfunc ParseLink(val string) (string, string, error) {\n\tif val == \"\" {\n\t\treturn \"\", \"\", errors.New(\"empty string specified for links\")\n\t}\n\t// We expect two parts, but restrict to three to allow detecting invalid formats.\n\tarr := strings.SplitN(val, \":\", 3)\n\n\t// TODO(thaJeztah): clean up this logic!!\n\tif len(arr) > 2 {\n\t\treturn \"\", \"\", errors.New(\"bad format for links: \" + val)\n\t}\n\t// TODO(thaJeztah): this should trim the \"/\" prefix as well??\n\tif len(arr) == 1 {","sourceCodeStart":348,"sourceCodeEnd":384,"githubUrl":"https://github.com/docker/cli/blob/e9452d6e785f6e365712b9d71bd7517591773c86/opts/opts.go#L348-L384","documentation":"Error \"value is too precise\" thrown in docker/cli.","triggerScenarios":"Thrown at opts/opts.go:366 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"e9452d6e785f6e365712b9d71bd7517591773c86","analyzedAt":"2026-08-01T07:09:22.474Z","schemaVersion":2}