package fmt

Import Path
	fmt (on golang.org and go.dev)

Dependency Relation
	imports 9 packages, and imported by 80 packages

Involved Source Files
	d-> doc.go
	    errors.go
	    format.go
	    print.go
	    scan.go

Exported Type Names

type Formatter (interface) Formatter is the interface implemented by values with a custom formatter. The implementation of Format may call Sprint(f) or Fprint(f) etc. to generate its output. (T) Format(f State, c rune) math/big.(*Float) math/big.(*Int)
type GoStringer (interface) GoStringer is implemented by any value that has a GoString method, which defines the Go syntax for that value. The GoString method is used to print values passed as an operand to a %#v format. (T) GoString() string debug/dwarf.Attr debug/dwarf.Class debug/dwarf.Tag debug/elf.Class debug/elf.CompressionType debug/elf.Data debug/elf.DynFlag debug/elf.DynTag debug/elf.Machine debug/elf.NType debug/elf.OSABI debug/elf.ProgFlag debug/elf.ProgType debug/elf.R_386 debug/elf.R_390 debug/elf.R_AARCH64 debug/elf.R_ALPHA debug/elf.R_ARM debug/elf.R_MIPS debug/elf.R_PPC debug/elf.R_PPC64 debug/elf.R_RISCV debug/elf.R_SPARC debug/elf.R_X86_64 debug/elf.SectionFlag debug/elf.SectionIndex debug/elf.SectionType debug/elf.SymBind debug/elf.SymType debug/elf.SymVis debug/elf.Type debug/elf.Version debug/macho.Cpu debug/macho.LoadCmd debug/macho.RelocTypeARM debug/macho.RelocTypeARM64 debug/macho.RelocTypeGeneric debug/macho.RelocTypeX86_64 debug/macho.Type vendor/golang.org/x/net/dns/dnsmessage.(*AAAAResource) vendor/golang.org/x/net/dns/dnsmessage.(*AResource) vendor/golang.org/x/net/dns/dnsmessage.Class vendor/golang.org/x/net/dns/dnsmessage.(*CNAMEResource) vendor/golang.org/x/net/dns/dnsmessage.(*Header) vendor/golang.org/x/net/dns/dnsmessage.(*Message) vendor/golang.org/x/net/dns/dnsmessage.(*MXResource) vendor/golang.org/x/net/dns/dnsmessage.(*Name) vendor/golang.org/x/net/dns/dnsmessage.(*NSResource) vendor/golang.org/x/net/dns/dnsmessage.OpCode vendor/golang.org/x/net/dns/dnsmessage.(*Option) vendor/golang.org/x/net/dns/dnsmessage.(*OPTResource) vendor/golang.org/x/net/dns/dnsmessage.(*PTRResource) vendor/golang.org/x/net/dns/dnsmessage.(*Question) vendor/golang.org/x/net/dns/dnsmessage.RCode vendor/golang.org/x/net/dns/dnsmessage.(*Resource) vendor/golang.org/x/net/dns/dnsmessage.ResourceBody (interface) vendor/golang.org/x/net/dns/dnsmessage.(*ResourceHeader) vendor/golang.org/x/net/dns/dnsmessage.(*SOAResource) vendor/golang.org/x/net/dns/dnsmessage.(*SRVResource) vendor/golang.org/x/net/dns/dnsmessage.(*TXTResource) vendor/golang.org/x/net/dns/dnsmessage.Type
type Scanner (interface) Scanner is implemented by any value that has a Scan method, which scans the input for the representation of a value and stores the result in the receiver, which must be a pointer to be useful. The Scan method is called for any argument to Scan, Scanf, or Scanln that implements it. (T) Scan(state ScanState, verb rune) error math/big.(*Float) math/big.(*Int) math/big.(*Rat)
type ScanState (interface) ScanState represents the scanner state passed to custom scanners. Scanners may do rune-at-a-time scanning or ask the ScanState to discover the next space-delimited token. (T) Read(buf []byte) (n int, err error) (T) ReadRune() (r rune, size int, err error) (T) SkipSpace() (T) Token(skipSpace bool, f func(rune) bool) (token []byte, err error) (T) UnreadRune() error (T) Width() (wid int, ok bool) T : io.Reader T : io.RuneReader T : io.RuneScanner func Scanner.Scan(state ScanState, verb rune) error func math/big.(*Float).Scan(s ScanState, ch rune) error func math/big.(*Int).Scan(s ScanState, ch rune) error func math/big.(*Rat).Scan(s ScanState, ch rune) error
type State (interface) State represents the printer state passed to custom formatters. It provides access to the io.Writer interface plus information about the flags and options for the operand's format specifier. (T) Flag(c int) bool (T) Precision() (prec int, ok bool) (T) Width() (wid int, ok bool) (T) Write(b []byte) (n int, err error) T : io.Writer func Formatter.Format(f State, c rune) func math/big.(*Float).Format(s State, format rune) func math/big.(*Int).Format(s State, ch rune)
type Stringer (interface) Stringer is implemented by any value that has a String method, which defines the ``native'' format for that value. The String method is used to print values passed as an operand to any format that accepts a string or to an unformatted printer such as Print. (T) String() string archive/tar.Format bytes.(*Buffer) crypto.Hash crypto/tls.ClientAuthType crypto/tls.CurveID crypto/tls.SignatureScheme crypto/x509.PublicKeyAlgorithm crypto/x509.SignatureAlgorithm crypto/x509/pkix.Name crypto/x509/pkix.RDNSequence database/sql.IsolationLevel debug/dwarf.(*AddrType) debug/dwarf.(*ArrayType) debug/dwarf.Attr debug/dwarf.(*BasicType) debug/dwarf.(*BoolType) debug/dwarf.(*CharType) debug/dwarf.Class debug/dwarf.(*ComplexType) debug/dwarf.(*DotDotDotType) debug/dwarf.(*EnumType) debug/dwarf.(*FloatType) debug/dwarf.(*FuncType) debug/dwarf.(*IntType) debug/dwarf.(*PtrType) debug/dwarf.(*QualType) debug/dwarf.(*StructType) debug/dwarf.Tag debug/dwarf.Type (interface) debug/dwarf.(*TypedefType) debug/dwarf.(*UcharType) debug/dwarf.(*UintType) debug/dwarf.(*UnspecifiedType) debug/dwarf.(*UnsupportedType) debug/dwarf.(*VoidType) debug/elf.Class debug/elf.CompressionType debug/elf.Data debug/elf.DynFlag debug/elf.DynTag debug/elf.Machine debug/elf.NType debug/elf.OSABI debug/elf.ProgFlag debug/elf.ProgType debug/elf.R_386 debug/elf.R_390 debug/elf.R_AARCH64 debug/elf.R_ALPHA debug/elf.R_ARM debug/elf.R_MIPS debug/elf.R_PPC debug/elf.R_PPC64 debug/elf.R_RISCV debug/elf.R_SPARC debug/elf.R_X86_64 debug/elf.SectionFlag debug/elf.SectionIndex debug/elf.SectionType debug/elf.SymBind debug/elf.SymType debug/elf.SymVis debug/elf.Type debug/elf.Version debug/macho.Cpu debug/macho.LoadCmd debug/macho.RelocTypeARM debug/macho.RelocTypeARM64 debug/macho.RelocTypeGeneric debug/macho.RelocTypeX86_64 debug/macho.Type encoding/asn1.ObjectIdentifier encoding/binary.ByteOrder (interface) encoding/json.Delim encoding/json.Number expvar.(*Float) expvar.Func expvar.(*Int) expvar.(*Map) expvar.(*String) expvar.Var (interface) flag.Getter (interface) flag.Value (interface) go/ast.CommentMap go/ast.(*Ident) go/ast.ObjKind go/ast.(*Scope) go/constant.Value (interface) go/token.Position go/token.Token go/types.(*Array) go/types.(*Basic) go/types.(*Builtin) go/types.(*Chan) go/types.(*Const) go/types.(*Func) go/types.(*Initializer) go/types.(*Interface) go/types.(*Label) go/types.(*Map) go/types.(*MethodSet) go/types.(*Named) go/types.(*Nil) go/types.Object (interface) go/types.(*Package) go/types.(*PkgName) go/types.(*Pointer) go/types.(*Scope) go/types.(*Selection) go/types.(*Signature) go/types.(*Slice) go/types.(*Struct) go/types.(*Tuple) go/types.Type (interface) go/types.(*TypeName) go/types.(*Var) image.Point image.Rectangle image.YCbCrSubsampleRatio internal/profile.(*Profile) internal/reflectlite.Type (interface) internal/trace.(*Event) internal/trace.(*Writer) math/big.Accuracy math/big.(*Float) math/big.(*Int) math/big.(*Rat) math/big.RoundingMode net.Addr (interface) net.Flags net.HardwareAddr net.IP net.(*IPAddr) net.IPMask net.(*IPNet) net.(*TCPAddr) net.(*UDPAddr) net.(*UnixAddr) net/http.ConnState net/http.(*Cookie) net/http/cookiejar.PublicSuffixList (interface) net/internal/socktest.Stat net/internal/socktest.Status net/mail.(*Address) net/url.(*URL) net/url.(*Userinfo) os.FileMode os.(*ProcessState) os.Signal (interface) os/exec.(*Cmd) os/exec.ExitError reflect.ChanDir reflect.Kind reflect.Type (interface) reflect.Value regexp.(*Regexp) regexp/syntax.ErrorCode regexp/syntax.(*Inst) regexp/syntax.InstOp regexp/syntax.Op regexp/syntax.(*Prog) regexp/syntax.(*Regexp) strings.(*Builder) syscall.Signal testing.BenchmarkResult text/scanner.Position text/scanner.Scanner text/template/parse.(*ActionNode) text/template/parse.(*BoolNode) text/template/parse.(*BranchNode) text/template/parse.(*ChainNode) text/template/parse.(*CommandNode) text/template/parse.(*DotNode) text/template/parse.(*FieldNode) text/template/parse.(*IdentifierNode) text/template/parse.(*IfNode) text/template/parse.(*ListNode) text/template/parse.(*NilNode) text/template/parse.Node (interface) text/template/parse.(*NumberNode) text/template/parse.(*PipeNode) text/template/parse.(*RangeNode) text/template/parse.(*StringNode) text/template/parse.(*TemplateNode) text/template/parse.(*TextNode) text/template/parse.(*VariableNode) text/template/parse.(*WithNode) time.Duration time.(*Location) time.Month time.Time time.Weekday vendor/golang.org/x/net/dns/dnsmessage.Class vendor/golang.org/x/net/dns/dnsmessage.Name vendor/golang.org/x/net/dns/dnsmessage.RCode vendor/golang.org/x/net/dns/dnsmessage.Type vendor/golang.org/x/net/http2/hpack.HeaderField vendor/golang.org/x/net/idna.(*Profile) vendor/golang.org/x/text/unicode/bidi.(*Run) T : expvar.Var
Exported Values
func Errorf(format string, a ...interface{}) error Errorf formats according to a format specifier and returns the string as a value that satisfies error. If the format specifier includes a %w verb with an error operand, the returned error will implement an Unwrap method returning the operand. It is invalid to include more than one %w verb or to supply it with an operand that does not implement the error interface. The %w verb is otherwise a synonym for %v.
func Fprint(w io.Writer, a ...interface{}) (n int, err error) Fprint formats using the default formats for its operands and writes to w. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.
func Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) Fprintf formats according to a format specifier and writes to w. It returns the number of bytes written and any write error encountered.
func Fprintln(w io.Writer, a ...interface{}) (n int, err error) Fprintln formats using the default formats for its operands and writes to w. Spaces are always added between operands and a newline is appended. It returns the number of bytes written and any write error encountered.
func Fscan(r io.Reader, a ...interface{}) (n int, err error) Fscan scans text read from r, storing successive space-separated values into successive arguments. Newlines count as space. It returns the number of items successfully scanned. If that is less than the number of arguments, err will report why.
func Fscanf(r io.Reader, format string, a ...interface{}) (n int, err error) Fscanf scans text read from r, storing successive space-separated values into successive arguments as determined by the format. It returns the number of items successfully parsed. Newlines in the input must match newlines in the format.
func Fscanln(r io.Reader, a ...interface{}) (n int, err error) Fscanln is similar to Fscan, but stops scanning at a newline and after the final item there must be a newline or EOF.
func Print(a ...interface{}) (n int, err error) Print formats using the default formats for its operands and writes to standard output. Spaces are added between operands when neither is a string. It returns the number of bytes written and any write error encountered.
func Printf(format string, a ...interface{}) (n int, err error) Printf formats according to a format specifier and writes to standard output. It returns the number of bytes written and any write error encountered.
func Println(a ...interface{}) (n int, err error) Println formats using the default formats for its operands and writes to standard output. Spaces are always added between operands and a newline is appended. It returns the number of bytes written and any write error encountered.
func Scan(a ...interface{}) (n int, err error) Scan scans text read from standard input, storing successive space-separated values into successive arguments. Newlines count as space. It returns the number of items successfully scanned. If that is less than the number of arguments, err will report why.
func Scanf(format string, a ...interface{}) (n int, err error) Scanf scans text read from standard input, storing successive space-separated values into successive arguments as determined by the format. It returns the number of items successfully scanned. If that is less than the number of arguments, err will report why. Newlines in the input must match newlines in the format. The one exception: the verb %c always scans the next rune in the input, even if it is a space (or tab etc.) or newline.
func Scanln(a ...interface{}) (n int, err error) Scanln is similar to Scan, but stops scanning at a newline and after the final item there must be a newline or EOF.
func Sprint(a ...interface{}) string Sprint formats using the default formats for its operands and returns the resulting string. Spaces are added between operands when neither is a string.
func Sprintf(format string, a ...interface{}) string Sprintf formats according to a format specifier and returns the resulting string.
func Sprintln(a ...interface{}) string Sprintln formats using the default formats for its operands and returns the resulting string. Spaces are always added between operands and a newline is appended.
func Sscan(str string, a ...interface{}) (n int, err error) Sscan scans the argument string, storing successive space-separated values into successive arguments. Newlines count as space. It returns the number of items successfully scanned. If that is less than the number of arguments, err will report why.
func Sscanf(str string, format string, a ...interface{}) (n int, err error) Sscanf scans the argument string, storing successive space-separated values into successive arguments as determined by the format. It returns the number of items successfully parsed. Newlines in the input must match newlines in the format.
func Sscanln(str string, a ...interface{}) (n int, err error) Sscanln is similar to Sscan, but stops scanning at a newline and after the final item there must be a newline or EOF.