forked from LaconicNetwork/kompose
commit
d05e8c522a
32
glide.lock
generated
32
glide.lock
generated
@ -1,5 +1,5 @@
|
|||||||
hash: 7c5c3fff80f67ee4c3eb3a500cf7d04e4f7a05fc6f0edb2340079cc1b16ed68b
|
hash: 4ea8562ed136361f0ad9741263198f8e0bef9511ef543ff4532cd2f0f33e95ed
|
||||||
updated: 2017-02-13T09:57:50.997429158-05:00
|
updated: 2017-03-14T11:16:50.6057693-04:00
|
||||||
imports:
|
imports:
|
||||||
- name: cloud.google.com/go
|
- name: cloud.google.com/go
|
||||||
version: 3b1ae45394a234c385be014e9a488f2bb6eef821
|
version: 3b1ae45394a234c385be014e9a488f2bb6eef821
|
||||||
@ -190,7 +190,7 @@ imports:
|
|||||||
- name: github.com/docker/go-units
|
- name: github.com/docker/go-units
|
||||||
version: 0bbddae09c5a5419a8c6dcdd7ff90da3d450393b
|
version: 0bbddae09c5a5419a8c6dcdd7ff90da3d450393b
|
||||||
- name: github.com/docker/libcompose
|
- name: github.com/docker/libcompose
|
||||||
version: 1c4bd4542afb20db0b51afd71d9ebceaf206e2dd
|
version: 8e4221d0435d29e6239adf9ccb4de1f0c0ab0935
|
||||||
subpackages:
|
subpackages:
|
||||||
- config
|
- config
|
||||||
- logger
|
- logger
|
||||||
@ -214,7 +214,7 @@ imports:
|
|||||||
- name: github.com/flynn/go-shlex
|
- name: github.com/flynn/go-shlex
|
||||||
version: 3f9db97f856818214da2e1057f8ad84803971cff
|
version: 3f9db97f856818214da2e1057f8ad84803971cff
|
||||||
- name: github.com/fsnotify/fsnotify
|
- name: github.com/fsnotify/fsnotify
|
||||||
version: a904159b9206978bb6d53fcc7a769e5cd726c737
|
version: 7d7316ed6e1ed2de075aab8dfc76de5d158d66e1
|
||||||
- name: github.com/fsouza/go-dockerclient
|
- name: github.com/fsouza/go-dockerclient
|
||||||
version: bf97c77db7c945cbcdbf09d56c6f87a66f54537b
|
version: bf97c77db7c945cbcdbf09d56c6f87a66f54537b
|
||||||
subpackages:
|
subpackages:
|
||||||
@ -332,7 +332,7 @@ imports:
|
|||||||
- runtime/internal
|
- runtime/internal
|
||||||
- utilities
|
- utilities
|
||||||
- name: github.com/hashicorp/hcl
|
- name: github.com/hashicorp/hcl
|
||||||
version: 372e8ddaa16fd67e371e9323807d056b799360af
|
version: 630949a3c5fa3c613328e1b8256052cbc2327c9b
|
||||||
subpackages:
|
subpackages:
|
||||||
- hcl/ast
|
- hcl/ast
|
||||||
- hcl/parser
|
- hcl/parser
|
||||||
@ -357,7 +357,7 @@ imports:
|
|||||||
subpackages:
|
subpackages:
|
||||||
- pbutil
|
- pbutil
|
||||||
- name: github.com/mitchellh/mapstructure
|
- name: github.com/mitchellh/mapstructure
|
||||||
version: db1efb556f84b25a0a13a04aad883943538ad2e0
|
version: 53818660ed4955e899c0bcafa97299a388bd7c8e
|
||||||
- name: github.com/openshift/origin
|
- name: github.com/openshift/origin
|
||||||
version: b4e0954faa4a0d11d9c1a536b76ad4a8c0206b7c
|
version: b4e0954faa4a0d11d9c1a536b76ad4a8c0206b7c
|
||||||
subpackages:
|
subpackages:
|
||||||
@ -403,9 +403,9 @@ imports:
|
|||||||
- name: github.com/pborman/uuid
|
- name: github.com/pborman/uuid
|
||||||
version: ca53cad383cad2479bbba7f7a1a05797ec1386e4
|
version: ca53cad383cad2479bbba7f7a1a05797ec1386e4
|
||||||
- name: github.com/pelletier/go-buffruneio
|
- name: github.com/pelletier/go-buffruneio
|
||||||
version: df1e16fde7fc330a0ca68167c23bf7ed6ac31d6d
|
version: c37440a7cf42ac63b919c752ca73a85067e05992
|
||||||
- name: github.com/pelletier/go-toml
|
- name: github.com/pelletier/go-toml
|
||||||
version: c9506ee96398e7571356462217b9e24d6a628d71
|
version: 3b00596b2e9ee541bbd72dc50cc0c60e2b46c69c
|
||||||
- name: github.com/prometheus/client_golang
|
- name: github.com/prometheus/client_golang
|
||||||
version: e51041b3fa41cece0dca035740ba6411905be473
|
version: e51041b3fa41cece0dca035740ba6411905be473
|
||||||
subpackages:
|
subpackages:
|
||||||
@ -423,31 +423,31 @@ imports:
|
|||||||
- name: github.com/prometheus/procfs
|
- name: github.com/prometheus/procfs
|
||||||
version: 454a56f35412459b5e684fd5ec0f9211b94f002a
|
version: 454a56f35412459b5e684fd5ec0f9211b94f002a
|
||||||
- name: github.com/Sirupsen/logrus
|
- name: github.com/Sirupsen/logrus
|
||||||
version: 3f603f494d61c73457fb234161d8982b9f0f0b71
|
version: 1deb2db2a6fff8a35532079061b903c3a25eed52
|
||||||
- name: github.com/spf13/afero
|
- name: github.com/spf13/afero
|
||||||
version: 72b31426848c6ef12a7a8e216708cb0d1530f074
|
version: 9be650865eab0c12963d8753212f4f9c66cdcf12
|
||||||
subpackages:
|
subpackages:
|
||||||
- mem
|
- mem
|
||||||
- name: github.com/spf13/cast
|
- name: github.com/spf13/cast
|
||||||
version: d1139bab1c07d5ad390a65e7305876b3c1a8370b
|
version: ce135a4ebeee6cfe9a26c93ee0d37825f26113c7
|
||||||
- name: github.com/spf13/cobra
|
- name: github.com/spf13/cobra
|
||||||
version: b5d8e8f46a2f829f755b6e33b454e25c61c935e1
|
version: 16c014f1a19d865b765b420e74508f80eb831ada
|
||||||
- name: github.com/spf13/jwalterweatherman
|
- name: github.com/spf13/jwalterweatherman
|
||||||
version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66
|
version: fa7ca7e836cf3a8bb4ebf799f472c12d7e903d66
|
||||||
- name: github.com/spf13/pflag
|
- name: github.com/spf13/pflag
|
||||||
version: 9ff6c6923cfffbcd502984b8e0c80539a94968b7
|
version: 9ff6c6923cfffbcd502984b8e0c80539a94968b7
|
||||||
- name: github.com/spf13/viper
|
- name: github.com/spf13/viper
|
||||||
version: 5ed0fc31f7f453625df314d8e66b9791e8d13003
|
version: 7538d73b4eb9511d85a9f1dfef202eeb8ac260f4
|
||||||
- name: github.com/ugorji/go
|
- name: github.com/ugorji/go
|
||||||
version: f4485b318aadd133842532f841dc205a8e339d74
|
version: f4485b318aadd133842532f841dc205a8e339d74
|
||||||
subpackages:
|
subpackages:
|
||||||
- codec
|
- codec
|
||||||
- name: github.com/xeipuuv/gojsonpointer
|
- name: github.com/xeipuuv/gojsonpointer
|
||||||
version: e0fe6f68307607d540ed8eac07a342c33fa1b54a
|
version: 6fe8760cad3569743d51ddbb243b26f8456742dc
|
||||||
- name: github.com/xeipuuv/gojsonreference
|
- name: github.com/xeipuuv/gojsonreference
|
||||||
version: e02fc20de94c78484cd5ffb007f8af96be030a45
|
version: e02fc20de94c78484cd5ffb007f8af96be030a45
|
||||||
- name: github.com/xeipuuv/gojsonschema
|
- name: github.com/xeipuuv/gojsonschema
|
||||||
version: 6b67b3fab74d992bd07f72550006ab2c6907c416
|
version: ff0417f4272e480246b4507459b3f6ae721a87ac
|
||||||
- name: golang.org/x/net
|
- name: golang.org/x/net
|
||||||
version: e90d6d0afc4c315a0d87a568ae68577cc15149a0
|
version: e90d6d0afc4c315a0d87a568ae68577cc15149a0
|
||||||
subpackages:
|
subpackages:
|
||||||
@ -471,7 +471,7 @@ imports:
|
|||||||
- jws
|
- jws
|
||||||
- jwt
|
- jwt
|
||||||
- name: golang.org/x/sys
|
- name: golang.org/x/sys
|
||||||
version: aaabbdc969c3935a2a7f61efac801e7163c73a2a
|
version: 99f16d856c9836c42d24e7ab64ea72916925fa97
|
||||||
subpackages:
|
subpackages:
|
||||||
- unix
|
- unix
|
||||||
- name: golang.org/x/text
|
- name: golang.org/x/text
|
||||||
|
|||||||
@ -11,7 +11,7 @@ import:
|
|||||||
- package: github.com/spf13/viper
|
- package: github.com/spf13/viper
|
||||||
|
|
||||||
- package: github.com/docker/libcompose
|
- package: github.com/docker/libcompose
|
||||||
version: 1c4bd4542afb20db0b51afd71d9ebceaf206e2dd
|
version: 8e4221d0435d29e6239adf9ccb4de1f0c0ab0935
|
||||||
subpackages:
|
subpackages:
|
||||||
- config
|
- config
|
||||||
- lookup
|
- lookup
|
||||||
|
|||||||
2
vendor/github.com/Sirupsen/logrus/terminal_appengine.go
generated
vendored
2
vendor/github.com/Sirupsen/logrus/terminal_appengine.go
generated
vendored
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
package logrus
|
package logrus
|
||||||
|
|
||||||
|
import "io"
|
||||||
|
|
||||||
// IsTerminal returns true if stderr's file descriptor is a terminal.
|
// IsTerminal returns true if stderr's file descriptor is a terminal.
|
||||||
func IsTerminal(f io.Writer) bool {
|
func IsTerminal(f io.Writer) bool {
|
||||||
return true
|
return true
|
||||||
|
|||||||
2
vendor/github.com/Sirupsen/logrus/terminal_solaris.go
generated
vendored
2
vendor/github.com/Sirupsen/logrus/terminal_solaris.go
generated
vendored
@ -3,6 +3,7 @@
|
|||||||
package logrus
|
package logrus
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
@ -10,7 +11,6 @@ import (
|
|||||||
|
|
||||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||||
func IsTerminal(f io.Writer) bool {
|
func IsTerminal(f io.Writer) bool {
|
||||||
var termios Termios
|
|
||||||
switch v := f.(type) {
|
switch v := f.(type) {
|
||||||
case *os.File:
|
case *os.File:
|
||||||
_, err := unix.IoctlGetTermios(int(v.Fd()), unix.TCGETA)
|
_, err := unix.IoctlGetTermios(int(v.Fd()), unix.TCGETA)
|
||||||
|
|||||||
38
vendor/github.com/Sirupsen/logrus/text_formatter.go
generated
vendored
38
vendor/github.com/Sirupsen/logrus/text_formatter.go
generated
vendored
@ -49,9 +49,26 @@ type TextFormatter struct {
|
|||||||
// be desired.
|
// be desired.
|
||||||
DisableSorting bool
|
DisableSorting bool
|
||||||
|
|
||||||
|
// QuoteEmptyFields will wrap empty fields in quotes if true
|
||||||
|
QuoteEmptyFields bool
|
||||||
|
|
||||||
|
// QuoteCharacter can be set to the override the default quoting character "
|
||||||
|
// with something else. For example: ', or `.
|
||||||
|
QuoteCharacter string
|
||||||
|
|
||||||
// Whether the logger's out is to a terminal
|
// Whether the logger's out is to a terminal
|
||||||
isTerminal bool
|
isTerminal bool
|
||||||
terminalOnce sync.Once
|
|
||||||
|
sync.Once
|
||||||
|
}
|
||||||
|
|
||||||
|
func (f *TextFormatter) init(entry *Entry) {
|
||||||
|
if len(f.QuoteCharacter) == 0 {
|
||||||
|
f.QuoteCharacter = "\""
|
||||||
|
}
|
||||||
|
if entry.Logger != nil {
|
||||||
|
f.isTerminal = IsTerminal(entry.Logger.Out)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
||||||
@ -72,11 +89,7 @@ func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
|
|||||||
|
|
||||||
prefixFieldClashes(entry.Data)
|
prefixFieldClashes(entry.Data)
|
||||||
|
|
||||||
f.terminalOnce.Do(func() {
|
f.Do(func() { f.init(entry) })
|
||||||
if entry.Logger != nil {
|
|
||||||
f.isTerminal = IsTerminal(entry.Logger.Out)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
|
isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
|
||||||
|
|
||||||
@ -132,7 +145,10 @@ func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []strin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func needsQuoting(text string) bool {
|
func (f *TextFormatter) needsQuoting(text string) bool {
|
||||||
|
if f.QuoteEmptyFields && len(text) == 0 {
|
||||||
|
return true
|
||||||
|
}
|
||||||
for _, ch := range text {
|
for _, ch := range text {
|
||||||
if !((ch >= 'a' && ch <= 'z') ||
|
if !((ch >= 'a' && ch <= 'z') ||
|
||||||
(ch >= 'A' && ch <= 'Z') ||
|
(ch >= 'A' && ch <= 'Z') ||
|
||||||
@ -155,17 +171,17 @@ func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interf
|
|||||||
func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
|
func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
|
||||||
switch value := value.(type) {
|
switch value := value.(type) {
|
||||||
case string:
|
case string:
|
||||||
if !needsQuoting(value) {
|
if !f.needsQuoting(value) {
|
||||||
b.WriteString(value)
|
b.WriteString(value)
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(b, "%q", value)
|
fmt.Fprintf(b, "%s%v%s", f.QuoteCharacter, value, f.QuoteCharacter)
|
||||||
}
|
}
|
||||||
case error:
|
case error:
|
||||||
errmsg := value.Error()
|
errmsg := value.Error()
|
||||||
if !needsQuoting(errmsg) {
|
if !f.needsQuoting(errmsg) {
|
||||||
b.WriteString(errmsg)
|
b.WriteString(errmsg)
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(b, "%q", errmsg)
|
fmt.Fprintf(b, "%s%v%s", f.QuoteCharacter, errmsg, f.QuoteCharacter)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
fmt.Fprint(b, value)
|
fmt.Fprint(b, value)
|
||||||
|
|||||||
29
vendor/github.com/Sirupsen/logrus/writer.go
generated
vendored
29
vendor/github.com/Sirupsen/logrus/writer.go
generated
vendored
@ -11,39 +11,48 @@ func (logger *Logger) Writer() *io.PipeWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
|
func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
|
||||||
|
return NewEntry(logger).WriterLevel(level)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entry *Entry) Writer() *io.PipeWriter {
|
||||||
|
return entry.WriterLevel(InfoLevel)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (entry *Entry) WriterLevel(level Level) *io.PipeWriter {
|
||||||
reader, writer := io.Pipe()
|
reader, writer := io.Pipe()
|
||||||
|
|
||||||
var printFunc func(args ...interface{})
|
var printFunc func(args ...interface{})
|
||||||
|
|
||||||
switch level {
|
switch level {
|
||||||
case DebugLevel:
|
case DebugLevel:
|
||||||
printFunc = logger.Debug
|
printFunc = entry.Debug
|
||||||
case InfoLevel:
|
case InfoLevel:
|
||||||
printFunc = logger.Info
|
printFunc = entry.Info
|
||||||
case WarnLevel:
|
case WarnLevel:
|
||||||
printFunc = logger.Warn
|
printFunc = entry.Warn
|
||||||
case ErrorLevel:
|
case ErrorLevel:
|
||||||
printFunc = logger.Error
|
printFunc = entry.Error
|
||||||
case FatalLevel:
|
case FatalLevel:
|
||||||
printFunc = logger.Fatal
|
printFunc = entry.Fatal
|
||||||
case PanicLevel:
|
case PanicLevel:
|
||||||
printFunc = logger.Panic
|
printFunc = entry.Panic
|
||||||
default:
|
default:
|
||||||
printFunc = logger.Print
|
printFunc = entry.Print
|
||||||
}
|
}
|
||||||
|
|
||||||
go logger.writerScanner(reader, printFunc)
|
go entry.writerScanner(reader, printFunc)
|
||||||
runtime.SetFinalizer(writer, writerFinalizer)
|
runtime.SetFinalizer(writer, writerFinalizer)
|
||||||
|
|
||||||
return writer
|
return writer
|
||||||
}
|
}
|
||||||
|
|
||||||
func (logger *Logger) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) {
|
func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) {
|
||||||
scanner := bufio.NewScanner(reader)
|
scanner := bufio.NewScanner(reader)
|
||||||
for scanner.Scan() {
|
for scanner.Scan() {
|
||||||
printFunc(scanner.Text())
|
printFunc(scanner.Text())
|
||||||
}
|
}
|
||||||
if err := scanner.Err(); err != nil {
|
if err := scanner.Err(); err != nil {
|
||||||
logger.Errorf("Error while reading from Writer: %s", err)
|
entry.Errorf("Error while reading from Writer: %s", err)
|
||||||
}
|
}
|
||||||
reader.Close()
|
reader.Close()
|
||||||
}
|
}
|
||||||
|
|||||||
2
vendor/github.com/docker/libcompose/config/schema.go
generated
vendored
2
vendor/github.com/docker/libcompose/config/schema.go
generated
vendored
@ -86,6 +86,7 @@ var schemaDataV1 = `{
|
|||||||
"log_opt": {"type": "object"},
|
"log_opt": {"type": "object"},
|
||||||
"mac_address": {"type": "string"},
|
"mac_address": {"type": "string"},
|
||||||
"mem_limit": {"type": ["number", "string"]},
|
"mem_limit": {"type": ["number", "string"]},
|
||||||
|
"mem_reservation": {"type": ["number", "string"]},
|
||||||
"memswap_limit": {"type": ["number", "string"]},
|
"memswap_limit": {"type": ["number", "string"]},
|
||||||
"mem_swappiness": {"type": "integer"},
|
"mem_swappiness": {"type": "integer"},
|
||||||
"net": {"type": "string"},
|
"net": {"type": "string"},
|
||||||
@ -298,6 +299,7 @@ var servicesSchemaDataV2 = `{
|
|||||||
|
|
||||||
"mac_address": {"type": "string"},
|
"mac_address": {"type": "string"},
|
||||||
"mem_limit": {"type": ["number", "string"]},
|
"mem_limit": {"type": ["number", "string"]},
|
||||||
|
"mem_reservation": {"type": ["number", "string"]},
|
||||||
"memswap_limit": {"type": ["number", "string"]},
|
"memswap_limit": {"type": ["number", "string"]},
|
||||||
"mem_swappiness": {"type": "integer"},
|
"mem_swappiness": {"type": "integer"},
|
||||||
"network_mode": {"type": "string"},
|
"network_mode": {"type": "string"},
|
||||||
|
|||||||
1
vendor/github.com/docker/libcompose/config/types.go
generated
vendored
1
vendor/github.com/docker/libcompose/config/types.go
generated
vendored
@ -117,6 +117,7 @@ type ServiceConfig struct {
|
|||||||
Logging Log `yaml:"logging,omitempty"`
|
Logging Log `yaml:"logging,omitempty"`
|
||||||
MacAddress string `yaml:"mac_address,omitempty"`
|
MacAddress string `yaml:"mac_address,omitempty"`
|
||||||
MemLimit yaml.MemStringorInt `yaml:"mem_limit,omitempty"`
|
MemLimit yaml.MemStringorInt `yaml:"mem_limit,omitempty"`
|
||||||
|
MemReservation yaml.MemStringorInt `yaml:"mem_reservation,omitempty"`
|
||||||
MemSwapLimit yaml.MemStringorInt `yaml:"memswap_limit,omitempty"`
|
MemSwapLimit yaml.MemStringorInt `yaml:"memswap_limit,omitempty"`
|
||||||
MemSwappiness yaml.MemStringorInt `yaml:"mem_swappiness,omitempty"`
|
MemSwappiness yaml.MemStringorInt `yaml:"mem_swappiness,omitempty"`
|
||||||
NetworkMode string `yaml:"network_mode,omitempty"`
|
NetworkMode string `yaml:"network_mode,omitempty"`
|
||||||
|
|||||||
21
vendor/github.com/docker/libcompose/project/project.go
generated
vendored
21
vendor/github.com/docker/libcompose/project/project.go
generated
vendored
@ -4,6 +4,7 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
|
"path"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -65,7 +66,17 @@ func NewProject(context *Context, runtime RuntimeProject, parseOptions *config.P
|
|||||||
}
|
}
|
||||||
|
|
||||||
if context.EnvironmentLookup == nil {
|
if context.EnvironmentLookup == nil {
|
||||||
cwd, err := os.Getwd()
|
var envPath, absPath, cwd string
|
||||||
|
var err error
|
||||||
|
if len(context.ComposeFiles) > 0 {
|
||||||
|
absPath, err = filepath.Abs(context.ComposeFiles[0])
|
||||||
|
dir, _ := path.Split(absPath)
|
||||||
|
envPath = filepath.Join(dir, ".env")
|
||||||
|
} else {
|
||||||
|
cwd, err = os.Getwd()
|
||||||
|
envPath = filepath.Join(cwd, ".env")
|
||||||
|
}
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("Could not get the rooted path name to the current directory: %v", err)
|
log.Errorf("Could not get the rooted path name to the current directory: %v", err)
|
||||||
return nil
|
return nil
|
||||||
@ -73,7 +84,7 @@ func NewProject(context *Context, runtime RuntimeProject, parseOptions *config.P
|
|||||||
context.EnvironmentLookup = &lookup.ComposableEnvLookup{
|
context.EnvironmentLookup = &lookup.ComposableEnvLookup{
|
||||||
Lookups: []config.EnvironmentLookup{
|
Lookups: []config.EnvironmentLookup{
|
||||||
&lookup.EnvfileLookup{
|
&lookup.EnvfileLookup{
|
||||||
Path: filepath.Join(cwd, ".env"),
|
Path: envPath,
|
||||||
},
|
},
|
||||||
&lookup.OsEnvLookup{},
|
&lookup.OsEnvLookup{},
|
||||||
},
|
},
|
||||||
@ -150,7 +161,7 @@ func (p *Project) CreateService(name string) (Service, error) {
|
|||||||
|
|
||||||
// check the environment for extra build Args that are set but not given a value in the compose file
|
// check the environment for extra build Args that are set but not given a value in the compose file
|
||||||
for arg, value := range config.Build.Args {
|
for arg, value := range config.Build.Args {
|
||||||
if value == "\x00" {
|
if *value == "\x00" {
|
||||||
envValue := p.context.EnvironmentLookup.Lookup(arg, &config)
|
envValue := p.context.EnvironmentLookup.Lookup(arg, &config)
|
||||||
// depending on what we get back we do different things
|
// depending on what we get back we do different things
|
||||||
switch l := len(envValue); l {
|
switch l := len(envValue); l {
|
||||||
@ -158,7 +169,7 @@ func (p *Project) CreateService(name string) (Service, error) {
|
|||||||
delete(config.Build.Args, arg)
|
delete(config.Build.Args, arg)
|
||||||
case 1:
|
case 1:
|
||||||
parts := strings.SplitN(envValue[0], "=", 2)
|
parts := strings.SplitN(envValue[0], "=", 2)
|
||||||
config.Build.Args[parts[0]] = parts[1]
|
config.Build.Args[parts[0]] = &parts[1]
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("tried to set Build Arg %#v to multi-value %#v", arg, envValue)
|
return nil, fmt.Errorf("tried to set Build Arg %#v to multi-value %#v", arg, envValue)
|
||||||
}
|
}
|
||||||
@ -312,7 +323,7 @@ func (p *Project) handleVolumeConfig() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
vol, ok := p.VolumeConfigs[volume.Source]
|
vol, ok := p.VolumeConfigs[volume.Source]
|
||||||
if !ok {
|
if !ok || vol == nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
21
vendor/github.com/docker/libcompose/yaml/build.go
generated
vendored
21
vendor/github.com/docker/libcompose/yaml/build.go
generated
vendored
@ -12,7 +12,7 @@ import (
|
|||||||
type Build struct {
|
type Build struct {
|
||||||
Context string
|
Context string
|
||||||
Dockerfile string
|
Dockerfile string
|
||||||
Args map[string]string
|
Args map[string]*string
|
||||||
}
|
}
|
||||||
|
|
||||||
// MarshalYAML implements the Marshaller interface.
|
// MarshalYAML implements the Marshaller interface.
|
||||||
@ -63,8 +63,8 @@ func (b *Build) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
|||||||
return errors.New("Failed to unmarshal Build")
|
return errors.New("Failed to unmarshal Build")
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleBuildArgs(value interface{}) (map[string]string, error) {
|
func handleBuildArgs(value interface{}) (map[string]*string, error) {
|
||||||
var args map[string]string
|
var args map[string]*string
|
||||||
switch v := value.(type) {
|
switch v := value.(type) {
|
||||||
case map[interface{}]interface{}:
|
case map[interface{}]interface{}:
|
||||||
return handleBuildArgMap(v)
|
return handleBuildArgMap(v)
|
||||||
@ -75,25 +75,26 @@ func handleBuildArgs(value interface{}) (map[string]string, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleBuildArgSlice(s []interface{}) (map[string]string, error) {
|
func handleBuildArgSlice(s []interface{}) (map[string]*string, error) {
|
||||||
var args = map[string]string{}
|
var args = map[string]*string{}
|
||||||
for _, arg := range s {
|
for _, arg := range s {
|
||||||
// check if a value is provided
|
// check if a value is provided
|
||||||
switch v := strings.SplitN(arg.(string), "=", 2); len(v) {
|
switch v := strings.SplitN(arg.(string), "=", 2); len(v) {
|
||||||
case 1:
|
case 1:
|
||||||
// if we have not specified a a value for this build arg, we assign it an ascii null value and query the environment
|
// if we have not specified a a value for this build arg, we assign it an ascii null value and query the environment
|
||||||
// later when we build the service
|
// later when we build the service
|
||||||
args[v[0]] = "\x00"
|
str := "\x00"
|
||||||
|
args[v[0]] = &str
|
||||||
case 2:
|
case 2:
|
||||||
// if we do have a value provided, we use it
|
// if we do have a value provided, we use it
|
||||||
args[v[0]] = v[1]
|
args[v[0]] = &v[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return args, nil
|
return args, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleBuildArgMap(m map[interface{}]interface{}) (map[string]string, error) {
|
func handleBuildArgMap(m map[interface{}]interface{}) (map[string]*string, error) {
|
||||||
args := map[string]string{}
|
args := map[string]*string{}
|
||||||
for mapKey, mapValue := range m {
|
for mapKey, mapValue := range m {
|
||||||
var argValue string
|
var argValue string
|
||||||
name, ok := mapKey.(string)
|
name, ok := mapKey.(string)
|
||||||
@ -110,7 +111,7 @@ func handleBuildArgMap(m map[interface{}]interface{}) (map[string]string, error)
|
|||||||
default:
|
default:
|
||||||
return args, fmt.Errorf("Cannot unmarshal '%v' to type %T into a string value", mapValue, mapValue)
|
return args, fmt.Errorf("Cannot unmarshal '%v' to type %T into a string value", mapValue, mapValue)
|
||||||
}
|
}
|
||||||
args[name] = argValue
|
args[name] = &argValue
|
||||||
}
|
}
|
||||||
return args, nil
|
return args, nil
|
||||||
}
|
}
|
||||||
|
|||||||
24
vendor/github.com/mitchellh/mapstructure/mapstructure.go
generated
vendored
24
vendor/github.com/mitchellh/mapstructure/mapstructure.go
generated
vendored
@ -69,6 +69,9 @@ type DecoderConfig struct {
|
|||||||
// - empty array = empty map and vice versa
|
// - empty array = empty map and vice versa
|
||||||
// - negative numbers to overflowed uint values (base 10)
|
// - negative numbers to overflowed uint values (base 10)
|
||||||
// - slice of maps to a merged map
|
// - slice of maps to a merged map
|
||||||
|
// - single values are converted to slices if required. Each
|
||||||
|
// element is weakly decoded. For example: "4" can become []int{4}
|
||||||
|
// if the target type is an int slice.
|
||||||
//
|
//
|
||||||
WeaklyTypedInput bool
|
WeaklyTypedInput bool
|
||||||
|
|
||||||
@ -584,17 +587,28 @@ func (d *Decoder) decodeSlice(name string, data interface{}, val reflect.Value)
|
|||||||
|
|
||||||
valSlice := val
|
valSlice := val
|
||||||
if valSlice.IsNil() || d.config.ZeroFields {
|
if valSlice.IsNil() || d.config.ZeroFields {
|
||||||
|
|
||||||
// Check input type
|
// Check input type
|
||||||
if dataValKind != reflect.Array && dataValKind != reflect.Slice {
|
if dataValKind != reflect.Array && dataValKind != reflect.Slice {
|
||||||
// Accept empty map instead of array/slice in weakly typed mode
|
if d.config.WeaklyTypedInput {
|
||||||
if d.config.WeaklyTypedInput && dataVal.Kind() == reflect.Map && dataVal.Len() == 0 {
|
switch {
|
||||||
|
// Empty maps turn into empty slices
|
||||||
|
case dataValKind == reflect.Map:
|
||||||
|
if dataVal.Len() == 0 {
|
||||||
val.Set(reflect.MakeSlice(sliceType, 0, 0))
|
val.Set(reflect.MakeSlice(sliceType, 0, 0))
|
||||||
return nil
|
return nil
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
// All other types we try to convert to the slice type
|
||||||
|
// and "lift" it into it. i.e. a string becomes a string slice.
|
||||||
|
default:
|
||||||
|
// Just re-try this function with data as a slice.
|
||||||
|
return d.decodeSlice(name, []interface{}{data}, val)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return fmt.Errorf(
|
return fmt.Errorf(
|
||||||
"'%s': source data must be an array or slice, got %s", name, dataValKind)
|
"'%s': source data must be an array or slice, got %s", name, dataValKind)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make a new slice to hold our result, same size as the original data.
|
// Make a new slice to hold our result, same size as the original data.
|
||||||
|
|||||||
25
vendor/github.com/pelletier/go-buffruneio/buffruneio.go
generated
vendored
25
vendor/github.com/pelletier/go-buffruneio/buffruneio.go
generated
vendored
@ -31,8 +31,13 @@ func NewReader(rd io.Reader) *Reader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type runeWithSize struct {
|
||||||
|
r rune
|
||||||
|
size int
|
||||||
|
}
|
||||||
|
|
||||||
func (rd *Reader) feedBuffer() error {
|
func (rd *Reader) feedBuffer() error {
|
||||||
r, _, err := rd.input.ReadRune()
|
r, size, err := rd.input.ReadRune()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err != io.EOF {
|
if err != io.EOF {
|
||||||
@ -41,7 +46,9 @@ func (rd *Reader) feedBuffer() error {
|
|||||||
r = EOF
|
r = EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
rd.buffer.PushBack(r)
|
newRuneWithSize := runeWithSize{r, size}
|
||||||
|
|
||||||
|
rd.buffer.PushBack(newRuneWithSize)
|
||||||
if rd.current == nil {
|
if rd.current == nil {
|
||||||
rd.current = rd.buffer.Back()
|
rd.current = rd.buffer.Back()
|
||||||
}
|
}
|
||||||
@ -49,17 +56,17 @@ func (rd *Reader) feedBuffer() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ReadRune reads the next rune from buffer, or from the underlying reader if needed.
|
// ReadRune reads the next rune from buffer, or from the underlying reader if needed.
|
||||||
func (rd *Reader) ReadRune() (rune, error) {
|
func (rd *Reader) ReadRune() (rune, int, error) {
|
||||||
if rd.current == rd.buffer.Back() || rd.current == nil {
|
if rd.current == rd.buffer.Back() || rd.current == nil {
|
||||||
err := rd.feedBuffer()
|
err := rd.feedBuffer()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return EOF, err
|
return EOF, 0, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r := rd.current.Value
|
runeWithSize := rd.current.Value.(runeWithSize)
|
||||||
rd.current = rd.current.Next()
|
rd.current = rd.current.Next()
|
||||||
return r.(rune), nil
|
return runeWithSize.r, runeWithSize.size, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnreadRune pushes back the previously read rune in the buffer, extending it if needed.
|
// UnreadRune pushes back the previously read rune in the buffer, extending it if needed.
|
||||||
@ -84,9 +91,9 @@ func (rd *Reader) Forget() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Peek returns at most the next n runes, reading from the uderlying source if
|
// PeekRune returns at most the next n runes, reading from the uderlying source if
|
||||||
// needed. Does not move the current index. It includes EOF if reached.
|
// needed. Does not move the current index. It includes EOF if reached.
|
||||||
func (rd *Reader) Peek(n int) []rune {
|
func (rd *Reader) PeekRunes(n int) []rune {
|
||||||
res := make([]rune, 0, n)
|
res := make([]rune, 0, n)
|
||||||
cursor := rd.current
|
cursor := rd.current
|
||||||
for i := 0; i < n; i++ {
|
for i := 0; i < n; i++ {
|
||||||
@ -98,7 +105,7 @@ func (rd *Reader) Peek(n int) []rune {
|
|||||||
cursor = rd.buffer.Back()
|
cursor = rd.buffer.Back()
|
||||||
}
|
}
|
||||||
if cursor != nil {
|
if cursor != nil {
|
||||||
r := cursor.Value.(rune)
|
r := cursor.Value.(runeWithSize).r
|
||||||
res = append(res, r)
|
res = append(res, r)
|
||||||
if r == EOF {
|
if r == EOF {
|
||||||
return res
|
return res
|
||||||
|
|||||||
8
vendor/github.com/pelletier/go-toml/lexer.go
generated
vendored
8
vendor/github.com/pelletier/go-toml/lexer.go
generated
vendored
@ -36,7 +36,7 @@ type tomlLexer struct {
|
|||||||
// Basic read operations on input
|
// Basic read operations on input
|
||||||
|
|
||||||
func (l *tomlLexer) read() rune {
|
func (l *tomlLexer) read() rune {
|
||||||
r, err := l.input.ReadRune()
|
r, _, err := l.input.ReadRune()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -89,7 +89,7 @@ func (l *tomlLexer) emit(t tokenType) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (l *tomlLexer) peek() rune {
|
func (l *tomlLexer) peek() rune {
|
||||||
r, err := l.input.ReadRune()
|
r, _, err := l.input.ReadRune()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
@ -99,7 +99,7 @@ func (l *tomlLexer) peek() rune {
|
|||||||
|
|
||||||
func (l *tomlLexer) follow(next string) bool {
|
func (l *tomlLexer) follow(next string) bool {
|
||||||
for _, expectedRune := range next {
|
for _, expectedRune := range next {
|
||||||
r, err := l.input.ReadRune()
|
r, _, err := l.input.ReadRune()
|
||||||
defer l.input.UnreadRune()
|
defer l.input.UnreadRune()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
@ -219,7 +219,7 @@ func (l *tomlLexer) lexRvalue() tomlLexStateFn {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
possibleDate := string(l.input.Peek(35))
|
possibleDate := string(l.input.PeekRunes(35))
|
||||||
dateMatch := dateRegexp.FindString(possibleDate)
|
dateMatch := dateRegexp.FindString(possibleDate)
|
||||||
if dateMatch != "" {
|
if dateMatch != "" {
|
||||||
l.fastForward(len(dateMatch))
|
l.fastForward(len(dateMatch))
|
||||||
|
|||||||
3
vendor/github.com/pelletier/go-toml/token.go
generated
vendored
3
vendor/github.com/pelletier/go-toml/token.go
generated
vendored
@ -135,5 +135,6 @@ func isDigit(r rune) bool {
|
|||||||
|
|
||||||
func isHexDigit(r rune) bool {
|
func isHexDigit(r rune) bool {
|
||||||
return isDigit(r) ||
|
return isDigit(r) ||
|
||||||
r == 'A' || r == 'B' || r == 'C' || r == 'D' || r == 'E' || r == 'F'
|
(r >= 'a' && r <= 'f') ||
|
||||||
|
(r >= 'A' && r <= 'F')
|
||||||
}
|
}
|
||||||
|
|||||||
4
vendor/github.com/pelletier/go-toml/toml.go
generated
vendored
4
vendor/github.com/pelletier/go-toml/toml.go
generated
vendored
@ -10,13 +10,13 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type tomlValue struct {
|
type tomlValue struct {
|
||||||
value interface{}
|
value interface{} // string, int64, uint64, float64, bool, time.Time, [] of any of this list
|
||||||
position Position
|
position Position
|
||||||
}
|
}
|
||||||
|
|
||||||
// TomlTree is the result of the parsing of a TOML file.
|
// TomlTree is the result of the parsing of a TOML file.
|
||||||
type TomlTree struct {
|
type TomlTree struct {
|
||||||
values map[string]interface{}
|
values map[string]interface{} // string -> *tomlValue, *TomlTree, []*TomlTree
|
||||||
position Position
|
position Position
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
227
vendor/github.com/pelletier/go-toml/tomltree_conversions.go
generated
vendored
227
vendor/github.com/pelletier/go-toml/tomltree_conversions.go
generated
vendored
@ -1,227 +0,0 @@
|
|||||||
package toml
|
|
||||||
|
|
||||||
// Tools to convert a TomlTree to different representations
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"strconv"
|
|
||||||
"strings"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
// encodes a string to a TOML-compliant string value
|
|
||||||
func encodeTomlString(value string) string {
|
|
||||||
result := ""
|
|
||||||
for _, rr := range value {
|
|
||||||
intRr := uint16(rr)
|
|
||||||
switch rr {
|
|
||||||
case '\b':
|
|
||||||
result += "\\b"
|
|
||||||
case '\t':
|
|
||||||
result += "\\t"
|
|
||||||
case '\n':
|
|
||||||
result += "\\n"
|
|
||||||
case '\f':
|
|
||||||
result += "\\f"
|
|
||||||
case '\r':
|
|
||||||
result += "\\r"
|
|
||||||
case '"':
|
|
||||||
result += "\\\""
|
|
||||||
case '\\':
|
|
||||||
result += "\\\\"
|
|
||||||
default:
|
|
||||||
if intRr < 0x001F {
|
|
||||||
result += fmt.Sprintf("\\u%0.4X", intRr)
|
|
||||||
} else {
|
|
||||||
result += string(rr)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
// Value print support function for ToString()
|
|
||||||
// Outputs the TOML compliant string representation of a value
|
|
||||||
func toTomlValue(item interface{}, indent int) string {
|
|
||||||
tab := strings.Repeat(" ", indent)
|
|
||||||
switch value := item.(type) {
|
|
||||||
case int:
|
|
||||||
return tab + strconv.FormatInt(int64(value), 10)
|
|
||||||
case int8:
|
|
||||||
return tab + strconv.FormatInt(int64(value), 10)
|
|
||||||
case int16:
|
|
||||||
return tab + strconv.FormatInt(int64(value), 10)
|
|
||||||
case int32:
|
|
||||||
return tab + strconv.FormatInt(int64(value), 10)
|
|
||||||
case int64:
|
|
||||||
return tab + strconv.FormatInt(value, 10)
|
|
||||||
case uint:
|
|
||||||
return tab + strconv.FormatUint(uint64(value), 10)
|
|
||||||
case uint8:
|
|
||||||
return tab + strconv.FormatUint(uint64(value), 10)
|
|
||||||
case uint16:
|
|
||||||
return tab + strconv.FormatUint(uint64(value), 10)
|
|
||||||
case uint32:
|
|
||||||
return tab + strconv.FormatUint(uint64(value), 10)
|
|
||||||
case uint64:
|
|
||||||
return tab + strconv.FormatUint(value, 10)
|
|
||||||
case float32:
|
|
||||||
return tab + strconv.FormatFloat(float64(value), 'f', -1, 32)
|
|
||||||
case float64:
|
|
||||||
return tab + strconv.FormatFloat(value, 'f', -1, 64)
|
|
||||||
case string:
|
|
||||||
return tab + "\"" + encodeTomlString(value) + "\""
|
|
||||||
case bool:
|
|
||||||
if value {
|
|
||||||
return "true"
|
|
||||||
}
|
|
||||||
return "false"
|
|
||||||
case time.Time:
|
|
||||||
return tab + value.Format(time.RFC3339)
|
|
||||||
case []interface{}:
|
|
||||||
values := []string{}
|
|
||||||
for _, item := range value {
|
|
||||||
values = append(values, toTomlValue(item, 0))
|
|
||||||
}
|
|
||||||
return "[" + strings.Join(values, ",") + "]"
|
|
||||||
case nil:
|
|
||||||
return ""
|
|
||||||
default:
|
|
||||||
panic(fmt.Errorf("unsupported value type %T: %v", value, value))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Recursive support function for ToString()
|
|
||||||
// Outputs a tree, using the provided keyspace to prefix table names
|
|
||||||
func (t *TomlTree) toToml(indent, keyspace string) string {
|
|
||||||
resultChunks := []string{}
|
|
||||||
for k, v := range t.values {
|
|
||||||
// figure out the keyspace
|
|
||||||
combinedKey := k
|
|
||||||
if keyspace != "" {
|
|
||||||
combinedKey = keyspace + "." + combinedKey
|
|
||||||
}
|
|
||||||
resultChunk := ""
|
|
||||||
// output based on type
|
|
||||||
switch node := v.(type) {
|
|
||||||
case []*TomlTree:
|
|
||||||
for _, item := range node {
|
|
||||||
if len(item.Keys()) > 0 {
|
|
||||||
resultChunk += fmt.Sprintf("\n%s[[%s]]\n", indent, combinedKey)
|
|
||||||
}
|
|
||||||
resultChunk += item.toToml(indent+" ", combinedKey)
|
|
||||||
}
|
|
||||||
resultChunks = append(resultChunks, resultChunk)
|
|
||||||
case *TomlTree:
|
|
||||||
if len(node.Keys()) > 0 {
|
|
||||||
resultChunk += fmt.Sprintf("\n%s[%s]\n", indent, combinedKey)
|
|
||||||
}
|
|
||||||
resultChunk += node.toToml(indent+" ", combinedKey)
|
|
||||||
resultChunks = append(resultChunks, resultChunk)
|
|
||||||
case map[string]interface{}:
|
|
||||||
sub := TreeFromMap(node)
|
|
||||||
|
|
||||||
if len(sub.Keys()) > 0 {
|
|
||||||
resultChunk += fmt.Sprintf("\n%s[%s]\n", indent, combinedKey)
|
|
||||||
}
|
|
||||||
resultChunk += sub.toToml(indent+" ", combinedKey)
|
|
||||||
resultChunks = append(resultChunks, resultChunk)
|
|
||||||
case map[string]string:
|
|
||||||
sub := TreeFromMap(convertMapStringString(node))
|
|
||||||
|
|
||||||
if len(sub.Keys()) > 0 {
|
|
||||||
resultChunk += fmt.Sprintf("\n%s[%s]\n", indent, combinedKey)
|
|
||||||
}
|
|
||||||
resultChunk += sub.toToml(indent+" ", combinedKey)
|
|
||||||
resultChunks = append(resultChunks, resultChunk)
|
|
||||||
case map[interface{}]interface{}:
|
|
||||||
sub := TreeFromMap(convertMapInterfaceInterface(node))
|
|
||||||
|
|
||||||
if len(sub.Keys()) > 0 {
|
|
||||||
resultChunk += fmt.Sprintf("\n%s[%s]\n", indent, combinedKey)
|
|
||||||
}
|
|
||||||
resultChunk += sub.toToml(indent+" ", combinedKey)
|
|
||||||
resultChunks = append(resultChunks, resultChunk)
|
|
||||||
case *tomlValue:
|
|
||||||
resultChunk = fmt.Sprintf("%s%s = %s\n", indent, k, toTomlValue(node.value, 0))
|
|
||||||
resultChunks = append([]string{resultChunk}, resultChunks...)
|
|
||||||
default:
|
|
||||||
resultChunk = fmt.Sprintf("%s%s = %s\n", indent, k, toTomlValue(v, 0))
|
|
||||||
resultChunks = append([]string{resultChunk}, resultChunks...)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return strings.Join(resultChunks, "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Same as ToToml(), but does not panic and returns an error
|
|
||||||
func (t *TomlTree) toTomlSafe(indent, keyspace string) (result string, err error) {
|
|
||||||
defer func() {
|
|
||||||
if r := recover(); r != nil {
|
|
||||||
result = ""
|
|
||||||
switch x := r.(type) {
|
|
||||||
case error:
|
|
||||||
err = x
|
|
||||||
default:
|
|
||||||
err = fmt.Errorf("unknown panic: %s", r)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}()
|
|
||||||
result = t.toToml(indent, keyspace)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
func convertMapStringString(in map[string]string) map[string]interface{} {
|
|
||||||
result := make(map[string]interface{}, len(in))
|
|
||||||
for k, v := range in {
|
|
||||||
result[k] = v
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
func convertMapInterfaceInterface(in map[interface{}]interface{}) map[string]interface{} {
|
|
||||||
result := make(map[string]interface{}, len(in))
|
|
||||||
for k, v := range in {
|
|
||||||
result[k.(string)] = v
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
// ToString generates a human-readable representation of the current tree.
|
|
||||||
// Output spans multiple lines, and is suitable for ingest by a TOML parser.
|
|
||||||
// If the conversion cannot be performed, ToString returns a non-nil error.
|
|
||||||
func (t *TomlTree) ToString() (string, error) {
|
|
||||||
return t.toTomlSafe("", "")
|
|
||||||
}
|
|
||||||
|
|
||||||
// String generates a human-readable representation of the current tree.
|
|
||||||
// Alias of ToString.
|
|
||||||
func (t *TomlTree) String() string {
|
|
||||||
result, _ := t.ToString()
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
// ToMap recursively generates a representation of the current tree using map[string]interface{}.
|
|
||||||
func (t *TomlTree) ToMap() map[string]interface{} {
|
|
||||||
result := map[string]interface{}{}
|
|
||||||
|
|
||||||
for k, v := range t.values {
|
|
||||||
switch node := v.(type) {
|
|
||||||
case []*TomlTree:
|
|
||||||
var array []interface{}
|
|
||||||
for _, item := range node {
|
|
||||||
array = append(array, item.ToMap())
|
|
||||||
}
|
|
||||||
result[k] = array
|
|
||||||
case *TomlTree:
|
|
||||||
result[k] = node.ToMap()
|
|
||||||
case map[string]interface{}:
|
|
||||||
sub := TreeFromMap(node)
|
|
||||||
result[k] = sub.ToMap()
|
|
||||||
case *tomlValue:
|
|
||||||
result[k] = node.value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
212
vendor/github.com/pelletier/go-toml/tomltree_write.go
generated
vendored
Normal file
212
vendor/github.com/pelletier/go-toml/tomltree_write.go
generated
vendored
Normal file
@ -0,0 +1,212 @@
|
|||||||
|
package toml
|
||||||
|
|
||||||
|
import (
|
||||||
|
"bytes"
|
||||||
|
"fmt"
|
||||||
|
"io"
|
||||||
|
"sort"
|
||||||
|
"strconv"
|
||||||
|
"strings"
|
||||||
|
"time"
|
||||||
|
)
|
||||||
|
|
||||||
|
// encodes a string to a TOML-compliant string value
|
||||||
|
func encodeTomlString(value string) string {
|
||||||
|
result := ""
|
||||||
|
for _, rr := range value {
|
||||||
|
switch rr {
|
||||||
|
case '\b':
|
||||||
|
result += "\\b"
|
||||||
|
case '\t':
|
||||||
|
result += "\\t"
|
||||||
|
case '\n':
|
||||||
|
result += "\\n"
|
||||||
|
case '\f':
|
||||||
|
result += "\\f"
|
||||||
|
case '\r':
|
||||||
|
result += "\\r"
|
||||||
|
case '"':
|
||||||
|
result += "\\\""
|
||||||
|
case '\\':
|
||||||
|
result += "\\\\"
|
||||||
|
default:
|
||||||
|
intRr := uint16(rr)
|
||||||
|
if intRr < 0x001F {
|
||||||
|
result += fmt.Sprintf("\\u%0.4X", intRr)
|
||||||
|
} else {
|
||||||
|
result += string(rr)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
func tomlValueStringRepresentation(v interface{}) (string, error) {
|
||||||
|
switch value := v.(type) {
|
||||||
|
case uint64:
|
||||||
|
return strconv.FormatUint(value, 10), nil
|
||||||
|
case int64:
|
||||||
|
return strconv.FormatInt(value, 10), nil
|
||||||
|
case float64:
|
||||||
|
return strconv.FormatFloat(value, 'f', -1, 32), nil
|
||||||
|
case string:
|
||||||
|
return "\"" + encodeTomlString(value) + "\"", nil
|
||||||
|
case bool:
|
||||||
|
if value {
|
||||||
|
return "true", nil
|
||||||
|
}
|
||||||
|
return "false", nil
|
||||||
|
case time.Time:
|
||||||
|
return value.Format(time.RFC3339), nil
|
||||||
|
case nil:
|
||||||
|
return "", nil
|
||||||
|
case []interface{}:
|
||||||
|
values := []string{}
|
||||||
|
for _, item := range value {
|
||||||
|
itemRepr, err := tomlValueStringRepresentation(item)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
values = append(values, itemRepr)
|
||||||
|
}
|
||||||
|
return "[" + strings.Join(values, ",") + "]", nil
|
||||||
|
default:
|
||||||
|
return "", fmt.Errorf("unsupported value type %T: %v", value, value)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (t *TomlTree) writeTo(w io.Writer, indent, keyspace string, bytesCount int64) (int64, error) {
|
||||||
|
simpleValuesKeys := make([]string, 0)
|
||||||
|
complexValuesKeys := make([]string, 0)
|
||||||
|
|
||||||
|
for k := range t.values {
|
||||||
|
v := t.values[k]
|
||||||
|
switch v.(type) {
|
||||||
|
case *TomlTree, []*TomlTree:
|
||||||
|
complexValuesKeys = append(complexValuesKeys, k)
|
||||||
|
default:
|
||||||
|
simpleValuesKeys = append(simpleValuesKeys, k)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
sort.Strings(simpleValuesKeys)
|
||||||
|
sort.Strings(complexValuesKeys)
|
||||||
|
|
||||||
|
for _, k := range simpleValuesKeys {
|
||||||
|
v, ok := t.values[k].(*tomlValue)
|
||||||
|
if !ok {
|
||||||
|
return bytesCount, fmt.Errorf("invalid key type at %s: %T", k, t.values[k])
|
||||||
|
}
|
||||||
|
|
||||||
|
repr, err := tomlValueStringRepresentation(v.value)
|
||||||
|
if err != nil {
|
||||||
|
return bytesCount, err
|
||||||
|
}
|
||||||
|
|
||||||
|
kvRepr := fmt.Sprintf("%s%s = %s\n", indent, k, repr)
|
||||||
|
writtenBytesCount, err := w.Write([]byte(kvRepr))
|
||||||
|
bytesCount += int64(writtenBytesCount)
|
||||||
|
if err != nil {
|
||||||
|
return bytesCount, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, k := range complexValuesKeys {
|
||||||
|
v := t.values[k]
|
||||||
|
|
||||||
|
combinedKey := k
|
||||||
|
if keyspace != "" {
|
||||||
|
combinedKey = keyspace + "." + combinedKey
|
||||||
|
}
|
||||||
|
|
||||||
|
switch node := v.(type) {
|
||||||
|
// node has to be of those two types given how keys are sorted above
|
||||||
|
case *TomlTree:
|
||||||
|
tableName := fmt.Sprintf("\n%s[%s]\n", indent, combinedKey)
|
||||||
|
writtenBytesCount, err := w.Write([]byte(tableName))
|
||||||
|
bytesCount += int64(writtenBytesCount)
|
||||||
|
if err != nil {
|
||||||
|
return bytesCount, err
|
||||||
|
}
|
||||||
|
bytesCount, err = node.writeTo(w, indent+" ", combinedKey, bytesCount)
|
||||||
|
if err != nil {
|
||||||
|
return bytesCount, err
|
||||||
|
}
|
||||||
|
case []*TomlTree:
|
||||||
|
for _, subTree := range node {
|
||||||
|
if len(subTree.values) > 0 {
|
||||||
|
tableArrayName := fmt.Sprintf("\n%s[[%s]]\n", indent, combinedKey)
|
||||||
|
writtenBytesCount, err := w.Write([]byte(tableArrayName))
|
||||||
|
bytesCount += int64(writtenBytesCount)
|
||||||
|
if err != nil {
|
||||||
|
return bytesCount, err
|
||||||
|
}
|
||||||
|
|
||||||
|
bytesCount, err = subTree.writeTo(w, indent+" ", combinedKey, bytesCount)
|
||||||
|
if err != nil {
|
||||||
|
return bytesCount, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return bytesCount, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// WriteTo encode the TomlTree as Toml and writes it to the writer w.
|
||||||
|
// Returns the number of bytes written in case of success, or an error if anything happened.
|
||||||
|
func (t *TomlTree) WriteTo(w io.Writer) (int64, error) {
|
||||||
|
return t.writeTo(w, "", "", 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToTomlString generates a human-readable representation of the current tree.
|
||||||
|
// Output spans multiple lines, and is suitable for ingest by a TOML parser.
|
||||||
|
// If the conversion cannot be performed, ToString returns a non-nil error.
|
||||||
|
func (t *TomlTree) ToTomlString() (string, error) {
|
||||||
|
var buf bytes.Buffer
|
||||||
|
_, err := t.WriteTo(&buf)
|
||||||
|
if err != nil {
|
||||||
|
return "", err
|
||||||
|
}
|
||||||
|
return buf.String(), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// String generates a human-readable representation of the current tree.
|
||||||
|
// Alias of ToString. Present to implement the fmt.Stringer interface.
|
||||||
|
func (t *TomlTree) String() string {
|
||||||
|
result, _ := t.ToTomlString()
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToMap recursively generates a representation of the tree using Go built-in structures.
|
||||||
|
// The following types are used:
|
||||||
|
// * uint64
|
||||||
|
// * int64
|
||||||
|
// * bool
|
||||||
|
// * string
|
||||||
|
// * time.Time
|
||||||
|
// * map[string]interface{} (where interface{} is any of this list)
|
||||||
|
// * []interface{} (where interface{} is any of this list)
|
||||||
|
func (t *TomlTree) ToMap() map[string]interface{} {
|
||||||
|
result := map[string]interface{}{}
|
||||||
|
|
||||||
|
for k, v := range t.values {
|
||||||
|
switch node := v.(type) {
|
||||||
|
case []*TomlTree:
|
||||||
|
var array []interface{}
|
||||||
|
for _, item := range node {
|
||||||
|
array = append(array, item.ToMap())
|
||||||
|
}
|
||||||
|
result[k] = array
|
||||||
|
case *TomlTree:
|
||||||
|
result[k] = node.ToMap()
|
||||||
|
case map[string]interface{}:
|
||||||
|
sub := TreeFromMap(node)
|
||||||
|
result[k] = sub.ToMap()
|
||||||
|
case *tomlValue:
|
||||||
|
result[k] = node.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
70
vendor/github.com/spf13/cast/cast.go
generated
vendored
70
vendor/github.com/spf13/cast/cast.go
generated
vendored
@ -3,80 +3,150 @@
|
|||||||
// Use of this source code is governed by an MIT-style
|
// Use of this source code is governed by an MIT-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// Package cast provides easy and safe casting in Go.
|
||||||
package cast
|
package cast
|
||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
|
// ToBool casts an interface to a bool type.
|
||||||
func ToBool(i interface{}) bool {
|
func ToBool(i interface{}) bool {
|
||||||
v, _ := ToBoolE(i)
|
v, _ := ToBoolE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToTime casts an interface to a time.Time type.
|
||||||
func ToTime(i interface{}) time.Time {
|
func ToTime(i interface{}) time.Time {
|
||||||
v, _ := ToTimeE(i)
|
v, _ := ToTimeE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToDuration casts an interface to a time.Duration type.
|
||||||
func ToDuration(i interface{}) time.Duration {
|
func ToDuration(i interface{}) time.Duration {
|
||||||
v, _ := ToDurationE(i)
|
v, _ := ToDurationE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToFloat64 casts an interface to a float64 type.
|
||||||
func ToFloat64(i interface{}) float64 {
|
func ToFloat64(i interface{}) float64 {
|
||||||
v, _ := ToFloat64E(i)
|
v, _ := ToFloat64E(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToFloat32 casts an interface to a float32 type.
|
||||||
|
func ToFloat32(i interface{}) float32 {
|
||||||
|
v, _ := ToFloat32E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToInt64 casts an interface to an int64 type.
|
||||||
func ToInt64(i interface{}) int64 {
|
func ToInt64(i interface{}) int64 {
|
||||||
v, _ := ToInt64E(i)
|
v, _ := ToInt64E(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToInt32 casts an interface to an int32 type.
|
||||||
|
func ToInt32(i interface{}) int32 {
|
||||||
|
v, _ := ToInt32E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToInt16 casts an interface to an int16 type.
|
||||||
|
func ToInt16(i interface{}) int16 {
|
||||||
|
v, _ := ToInt16E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToInt8 casts an interface to an int8 type.
|
||||||
|
func ToInt8(i interface{}) int8 {
|
||||||
|
v, _ := ToInt8E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToInt casts an interface to an int type.
|
||||||
func ToInt(i interface{}) int {
|
func ToInt(i interface{}) int {
|
||||||
v, _ := ToIntE(i)
|
v, _ := ToIntE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToUint casts an interface to a uint type.
|
||||||
|
func ToUint(i interface{}) uint {
|
||||||
|
v, _ := ToUintE(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint64 casts an interface to a uint64 type.
|
||||||
|
func ToUint64(i interface{}) uint64 {
|
||||||
|
v, _ := ToUint64E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint32 casts an interface to a uint32 type.
|
||||||
|
func ToUint32(i interface{}) uint32 {
|
||||||
|
v, _ := ToUint32E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint16 casts an interface to a uint16 type.
|
||||||
|
func ToUint16(i interface{}) uint16 {
|
||||||
|
v, _ := ToUint16E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint8 casts an interface to a uint8 type.
|
||||||
|
func ToUint8(i interface{}) uint8 {
|
||||||
|
v, _ := ToUint8E(i)
|
||||||
|
return v
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToString casts an interface to a string type.
|
||||||
func ToString(i interface{}) string {
|
func ToString(i interface{}) string {
|
||||||
v, _ := ToStringE(i)
|
v, _ := ToStringE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToStringMapString casts an interface to a map[string]string type.
|
||||||
func ToStringMapString(i interface{}) map[string]string {
|
func ToStringMapString(i interface{}) map[string]string {
|
||||||
v, _ := ToStringMapStringE(i)
|
v, _ := ToStringMapStringE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToStringMapStringSlice casts an interface to a map[string][]string type.
|
||||||
func ToStringMapStringSlice(i interface{}) map[string][]string {
|
func ToStringMapStringSlice(i interface{}) map[string][]string {
|
||||||
v, _ := ToStringMapStringSliceE(i)
|
v, _ := ToStringMapStringSliceE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToStringMapBool casts an interface to a map[string]bool type.
|
||||||
func ToStringMapBool(i interface{}) map[string]bool {
|
func ToStringMapBool(i interface{}) map[string]bool {
|
||||||
v, _ := ToStringMapBoolE(i)
|
v, _ := ToStringMapBoolE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToStringMap casts an interface to a map[string]interface{} type.
|
||||||
func ToStringMap(i interface{}) map[string]interface{} {
|
func ToStringMap(i interface{}) map[string]interface{} {
|
||||||
v, _ := ToStringMapE(i)
|
v, _ := ToStringMapE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToSlice casts an interface to a []interface{} type.
|
||||||
func ToSlice(i interface{}) []interface{} {
|
func ToSlice(i interface{}) []interface{} {
|
||||||
v, _ := ToSliceE(i)
|
v, _ := ToSliceE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToBoolSlice casts an interface to a []bool type.
|
||||||
func ToBoolSlice(i interface{}) []bool {
|
func ToBoolSlice(i interface{}) []bool {
|
||||||
v, _ := ToBoolSliceE(i)
|
v, _ := ToBoolSliceE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToStringSlice casts an interface to a []string type.
|
||||||
func ToStringSlice(i interface{}) []string {
|
func ToStringSlice(i interface{}) []string {
|
||||||
v, _ := ToStringSliceE(i)
|
v, _ := ToStringSliceE(i)
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ToIntSlice casts an interface to a []int type.
|
||||||
func ToIntSlice(i interface{}) []int {
|
func ToIntSlice(i interface{}) []int {
|
||||||
v, _ := ToIntSliceE(i)
|
v, _ := ToIntSliceE(i)
|
||||||
return v
|
return v
|
||||||
|
|||||||
739
vendor/github.com/spf13/cast/caste.go
generated
vendored
739
vendor/github.com/spf13/cast/caste.go
generated
vendored
@ -6,6 +6,7 @@
|
|||||||
package cast
|
package cast
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"html/template"
|
"html/template"
|
||||||
"reflect"
|
"reflect"
|
||||||
@ -14,7 +15,9 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ToTimeE casts an empty interface to time.Time.
|
var errNegativeNotAllowed = errors.New("unable to cast negative value")
|
||||||
|
|
||||||
|
// ToTimeE casts an interface to a time.Time type.
|
||||||
func ToTimeE(i interface{}) (tim time.Time, err error) {
|
func ToTimeE(i interface{}) (tim time.Time, err error) {
|
||||||
i = indirect(i)
|
i = indirect(i)
|
||||||
|
|
||||||
@ -22,30 +25,32 @@ func ToTimeE(i interface{}) (tim time.Time, err error) {
|
|||||||
case time.Time:
|
case time.Time:
|
||||||
return v, nil
|
return v, nil
|
||||||
case string:
|
case string:
|
||||||
d, e := StringToDate(v)
|
return StringToDate(v)
|
||||||
if e == nil {
|
|
||||||
return d, nil
|
|
||||||
}
|
|
||||||
return time.Time{}, fmt.Errorf("Could not parse Date/Time format: %v\n", e)
|
|
||||||
case int:
|
case int:
|
||||||
return time.Unix(int64(v), 0), nil
|
return time.Unix(int64(v), 0), nil
|
||||||
case int32:
|
|
||||||
return time.Unix(int64(v), 0), nil
|
|
||||||
case int64:
|
case int64:
|
||||||
return time.Unix(v, 0), nil
|
return time.Unix(v, 0), nil
|
||||||
|
case int32:
|
||||||
|
return time.Unix(int64(v), 0), nil
|
||||||
|
case uint:
|
||||||
|
return time.Unix(int64(v), 0), nil
|
||||||
|
case uint64:
|
||||||
|
return time.Unix(int64(v), 0), nil
|
||||||
|
case uint32:
|
||||||
|
return time.Unix(int64(v), 0), nil
|
||||||
default:
|
default:
|
||||||
return time.Time{}, fmt.Errorf("Unable to Cast %#v to Time\n", i)
|
return time.Time{}, fmt.Errorf("unable to cast %#v of type %T to Time", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToDurationE casts an empty interface to time.Duration.
|
// ToDurationE casts an interface to a time.Duration type.
|
||||||
func ToDurationE(i interface{}) (d time.Duration, err error) {
|
func ToDurationE(i interface{}) (d time.Duration, err error) {
|
||||||
i = indirect(i)
|
i = indirect(i)
|
||||||
|
|
||||||
switch s := i.(type) {
|
switch s := i.(type) {
|
||||||
case time.Duration:
|
case time.Duration:
|
||||||
return s, nil
|
return s, nil
|
||||||
case int64, int32, int16, int8, int:
|
case int, int64, int32, int16, int8, uint, uint64, uint32, uint16, uint8:
|
||||||
d = time.Duration(ToInt64(s))
|
d = time.Duration(ToInt64(s))
|
||||||
return
|
return
|
||||||
case float32, float64:
|
case float32, float64:
|
||||||
@ -59,14 +64,13 @@ func ToDurationE(i interface{}) (d time.Duration, err error) {
|
|||||||
}
|
}
|
||||||
return
|
return
|
||||||
default:
|
default:
|
||||||
err = fmt.Errorf("Unable to Cast %#v to Duration\n", i)
|
err = fmt.Errorf("unable to cast %#v of type %T to Duration", i, i)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToBoolE casts an empty interface to a bool.
|
// ToBoolE casts an interface to a bool type.
|
||||||
func ToBoolE(i interface{}) (bool, error) {
|
func ToBoolE(i interface{}) (bool, error) {
|
||||||
|
|
||||||
i = indirect(i)
|
i = indirect(i)
|
||||||
|
|
||||||
switch b := i.(type) {
|
switch b := i.(type) {
|
||||||
@ -82,11 +86,11 @@ func ToBoolE(i interface{}) (bool, error) {
|
|||||||
case string:
|
case string:
|
||||||
return strconv.ParseBool(i.(string))
|
return strconv.ParseBool(i.(string))
|
||||||
default:
|
default:
|
||||||
return false, fmt.Errorf("Unable to Cast %#v to bool", i)
|
return false, fmt.Errorf("unable to cast %#v of type %T to bool", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToFloat64E casts an empty interface to a float64.
|
// ToFloat64E casts an interface to a float64 type.
|
||||||
func ToFloat64E(i interface{}) (float64, error) {
|
func ToFloat64E(i interface{}) (float64, error) {
|
||||||
i = indirect(i)
|
i = indirect(i)
|
||||||
|
|
||||||
@ -95,6 +99,8 @@ func ToFloat64E(i interface{}) (float64, error) {
|
|||||||
return s, nil
|
return s, nil
|
||||||
case float32:
|
case float32:
|
||||||
return float64(s), nil
|
return float64(s), nil
|
||||||
|
case int:
|
||||||
|
return float64(s), nil
|
||||||
case int64:
|
case int64:
|
||||||
return float64(s), nil
|
return float64(s), nil
|
||||||
case int32:
|
case int32:
|
||||||
@ -103,55 +109,266 @@ func ToFloat64E(i interface{}) (float64, error) {
|
|||||||
return float64(s), nil
|
return float64(s), nil
|
||||||
case int8:
|
case int8:
|
||||||
return float64(s), nil
|
return float64(s), nil
|
||||||
case int:
|
case uint:
|
||||||
|
return float64(s), nil
|
||||||
|
case uint64:
|
||||||
|
return float64(s), nil
|
||||||
|
case uint32:
|
||||||
|
return float64(s), nil
|
||||||
|
case uint16:
|
||||||
|
return float64(s), nil
|
||||||
|
case uint8:
|
||||||
return float64(s), nil
|
return float64(s), nil
|
||||||
case string:
|
case string:
|
||||||
v, err := strconv.ParseFloat(s, 64)
|
v, err := strconv.ParseFloat(s, 64)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return float64(v), nil
|
return v, nil
|
||||||
}
|
}
|
||||||
return 0.0, fmt.Errorf("Unable to Cast %#v to float", i)
|
return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i)
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
default:
|
default:
|
||||||
return 0.0, fmt.Errorf("Unable to Cast %#v to float", i)
|
return 0, fmt.Errorf("unable to cast %#v of type %T to float64", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToInt64E casts an empty interface to an int64.
|
// ToFloat32E casts an interface to a float32 type.
|
||||||
|
func ToFloat32E(i interface{}) (float32, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case float64:
|
||||||
|
return float32(s), nil
|
||||||
|
case float32:
|
||||||
|
return s, nil
|
||||||
|
case int:
|
||||||
|
return float32(s), nil
|
||||||
|
case int64:
|
||||||
|
return float32(s), nil
|
||||||
|
case int32:
|
||||||
|
return float32(s), nil
|
||||||
|
case int16:
|
||||||
|
return float32(s), nil
|
||||||
|
case int8:
|
||||||
|
return float32(s), nil
|
||||||
|
case uint:
|
||||||
|
return float32(s), nil
|
||||||
|
case uint64:
|
||||||
|
return float32(s), nil
|
||||||
|
case uint32:
|
||||||
|
return float32(s), nil
|
||||||
|
case uint16:
|
||||||
|
return float32(s), nil
|
||||||
|
case uint8:
|
||||||
|
return float32(s), nil
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseFloat(s, 32)
|
||||||
|
if err == nil {
|
||||||
|
return float32(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i)
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to float32", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToInt64E casts an interface to an int64 type.
|
||||||
func ToInt64E(i interface{}) (int64, error) {
|
func ToInt64E(i interface{}) (int64, error) {
|
||||||
i = indirect(i)
|
i = indirect(i)
|
||||||
|
|
||||||
switch s := i.(type) {
|
switch s := i.(type) {
|
||||||
case int64:
|
|
||||||
return s, nil
|
|
||||||
case int:
|
case int:
|
||||||
return int64(s), nil
|
return int64(s), nil
|
||||||
|
case int64:
|
||||||
|
return s, nil
|
||||||
case int32:
|
case int32:
|
||||||
return int64(s), nil
|
return int64(s), nil
|
||||||
case int16:
|
case int16:
|
||||||
return int64(s), nil
|
return int64(s), nil
|
||||||
case int8:
|
case int8:
|
||||||
return int64(s), nil
|
return int64(s), nil
|
||||||
|
case uint:
|
||||||
|
return int64(s), nil
|
||||||
|
case uint64:
|
||||||
|
return int64(s), nil
|
||||||
|
case uint32:
|
||||||
|
return int64(s), nil
|
||||||
|
case uint16:
|
||||||
|
return int64(s), nil
|
||||||
|
case uint8:
|
||||||
|
return int64(s), nil
|
||||||
|
case float64:
|
||||||
|
return int64(s), nil
|
||||||
|
case float32:
|
||||||
|
return int64(s), nil
|
||||||
case string:
|
case string:
|
||||||
v, err := strconv.ParseInt(s, 0, 0)
|
v, err := strconv.ParseInt(s, 0, 0)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return v, nil
|
return v, nil
|
||||||
}
|
}
|
||||||
return 0, fmt.Errorf("Unable to Cast %#v to int64", i)
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i)
|
||||||
case float64:
|
|
||||||
return int64(s), nil
|
|
||||||
case bool:
|
case bool:
|
||||||
if bool(s) {
|
if s {
|
||||||
return int64(1), nil
|
return 1, nil
|
||||||
}
|
}
|
||||||
return int64(0), nil
|
return 0, nil
|
||||||
case nil:
|
case nil:
|
||||||
return int64(0), nil
|
return 0, nil
|
||||||
default:
|
default:
|
||||||
return int64(0), fmt.Errorf("Unable to Cast %#v to int64", i)
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int64", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToIntE casts an empty interface to an int.
|
// ToInt32E casts an interface to an int32 type.
|
||||||
|
func ToInt32E(i interface{}) (int32, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case int:
|
||||||
|
return int32(s), nil
|
||||||
|
case int64:
|
||||||
|
return int32(s), nil
|
||||||
|
case int32:
|
||||||
|
return s, nil
|
||||||
|
case int16:
|
||||||
|
return int32(s), nil
|
||||||
|
case int8:
|
||||||
|
return int32(s), nil
|
||||||
|
case uint:
|
||||||
|
return int32(s), nil
|
||||||
|
case uint64:
|
||||||
|
return int32(s), nil
|
||||||
|
case uint32:
|
||||||
|
return int32(s), nil
|
||||||
|
case uint16:
|
||||||
|
return int32(s), nil
|
||||||
|
case uint8:
|
||||||
|
return int32(s), nil
|
||||||
|
case float64:
|
||||||
|
return int32(s), nil
|
||||||
|
case float32:
|
||||||
|
return int32(s), nil
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseInt(s, 0, 0)
|
||||||
|
if err == nil {
|
||||||
|
return int32(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i)
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int32", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToInt16E casts an interface to an int16 type.
|
||||||
|
func ToInt16E(i interface{}) (int16, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case int:
|
||||||
|
return int16(s), nil
|
||||||
|
case int64:
|
||||||
|
return int16(s), nil
|
||||||
|
case int32:
|
||||||
|
return int16(s), nil
|
||||||
|
case int16:
|
||||||
|
return s, nil
|
||||||
|
case int8:
|
||||||
|
return int16(s), nil
|
||||||
|
case uint:
|
||||||
|
return int16(s), nil
|
||||||
|
case uint64:
|
||||||
|
return int16(s), nil
|
||||||
|
case uint32:
|
||||||
|
return int16(s), nil
|
||||||
|
case uint16:
|
||||||
|
return int16(s), nil
|
||||||
|
case uint8:
|
||||||
|
return int16(s), nil
|
||||||
|
case float64:
|
||||||
|
return int16(s), nil
|
||||||
|
case float32:
|
||||||
|
return int16(s), nil
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseInt(s, 0, 0)
|
||||||
|
if err == nil {
|
||||||
|
return int16(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i)
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int16", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToInt8E casts an interface to an int8 type.
|
||||||
|
func ToInt8E(i interface{}) (int8, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case int:
|
||||||
|
return int8(s), nil
|
||||||
|
case int64:
|
||||||
|
return int8(s), nil
|
||||||
|
case int32:
|
||||||
|
return int8(s), nil
|
||||||
|
case int16:
|
||||||
|
return int8(s), nil
|
||||||
|
case int8:
|
||||||
|
return s, nil
|
||||||
|
case uint:
|
||||||
|
return int8(s), nil
|
||||||
|
case uint64:
|
||||||
|
return int8(s), nil
|
||||||
|
case uint32:
|
||||||
|
return int8(s), nil
|
||||||
|
case uint16:
|
||||||
|
return int8(s), nil
|
||||||
|
case uint8:
|
||||||
|
return int8(s), nil
|
||||||
|
case float64:
|
||||||
|
return int8(s), nil
|
||||||
|
case float32:
|
||||||
|
return int8(s), nil
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseInt(s, 0, 0)
|
||||||
|
if err == nil {
|
||||||
|
return int8(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i)
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int8", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToIntE casts an interface to an int type.
|
||||||
func ToIntE(i interface{}) (int, error) {
|
func ToIntE(i interface{}) (int, error) {
|
||||||
i = indirect(i)
|
i = indirect(i)
|
||||||
|
|
||||||
@ -166,23 +383,375 @@ func ToIntE(i interface{}) (int, error) {
|
|||||||
return int(s), nil
|
return int(s), nil
|
||||||
case int8:
|
case int8:
|
||||||
return int(s), nil
|
return int(s), nil
|
||||||
|
case uint:
|
||||||
|
return int(s), nil
|
||||||
|
case uint64:
|
||||||
|
return int(s), nil
|
||||||
|
case uint32:
|
||||||
|
return int(s), nil
|
||||||
|
case uint16:
|
||||||
|
return int(s), nil
|
||||||
|
case uint8:
|
||||||
|
return int(s), nil
|
||||||
|
case float64:
|
||||||
|
return int(s), nil
|
||||||
|
case float32:
|
||||||
|
return int(s), nil
|
||||||
case string:
|
case string:
|
||||||
v, err := strconv.ParseInt(s, 0, 0)
|
v, err := strconv.ParseInt(s, 0, 0)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
return int(v), nil
|
return int(v), nil
|
||||||
}
|
}
|
||||||
return 0, fmt.Errorf("Unable to Cast %#v to int", i)
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int", i, i)
|
||||||
case float64:
|
|
||||||
return int(s), nil
|
|
||||||
case bool:
|
case bool:
|
||||||
if bool(s) {
|
if s {
|
||||||
return 1, nil
|
return 1, nil
|
||||||
}
|
}
|
||||||
return 0, nil
|
return 0, nil
|
||||||
case nil:
|
case nil:
|
||||||
return 0, nil
|
return 0, nil
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("Unable to Cast %#v to int", i)
|
return 0, fmt.Errorf("unable to cast %#v of type %T to int", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUintE casts an interface to a uint type.
|
||||||
|
func ToUintE(i interface{}) (uint, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseUint(s, 0, 0)
|
||||||
|
if err == nil {
|
||||||
|
return uint(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v to uint: %s", i, err)
|
||||||
|
case int:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint(s), nil
|
||||||
|
case int64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint(s), nil
|
||||||
|
case int32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint(s), nil
|
||||||
|
case int16:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint(s), nil
|
||||||
|
case int8:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint(s), nil
|
||||||
|
case uint:
|
||||||
|
return s, nil
|
||||||
|
case uint64:
|
||||||
|
return uint(s), nil
|
||||||
|
case uint32:
|
||||||
|
return uint(s), nil
|
||||||
|
case uint16:
|
||||||
|
return uint(s), nil
|
||||||
|
case uint8:
|
||||||
|
return uint(s), nil
|
||||||
|
case float64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint(s), nil
|
||||||
|
case float32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint(s), nil
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to uint", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint64E casts an interface to a uint64 type.
|
||||||
|
func ToUint64E(i interface{}) (uint64, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseUint(s, 0, 64)
|
||||||
|
if err == nil {
|
||||||
|
return v, nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v to uint64: %s", i, err)
|
||||||
|
case int:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint64(s), nil
|
||||||
|
case int64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint64(s), nil
|
||||||
|
case int32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint64(s), nil
|
||||||
|
case int16:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint64(s), nil
|
||||||
|
case int8:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint64(s), nil
|
||||||
|
case uint:
|
||||||
|
return uint64(s), nil
|
||||||
|
case uint64:
|
||||||
|
return s, nil
|
||||||
|
case uint32:
|
||||||
|
return uint64(s), nil
|
||||||
|
case uint16:
|
||||||
|
return uint64(s), nil
|
||||||
|
case uint8:
|
||||||
|
return uint64(s), nil
|
||||||
|
case float32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint64(s), nil
|
||||||
|
case float64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint64(s), nil
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to uint64", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint32E casts an interface to a uint32 type.
|
||||||
|
func ToUint32E(i interface{}) (uint32, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseUint(s, 0, 32)
|
||||||
|
if err == nil {
|
||||||
|
return uint32(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v to uint32: %s", i, err)
|
||||||
|
case int:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint32(s), nil
|
||||||
|
case int64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint32(s), nil
|
||||||
|
case int32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint32(s), nil
|
||||||
|
case int16:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint32(s), nil
|
||||||
|
case int8:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint32(s), nil
|
||||||
|
case uint:
|
||||||
|
return uint32(s), nil
|
||||||
|
case uint64:
|
||||||
|
return uint32(s), nil
|
||||||
|
case uint32:
|
||||||
|
return s, nil
|
||||||
|
case uint16:
|
||||||
|
return uint32(s), nil
|
||||||
|
case uint8:
|
||||||
|
return uint32(s), nil
|
||||||
|
case float64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint32(s), nil
|
||||||
|
case float32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint32(s), nil
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to uint32", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint16E casts an interface to a uint16 type.
|
||||||
|
func ToUint16E(i interface{}) (uint16, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseUint(s, 0, 16)
|
||||||
|
if err == nil {
|
||||||
|
return uint16(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v to uint16: %s", i, err)
|
||||||
|
case int:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint16(s), nil
|
||||||
|
case int64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint16(s), nil
|
||||||
|
case int32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint16(s), nil
|
||||||
|
case int16:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint16(s), nil
|
||||||
|
case int8:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint16(s), nil
|
||||||
|
case uint:
|
||||||
|
return uint16(s), nil
|
||||||
|
case uint64:
|
||||||
|
return uint16(s), nil
|
||||||
|
case uint32:
|
||||||
|
return uint16(s), nil
|
||||||
|
case uint16:
|
||||||
|
return s, nil
|
||||||
|
case uint8:
|
||||||
|
return uint16(s), nil
|
||||||
|
case float64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint16(s), nil
|
||||||
|
case float32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint16(s), nil
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to uint16", i, i)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ToUint8E casts an interface to a uint type.
|
||||||
|
func ToUint8E(i interface{}) (uint8, error) {
|
||||||
|
i = indirect(i)
|
||||||
|
|
||||||
|
switch s := i.(type) {
|
||||||
|
case string:
|
||||||
|
v, err := strconv.ParseUint(s, 0, 8)
|
||||||
|
if err == nil {
|
||||||
|
return uint8(v), nil
|
||||||
|
}
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v to uint8: %s", i, err)
|
||||||
|
case int:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint8(s), nil
|
||||||
|
case int64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint8(s), nil
|
||||||
|
case int32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint8(s), nil
|
||||||
|
case int16:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint8(s), nil
|
||||||
|
case int8:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint8(s), nil
|
||||||
|
case uint:
|
||||||
|
return uint8(s), nil
|
||||||
|
case uint64:
|
||||||
|
return uint8(s), nil
|
||||||
|
case uint32:
|
||||||
|
return uint8(s), nil
|
||||||
|
case uint16:
|
||||||
|
return uint8(s), nil
|
||||||
|
case uint8:
|
||||||
|
return s, nil
|
||||||
|
case float64:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint8(s), nil
|
||||||
|
case float32:
|
||||||
|
if s < 0 {
|
||||||
|
return 0, errNegativeNotAllowed
|
||||||
|
}
|
||||||
|
return uint8(s), nil
|
||||||
|
case bool:
|
||||||
|
if s {
|
||||||
|
return 1, nil
|
||||||
|
}
|
||||||
|
return 0, nil
|
||||||
|
case nil:
|
||||||
|
return 0, nil
|
||||||
|
default:
|
||||||
|
return 0, fmt.Errorf("unable to cast %#v of type %T to uint8", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,7 +794,7 @@ func indirectToStringerOrError(a interface{}) interface{} {
|
|||||||
return v.Interface()
|
return v.Interface()
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToStringE casts an empty interface to a string.
|
// ToStringE casts an interface to a string type.
|
||||||
func ToStringE(i interface{}) (string, error) {
|
func ToStringE(i interface{}) (string, error) {
|
||||||
i = indirectToStringerOrError(i)
|
i = indirectToStringerOrError(i)
|
||||||
|
|
||||||
@ -235,11 +804,29 @@ func ToStringE(i interface{}) (string, error) {
|
|||||||
case bool:
|
case bool:
|
||||||
return strconv.FormatBool(s), nil
|
return strconv.FormatBool(s), nil
|
||||||
case float64:
|
case float64:
|
||||||
return strconv.FormatFloat(i.(float64), 'f', -1, 64), nil
|
return strconv.FormatFloat(s, 'f', -1, 64), nil
|
||||||
case int64:
|
case float32:
|
||||||
return strconv.FormatInt(i.(int64), 10), nil
|
return strconv.FormatFloat(float64(s), 'f', -1, 32), nil
|
||||||
case int:
|
case int:
|
||||||
return strconv.FormatInt(int64(i.(int)), 10), nil
|
return strconv.Itoa(s), nil
|
||||||
|
case int64:
|
||||||
|
return strconv.FormatInt(s, 10), nil
|
||||||
|
case int32:
|
||||||
|
return strconv.Itoa(int(s)), nil
|
||||||
|
case int16:
|
||||||
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
|
case int8:
|
||||||
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
|
case uint:
|
||||||
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
|
case uint64:
|
||||||
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
|
case uint32:
|
||||||
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
|
case uint16:
|
||||||
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
|
case uint8:
|
||||||
|
return strconv.FormatInt(int64(s), 10), nil
|
||||||
case []byte:
|
case []byte:
|
||||||
return string(s), nil
|
return string(s), nil
|
||||||
case template.HTML:
|
case template.HTML:
|
||||||
@ -259,13 +846,12 @@ func ToStringE(i interface{}) (string, error) {
|
|||||||
case error:
|
case error:
|
||||||
return s.Error(), nil
|
return s.Error(), nil
|
||||||
default:
|
default:
|
||||||
return "", fmt.Errorf("Unable to Cast %#v to string", i)
|
return "", fmt.Errorf("unable to cast %#v of type %T to string", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToStringMapStringE casts an empty interface to a map[string]string.
|
// ToStringMapStringE casts an interface to a map[string]string type.
|
||||||
func ToStringMapStringE(i interface{}) (map[string]string, error) {
|
func ToStringMapStringE(i interface{}) (map[string]string, error) {
|
||||||
|
|
||||||
var m = map[string]string{}
|
var m = map[string]string{}
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
@ -287,13 +873,12 @@ func ToStringMapStringE(i interface{}) (map[string]string, error) {
|
|||||||
}
|
}
|
||||||
return m, nil
|
return m, nil
|
||||||
default:
|
default:
|
||||||
return m, fmt.Errorf("Unable to Cast %#v to map[string]string", i)
|
return m, fmt.Errorf("unable to cast %#v of type %T to map[string]string", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToStringMapStringSliceE casts an empty interface to a map[string][]string.
|
// ToStringMapStringSliceE casts an interface to a map[string][]string type.
|
||||||
func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) {
|
func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) {
|
||||||
|
|
||||||
var m = map[string][]string{}
|
var m = map[string][]string{}
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
@ -339,23 +924,22 @@ func ToStringMapStringSliceE(i interface{}) (map[string][]string, error) {
|
|||||||
for k, val := range v {
|
for k, val := range v {
|
||||||
key, err := ToStringE(k)
|
key, err := ToStringE(k)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return m, fmt.Errorf("Unable to Cast %#v to map[string][]string", i)
|
return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i)
|
||||||
}
|
}
|
||||||
value, err := ToStringSliceE(val)
|
value, err := ToStringSliceE(val)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return m, fmt.Errorf("Unable to Cast %#v to map[string][]string", i)
|
return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i)
|
||||||
}
|
}
|
||||||
m[key] = value
|
m[key] = value
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return m, fmt.Errorf("Unable to Cast %#v to map[string][]string", i)
|
return m, fmt.Errorf("unable to cast %#v of type %T to map[string][]string", i, i)
|
||||||
}
|
}
|
||||||
return m, nil
|
return m, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToStringMapBoolE casts an empty interface to a map[string]bool.
|
// ToStringMapBoolE casts an interface to a map[string]bool type.
|
||||||
func ToStringMapBoolE(i interface{}) (map[string]bool, error) {
|
func ToStringMapBoolE(i interface{}) (map[string]bool, error) {
|
||||||
|
|
||||||
var m = map[string]bool{}
|
var m = map[string]bool{}
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
@ -372,13 +956,12 @@ func ToStringMapBoolE(i interface{}) (map[string]bool, error) {
|
|||||||
case map[string]bool:
|
case map[string]bool:
|
||||||
return v, nil
|
return v, nil
|
||||||
default:
|
default:
|
||||||
return m, fmt.Errorf("Unable to Cast %#v to map[string]bool", i)
|
return m, fmt.Errorf("unable to cast %#v of type %T to map[string]bool", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToStringMapE casts an empty interface to a map[string]interface{}.
|
// ToStringMapE casts an interface to a map[string]interface{} type.
|
||||||
func ToStringMapE(i interface{}) (map[string]interface{}, error) {
|
func ToStringMapE(i interface{}) (map[string]interface{}, error) {
|
||||||
|
|
||||||
var m = map[string]interface{}{}
|
var m = map[string]interface{}{}
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
@ -390,36 +973,31 @@ func ToStringMapE(i interface{}) (map[string]interface{}, error) {
|
|||||||
case map[string]interface{}:
|
case map[string]interface{}:
|
||||||
return v, nil
|
return v, nil
|
||||||
default:
|
default:
|
||||||
return m, fmt.Errorf("Unable to Cast %#v to map[string]interface{}", i)
|
return m, fmt.Errorf("unable to cast %#v of type %T to map[string]interface{}", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToSliceE casts an empty interface to a []interface{}.
|
// ToSliceE casts an interface to a []interface{} type.
|
||||||
func ToSliceE(i interface{}) ([]interface{}, error) {
|
func ToSliceE(i interface{}) ([]interface{}, error) {
|
||||||
|
|
||||||
var s []interface{}
|
var s []interface{}
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
case []interface{}:
|
case []interface{}:
|
||||||
for _, u := range v {
|
return append(s, v...), nil
|
||||||
s = append(s, u)
|
|
||||||
}
|
|
||||||
return s, nil
|
|
||||||
case []map[string]interface{}:
|
case []map[string]interface{}:
|
||||||
for _, u := range v {
|
for _, u := range v {
|
||||||
s = append(s, u)
|
s = append(s, u)
|
||||||
}
|
}
|
||||||
return s, nil
|
return s, nil
|
||||||
default:
|
default:
|
||||||
return s, fmt.Errorf("Unable to Cast %#v of type %v to []interface{}", i, reflect.TypeOf(i))
|
return s, fmt.Errorf("unable to cast %#v of type %T to []interface{}", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToBoolSliceE casts an empty interface to a []bool.
|
// ToBoolSliceE casts an interface to a []bool type.
|
||||||
func ToBoolSliceE(i interface{}) ([]bool, error) {
|
func ToBoolSliceE(i interface{}) ([]bool, error) {
|
||||||
|
|
||||||
if i == nil {
|
if i == nil {
|
||||||
return []bool{}, fmt.Errorf("Unable to Cast %#v to []bool", i)
|
return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
@ -435,19 +1013,18 @@ func ToBoolSliceE(i interface{}) ([]bool, error) {
|
|||||||
for j := 0; j < s.Len(); j++ {
|
for j := 0; j < s.Len(); j++ {
|
||||||
val, err := ToBoolE(s.Index(j).Interface())
|
val, err := ToBoolE(s.Index(j).Interface())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return []bool{}, fmt.Errorf("Unable to Cast %#v to []bool", i)
|
return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i)
|
||||||
}
|
}
|
||||||
a[j] = val
|
a[j] = val
|
||||||
}
|
}
|
||||||
return a, nil
|
return a, nil
|
||||||
default:
|
default:
|
||||||
return []bool{}, fmt.Errorf("Unable to Cast %#v to []bool", i)
|
return []bool{}, fmt.Errorf("unable to cast %#v of type %T to []bool", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToStringSliceE casts an empty interface to a []string.
|
// ToStringSliceE casts an interface to a []string type.
|
||||||
func ToStringSliceE(i interface{}) ([]string, error) {
|
func ToStringSliceE(i interface{}) ([]string, error) {
|
||||||
|
|
||||||
var a []string
|
var a []string
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
@ -463,19 +1040,18 @@ func ToStringSliceE(i interface{}) ([]string, error) {
|
|||||||
case interface{}:
|
case interface{}:
|
||||||
str, err := ToStringE(v)
|
str, err := ToStringE(v)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return a, fmt.Errorf("Unable to Cast %#v to []string", i)
|
return a, fmt.Errorf("unable to cast %#v of type %T to []string", i, i)
|
||||||
}
|
}
|
||||||
return []string{str}, nil
|
return []string{str}, nil
|
||||||
default:
|
default:
|
||||||
return a, fmt.Errorf("Unable to Cast %#v to []string", i)
|
return a, fmt.Errorf("unable to cast %#v of type %T to []string", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToIntSliceE casts an empty interface to a []int.
|
// ToIntSliceE casts an interface to a []int type.
|
||||||
func ToIntSliceE(i interface{}) ([]int, error) {
|
func ToIntSliceE(i interface{}) ([]int, error) {
|
||||||
|
|
||||||
if i == nil {
|
if i == nil {
|
||||||
return []int{}, fmt.Errorf("Unable to Cast %#v to []int", i)
|
return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i)
|
||||||
}
|
}
|
||||||
|
|
||||||
switch v := i.(type) {
|
switch v := i.(type) {
|
||||||
@ -491,17 +1067,19 @@ func ToIntSliceE(i interface{}) ([]int, error) {
|
|||||||
for j := 0; j < s.Len(); j++ {
|
for j := 0; j < s.Len(); j++ {
|
||||||
val, err := ToIntE(s.Index(j).Interface())
|
val, err := ToIntE(s.Index(j).Interface())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return []int{}, fmt.Errorf("Unable to Cast %#v to []int", i)
|
return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i)
|
||||||
}
|
}
|
||||||
a[j] = val
|
a[j] = val
|
||||||
}
|
}
|
||||||
return a, nil
|
return a, nil
|
||||||
default:
|
default:
|
||||||
return []int{}, fmt.Errorf("Unable to Cast %#v to []int", i)
|
return []int{}, fmt.Errorf("unable to cast %#v of type %T to []int", i, i)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// StringToDate casts an empty interface to a time.Time.
|
// StringToDate attempts to parse a string into a time.Time type using a
|
||||||
|
// predefined list of formats. If no suitable format is found, an error is
|
||||||
|
// returned.
|
||||||
func StringToDate(s string) (time.Time, error) {
|
func StringToDate(s string) (time.Time, error) {
|
||||||
return parseDateWith(s, []string{
|
return parseDateWith(s, []string{
|
||||||
time.RFC3339,
|
time.RFC3339,
|
||||||
@ -519,6 +1097,7 @@ func StringToDate(s string) (time.Time, error) {
|
|||||||
"02 Jan 2006",
|
"02 Jan 2006",
|
||||||
"2006-01-02 15:04:05 -07:00",
|
"2006-01-02 15:04:05 -07:00",
|
||||||
"2006-01-02 15:04:05 -0700",
|
"2006-01-02 15:04:05 -0700",
|
||||||
|
"2006-01-02 15:04:05Z07:00", // RFC3339 without T
|
||||||
"2006-01-02 15:04:05",
|
"2006-01-02 15:04:05",
|
||||||
time.Kitchen,
|
time.Kitchen,
|
||||||
time.Stamp,
|
time.Stamp,
|
||||||
@ -534,5 +1113,5 @@ func parseDateWith(s string, dates []string) (d time.Time, e error) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return d, fmt.Errorf("Unable to parse date: %s", s)
|
return d, fmt.Errorf("unable to parse date: %s", s)
|
||||||
}
|
}
|
||||||
|
|||||||
46
vendor/github.com/spf13/cobra/command.go
generated
vendored
46
vendor/github.com/spf13/cobra/command.go
generated
vendored
@ -155,12 +155,12 @@ func (c *Command) SetUsageTemplate(s string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// SetFlagErrorFunc sets a function to generate an error when flag parsing
|
// SetFlagErrorFunc sets a function to generate an error when flag parsing
|
||||||
// fails
|
// fails.
|
||||||
func (c *Command) SetFlagErrorFunc(f func(*Command, error) error) {
|
func (c *Command) SetFlagErrorFunc(f func(*Command, error) error) {
|
||||||
c.flagErrorFunc = f
|
c.flagErrorFunc = f
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetHelpFunc sets help function. Can be defined by Application
|
// SetHelpFunc sets help function. Can be defined by Application.
|
||||||
func (c *Command) SetHelpFunc(f func(*Command, []string)) {
|
func (c *Command) SetHelpFunc(f func(*Command, []string)) {
|
||||||
c.helpFunc = f
|
c.helpFunc = f
|
||||||
}
|
}
|
||||||
@ -187,7 +187,7 @@ func (c *Command) SetGlobalNormalizationFunc(n func(f *flag.FlagSet, name string
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// OutOrStdout returns output to stdout
|
// OutOrStdout returns output to stdout.
|
||||||
func (c *Command) OutOrStdout() io.Writer {
|
func (c *Command) OutOrStdout() io.Writer {
|
||||||
return c.getOut(os.Stdout)
|
return c.getOut(os.Stdout)
|
||||||
}
|
}
|
||||||
@ -347,7 +347,7 @@ Aliases:
|
|||||||
Examples:
|
Examples:
|
||||||
{{ .Example }}{{end}}{{if .HasAvailableSubCommands}}
|
{{ .Example }}{{end}}{{if .HasAvailableSubCommands}}
|
||||||
|
|
||||||
Available Commands:{{range .Commands}}{{if .IsAvailableCommand}}
|
Available Commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}}
|
||||||
{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}
|
{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
@ -356,7 +356,7 @@ Flags:
|
|||||||
Global Flags:
|
Global Flags:
|
||||||
{{.InheritedFlags.FlagUsages | trimRightSpace}}{{end}}{{if .HasHelpSubCommands}}
|
{{.InheritedFlags.FlagUsages | trimRightSpace}}{{end}}{{if .HasHelpSubCommands}}
|
||||||
|
|
||||||
Additional help topics:{{range .Commands}}{{if .IsHelpCommand}}
|
Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}
|
||||||
{{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}}
|
{{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableSubCommands}}
|
||||||
|
|
||||||
Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}}
|
Use "{{.CommandPath}} [command] --help" for more information about a command.{{end}}
|
||||||
@ -384,20 +384,18 @@ func (c *Command) resetChildrensParents() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test if the named flag is a boolean flag.
|
func hasNoOptDefVal(name string, f *flag.FlagSet) bool {
|
||||||
func isBooleanFlag(name string, f *flag.FlagSet) bool {
|
|
||||||
flag := f.Lookup(name)
|
flag := f.Lookup(name)
|
||||||
if flag == nil {
|
if flag == nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return flag.Value.Type() == "bool"
|
return len(flag.NoOptDefVal) > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// Test if the named flag is a boolean flag.
|
func shortHasNoOptDefVal(name string, fs *flag.FlagSet) bool {
|
||||||
func isBooleanShortFlag(name string, f *flag.FlagSet) bool {
|
|
||||||
result := false
|
result := false
|
||||||
f.VisitAll(func(f *flag.Flag) {
|
fs.VisitAll(func(flag *flag.Flag) {
|
||||||
if f.Shorthand == name && f.Value.Type() == "bool" {
|
if flag.Shorthand == name && len(flag.NoOptDefVal) > 0 {
|
||||||
result = true
|
result = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -423,8 +421,8 @@ func stripFlags(args []string, c *Command) []string {
|
|||||||
inQuote = true
|
inQuote = true
|
||||||
case strings.HasPrefix(y, "--") && !strings.Contains(y, "="):
|
case strings.HasPrefix(y, "--") && !strings.Contains(y, "="):
|
||||||
// TODO: this isn't quite right, we should really check ahead for 'true' or 'false'
|
// TODO: this isn't quite right, we should really check ahead for 'true' or 'false'
|
||||||
inFlag = !isBooleanFlag(y[2:], c.Flags())
|
inFlag = !hasNoOptDefVal(y[2:], c.Flags())
|
||||||
case strings.HasPrefix(y, "-") && !strings.Contains(y, "=") && len(y) == 2 && !isBooleanShortFlag(y[1:], c.Flags()):
|
case strings.HasPrefix(y, "-") && !strings.Contains(y, "=") && len(y) == 2 && !shortHasNoOptDefVal(y[1:], c.Flags()):
|
||||||
inFlag = true
|
inFlag = true
|
||||||
case inFlag:
|
case inFlag:
|
||||||
inFlag = false
|
inFlag = false
|
||||||
@ -698,7 +696,6 @@ func (c *Command) Execute() error {
|
|||||||
|
|
||||||
// ExecuteC executes the command.
|
// ExecuteC executes the command.
|
||||||
func (c *Command) ExecuteC() (cmd *Command, err error) {
|
func (c *Command) ExecuteC() (cmd *Command, err error) {
|
||||||
|
|
||||||
// Regardless of what command execute is called on, run on Root only
|
// Regardless of what command execute is called on, run on Root only
|
||||||
if c.HasParent() {
|
if c.HasParent() {
|
||||||
return c.Root().ExecuteC()
|
return c.Root().ExecuteC()
|
||||||
@ -783,7 +780,7 @@ func (c *Command) initHelpCmd() {
|
|||||||
Run: func(c *Command, args []string) {
|
Run: func(c *Command, args []string) {
|
||||||
cmd, _, e := c.Root().Find(args)
|
cmd, _, e := c.Root().Find(args)
|
||||||
if cmd == nil || e != nil {
|
if cmd == nil || e != nil {
|
||||||
c.Printf("Unknown help topic %#q.", args)
|
c.Printf("Unknown help topic %#q\n", args)
|
||||||
c.Root().Usage()
|
c.Root().Usage()
|
||||||
} else {
|
} else {
|
||||||
cmd.Help()
|
cmd.Help()
|
||||||
@ -1024,11 +1021,12 @@ func (c *Command) IsAvailableCommand() bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
// IsHelpCommand determines if a command is a 'help' command; a help command is
|
// IsAdditionalHelpTopicCommand determines if a command is an additional
|
||||||
// determined by the fact that it is NOT runnable/hidden/deprecated, and has no
|
// help topic command; additional help topic command is determined by the
|
||||||
// sub commands that are runnable/hidden/deprecated.
|
// fact that it is NOT runnable/hidden/deprecated, and has no sub commands that
|
||||||
func (c *Command) IsHelpCommand() bool {
|
// are runnable/hidden/deprecated.
|
||||||
|
// Concrete example: https://github.com/spf13/cobra/issues/393#issuecomment-282741924.
|
||||||
|
func (c *Command) IsAdditionalHelpTopicCommand() bool {
|
||||||
// if a command is runnable, deprecated, or hidden it is not a 'help' command
|
// if a command is runnable, deprecated, or hidden it is not a 'help' command
|
||||||
if c.Runnable() || len(c.Deprecated) != 0 || c.Hidden {
|
if c.Runnable() || len(c.Deprecated) != 0 || c.Hidden {
|
||||||
return false
|
return false
|
||||||
@ -1036,7 +1034,7 @@ func (c *Command) IsHelpCommand() bool {
|
|||||||
|
|
||||||
// if any non-help sub commands are found, the command is not a 'help' command
|
// if any non-help sub commands are found, the command is not a 'help' command
|
||||||
for _, sub := range c.commands {
|
for _, sub := range c.commands {
|
||||||
if !sub.IsHelpCommand() {
|
if !sub.IsAdditionalHelpTopicCommand() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1049,10 +1047,9 @@ func (c *Command) IsHelpCommand() bool {
|
|||||||
// that need to be shown in the usage/help default template under 'additional help
|
// that need to be shown in the usage/help default template under 'additional help
|
||||||
// topics'.
|
// topics'.
|
||||||
func (c *Command) HasHelpSubCommands() bool {
|
func (c *Command) HasHelpSubCommands() bool {
|
||||||
|
|
||||||
// return true on the first found available 'help' sub command
|
// return true on the first found available 'help' sub command
|
||||||
for _, sub := range c.commands {
|
for _, sub := range c.commands {
|
||||||
if sub.IsHelpCommand() {
|
if sub.IsAdditionalHelpTopicCommand() {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1064,7 +1061,6 @@ func (c *Command) HasHelpSubCommands() bool {
|
|||||||
// HasAvailableSubCommands determines if a command has available sub commands that
|
// HasAvailableSubCommands determines if a command has available sub commands that
|
||||||
// need to be shown in the usage/help default template under 'available commands'.
|
// need to be shown in the usage/help default template under 'available commands'.
|
||||||
func (c *Command) HasAvailableSubCommands() bool {
|
func (c *Command) HasAvailableSubCommands() bool {
|
||||||
|
|
||||||
// return true on the first found available (non deprecated/help/hidden)
|
// return true on the first found available (non deprecated/help/hidden)
|
||||||
// sub command
|
// sub command
|
||||||
for _, sub := range c.commands {
|
for _, sub := range c.commands {
|
||||||
|
|||||||
10
vendor/github.com/spf13/viper/viper.go
generated
vendored
10
vendor/github.com/spf13/viper/viper.go
generated
vendored
@ -1093,9 +1093,15 @@ func (v *Viper) ReadInConfig() error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
v.config = make(map[string]interface{})
|
config := make(map[string]interface{})
|
||||||
|
|
||||||
return v.unmarshalReader(bytes.NewReader(file), v.config)
|
err = v.unmarshalReader(bytes.NewReader(file), config)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
v.config = config
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// MergeInConfig merges a new configuration with an existing config.
|
// MergeInConfig merges a new configuration with an existing config.
|
||||||
|
|||||||
93
vendor/github.com/xeipuuv/gojsonpointer/pointer.go
generated
vendored
93
vendor/github.com/xeipuuv/gojsonpointer/pointer.go
generated
vendored
@ -52,35 +52,24 @@ type implStruct struct {
|
|||||||
outError error
|
outError error
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewJsonPointer(jsonPointerString string) (JsonPointer, error) {
|
|
||||||
|
|
||||||
var p JsonPointer
|
|
||||||
err := p.parse(jsonPointerString)
|
|
||||||
return p, err
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
type JsonPointer struct {
|
type JsonPointer struct {
|
||||||
referenceTokens []string
|
referenceTokens []string
|
||||||
}
|
}
|
||||||
|
|
||||||
// "Constructor", parses the given string JSON pointer
|
// NewJsonPointer parses the given string JSON pointer and returns an object
|
||||||
func (p *JsonPointer) parse(jsonPointerString string) error {
|
func NewJsonPointer(jsonPointerString string) (p JsonPointer, err error) {
|
||||||
|
|
||||||
var err error
|
// Pointer to the root of the document
|
||||||
|
if len(jsonPointerString) == 0 {
|
||||||
if jsonPointerString != const_empty_pointer {
|
// Keep referenceTokens nil
|
||||||
if !strings.HasPrefix(jsonPointerString, const_pointer_separator) {
|
return
|
||||||
err = errors.New(const_invalid_start)
|
|
||||||
} else {
|
|
||||||
referenceTokens := strings.Split(jsonPointerString, const_pointer_separator)
|
|
||||||
for _, referenceToken := range referenceTokens[1:] {
|
|
||||||
p.referenceTokens = append(p.referenceTokens, referenceToken)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
if jsonPointerString[0] != '/' {
|
||||||
|
return p, errors.New(const_invalid_start)
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
p.referenceTokens = strings.Split(jsonPointerString[1:], const_pointer_separator)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uses the pointer to retrieve a value from a JSON document
|
// Uses the pointer to retrieve a value from a JSON document
|
||||||
@ -119,64 +108,55 @@ func (p *JsonPointer) implementation(i *implStruct) {
|
|||||||
|
|
||||||
for ti, token := range p.referenceTokens {
|
for ti, token := range p.referenceTokens {
|
||||||
|
|
||||||
decodedToken := decodeReferenceToken(token)
|
|
||||||
isLastToken := ti == len(p.referenceTokens)-1
|
isLastToken := ti == len(p.referenceTokens)-1
|
||||||
|
|
||||||
rValue := reflect.ValueOf(node)
|
switch v := node.(type) {
|
||||||
kind = rValue.Kind()
|
|
||||||
|
|
||||||
switch kind {
|
case map[string]interface{}:
|
||||||
|
decodedToken := decodeReferenceToken(token)
|
||||||
case reflect.Map:
|
if _, ok := v[decodedToken]; ok {
|
||||||
m := node.(map[string]interface{})
|
node = v[decodedToken]
|
||||||
if _, ok := m[decodedToken]; ok {
|
|
||||||
node = m[decodedToken]
|
|
||||||
if isLastToken && i.mode == "SET" {
|
if isLastToken && i.mode == "SET" {
|
||||||
m[decodedToken] = i.setInValue
|
v[decodedToken] = i.setInValue
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
i.outError = errors.New(fmt.Sprintf("Object has no key '%s'", token))
|
i.outError = fmt.Errorf("Object has no key '%s'", decodedToken)
|
||||||
i.getOutKind = kind
|
i.getOutKind = reflect.Map
|
||||||
i.getOutNode = nil
|
i.getOutNode = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
case reflect.Slice:
|
case []interface{}:
|
||||||
s := node.([]interface{})
|
|
||||||
tokenIndex, err := strconv.Atoi(token)
|
tokenIndex, err := strconv.Atoi(token)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
i.outError = errors.New(fmt.Sprintf("Invalid array index '%s'", token))
|
i.outError = fmt.Errorf("Invalid array index '%s'", token)
|
||||||
i.getOutKind = kind
|
i.getOutKind = reflect.Slice
|
||||||
i.getOutNode = nil
|
i.getOutNode = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
sLength := len(s)
|
if tokenIndex < 0 || tokenIndex >= len(v) {
|
||||||
if tokenIndex < 0 || tokenIndex >= sLength {
|
i.outError = fmt.Errorf("Out of bound array[0,%d] index '%d'", len(v), tokenIndex)
|
||||||
i.outError = errors.New(fmt.Sprintf("Out of bound array[0,%d] index '%d'", sLength, tokenIndex))
|
i.getOutKind = reflect.Slice
|
||||||
i.getOutKind = kind
|
|
||||||
i.getOutNode = nil
|
i.getOutNode = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
node = s[tokenIndex]
|
node = v[tokenIndex]
|
||||||
if isLastToken && i.mode == "SET" {
|
if isLastToken && i.mode == "SET" {
|
||||||
s[tokenIndex] = i.setInValue
|
v[tokenIndex] = i.setInValue
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
i.outError = errors.New(fmt.Sprintf("Invalid token reference '%s'", token))
|
i.outError = fmt.Errorf("Invalid token reference '%s'", token)
|
||||||
i.getOutKind = kind
|
i.getOutKind = reflect.ValueOf(node).Kind()
|
||||||
i.getOutNode = nil
|
i.getOutNode = nil
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
rValue := reflect.ValueOf(node)
|
|
||||||
kind = rValue.Kind()
|
|
||||||
|
|
||||||
i.getOutNode = node
|
i.getOutNode = node
|
||||||
i.getOutKind = kind
|
i.getOutKind = reflect.ValueOf(node).Kind()
|
||||||
i.outError = nil
|
i.outError = nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,21 +177,14 @@ func (p *JsonPointer) String() string {
|
|||||||
// ~1 => /
|
// ~1 => /
|
||||||
// ... and vice versa
|
// ... and vice versa
|
||||||
|
|
||||||
const (
|
|
||||||
const_encoded_reference_token_0 = `~0`
|
|
||||||
const_encoded_reference_token_1 = `~1`
|
|
||||||
const_decoded_reference_token_0 = `~`
|
|
||||||
const_decoded_reference_token_1 = `/`
|
|
||||||
)
|
|
||||||
|
|
||||||
func decodeReferenceToken(token string) string {
|
func decodeReferenceToken(token string) string {
|
||||||
step1 := strings.Replace(token, const_encoded_reference_token_1, const_decoded_reference_token_1, -1)
|
step1 := strings.Replace(token, `~1`, `/`, -1)
|
||||||
step2 := strings.Replace(step1, const_encoded_reference_token_0, const_decoded_reference_token_0, -1)
|
step2 := strings.Replace(step1, `~0`, `~`, -1)
|
||||||
return step2
|
return step2
|
||||||
}
|
}
|
||||||
|
|
||||||
func encodeReferenceToken(token string) string {
|
func encodeReferenceToken(token string) string {
|
||||||
step1 := strings.Replace(token, const_decoded_reference_token_1, const_encoded_reference_token_1, -1)
|
step1 := strings.Replace(token, `~`, `~0`, -1)
|
||||||
step2 := strings.Replace(step1, const_decoded_reference_token_0, const_encoded_reference_token_0, -1)
|
step2 := strings.Replace(step1, `/`, `~1`, -1)
|
||||||
return step2
|
return step2
|
||||||
}
|
}
|
||||||
|
|||||||
2
vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go
generated
vendored
2
vendor/github.com/xeipuuv/gojsonschema/jsonLoader.go
generated
vendored
@ -175,7 +175,7 @@ func (l *jsonReferenceLoader) loadFromHTTP(address string) (interface{}, error)
|
|||||||
|
|
||||||
// must return HTTP Status 200 OK
|
// must return HTTP Status 200 OK
|
||||||
if resp.StatusCode != http.StatusOK {
|
if resp.StatusCode != http.StatusOK {
|
||||||
return nil, errors.New(formatErrorDescription(Locale.httpBadStatus(), ErrorDetails{"status": resp.Status}))
|
return nil, errors.New(formatErrorDescription(Locale.HttpBadStatus(), ErrorDetails{"status": resp.Status}))
|
||||||
}
|
}
|
||||||
|
|
||||||
bodyBuff, err := ioutil.ReadAll(resp.Body)
|
bodyBuff, err := ioutil.ReadAll(resp.Body)
|
||||||
|
|||||||
6
vendor/github.com/xeipuuv/gojsonschema/locales.go
generated
vendored
6
vendor/github.com/xeipuuv/gojsonschema/locales.go
generated
vendored
@ -26,7 +26,7 @@
|
|||||||
package gojsonschema
|
package gojsonschema
|
||||||
|
|
||||||
type (
|
type (
|
||||||
// locale is an interface for definining custom error strings
|
// locale is an interface for defining custom error strings
|
||||||
locale interface {
|
locale interface {
|
||||||
Required() string
|
Required() string
|
||||||
InvalidType() string
|
InvalidType() string
|
||||||
@ -73,7 +73,7 @@ type (
|
|||||||
ReferenceMustBeCanonical() string
|
ReferenceMustBeCanonical() string
|
||||||
NotAValidType() string
|
NotAValidType() string
|
||||||
Duplicated() string
|
Duplicated() string
|
||||||
httpBadStatus() string
|
HttpBadStatus() string
|
||||||
|
|
||||||
// ErrorFormat
|
// ErrorFormat
|
||||||
ErrorFormat() string
|
ErrorFormat() string
|
||||||
@ -256,7 +256,7 @@ func (l DefaultLocale) Duplicated() string {
|
|||||||
return `{{.type}} type is duplicated`
|
return `{{.type}} type is duplicated`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (l DefaultLocale) httpBadStatus() string {
|
func (l DefaultLocale) HttpBadStatus() string {
|
||||||
return `Could not read schema from HTTP, response status is {{.status}}`
|
return `Could not read schema from HTTP, response status is {{.status}}`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
vendor/golang.org/x/sys/unix/asm.s
generated
vendored
10
vendor/golang.org/x/sys/unix/asm.s
generated
vendored
@ -1,10 +0,0 @@
|
|||||||
// Copyright 2014 The Go Authors. All rights reserved.
|
|
||||||
// Use of this source code is governed by a BSD-style
|
|
||||||
// license that can be found in the LICENSE file.
|
|
||||||
|
|
||||||
// +build !gccgo
|
|
||||||
|
|
||||||
#include "textflag.h"
|
|
||||||
|
|
||||||
TEXT ·use(SB),NOSPLIT,$0
|
|
||||||
RET
|
|
||||||
150
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
150
vendor/golang.org/x/sys/unix/syscall_linux.go
generated
vendored
@ -452,6 +452,127 @@ func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
|||||||
return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.
|
||||||
|
// SockaddrALG enables userspace access to the Linux kernel's cryptography
|
||||||
|
// subsystem. The Type and Name fields specify which type of hash or cipher
|
||||||
|
// should be used with a given socket.
|
||||||
|
//
|
||||||
|
// To create a file descriptor that provides access to a hash or cipher, both
|
||||||
|
// Bind and Accept must be used. Once the setup process is complete, input
|
||||||
|
// data can be written to the socket, processed by the kernel, and then read
|
||||||
|
// back as hash output or ciphertext.
|
||||||
|
//
|
||||||
|
// Here is an example of using an AF_ALG socket with SHA1 hashing.
|
||||||
|
// The initial socket setup process is as follows:
|
||||||
|
//
|
||||||
|
// // Open a socket to perform SHA1 hashing.
|
||||||
|
// fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)
|
||||||
|
// addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"}
|
||||||
|
// unix.Bind(fd, addr)
|
||||||
|
// // Note: unix.Accept does not work at this time; must invoke accept()
|
||||||
|
// // manually using unix.Syscall.
|
||||||
|
// hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)
|
||||||
|
//
|
||||||
|
// Once a file descriptor has been returned from Accept, it may be used to
|
||||||
|
// perform SHA1 hashing. The descriptor is not safe for concurrent use, but
|
||||||
|
// may be re-used repeatedly with subsequent Write and Read operations.
|
||||||
|
//
|
||||||
|
// When hashing a small byte slice or string, a single Write and Read may
|
||||||
|
// be used:
|
||||||
|
//
|
||||||
|
// // Assume hashfd is already configured using the setup process.
|
||||||
|
// hash := os.NewFile(hashfd, "sha1")
|
||||||
|
// // Hash an input string and read the results. Each Write discards
|
||||||
|
// // previous hash state. Read always reads the current state.
|
||||||
|
// b := make([]byte, 20)
|
||||||
|
// for i := 0; i < 2; i++ {
|
||||||
|
// io.WriteString(hash, "Hello, world.")
|
||||||
|
// hash.Read(b)
|
||||||
|
// fmt.Println(hex.EncodeToString(b))
|
||||||
|
// }
|
||||||
|
// // Output:
|
||||||
|
// // 2ae01472317d1935a84797ec1983ae243fc6aa28
|
||||||
|
// // 2ae01472317d1935a84797ec1983ae243fc6aa28
|
||||||
|
//
|
||||||
|
// For hashing larger byte slices, or byte streams such as those read from
|
||||||
|
// a file or socket, use Sendto with MSG_MORE to instruct the kernel to update
|
||||||
|
// the hash digest instead of creating a new one for a given chunk and finalizing it.
|
||||||
|
//
|
||||||
|
// // Assume hashfd and addr are already configured using the setup process.
|
||||||
|
// hash := os.NewFile(hashfd, "sha1")
|
||||||
|
// // Hash the contents of a file.
|
||||||
|
// f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz")
|
||||||
|
// b := make([]byte, 4096)
|
||||||
|
// for {
|
||||||
|
// n, err := f.Read(b)
|
||||||
|
// if err == io.EOF {
|
||||||
|
// break
|
||||||
|
// }
|
||||||
|
// unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)
|
||||||
|
// }
|
||||||
|
// hash.Read(b)
|
||||||
|
// fmt.Println(hex.EncodeToString(b))
|
||||||
|
// // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5
|
||||||
|
//
|
||||||
|
// For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html.
|
||||||
|
type SockaddrALG struct {
|
||||||
|
Type string
|
||||||
|
Name string
|
||||||
|
Feature uint32
|
||||||
|
Mask uint32
|
||||||
|
raw RawSockaddrALG
|
||||||
|
}
|
||||||
|
|
||||||
|
func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
|
// Leave room for NUL byte terminator.
|
||||||
|
if len(sa.Type) > 13 {
|
||||||
|
return nil, 0, EINVAL
|
||||||
|
}
|
||||||
|
if len(sa.Name) > 63 {
|
||||||
|
return nil, 0, EINVAL
|
||||||
|
}
|
||||||
|
|
||||||
|
sa.raw.Family = AF_ALG
|
||||||
|
sa.raw.Feat = sa.Feature
|
||||||
|
sa.raw.Mask = sa.Mask
|
||||||
|
|
||||||
|
typ, err := ByteSliceFromString(sa.Type)
|
||||||
|
if err != nil {
|
||||||
|
return nil, 0, err
|
||||||
|
}
|
||||||
|
name, err := ByteSliceFromString(sa.Name)
|
||||||
|
if err != nil {
|
||||||
|
return nil, 0, err
|
||||||
|
}
|
||||||
|
|
||||||
|
copy(sa.raw.Type[:], typ)
|
||||||
|
copy(sa.raw.Name[:], name)
|
||||||
|
|
||||||
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
|
||||||
|
// SockaddrVM provides access to Linux VM sockets: a mechanism that enables
|
||||||
|
// bidirectional communication between a hypervisor and its guest virtual
|
||||||
|
// machines.
|
||||||
|
type SockaddrVM struct {
|
||||||
|
// CID and Port specify a context ID and port address for a VM socket.
|
||||||
|
// Guests have a unique CID, and hosts may have a well-known CID of:
|
||||||
|
// - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
|
||||||
|
// - VMADDR_CID_HOST: refers to other processes on the host.
|
||||||
|
CID uint32
|
||||||
|
Port uint32
|
||||||
|
raw RawSockaddrVM
|
||||||
|
}
|
||||||
|
|
||||||
|
func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
|
||||||
|
sa.raw.Family = AF_VSOCK
|
||||||
|
sa.raw.Port = sa.Port
|
||||||
|
sa.raw.Cid = sa.CID
|
||||||
|
|
||||||
|
return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
|
||||||
|
}
|
||||||
|
|
||||||
func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
|
func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
|
||||||
switch rsa.Addr.Family {
|
switch rsa.Addr.Family {
|
||||||
case AF_NETLINK:
|
case AF_NETLINK:
|
||||||
@ -521,6 +642,14 @@ func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
|
|||||||
sa.Addr[i] = pp.Addr[i]
|
sa.Addr[i] = pp.Addr[i]
|
||||||
}
|
}
|
||||||
return sa, nil
|
return sa, nil
|
||||||
|
|
||||||
|
case AF_VSOCK:
|
||||||
|
pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
|
||||||
|
sa := &SockaddrVM{
|
||||||
|
CID: pp.Cid,
|
||||||
|
Port: pp.Port,
|
||||||
|
}
|
||||||
|
return sa, nil
|
||||||
}
|
}
|
||||||
return nil, EAFNOSUPPORT
|
return nil, EAFNOSUPPORT
|
||||||
}
|
}
|
||||||
@ -939,6 +1068,7 @@ func Getpgrp() (pid int) {
|
|||||||
//sysnb Getpid() (pid int)
|
//sysnb Getpid() (pid int)
|
||||||
//sysnb Getppid() (ppid int)
|
//sysnb Getppid() (ppid int)
|
||||||
//sys Getpriority(which int, who int) (prio int, err error)
|
//sys Getpriority(which int, who int) (prio int, err error)
|
||||||
|
//sys Getrandom(buf []byte, flags int) (n int, err error)
|
||||||
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
//sysnb Getrusage(who int, rusage *Rusage) (err error)
|
||||||
//sysnb Getsid(pid int) (sid int, err error)
|
//sysnb Getsid(pid int) (sid int, err error)
|
||||||
//sysnb Gettid() (tid int)
|
//sysnb Gettid() (tid int)
|
||||||
@ -1019,6 +1149,25 @@ func Munmap(b []byte) (err error) {
|
|||||||
//sys Mlockall(flags int) (err error)
|
//sys Mlockall(flags int) (err error)
|
||||||
//sys Munlockall() (err error)
|
//sys Munlockall() (err error)
|
||||||
|
|
||||||
|
// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
|
||||||
|
// using the specified flags.
|
||||||
|
func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
|
||||||
|
n, _, errno := Syscall6(
|
||||||
|
SYS_VMSPLICE,
|
||||||
|
uintptr(fd),
|
||||||
|
uintptr(unsafe.Pointer(&iovs[0])),
|
||||||
|
uintptr(len(iovs)),
|
||||||
|
uintptr(flags),
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
)
|
||||||
|
if errno != 0 {
|
||||||
|
return 0, syscall.Errno(errno)
|
||||||
|
}
|
||||||
|
|
||||||
|
return int(n), nil
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Unimplemented
|
* Unimplemented
|
||||||
*/
|
*/
|
||||||
@ -1146,7 +1295,6 @@ func Munmap(b []byte) (err error) {
|
|||||||
// Utimensat
|
// Utimensat
|
||||||
// Vfork
|
// Vfork
|
||||||
// Vhangup
|
// Vhangup
|
||||||
// Vmsplice
|
|
||||||
// Vserver
|
// Vserver
|
||||||
// Waitid
|
// Waitid
|
||||||
// _Sysctl
|
// _Sysctl
|
||||||
|
|||||||
8
vendor/golang.org/x/sys/unix/types_linux.go
generated
vendored
8
vendor/golang.org/x/sys/unix/types_linux.go
generated
vendored
@ -59,6 +59,8 @@ package unix
|
|||||||
#include <bluetooth/bluetooth.h>
|
#include <bluetooth/bluetooth.h>
|
||||||
#include <bluetooth/hci.h>
|
#include <bluetooth/hci.h>
|
||||||
#include <linux/can.h>
|
#include <linux/can.h>
|
||||||
|
#include <linux/if_alg.h>
|
||||||
|
#include <linux/vm_sockets.h>
|
||||||
|
|
||||||
#ifdef TCSETS2
|
#ifdef TCSETS2
|
||||||
// On systems that have "struct termios2" use this as type Termios.
|
// On systems that have "struct termios2" use this as type Termios.
|
||||||
@ -221,6 +223,10 @@ type RawSockaddrHCI C.struct_sockaddr_hci
|
|||||||
|
|
||||||
type RawSockaddrCAN C.struct_sockaddr_can
|
type RawSockaddrCAN C.struct_sockaddr_can
|
||||||
|
|
||||||
|
type RawSockaddrALG C.struct_sockaddr_alg
|
||||||
|
|
||||||
|
type RawSockaddrVM C.struct_sockaddr_vm
|
||||||
|
|
||||||
type RawSockaddr C.struct_sockaddr
|
type RawSockaddr C.struct_sockaddr
|
||||||
|
|
||||||
type RawSockaddrAny C.struct_sockaddr_any
|
type RawSockaddrAny C.struct_sockaddr_any
|
||||||
@ -262,6 +268,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
|
SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
|
||||||
SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
|
SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
|
||||||
SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can
|
SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can
|
||||||
|
SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg
|
||||||
|
SizeofSockaddrVM = C.sizeof_struct_sockaddr_vm
|
||||||
SizeofLinger = C.sizeof_struct_linger
|
SizeofLinger = C.sizeof_struct_linger
|
||||||
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
SizeofIPMreq = C.sizeof_struct_ip_mreq
|
||||||
SizeofIPMreqn = C.sizeof_struct_ip_mreqn
|
SizeofIPMreqn = C.sizeof_struct_ip_mreqn
|
||||||
|
|||||||
49
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
49
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
@ -51,8 +51,16 @@ const (
|
|||||||
AF_TIPC = 0x1e
|
AF_TIPC = 0x1e
|
||||||
AF_UNIX = 0x1
|
AF_UNIX = 0x1
|
||||||
AF_UNSPEC = 0x0
|
AF_UNSPEC = 0x0
|
||||||
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
ARPHRD_ARCNET = 0x7
|
ARPHRD_ARCNET = 0x7
|
||||||
@ -145,6 +153,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80041270
|
||||||
|
BLKBSZSET = 0x40041271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80041272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -385,6 +408,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -424,6 +453,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -808,6 +839,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1247,6 +1279,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0x1
|
SOL_SOCKET = 0x1
|
||||||
@ -1292,6 +1325,17 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x3
|
SO_TYPE = 0x3
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1464,6 +1508,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x6
|
VMIN = 0x6
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
56
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
56
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
@ -51,8 +51,16 @@ const (
|
|||||||
AF_TIPC = 0x1e
|
AF_TIPC = 0x1e
|
||||||
AF_UNIX = 0x1
|
AF_UNIX = 0x1
|
||||||
AF_UNSPEC = 0x0
|
AF_UNSPEC = 0x0
|
||||||
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
ARPHRD_ARCNET = 0x7
|
ARPHRD_ARCNET = 0x7
|
||||||
@ -145,6 +153,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -385,6 +408,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -424,6 +453,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -766,6 +797,7 @@ const (
|
|||||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||||
NETLINK_AUDIT = 0x9
|
NETLINK_AUDIT = 0x9
|
||||||
NETLINK_BROADCAST_ERROR = 0x4
|
NETLINK_BROADCAST_ERROR = 0x4
|
||||||
|
NETLINK_CAP_ACK = 0xa
|
||||||
NETLINK_CONNECTOR = 0xb
|
NETLINK_CONNECTOR = 0xb
|
||||||
NETLINK_CRYPTO = 0x15
|
NETLINK_CRYPTO = 0x15
|
||||||
NETLINK_DNRTMSG = 0xe
|
NETLINK_DNRTMSG = 0xe
|
||||||
@ -778,14 +810,19 @@ const (
|
|||||||
NETLINK_IP6_FW = 0xd
|
NETLINK_IP6_FW = 0xd
|
||||||
NETLINK_ISCSI = 0x8
|
NETLINK_ISCSI = 0x8
|
||||||
NETLINK_KOBJECT_UEVENT = 0xf
|
NETLINK_KOBJECT_UEVENT = 0xf
|
||||||
|
NETLINK_LISTEN_ALL_NSID = 0x8
|
||||||
|
NETLINK_LIST_MEMBERSHIPS = 0x9
|
||||||
NETLINK_NETFILTER = 0xc
|
NETLINK_NETFILTER = 0xc
|
||||||
NETLINK_NFLOG = 0x5
|
NETLINK_NFLOG = 0x5
|
||||||
NETLINK_NO_ENOBUFS = 0x5
|
NETLINK_NO_ENOBUFS = 0x5
|
||||||
NETLINK_PKTINFO = 0x3
|
NETLINK_PKTINFO = 0x3
|
||||||
NETLINK_RDMA = 0x14
|
NETLINK_RDMA = 0x14
|
||||||
NETLINK_ROUTE = 0x0
|
NETLINK_ROUTE = 0x0
|
||||||
|
NETLINK_RX_RING = 0x6
|
||||||
NETLINK_SCSITRANSPORT = 0x12
|
NETLINK_SCSITRANSPORT = 0x12
|
||||||
NETLINK_SELINUX = 0x7
|
NETLINK_SELINUX = 0x7
|
||||||
|
NETLINK_SOCK_DIAG = 0x4
|
||||||
|
NETLINK_TX_RING = 0x7
|
||||||
NETLINK_UNUSED = 0x1
|
NETLINK_UNUSED = 0x1
|
||||||
NETLINK_USERSOCK = 0x2
|
NETLINK_USERSOCK = 0x2
|
||||||
NETLINK_XFRM = 0x6
|
NETLINK_XFRM = 0x6
|
||||||
@ -808,6 +845,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1248,6 +1286,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0x1
|
SOL_SOCKET = 0x1
|
||||||
@ -1293,6 +1332,17 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x3
|
SO_TYPE = 0x3
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1465,7 +1515,13 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x6
|
VMIN = 0x6
|
||||||
|
VM_SOCKETS_INVALID_VERSION = 0xffffffff
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
VSTART = 0x8
|
VSTART = 0x8
|
||||||
|
|||||||
53
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
53
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
@ -50,8 +50,16 @@ const (
|
|||||||
AF_TIPC = 0x1e
|
AF_TIPC = 0x1e
|
||||||
AF_UNIX = 0x1
|
AF_UNIX = 0x1
|
||||||
AF_UNSPEC = 0x0
|
AF_UNSPEC = 0x0
|
||||||
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
ARPHRD_ARCNET = 0x7
|
ARPHRD_ARCNET = 0x7
|
||||||
@ -141,6 +149,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -370,6 +393,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -409,6 +438,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -726,6 +757,7 @@ const (
|
|||||||
NETLINK_AUDIT = 0x9
|
NETLINK_AUDIT = 0x9
|
||||||
NETLINK_BROADCAST_ERROR = 0x4
|
NETLINK_BROADCAST_ERROR = 0x4
|
||||||
NETLINK_CONNECTOR = 0xb
|
NETLINK_CONNECTOR = 0xb
|
||||||
|
NETLINK_CRYPTO = 0x15
|
||||||
NETLINK_DNRTMSG = 0xe
|
NETLINK_DNRTMSG = 0xe
|
||||||
NETLINK_DROP_MEMBERSHIP = 0x2
|
NETLINK_DROP_MEMBERSHIP = 0x2
|
||||||
NETLINK_ECRYPTFS = 0x13
|
NETLINK_ECRYPTFS = 0x13
|
||||||
@ -742,8 +774,11 @@ const (
|
|||||||
NETLINK_PKTINFO = 0x3
|
NETLINK_PKTINFO = 0x3
|
||||||
NETLINK_RDMA = 0x14
|
NETLINK_RDMA = 0x14
|
||||||
NETLINK_ROUTE = 0x0
|
NETLINK_ROUTE = 0x0
|
||||||
|
NETLINK_RX_RING = 0x6
|
||||||
NETLINK_SCSITRANSPORT = 0x12
|
NETLINK_SCSITRANSPORT = 0x12
|
||||||
NETLINK_SELINUX = 0x7
|
NETLINK_SELINUX = 0x7
|
||||||
|
NETLINK_SOCK_DIAG = 0x4
|
||||||
|
NETLINK_TX_RING = 0x7
|
||||||
NETLINK_UNUSED = 0x1
|
NETLINK_UNUSED = 0x1
|
||||||
NETLINK_USERSOCK = 0x2
|
NETLINK_USERSOCK = 0x2
|
||||||
NETLINK_XFRM = 0x6
|
NETLINK_XFRM = 0x6
|
||||||
@ -766,6 +801,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
NLM_F_MATCH = 0x200
|
NLM_F_MATCH = 0x200
|
||||||
@ -1171,6 +1207,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0x1
|
SOL_SOCKET = 0x1
|
||||||
@ -1216,6 +1253,17 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x3
|
SO_TYPE = 0x3
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1388,6 +1436,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x6
|
VMIN = 0x6
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
51
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
51
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
@ -54,6 +54,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
ARPHRD_ARCNET = 0x7
|
ARPHRD_ARCNET = 0x7
|
||||||
@ -149,6 +156,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -399,6 +421,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -438,6 +466,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -795,6 +825,7 @@ const (
|
|||||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||||
NETLINK_AUDIT = 0x9
|
NETLINK_AUDIT = 0x9
|
||||||
NETLINK_BROADCAST_ERROR = 0x4
|
NETLINK_BROADCAST_ERROR = 0x4
|
||||||
|
NETLINK_CAP_ACK = 0xa
|
||||||
NETLINK_CONNECTOR = 0xb
|
NETLINK_CONNECTOR = 0xb
|
||||||
NETLINK_CRYPTO = 0x15
|
NETLINK_CRYPTO = 0x15
|
||||||
NETLINK_DNRTMSG = 0xe
|
NETLINK_DNRTMSG = 0xe
|
||||||
@ -807,6 +838,8 @@ const (
|
|||||||
NETLINK_IP6_FW = 0xd
|
NETLINK_IP6_FW = 0xd
|
||||||
NETLINK_ISCSI = 0x8
|
NETLINK_ISCSI = 0x8
|
||||||
NETLINK_KOBJECT_UEVENT = 0xf
|
NETLINK_KOBJECT_UEVENT = 0xf
|
||||||
|
NETLINK_LISTEN_ALL_NSID = 0x8
|
||||||
|
NETLINK_LIST_MEMBERSHIPS = 0x9
|
||||||
NETLINK_NETFILTER = 0xc
|
NETLINK_NETFILTER = 0xc
|
||||||
NETLINK_NFLOG = 0x5
|
NETLINK_NFLOG = 0x5
|
||||||
NETLINK_NO_ENOBUFS = 0x5
|
NETLINK_NO_ENOBUFS = 0x5
|
||||||
@ -840,6 +873,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1294,6 +1328,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0x1
|
SOL_SOCKET = 0x1
|
||||||
@ -1347,7 +1382,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x3
|
SO_TYPE = 0x3
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x29
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1542,6 +1588,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x6
|
VMIN = 0x6
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
55
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
55
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
@ -50,8 +50,16 @@ const (
|
|||||||
AF_TIPC = 0x1e
|
AF_TIPC = 0x1e
|
||||||
AF_UNIX = 0x1
|
AF_UNIX = 0x1
|
||||||
AF_UNSPEC = 0x0
|
AF_UNSPEC = 0x0
|
||||||
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
ARPHRD_ARCNET = 0x7
|
ARPHRD_ARCNET = 0x7
|
||||||
@ -144,6 +152,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -375,6 +398,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -414,6 +443,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -753,6 +784,7 @@ const (
|
|||||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||||
NETLINK_AUDIT = 0x9
|
NETLINK_AUDIT = 0x9
|
||||||
NETLINK_BROADCAST_ERROR = 0x4
|
NETLINK_BROADCAST_ERROR = 0x4
|
||||||
|
NETLINK_CAP_ACK = 0xa
|
||||||
NETLINK_CONNECTOR = 0xb
|
NETLINK_CONNECTOR = 0xb
|
||||||
NETLINK_CRYPTO = 0x15
|
NETLINK_CRYPTO = 0x15
|
||||||
NETLINK_DNRTMSG = 0xe
|
NETLINK_DNRTMSG = 0xe
|
||||||
@ -765,14 +797,19 @@ const (
|
|||||||
NETLINK_IP6_FW = 0xd
|
NETLINK_IP6_FW = 0xd
|
||||||
NETLINK_ISCSI = 0x8
|
NETLINK_ISCSI = 0x8
|
||||||
NETLINK_KOBJECT_UEVENT = 0xf
|
NETLINK_KOBJECT_UEVENT = 0xf
|
||||||
|
NETLINK_LISTEN_ALL_NSID = 0x8
|
||||||
|
NETLINK_LIST_MEMBERSHIPS = 0x9
|
||||||
NETLINK_NETFILTER = 0xc
|
NETLINK_NETFILTER = 0xc
|
||||||
NETLINK_NFLOG = 0x5
|
NETLINK_NFLOG = 0x5
|
||||||
NETLINK_NO_ENOBUFS = 0x5
|
NETLINK_NO_ENOBUFS = 0x5
|
||||||
NETLINK_PKTINFO = 0x3
|
NETLINK_PKTINFO = 0x3
|
||||||
NETLINK_RDMA = 0x14
|
NETLINK_RDMA = 0x14
|
||||||
NETLINK_ROUTE = 0x0
|
NETLINK_ROUTE = 0x0
|
||||||
|
NETLINK_RX_RING = 0x6
|
||||||
NETLINK_SCSITRANSPORT = 0x12
|
NETLINK_SCSITRANSPORT = 0x12
|
||||||
NETLINK_SELINUX = 0x7
|
NETLINK_SELINUX = 0x7
|
||||||
|
NETLINK_SOCK_DIAG = 0x4
|
||||||
|
NETLINK_TX_RING = 0x7
|
||||||
NETLINK_UNUSED = 0x1
|
NETLINK_UNUSED = 0x1
|
||||||
NETLINK_USERSOCK = 0x2
|
NETLINK_USERSOCK = 0x2
|
||||||
NETLINK_XFRM = 0x6
|
NETLINK_XFRM = 0x6
|
||||||
@ -795,6 +832,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1221,6 +1259,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0xffff
|
SOL_SOCKET = 0xffff
|
||||||
@ -1267,6 +1306,17 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1435,6 +1485,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x4
|
VMIN = 0x4
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
48
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
48
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
@ -56,6 +56,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_6LOWPAN = 0x339
|
ARPHRD_6LOWPAN = 0x339
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
@ -152,6 +159,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
BPF_ADD = 0x0
|
BPF_ADD = 0x0
|
||||||
@ -374,6 +396,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FLUSHO = 0x2000
|
FLUSHO = 0x2000
|
||||||
@ -413,6 +441,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
ICMPV6_FILTER = 0x1
|
ICMPV6_FILTER = 0x1
|
||||||
@ -806,6 +836,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1304,6 +1335,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0xffff
|
SOL_SOCKET = 0xffff
|
||||||
@ -1362,7 +1394,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x29
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1540,6 +1583,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x4
|
VMIN = 0x4
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
48
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
48
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
@ -56,6 +56,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_6LOWPAN = 0x339
|
ARPHRD_6LOWPAN = 0x339
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
@ -152,6 +159,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
BPF_ADD = 0x0
|
BPF_ADD = 0x0
|
||||||
@ -374,6 +396,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FLUSHO = 0x2000
|
FLUSHO = 0x2000
|
||||||
@ -413,6 +441,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
ICMPV6_FILTER = 0x1
|
ICMPV6_FILTER = 0x1
|
||||||
@ -806,6 +836,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1304,6 +1335,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0xffff
|
SOL_SOCKET = 0xffff
|
||||||
@ -1362,7 +1394,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x29
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1540,6 +1583,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x4
|
VMIN = 0x4
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
46
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
46
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
@ -57,6 +57,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_6LOWPAN = 0x339
|
ARPHRD_6LOWPAN = 0x339
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
@ -153,6 +160,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -411,6 +433,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -453,6 +481,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -1437,7 +1467,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x29
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1641,6 +1682,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x4
|
VMIN = 0x4
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
51
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
51
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
@ -54,6 +54,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_6LOWPAN = 0x339
|
ARPHRD_6LOWPAN = 0x339
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
@ -150,6 +157,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x16
|
B921600 = 0x16
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1f
|
BOTHER = 0x1f
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -401,6 +423,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -443,6 +471,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x4000
|
HUPCL = 0x4000
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x100
|
ICANON = 0x100
|
||||||
@ -785,6 +815,7 @@ const (
|
|||||||
NETLINK_ADD_MEMBERSHIP = 0x1
|
NETLINK_ADD_MEMBERSHIP = 0x1
|
||||||
NETLINK_AUDIT = 0x9
|
NETLINK_AUDIT = 0x9
|
||||||
NETLINK_BROADCAST_ERROR = 0x4
|
NETLINK_BROADCAST_ERROR = 0x4
|
||||||
|
NETLINK_CAP_ACK = 0xa
|
||||||
NETLINK_CONNECTOR = 0xb
|
NETLINK_CONNECTOR = 0xb
|
||||||
NETLINK_CRYPTO = 0x15
|
NETLINK_CRYPTO = 0x15
|
||||||
NETLINK_DNRTMSG = 0xe
|
NETLINK_DNRTMSG = 0xe
|
||||||
@ -797,6 +828,8 @@ const (
|
|||||||
NETLINK_IP6_FW = 0xd
|
NETLINK_IP6_FW = 0xd
|
||||||
NETLINK_ISCSI = 0x8
|
NETLINK_ISCSI = 0x8
|
||||||
NETLINK_KOBJECT_UEVENT = 0xf
|
NETLINK_KOBJECT_UEVENT = 0xf
|
||||||
|
NETLINK_LISTEN_ALL_NSID = 0x8
|
||||||
|
NETLINK_LIST_MEMBERSHIPS = 0x9
|
||||||
NETLINK_NETFILTER = 0xc
|
NETLINK_NETFILTER = 0xc
|
||||||
NETLINK_NFLOG = 0x5
|
NETLINK_NFLOG = 0x5
|
||||||
NETLINK_NO_ENOBUFS = 0x5
|
NETLINK_NO_ENOBUFS = 0x5
|
||||||
@ -832,6 +865,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1361,6 +1395,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0x1
|
SOL_SOCKET = 0x1
|
||||||
@ -1415,7 +1450,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x3
|
SO_TYPE = 0x3
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x29
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1614,6 +1660,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x5
|
VMIN = 0x5
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xb
|
VREPRINT = 0xb
|
||||||
|
|||||||
48
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
48
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
@ -54,6 +54,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
ARPHRD_ARCNET = 0x7
|
ARPHRD_ARCNET = 0x7
|
||||||
@ -149,6 +156,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x16
|
B921600 = 0x16
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1f
|
BOTHER = 0x1f
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -397,6 +419,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000000
|
EXTPROC = 0x10000000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -436,6 +464,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x4000
|
HUPCL = 0x4000
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x100
|
ICANON = 0x100
|
||||||
@ -840,6 +870,7 @@ const (
|
|||||||
NLM_F_ATOMIC = 0x400
|
NLM_F_ATOMIC = 0x400
|
||||||
NLM_F_CREATE = 0x400
|
NLM_F_CREATE = 0x400
|
||||||
NLM_F_DUMP = 0x300
|
NLM_F_DUMP = 0x300
|
||||||
|
NLM_F_DUMP_FILTERED = 0x20
|
||||||
NLM_F_DUMP_INTR = 0x10
|
NLM_F_DUMP_INTR = 0x10
|
||||||
NLM_F_ECHO = 0x8
|
NLM_F_ECHO = 0x8
|
||||||
NLM_F_EXCL = 0x200
|
NLM_F_EXCL = 0x200
|
||||||
@ -1361,6 +1392,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0x1
|
SOL_SOCKET = 0x1
|
||||||
@ -1414,7 +1446,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x3
|
SO_TYPE = 0x3
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x29
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1613,6 +1656,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x5
|
VMIN = 0x5
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xb
|
VREPRINT = 0xb
|
||||||
|
|||||||
47
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
47
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
@ -56,6 +56,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_6LOWPAN = 0x339
|
ARPHRD_6LOWPAN = 0x339
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
@ -152,6 +159,21 @@ const (
|
|||||||
B75 = 0x2
|
B75 = 0x2
|
||||||
B921600 = 0x1007
|
B921600 = 0x1007
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -407,6 +429,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -449,6 +477,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x2
|
F_UNLCK = 0x2
|
||||||
F_WRLCK = 0x1
|
F_WRLCK = 0x1
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -1412,6 +1442,7 @@ const (
|
|||||||
SOL_IP = 0x0
|
SOL_IP = 0x0
|
||||||
SOL_IPV6 = 0x29
|
SOL_IPV6 = 0x29
|
||||||
SOL_IRDA = 0x10a
|
SOL_IRDA = 0x10a
|
||||||
|
SOL_NETLINK = 0x10e
|
||||||
SOL_PACKET = 0x107
|
SOL_PACKET = 0x107
|
||||||
SOL_RAW = 0xff
|
SOL_RAW = 0xff
|
||||||
SOL_SOCKET = 0x1
|
SOL_SOCKET = 0x1
|
||||||
@ -1469,7 +1500,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x25
|
SO_TIMESTAMPING = 0x25
|
||||||
SO_TIMESTAMPNS = 0x23
|
SO_TIMESTAMPNS = 0x23
|
||||||
SO_TYPE = 0x3
|
SO_TYPE = 0x3
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x29
|
SO_WIFI_STATUS = 0x29
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1672,6 +1714,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x6
|
VMIN = 0x6
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
46
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
46
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
@ -57,6 +57,13 @@ const (
|
|||||||
AF_VSOCK = 0x28
|
AF_VSOCK = 0x28
|
||||||
AF_WANPIPE = 0x19
|
AF_WANPIPE = 0x19
|
||||||
AF_X25 = 0x9
|
AF_X25 = 0x9
|
||||||
|
ALG_OP_DECRYPT = 0x0
|
||||||
|
ALG_OP_ENCRYPT = 0x1
|
||||||
|
ALG_SET_AEAD_ASSOCLEN = 0x4
|
||||||
|
ALG_SET_AEAD_AUTHSIZE = 0x5
|
||||||
|
ALG_SET_IV = 0x2
|
||||||
|
ALG_SET_KEY = 0x1
|
||||||
|
ALG_SET_OP = 0x3
|
||||||
ARPHRD_6LOWPAN = 0x339
|
ARPHRD_6LOWPAN = 0x339
|
||||||
ARPHRD_ADAPT = 0x108
|
ARPHRD_ADAPT = 0x108
|
||||||
ARPHRD_APPLETLK = 0x8
|
ARPHRD_APPLETLK = 0x8
|
||||||
@ -156,6 +163,21 @@ const (
|
|||||||
B76800 = 0x1005
|
B76800 = 0x1005
|
||||||
B921600 = 0x1009
|
B921600 = 0x1009
|
||||||
B9600 = 0xd
|
B9600 = 0xd
|
||||||
|
BLKBSZGET = 0x80081270
|
||||||
|
BLKBSZSET = 0x40081271
|
||||||
|
BLKFLSBUF = 0x1261
|
||||||
|
BLKFRAGET = 0x1265
|
||||||
|
BLKFRASET = 0x1264
|
||||||
|
BLKGETSIZE = 0x1260
|
||||||
|
BLKGETSIZE64 = 0x80081272
|
||||||
|
BLKRAGET = 0x1263
|
||||||
|
BLKRASET = 0x1262
|
||||||
|
BLKROGET = 0x125e
|
||||||
|
BLKROSET = 0x125d
|
||||||
|
BLKRRPART = 0x125f
|
||||||
|
BLKSECTGET = 0x1267
|
||||||
|
BLKSECTSET = 0x1266
|
||||||
|
BLKSSZGET = 0x1268
|
||||||
BOTHER = 0x1000
|
BOTHER = 0x1000
|
||||||
BPF_A = 0x10
|
BPF_A = 0x10
|
||||||
BPF_ABS = 0x20
|
BPF_ABS = 0x20
|
||||||
@ -415,6 +437,12 @@ const (
|
|||||||
EXTA = 0xe
|
EXTA = 0xe
|
||||||
EXTB = 0xf
|
EXTB = 0xf
|
||||||
EXTPROC = 0x10000
|
EXTPROC = 0x10000
|
||||||
|
FALLOC_FL_COLLAPSE_RANGE = 0x8
|
||||||
|
FALLOC_FL_INSERT_RANGE = 0x20
|
||||||
|
FALLOC_FL_KEEP_SIZE = 0x1
|
||||||
|
FALLOC_FL_NO_HIDE_STALE = 0x4
|
||||||
|
FALLOC_FL_PUNCH_HOLE = 0x2
|
||||||
|
FALLOC_FL_ZERO_RANGE = 0x10
|
||||||
FD_CLOEXEC = 0x1
|
FD_CLOEXEC = 0x1
|
||||||
FD_SETSIZE = 0x400
|
FD_SETSIZE = 0x400
|
||||||
FF0 = 0x0
|
FF0 = 0x0
|
||||||
@ -457,6 +485,8 @@ const (
|
|||||||
F_ULOCK = 0x0
|
F_ULOCK = 0x0
|
||||||
F_UNLCK = 0x3
|
F_UNLCK = 0x3
|
||||||
F_WRLCK = 0x2
|
F_WRLCK = 0x2
|
||||||
|
GRND_NONBLOCK = 0x1
|
||||||
|
GRND_RANDOM = 0x2
|
||||||
HUPCL = 0x400
|
HUPCL = 0x400
|
||||||
IBSHIFT = 0x10
|
IBSHIFT = 0x10
|
||||||
ICANON = 0x2
|
ICANON = 0x2
|
||||||
@ -1510,7 +1540,18 @@ const (
|
|||||||
SO_TIMESTAMPING = 0x23
|
SO_TIMESTAMPING = 0x23
|
||||||
SO_TIMESTAMPNS = 0x21
|
SO_TIMESTAMPNS = 0x21
|
||||||
SO_TYPE = 0x1008
|
SO_TYPE = 0x1008
|
||||||
|
SO_VM_SOCKETS_BUFFER_MAX_SIZE = 0x2
|
||||||
|
SO_VM_SOCKETS_BUFFER_MIN_SIZE = 0x1
|
||||||
|
SO_VM_SOCKETS_BUFFER_SIZE = 0x0
|
||||||
|
SO_VM_SOCKETS_CONNECT_TIMEOUT = 0x6
|
||||||
|
SO_VM_SOCKETS_NONBLOCK_TXRX = 0x7
|
||||||
|
SO_VM_SOCKETS_PEER_HOST_VM_ID = 0x3
|
||||||
|
SO_VM_SOCKETS_TRUSTED = 0x5
|
||||||
SO_WIFI_STATUS = 0x25
|
SO_WIFI_STATUS = 0x25
|
||||||
|
SPLICE_F_GIFT = 0x8
|
||||||
|
SPLICE_F_MORE = 0x4
|
||||||
|
SPLICE_F_MOVE = 0x1
|
||||||
|
SPLICE_F_NONBLOCK = 0x2
|
||||||
S_BLKSIZE = 0x200
|
S_BLKSIZE = 0x200
|
||||||
S_IEXEC = 0x40
|
S_IEXEC = 0x40
|
||||||
S_IFBLK = 0x6000
|
S_IFBLK = 0x6000
|
||||||
@ -1715,6 +1756,11 @@ const (
|
|||||||
VINTR = 0x0
|
VINTR = 0x0
|
||||||
VKILL = 0x3
|
VKILL = 0x3
|
||||||
VLNEXT = 0xf
|
VLNEXT = 0xf
|
||||||
|
VMADDR_CID_ANY = 0xffffffff
|
||||||
|
VMADDR_CID_HOST = 0x2
|
||||||
|
VMADDR_CID_HYPERVISOR = 0x0
|
||||||
|
VMADDR_CID_RESERVED = 0x1
|
||||||
|
VMADDR_PORT_ANY = 0xffffffff
|
||||||
VMIN = 0x4
|
VMIN = 0x4
|
||||||
VQUIT = 0x1
|
VQUIT = 0x1
|
||||||
VREPRINT = 0xc
|
VREPRINT = 0xc
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
17
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
17
vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
generated
vendored
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
21
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
21
vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
generated
vendored
@ -1,7 +1,7 @@
|
|||||||
// mksyscall.pl syscall_linux.go syscall_linux_sparc64.go
|
// mksyscall.pl -tags linux,sparc64 syscall_linux.go syscall_linux_sparc64.go
|
||||||
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
||||||
|
|
||||||
// +build
|
// +build linux,sparc64
|
||||||
|
|
||||||
package unix
|
package unix
|
||||||
|
|
||||||
@ -543,6 +543,23 @@ func Getpriority(which int, who int) (prio int, err error) {
|
|||||||
|
|
||||||
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
|
func Getrandom(buf []byte, flags int) (n int, err error) {
|
||||||
|
var _p0 unsafe.Pointer
|
||||||
|
if len(buf) > 0 {
|
||||||
|
_p0 = unsafe.Pointer(&buf[0])
|
||||||
|
} else {
|
||||||
|
_p0 = unsafe.Pointer(&_zero)
|
||||||
|
}
|
||||||
|
r0, _, e1 := Syscall(SYS_GETRANDOM, uintptr(_p0), uintptr(len(buf)), uintptr(flags))
|
||||||
|
n = int(r0)
|
||||||
|
if e1 != 0 {
|
||||||
|
err = errnoErr(e1)
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
|
||||||
|
|
||||||
func Getrusage(who int, rusage *Rusage) (err error) {
|
func Getrusage(who int, rusage *Rusage) (err error) {
|
||||||
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
|
||||||
if e1 != 0 {
|
if e1 != 0 {
|
||||||
|
|||||||
37
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
37
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/asm/unistd_32.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D__i386__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build 386,linux
|
// +build 386,linux
|
||||||
@ -226,7 +226,6 @@ const (
|
|||||||
SYS_PIVOT_ROOT = 217
|
SYS_PIVOT_ROOT = 217
|
||||||
SYS_MINCORE = 218
|
SYS_MINCORE = 218
|
||||||
SYS_MADVISE = 219
|
SYS_MADVISE = 219
|
||||||
SYS_MADVISE1 = 219
|
|
||||||
SYS_GETDENTS64 = 220
|
SYS_GETDENTS64 = 220
|
||||||
SYS_FCNTL64 = 221
|
SYS_FCNTL64 = 221
|
||||||
SYS_GETTID = 224
|
SYS_GETTID = 224
|
||||||
@ -352,4 +351,38 @@ const (
|
|||||||
SYS_SETNS = 346
|
SYS_SETNS = 346
|
||||||
SYS_PROCESS_VM_READV = 347
|
SYS_PROCESS_VM_READV = 347
|
||||||
SYS_PROCESS_VM_WRITEV = 348
|
SYS_PROCESS_VM_WRITEV = 348
|
||||||
|
SYS_KCMP = 349
|
||||||
|
SYS_FINIT_MODULE = 350
|
||||||
|
SYS_SCHED_SETATTR = 351
|
||||||
|
SYS_SCHED_GETATTR = 352
|
||||||
|
SYS_RENAMEAT2 = 353
|
||||||
|
SYS_SECCOMP = 354
|
||||||
|
SYS_GETRANDOM = 355
|
||||||
|
SYS_MEMFD_CREATE = 356
|
||||||
|
SYS_BPF = 357
|
||||||
|
SYS_EXECVEAT = 358
|
||||||
|
SYS_SOCKET = 359
|
||||||
|
SYS_SOCKETPAIR = 360
|
||||||
|
SYS_BIND = 361
|
||||||
|
SYS_CONNECT = 362
|
||||||
|
SYS_LISTEN = 363
|
||||||
|
SYS_ACCEPT4 = 364
|
||||||
|
SYS_GETSOCKOPT = 365
|
||||||
|
SYS_SETSOCKOPT = 366
|
||||||
|
SYS_GETSOCKNAME = 367
|
||||||
|
SYS_GETPEERNAME = 368
|
||||||
|
SYS_SENDTO = 369
|
||||||
|
SYS_SENDMSG = 370
|
||||||
|
SYS_RECVFROM = 371
|
||||||
|
SYS_RECVMSG = 372
|
||||||
|
SYS_SHUTDOWN = 373
|
||||||
|
SYS_USERFAULTFD = 374
|
||||||
|
SYS_MEMBARRIER = 375
|
||||||
|
SYS_MLOCK2 = 376
|
||||||
|
SYS_COPY_FILE_RANGE = 377
|
||||||
|
SYS_PREADV2 = 378
|
||||||
|
SYS_PWRITEV2 = 379
|
||||||
|
SYS_PKEY_MPROTECT = 380
|
||||||
|
SYS_PKEY_ALLOC = 381
|
||||||
|
SYS_PKEY_FREE = 382
|
||||||
)
|
)
|
||||||
|
|||||||
22
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
22
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/asm/unistd_64.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build amd64,linux
|
// +build amd64,linux
|
||||||
@ -318,4 +318,24 @@ const (
|
|||||||
SYS_GETCPU = 309
|
SYS_GETCPU = 309
|
||||||
SYS_PROCESS_VM_READV = 310
|
SYS_PROCESS_VM_READV = 310
|
||||||
SYS_PROCESS_VM_WRITEV = 311
|
SYS_PROCESS_VM_WRITEV = 311
|
||||||
|
SYS_KCMP = 312
|
||||||
|
SYS_FINIT_MODULE = 313
|
||||||
|
SYS_SCHED_SETATTR = 314
|
||||||
|
SYS_SCHED_GETATTR = 315
|
||||||
|
SYS_RENAMEAT2 = 316
|
||||||
|
SYS_SECCOMP = 317
|
||||||
|
SYS_GETRANDOM = 318
|
||||||
|
SYS_MEMFD_CREATE = 319
|
||||||
|
SYS_KEXEC_FILE_LOAD = 320
|
||||||
|
SYS_BPF = 321
|
||||||
|
SYS_EXECVEAT = 322
|
||||||
|
SYS_USERFAULTFD = 323
|
||||||
|
SYS_MEMBARRIER = 324
|
||||||
|
SYS_MLOCK2 = 325
|
||||||
|
SYS_COPY_FILE_RANGE = 326
|
||||||
|
SYS_PREADV2 = 327
|
||||||
|
SYS_PWRITEV2 = 328
|
||||||
|
SYS_PKEY_MPROTECT = 329
|
||||||
|
SYS_PKEY_ALLOC = 330
|
||||||
|
SYS_PKEY_FREE = 331
|
||||||
)
|
)
|
||||||
|
|||||||
35
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
35
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl
|
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D__ARM_EABI__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build arm,linux
|
// +build arm,linux
|
||||||
@ -6,8 +6,6 @@
|
|||||||
package unix
|
package unix
|
||||||
|
|
||||||
const (
|
const (
|
||||||
SYS_OABI_SYSCALL_BASE = 0
|
|
||||||
SYS_SYSCALL_BASE = 0
|
|
||||||
SYS_RESTART_SYSCALL = 0
|
SYS_RESTART_SYSCALL = 0
|
||||||
SYS_EXIT = 1
|
SYS_EXIT = 1
|
||||||
SYS_FORK = 2
|
SYS_FORK = 2
|
||||||
@ -20,21 +18,16 @@ const (
|
|||||||
SYS_UNLINK = 10
|
SYS_UNLINK = 10
|
||||||
SYS_EXECVE = 11
|
SYS_EXECVE = 11
|
||||||
SYS_CHDIR = 12
|
SYS_CHDIR = 12
|
||||||
SYS_TIME = 13
|
|
||||||
SYS_MKNOD = 14
|
SYS_MKNOD = 14
|
||||||
SYS_CHMOD = 15
|
SYS_CHMOD = 15
|
||||||
SYS_LCHOWN = 16
|
SYS_LCHOWN = 16
|
||||||
SYS_LSEEK = 19
|
SYS_LSEEK = 19
|
||||||
SYS_GETPID = 20
|
SYS_GETPID = 20
|
||||||
SYS_MOUNT = 21
|
SYS_MOUNT = 21
|
||||||
SYS_UMOUNT = 22
|
|
||||||
SYS_SETUID = 23
|
SYS_SETUID = 23
|
||||||
SYS_GETUID = 24
|
SYS_GETUID = 24
|
||||||
SYS_STIME = 25
|
|
||||||
SYS_PTRACE = 26
|
SYS_PTRACE = 26
|
||||||
SYS_ALARM = 27
|
|
||||||
SYS_PAUSE = 29
|
SYS_PAUSE = 29
|
||||||
SYS_UTIME = 30
|
|
||||||
SYS_ACCESS = 33
|
SYS_ACCESS = 33
|
||||||
SYS_NICE = 34
|
SYS_NICE = 34
|
||||||
SYS_SYNC = 36
|
SYS_SYNC = 36
|
||||||
@ -69,20 +62,16 @@ const (
|
|||||||
SYS_SIGPENDING = 73
|
SYS_SIGPENDING = 73
|
||||||
SYS_SETHOSTNAME = 74
|
SYS_SETHOSTNAME = 74
|
||||||
SYS_SETRLIMIT = 75
|
SYS_SETRLIMIT = 75
|
||||||
SYS_GETRLIMIT = 76
|
|
||||||
SYS_GETRUSAGE = 77
|
SYS_GETRUSAGE = 77
|
||||||
SYS_GETTIMEOFDAY = 78
|
SYS_GETTIMEOFDAY = 78
|
||||||
SYS_SETTIMEOFDAY = 79
|
SYS_SETTIMEOFDAY = 79
|
||||||
SYS_GETGROUPS = 80
|
SYS_GETGROUPS = 80
|
||||||
SYS_SETGROUPS = 81
|
SYS_SETGROUPS = 81
|
||||||
SYS_SELECT = 82
|
|
||||||
SYS_SYMLINK = 83
|
SYS_SYMLINK = 83
|
||||||
SYS_READLINK = 85
|
SYS_READLINK = 85
|
||||||
SYS_USELIB = 86
|
SYS_USELIB = 86
|
||||||
SYS_SWAPON = 87
|
SYS_SWAPON = 87
|
||||||
SYS_REBOOT = 88
|
SYS_REBOOT = 88
|
||||||
SYS_READDIR = 89
|
|
||||||
SYS_MMAP = 90
|
|
||||||
SYS_MUNMAP = 91
|
SYS_MUNMAP = 91
|
||||||
SYS_TRUNCATE = 92
|
SYS_TRUNCATE = 92
|
||||||
SYS_FTRUNCATE = 93
|
SYS_FTRUNCATE = 93
|
||||||
@ -92,7 +81,6 @@ const (
|
|||||||
SYS_SETPRIORITY = 97
|
SYS_SETPRIORITY = 97
|
||||||
SYS_STATFS = 99
|
SYS_STATFS = 99
|
||||||
SYS_FSTATFS = 100
|
SYS_FSTATFS = 100
|
||||||
SYS_SOCKETCALL = 102
|
|
||||||
SYS_SYSLOG = 103
|
SYS_SYSLOG = 103
|
||||||
SYS_SETITIMER = 104
|
SYS_SETITIMER = 104
|
||||||
SYS_GETITIMER = 105
|
SYS_GETITIMER = 105
|
||||||
@ -100,11 +88,9 @@ const (
|
|||||||
SYS_LSTAT = 107
|
SYS_LSTAT = 107
|
||||||
SYS_FSTAT = 108
|
SYS_FSTAT = 108
|
||||||
SYS_VHANGUP = 111
|
SYS_VHANGUP = 111
|
||||||
SYS_SYSCALL = 113
|
|
||||||
SYS_WAIT4 = 114
|
SYS_WAIT4 = 114
|
||||||
SYS_SWAPOFF = 115
|
SYS_SWAPOFF = 115
|
||||||
SYS_SYSINFO = 116
|
SYS_SYSINFO = 116
|
||||||
SYS_IPC = 117
|
|
||||||
SYS_FSYNC = 118
|
SYS_FSYNC = 118
|
||||||
SYS_SIGRETURN = 119
|
SYS_SIGRETURN = 119
|
||||||
SYS_CLONE = 120
|
SYS_CLONE = 120
|
||||||
@ -353,4 +339,23 @@ const (
|
|||||||
SYS_SETNS = 375
|
SYS_SETNS = 375
|
||||||
SYS_PROCESS_VM_READV = 376
|
SYS_PROCESS_VM_READV = 376
|
||||||
SYS_PROCESS_VM_WRITEV = 377
|
SYS_PROCESS_VM_WRITEV = 377
|
||||||
|
SYS_KCMP = 378
|
||||||
|
SYS_FINIT_MODULE = 379
|
||||||
|
SYS_SCHED_SETATTR = 380
|
||||||
|
SYS_SCHED_GETATTR = 381
|
||||||
|
SYS_RENAMEAT2 = 382
|
||||||
|
SYS_SECCOMP = 383
|
||||||
|
SYS_GETRANDOM = 384
|
||||||
|
SYS_MEMFD_CREATE = 385
|
||||||
|
SYS_BPF = 386
|
||||||
|
SYS_EXECVEAT = 387
|
||||||
|
SYS_USERFAULTFD = 388
|
||||||
|
SYS_MEMBARRIER = 389
|
||||||
|
SYS_MLOCK2 = 390
|
||||||
|
SYS_COPY_FILE_RANGE = 391
|
||||||
|
SYS_PREADV2 = 392
|
||||||
|
SYS_PWRITEV2 = 393
|
||||||
|
SYS_PKEY_MPROTECT = 394
|
||||||
|
SYS_PKEY_ALLOC = 395
|
||||||
|
SYS_PKEY_FREE = 396
|
||||||
)
|
)
|
||||||
|
|||||||
15
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
15
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/asm-generic/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build arm64,linux
|
// +build arm64,linux
|
||||||
@ -269,4 +269,17 @@ const (
|
|||||||
SYS_SCHED_GETATTR = 275
|
SYS_SCHED_GETATTR = 275
|
||||||
SYS_RENAMEAT2 = 276
|
SYS_RENAMEAT2 = 276
|
||||||
SYS_SECCOMP = 277
|
SYS_SECCOMP = 277
|
||||||
|
SYS_GETRANDOM = 278
|
||||||
|
SYS_MEMFD_CREATE = 279
|
||||||
|
SYS_BPF = 280
|
||||||
|
SYS_EXECVEAT = 281
|
||||||
|
SYS_USERFAULTFD = 282
|
||||||
|
SYS_MEMBARRIER = 283
|
||||||
|
SYS_MLOCK2 = 284
|
||||||
|
SYS_COPY_FILE_RANGE = 285
|
||||||
|
SYS_PREADV2 = 286
|
||||||
|
SYS_PWRITEV2 = 287
|
||||||
|
SYS_PKEY_MPROTECT = 288
|
||||||
|
SYS_PKEY_ALLOC = 289
|
||||||
|
SYS_PKEY_FREE = 290
|
||||||
)
|
)
|
||||||
|
|||||||
25
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
25
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/mips-linux-gnu/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__MIPSEB__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build mips,linux
|
// +build mips,linux
|
||||||
@ -352,8 +352,23 @@ const (
|
|||||||
SYS_SETNS = 4344
|
SYS_SETNS = 4344
|
||||||
SYS_PROCESS_VM_READV = 4345
|
SYS_PROCESS_VM_READV = 4345
|
||||||
SYS_PROCESS_VM_WRITEV = 4346
|
SYS_PROCESS_VM_WRITEV = 4346
|
||||||
SYS_LINUX_SYSCALLS = 4346
|
SYS_KCMP = 4347
|
||||||
SYS_O32_LINUX_SYSCALLS = 4346
|
SYS_FINIT_MODULE = 4348
|
||||||
SYS_64_LINUX_SYSCALLS = 4305
|
SYS_SCHED_SETATTR = 4349
|
||||||
SYS_N32_LINUX_SYSCALLS = 4310
|
SYS_SCHED_GETATTR = 4350
|
||||||
|
SYS_RENAMEAT2 = 4351
|
||||||
|
SYS_SECCOMP = 4352
|
||||||
|
SYS_GETRANDOM = 4353
|
||||||
|
SYS_MEMFD_CREATE = 4354
|
||||||
|
SYS_BPF = 4355
|
||||||
|
SYS_EXECVEAT = 4356
|
||||||
|
SYS_USERFAULTFD = 4357
|
||||||
|
SYS_MEMBARRIER = 4358
|
||||||
|
SYS_MLOCK2 = 4359
|
||||||
|
SYS_COPY_FILE_RANGE = 4360
|
||||||
|
SYS_PREADV2 = 4361
|
||||||
|
SYS_PWRITEV2 = 4362
|
||||||
|
SYS_PKEY_MPROTECT = 4363
|
||||||
|
SYS_PKEY_ALLOC = 4364
|
||||||
|
SYS_PKEY_FREE = 4365
|
||||||
)
|
)
|
||||||
|
|||||||
9
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
9
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D_MIPS_SIM=_MIPS_SIM_ABI64 -D__MIPSEB__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build mips64,linux
|
// +build mips64,linux
|
||||||
@ -324,4 +324,11 @@ const (
|
|||||||
SYS_EXECVEAT = 5316
|
SYS_EXECVEAT = 5316
|
||||||
SYS_USERFAULTFD = 5317
|
SYS_USERFAULTFD = 5317
|
||||||
SYS_MEMBARRIER = 5318
|
SYS_MEMBARRIER = 5318
|
||||||
|
SYS_MLOCK2 = 5319
|
||||||
|
SYS_COPY_FILE_RANGE = 5320
|
||||||
|
SYS_PREADV2 = 5321
|
||||||
|
SYS_PWRITEV2 = 5322
|
||||||
|
SYS_PKEY_MPROTECT = 5323
|
||||||
|
SYS_PKEY_ALLOC = 5324
|
||||||
|
SYS_PKEY_FREE = 5325
|
||||||
)
|
)
|
||||||
|
|||||||
9
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
9
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D_MIPS_SIM=_MIPS_SIM_ABI64 -D__MIPSEL__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build mips64le,linux
|
// +build mips64le,linux
|
||||||
@ -324,4 +324,11 @@ const (
|
|||||||
SYS_EXECVEAT = 5316
|
SYS_EXECVEAT = 5316
|
||||||
SYS_USERFAULTFD = 5317
|
SYS_USERFAULTFD = 5317
|
||||||
SYS_MEMBARRIER = 5318
|
SYS_MEMBARRIER = 5318
|
||||||
|
SYS_MLOCK2 = 5319
|
||||||
|
SYS_COPY_FILE_RANGE = 5320
|
||||||
|
SYS_PREADV2 = 5321
|
||||||
|
SYS_PWRITEV2 = 5322
|
||||||
|
SYS_PKEY_MPROTECT = 5323
|
||||||
|
SYS_PKEY_ALLOC = 5324
|
||||||
|
SYS_PKEY_FREE = 5325
|
||||||
)
|
)
|
||||||
|
|||||||
25
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
25
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/mips-linux-gnu/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m32 -D_MIPS_SIM=_MIPS_SIM_ABI32 -D__MIPSEL__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build mipsle,linux
|
// +build mipsle,linux
|
||||||
@ -352,8 +352,23 @@ const (
|
|||||||
SYS_SETNS = 4344
|
SYS_SETNS = 4344
|
||||||
SYS_PROCESS_VM_READV = 4345
|
SYS_PROCESS_VM_READV = 4345
|
||||||
SYS_PROCESS_VM_WRITEV = 4346
|
SYS_PROCESS_VM_WRITEV = 4346
|
||||||
SYS_LINUX_SYSCALLS = 4346
|
SYS_KCMP = 4347
|
||||||
SYS_O32_LINUX_SYSCALLS = 4346
|
SYS_FINIT_MODULE = 4348
|
||||||
SYS_64_LINUX_SYSCALLS = 4305
|
SYS_SCHED_SETATTR = 4349
|
||||||
SYS_N32_LINUX_SYSCALLS = 4310
|
SYS_SCHED_GETATTR = 4350
|
||||||
|
SYS_RENAMEAT2 = 4351
|
||||||
|
SYS_SECCOMP = 4352
|
||||||
|
SYS_GETRANDOM = 4353
|
||||||
|
SYS_MEMFD_CREATE = 4354
|
||||||
|
SYS_BPF = 4355
|
||||||
|
SYS_EXECVEAT = 4356
|
||||||
|
SYS_USERFAULTFD = 4357
|
||||||
|
SYS_MEMBARRIER = 4358
|
||||||
|
SYS_MLOCK2 = 4359
|
||||||
|
SYS_COPY_FILE_RANGE = 4360
|
||||||
|
SYS_PREADV2 = 4361
|
||||||
|
SYS_PWRITEV2 = 4362
|
||||||
|
SYS_PKEY_MPROTECT = 4363
|
||||||
|
SYS_PKEY_ALLOC = 4364
|
||||||
|
SYS_PKEY_FREE = 4365
|
||||||
)
|
)
|
||||||
|
|||||||
11
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
11
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__powerpc64__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build ppc64,linux
|
// +build ppc64,linux
|
||||||
@ -357,4 +357,13 @@ const (
|
|||||||
SYS_GETRANDOM = 359
|
SYS_GETRANDOM = 359
|
||||||
SYS_MEMFD_CREATE = 360
|
SYS_MEMFD_CREATE = 360
|
||||||
SYS_BPF = 361
|
SYS_BPF = 361
|
||||||
|
SYS_EXECVEAT = 362
|
||||||
|
SYS_SWITCH_ENDIAN = 363
|
||||||
|
SYS_USERFAULTFD = 364
|
||||||
|
SYS_MEMBARRIER = 365
|
||||||
|
SYS_MLOCK2 = 378
|
||||||
|
SYS_COPY_FILE_RANGE = 379
|
||||||
|
SYS_PREADV2 = 380
|
||||||
|
SYS_PWRITEV2 = 381
|
||||||
|
SYS_KEXEC_FILE_LOAD = 382
|
||||||
)
|
)
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
18
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/powerpc64le-linux-gnu/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__powerpc64__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build ppc64le,linux
|
// +build ppc64le,linux
|
||||||
@ -350,4 +350,20 @@ const (
|
|||||||
SYS_PROCESS_VM_WRITEV = 352
|
SYS_PROCESS_VM_WRITEV = 352
|
||||||
SYS_FINIT_MODULE = 353
|
SYS_FINIT_MODULE = 353
|
||||||
SYS_KCMP = 354
|
SYS_KCMP = 354
|
||||||
|
SYS_SCHED_SETATTR = 355
|
||||||
|
SYS_SCHED_GETATTR = 356
|
||||||
|
SYS_RENAMEAT2 = 357
|
||||||
|
SYS_SECCOMP = 358
|
||||||
|
SYS_GETRANDOM = 359
|
||||||
|
SYS_MEMFD_CREATE = 360
|
||||||
|
SYS_BPF = 361
|
||||||
|
SYS_EXECVEAT = 362
|
||||||
|
SYS_SWITCH_ENDIAN = 363
|
||||||
|
SYS_USERFAULTFD = 364
|
||||||
|
SYS_MEMBARRIER = 365
|
||||||
|
SYS_MLOCK2 = 378
|
||||||
|
SYS_COPY_FILE_RANGE = 379
|
||||||
|
SYS_PREADV2 = 380
|
||||||
|
SYS_PWRITEV2 = 381
|
||||||
|
SYS_KEXEC_FILE_LOAD = 382
|
||||||
)
|
)
|
||||||
|
|||||||
5
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
5
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__s390x__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build s390x,linux
|
// +build s390x,linux
|
||||||
@ -303,6 +303,9 @@ const (
|
|||||||
SYS_RECVMSG = 372
|
SYS_RECVMSG = 372
|
||||||
SYS_SHUTDOWN = 373
|
SYS_SHUTDOWN = 373
|
||||||
SYS_MLOCK2 = 374
|
SYS_MLOCK2 = 374
|
||||||
|
SYS_COPY_FILE_RANGE = 375
|
||||||
|
SYS_PREADV2 = 376
|
||||||
|
SYS_PWRITEV2 = 377
|
||||||
SYS_SELECT = 142
|
SYS_SELECT = 142
|
||||||
SYS_GETRLIMIT = 191
|
SYS_GETRLIMIT = 191
|
||||||
SYS_LCHOWN = 198
|
SYS_LCHOWN = 198
|
||||||
|
|||||||
2
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// mksysnum_linux.pl /usr/include/sparc64-linux-gnu/asm/unistd.h
|
// mksysnum_linux.pl -Ilinux/usr/include -m64 -D__arch64__ linux/usr/include/asm/unistd.h
|
||||||
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
// MACHINE GENERATED BY THE ABOVE COMMAND; DO NOT EDIT
|
||||||
|
|
||||||
// +build sparc64,linux
|
// +build sparc64,linux
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
@ -210,6 +210,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -334,6 +350,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
@ -212,6 +212,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -338,6 +354,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
@ -214,6 +214,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]uint8
|
Data [14]uint8
|
||||||
@ -338,6 +354,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
@ -213,6 +213,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -339,6 +355,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
@ -213,6 +213,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -336,6 +352,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
@ -213,6 +213,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -338,6 +354,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
@ -213,6 +213,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -338,6 +354,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
@ -213,6 +213,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -336,6 +352,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
@ -214,6 +214,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]uint8
|
Data [14]uint8
|
||||||
@ -340,6 +356,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
@ -214,6 +214,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]uint8
|
Data [14]uint8
|
||||||
@ -340,6 +356,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
@ -213,6 +213,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -338,6 +354,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
18
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
18
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
@ -218,6 +218,22 @@ type RawSockaddrCAN struct {
|
|||||||
Addr [8]byte
|
Addr [8]byte
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RawSockaddrALG struct {
|
||||||
|
Family uint16
|
||||||
|
Type [14]uint8
|
||||||
|
Feat uint32
|
||||||
|
Mask uint32
|
||||||
|
Name [64]uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
type RawSockaddrVM struct {
|
||||||
|
Family uint16
|
||||||
|
Reserved1 uint16
|
||||||
|
Port uint32
|
||||||
|
Cid uint32
|
||||||
|
Zero [4]uint8
|
||||||
|
}
|
||||||
|
|
||||||
type RawSockaddr struct {
|
type RawSockaddr struct {
|
||||||
Family uint16
|
Family uint16
|
||||||
Data [14]int8
|
Data [14]int8
|
||||||
@ -343,6 +359,8 @@ const (
|
|||||||
SizeofSockaddrNetlink = 0xc
|
SizeofSockaddrNetlink = 0xc
|
||||||
SizeofSockaddrHCI = 0x6
|
SizeofSockaddrHCI = 0x6
|
||||||
SizeofSockaddrCAN = 0x10
|
SizeofSockaddrCAN = 0x10
|
||||||
|
SizeofSockaddrALG = 0x58
|
||||||
|
SizeofSockaddrVM = 0x10
|
||||||
SizeofLinger = 0x8
|
SizeofLinger = 0x8
|
||||||
SizeofIPMreq = 0x8
|
SizeofIPMreq = 0x8
|
||||||
SizeofIPMreqn = 0xc
|
SizeofIPMreqn = 0xc
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user