├── cmd
└── app
│ └── main.go
├── go.mod
├── go.sum
├── internal
├── core
│ ├── domain
│ │ └── person.go
│ ├── ports
│ │ ├── repositories.go
│ │ └── services.go
│ └── services
│ │ └── personssrv
│ │ └── service.go
└── infrastructure
│ ├── repositories
│ └── memory
│ │ └── personsrepo.go
│ └── server
│ ├── dto_get.go
│ ├── handlers.go
│ └── http.go
└── vendor
├── github.com
├── gin-contrib
│ └── sse
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── sse-decoder.go
│ │ ├── sse-encoder.go
│ │ └── writer.go
├── gin-gonic
│ └── gin
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── AUTHORS.md
│ │ ├── BENCHMARKS.md
│ │ ├── CHANGELOG.md
│ │ ├── CODE_OF_CONDUCT.md
│ │ ├── CONTRIBUTING.md
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── auth.go
│ │ ├── binding
│ │ ├── binding.go
│ │ ├── binding_nomsgpack.go
│ │ ├── default_validator.go
│ │ ├── form.go
│ │ ├── form_mapping.go
│ │ ├── header.go
│ │ ├── json.go
│ │ ├── msgpack.go
│ │ ├── multipart_form_mapping.go
│ │ ├── protobuf.go
│ │ ├── query.go
│ │ ├── uri.go
│ │ ├── xml.go
│ │ └── yaml.go
│ │ ├── codecov.yml
│ │ ├── context.go
│ │ ├── context_appengine.go
│ │ ├── debug.go
│ │ ├── deprecated.go
│ │ ├── doc.go
│ │ ├── errors.go
│ │ ├── fs.go
│ │ ├── gin.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── internal
│ │ ├── bytesconv
│ │ │ └── bytesconv.go
│ │ └── json
│ │ │ ├── json.go
│ │ │ └── jsoniter.go
│ │ ├── logger.go
│ │ ├── mode.go
│ │ ├── path.go
│ │ ├── recovery.go
│ │ ├── render
│ │ ├── data.go
│ │ ├── html.go
│ │ ├── json.go
│ │ ├── msgpack.go
│ │ ├── protobuf.go
│ │ ├── reader.go
│ │ ├── redirect.go
│ │ ├── render.go
│ │ ├── text.go
│ │ ├── xml.go
│ │ └── yaml.go
│ │ ├── response_writer.go
│ │ ├── routergroup.go
│ │ ├── test_helpers.go
│ │ ├── tree.go
│ │ ├── utils.go
│ │ └── version.go
├── go-playground
│ ├── locales
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── currency
│ │ │ └── currency.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── logo.png
│ │ └── rules.go
│ ├── universal-translator
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── errors.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── import_export.go
│ │ ├── logo.png
│ │ ├── translator.go
│ │ └── universal_translator.go
│ └── validator
│ │ └── v10
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── baked_in.go
│ │ ├── cache.go
│ │ ├── doc.go
│ │ ├── errors.go
│ │ ├── field_level.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── logo.png
│ │ ├── regexes.go
│ │ ├── struct_level.go
│ │ ├── translations.go
│ │ ├── util.go
│ │ ├── validator.go
│ │ └── validator_instance.go
├── golang
│ └── protobuf
│ │ ├── AUTHORS
│ │ ├── CONTRIBUTORS
│ │ ├── LICENSE
│ │ └── proto
│ │ ├── clone.go
│ │ ├── decode.go
│ │ ├── deprecated.go
│ │ ├── discard.go
│ │ ├── encode.go
│ │ ├── equal.go
│ │ ├── extensions.go
│ │ ├── lib.go
│ │ ├── message_set.go
│ │ ├── pointer_reflect.go
│ │ ├── pointer_unsafe.go
│ │ ├── properties.go
│ │ ├── table_marshal.go
│ │ ├── table_merge.go
│ │ ├── table_unmarshal.go
│ │ ├── text.go
│ │ └── text_parser.go
├── json-iterator
│ └── go
│ │ ├── .codecov.yml
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── Gopkg.lock
│ │ ├── Gopkg.toml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── adapter.go
│ │ ├── any.go
│ │ ├── any_array.go
│ │ ├── any_bool.go
│ │ ├── any_float.go
│ │ ├── any_int32.go
│ │ ├── any_int64.go
│ │ ├── any_invalid.go
│ │ ├── any_nil.go
│ │ ├── any_number.go
│ │ ├── any_object.go
│ │ ├── any_str.go
│ │ ├── any_uint32.go
│ │ ├── any_uint64.go
│ │ ├── build.sh
│ │ ├── config.go
│ │ ├── fuzzy_mode_convert_table.md
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── iter.go
│ │ ├── iter_array.go
│ │ ├── iter_float.go
│ │ ├── iter_int.go
│ │ ├── iter_object.go
│ │ ├── iter_skip.go
│ │ ├── iter_skip_sloppy.go
│ │ ├── iter_skip_strict.go
│ │ ├── iter_str.go
│ │ ├── jsoniter.go
│ │ ├── pool.go
│ │ ├── reflect.go
│ │ ├── reflect_array.go
│ │ ├── reflect_dynamic.go
│ │ ├── reflect_extension.go
│ │ ├── reflect_json_number.go
│ │ ├── reflect_json_raw_message.go
│ │ ├── reflect_map.go
│ │ ├── reflect_marshaler.go
│ │ ├── reflect_native.go
│ │ ├── reflect_optional.go
│ │ ├── reflect_slice.go
│ │ ├── reflect_struct_decoder.go
│ │ ├── reflect_struct_encoder.go
│ │ ├── stream.go
│ │ ├── stream_float.go
│ │ ├── stream_int.go
│ │ ├── stream_str.go
│ │ └── test.sh
├── leodido
│ └── go-urn
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── machine.go
│ │ ├── machine.go.rl
│ │ ├── makefile
│ │ └── urn.go
├── mattn
│ └── go-isatty
│ │ ├── .travis.yml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── doc.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── go.test.sh
│ │ ├── isatty_bsd.go
│ │ ├── isatty_others.go
│ │ ├── isatty_plan9.go
│ │ ├── isatty_solaris.go
│ │ ├── isatty_tcgets.go
│ │ ├── isatty_windows.go
│ │ └── renovate.json
├── modern-go
│ ├── concurrent
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── executor.go
│ │ ├── go_above_19.go
│ │ ├── go_below_19.go
│ │ └── unbounded_executor.go
│ └── reflect2
│ │ ├── .gitignore
│ │ ├── .travis.yml
│ │ ├── Gopkg.lock
│ │ ├── Gopkg.toml
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── go_above_17.go
│ │ ├── go_above_19.go
│ │ ├── go_below_17.go
│ │ ├── go_below_19.go
│ │ ├── reflect2.go
│ │ ├── reflect2_amd64.s
│ │ ├── reflect2_kind.go
│ │ ├── relfect2_386.s
│ │ ├── relfect2_amd64p32.s
│ │ ├── relfect2_arm.s
│ │ ├── relfect2_arm64.s
│ │ ├── relfect2_mips64x.s
│ │ ├── relfect2_mipsx.s
│ │ ├── relfect2_ppc64x.s
│ │ ├── relfect2_s390x.s
│ │ ├── safe_field.go
│ │ ├── safe_map.go
│ │ ├── safe_slice.go
│ │ ├── safe_struct.go
│ │ ├── safe_type.go
│ │ ├── test.sh
│ │ ├── type_map.go
│ │ ├── unsafe_array.go
│ │ ├── unsafe_eface.go
│ │ ├── unsafe_field.go
│ │ ├── unsafe_iface.go
│ │ ├── unsafe_link.go
│ │ ├── unsafe_map.go
│ │ ├── unsafe_ptr.go
│ │ ├── unsafe_slice.go
│ │ ├── unsafe_struct.go
│ │ └── unsafe_type.go
└── ugorji
│ └── go
│ └── codec
│ ├── 0_importpath.go
│ ├── LICENSE
│ ├── binc.go
│ ├── build.sh
│ ├── cbor.go
│ ├── codecgen.go
│ ├── decode.go
│ ├── doc.go
│ ├── encode.go
│ ├── fast-path.generated.go
│ ├── fast-path.go.tmpl
│ ├── fast-path.not.go
│ ├── float.go
│ ├── gen-dec-array.go.tmpl
│ ├── gen-dec-map.go.tmpl
│ ├── gen-enc-chan.go.tmpl
│ ├── gen-helper.generated.go
│ ├── gen-helper.go.tmpl
│ ├── gen.generated.go
│ ├── gen.go
│ ├── go.mod
│ ├── goversion_arrayof_gte_go15.go
│ ├── goversion_arrayof_lt_go15.go
│ ├── goversion_fmt_time_gte_go15.go
│ ├── goversion_fmt_time_lt_go15.go
│ ├── goversion_makemap_gte_go19.go
│ ├── goversion_makemap_lt_go19.go
│ ├── goversion_maprange_gte_go112.go
│ ├── goversion_maprange_lt_go112.go
│ ├── goversion_unexportedembeddedptr_gte_go110.go
│ ├── goversion_unexportedembeddedptr_lt_go110.go
│ ├── goversion_unsupported_lt_go14.go
│ ├── goversion_vendor_eq_go15.go
│ ├── goversion_vendor_eq_go16.go
│ ├── goversion_vendor_gte_go17.go
│ ├── goversion_vendor_lt_go15.go
│ ├── helper.go
│ ├── helper.s
│ ├── helper_internal.go
│ ├── helper_not_unsafe.go
│ ├── helper_unsafe.go
│ ├── json.go
│ ├── mammoth-test.go.tmpl
│ ├── mammoth2-test.go.tmpl
│ ├── msgpack.go
│ ├── prebuild.go
│ ├── reader.go
│ ├── register_ext.go
│ ├── rpc.go
│ ├── simple.go
│ ├── sort-slice.generated.go
│ ├── sort-slice.go.tmpl
│ ├── test-cbor-goldens.json
│ ├── test.py
│ └── writer.go
├── golang.org
└── x
│ └── sys
│ ├── AUTHORS
│ ├── CONTRIBUTORS
│ ├── LICENSE
│ ├── PATENTS
│ └── unix
│ ├── .gitignore
│ ├── README.md
│ ├── affinity_linux.go
│ ├── aliases.go
│ ├── asm_aix_ppc64.s
│ ├── asm_darwin_386.s
│ ├── asm_darwin_amd64.s
│ ├── asm_darwin_arm.s
│ ├── asm_darwin_arm64.s
│ ├── asm_dragonfly_amd64.s
│ ├── asm_freebsd_386.s
│ ├── asm_freebsd_amd64.s
│ ├── asm_freebsd_arm.s
│ ├── asm_freebsd_arm64.s
│ ├── asm_linux_386.s
│ ├── asm_linux_amd64.s
│ ├── asm_linux_arm.s
│ ├── asm_linux_arm64.s
│ ├── asm_linux_mips64x.s
│ ├── asm_linux_mipsx.s
│ ├── asm_linux_ppc64x.s
│ ├── asm_linux_riscv64.s
│ ├── asm_linux_s390x.s
│ ├── asm_netbsd_386.s
│ ├── asm_netbsd_amd64.s
│ ├── asm_netbsd_arm.s
│ ├── asm_netbsd_arm64.s
│ ├── asm_openbsd_386.s
│ ├── asm_openbsd_amd64.s
│ ├── asm_openbsd_arm.s
│ ├── asm_openbsd_arm64.s
│ ├── asm_solaris_amd64.s
│ ├── bluetooth_linux.go
│ ├── cap_freebsd.go
│ ├── constants.go
│ ├── dev_aix_ppc.go
│ ├── dev_aix_ppc64.go
│ ├── dev_darwin.go
│ ├── dev_dragonfly.go
│ ├── dev_freebsd.go
│ ├── dev_linux.go
│ ├── dev_netbsd.go
│ ├── dev_openbsd.go
│ ├── dirent.go
│ ├── endian_big.go
│ ├── endian_little.go
│ ├── env_unix.go
│ ├── errors_freebsd_386.go
│ ├── errors_freebsd_amd64.go
│ ├── errors_freebsd_arm.go
│ ├── fcntl.go
│ ├── fcntl_darwin.go
│ ├── fcntl_linux_32bit.go
│ ├── fdset.go
│ ├── gccgo.go
│ ├── gccgo_c.c
│ ├── gccgo_linux_amd64.go
│ ├── ioctl.go
│ ├── mkall.sh
│ ├── mkerrors.sh
│ ├── pagesize_unix.go
│ ├── pledge_openbsd.go
│ ├── race.go
│ ├── race0.go
│ ├── readdirent_getdents.go
│ ├── readdirent_getdirentries.go
│ ├── sockcmsg_dragonfly.go
│ ├── sockcmsg_linux.go
│ ├── sockcmsg_unix.go
│ ├── sockcmsg_unix_other.go
│ ├── str.go
│ ├── syscall.go
│ ├── syscall_aix.go
│ ├── syscall_aix_ppc.go
│ ├── syscall_aix_ppc64.go
│ ├── syscall_bsd.go
│ ├── syscall_darwin.1_12.go
│ ├── syscall_darwin.1_13.go
│ ├── syscall_darwin.go
│ ├── syscall_darwin_386.1_11.go
│ ├── syscall_darwin_386.go
│ ├── syscall_darwin_amd64.1_11.go
│ ├── syscall_darwin_amd64.go
│ ├── syscall_darwin_arm.1_11.go
│ ├── syscall_darwin_arm.go
│ ├── syscall_darwin_arm64.1_11.go
│ ├── syscall_darwin_arm64.go
│ ├── syscall_darwin_libSystem.go
│ ├── syscall_dragonfly.go
│ ├── syscall_dragonfly_amd64.go
│ ├── syscall_freebsd.go
│ ├── syscall_freebsd_386.go
│ ├── syscall_freebsd_amd64.go
│ ├── syscall_freebsd_arm.go
│ ├── syscall_freebsd_arm64.go
│ ├── syscall_linux.go
│ ├── syscall_linux_386.go
│ ├── syscall_linux_amd64.go
│ ├── syscall_linux_amd64_gc.go
│ ├── syscall_linux_arm.go
│ ├── syscall_linux_arm64.go
│ ├── syscall_linux_gc.go
│ ├── syscall_linux_gc_386.go
│ ├── syscall_linux_gccgo_386.go
│ ├── syscall_linux_gccgo_arm.go
│ ├── syscall_linux_mips64x.go
│ ├── syscall_linux_mipsx.go
│ ├── syscall_linux_ppc64x.go
│ ├── syscall_linux_riscv64.go
│ ├── syscall_linux_s390x.go
│ ├── syscall_linux_sparc64.go
│ ├── syscall_netbsd.go
│ ├── syscall_netbsd_386.go
│ ├── syscall_netbsd_amd64.go
│ ├── syscall_netbsd_arm.go
│ ├── syscall_netbsd_arm64.go
│ ├── syscall_openbsd.go
│ ├── syscall_openbsd_386.go
│ ├── syscall_openbsd_amd64.go
│ ├── syscall_openbsd_arm.go
│ ├── syscall_openbsd_arm64.go
│ ├── syscall_solaris.go
│ ├── syscall_solaris_amd64.go
│ ├── syscall_unix.go
│ ├── syscall_unix_gc.go
│ ├── syscall_unix_gc_ppc64x.go
│ ├── timestruct.go
│ ├── unveil_openbsd.go
│ ├── xattr_bsd.go
│ ├── zerrors_aix_ppc.go
│ ├── zerrors_aix_ppc64.go
│ ├── zerrors_darwin_386.go
│ ├── zerrors_darwin_amd64.go
│ ├── zerrors_darwin_arm.go
│ ├── zerrors_darwin_arm64.go
│ ├── zerrors_dragonfly_amd64.go
│ ├── zerrors_freebsd_386.go
│ ├── zerrors_freebsd_amd64.go
│ ├── zerrors_freebsd_arm.go
│ ├── zerrors_freebsd_arm64.go
│ ├── zerrors_linux_386.go
│ ├── zerrors_linux_amd64.go
│ ├── zerrors_linux_arm.go
│ ├── zerrors_linux_arm64.go
│ ├── zerrors_linux_mips.go
│ ├── zerrors_linux_mips64.go
│ ├── zerrors_linux_mips64le.go
│ ├── zerrors_linux_mipsle.go
│ ├── zerrors_linux_ppc64.go
│ ├── zerrors_linux_ppc64le.go
│ ├── zerrors_linux_riscv64.go
│ ├── zerrors_linux_s390x.go
│ ├── zerrors_linux_sparc64.go
│ ├── zerrors_netbsd_386.go
│ ├── zerrors_netbsd_amd64.go
│ ├── zerrors_netbsd_arm.go
│ ├── zerrors_netbsd_arm64.go
│ ├── zerrors_openbsd_386.go
│ ├── zerrors_openbsd_amd64.go
│ ├── zerrors_openbsd_arm.go
│ ├── zerrors_openbsd_arm64.go
│ ├── zerrors_solaris_amd64.go
│ ├── zptrace_armnn_linux.go
│ ├── zptrace_linux_arm64.go
│ ├── zptrace_mipsnn_linux.go
│ ├── zptrace_mipsnnle_linux.go
│ ├── zptrace_x86_linux.go
│ ├── zsyscall_aix_ppc.go
│ ├── zsyscall_aix_ppc64.go
│ ├── zsyscall_aix_ppc64_gc.go
│ ├── zsyscall_aix_ppc64_gccgo.go
│ ├── zsyscall_darwin_386.1_11.go
│ ├── zsyscall_darwin_386.1_13.go
│ ├── zsyscall_darwin_386.1_13.s
│ ├── zsyscall_darwin_386.go
│ ├── zsyscall_darwin_386.s
│ ├── zsyscall_darwin_amd64.1_11.go
│ ├── zsyscall_darwin_amd64.1_13.go
│ ├── zsyscall_darwin_amd64.1_13.s
│ ├── zsyscall_darwin_amd64.go
│ ├── zsyscall_darwin_amd64.s
│ ├── zsyscall_darwin_arm.1_11.go
│ ├── zsyscall_darwin_arm.1_13.go
│ ├── zsyscall_darwin_arm.1_13.s
│ ├── zsyscall_darwin_arm.go
│ ├── zsyscall_darwin_arm.s
│ ├── zsyscall_darwin_arm64.1_11.go
│ ├── zsyscall_darwin_arm64.1_13.go
│ ├── zsyscall_darwin_arm64.1_13.s
│ ├── zsyscall_darwin_arm64.go
│ ├── zsyscall_darwin_arm64.s
│ ├── zsyscall_dragonfly_amd64.go
│ ├── zsyscall_freebsd_386.go
│ ├── zsyscall_freebsd_amd64.go
│ ├── zsyscall_freebsd_arm.go
│ ├── zsyscall_freebsd_arm64.go
│ ├── zsyscall_linux_386.go
│ ├── zsyscall_linux_amd64.go
│ ├── zsyscall_linux_arm.go
│ ├── zsyscall_linux_arm64.go
│ ├── zsyscall_linux_mips.go
│ ├── zsyscall_linux_mips64.go
│ ├── zsyscall_linux_mips64le.go
│ ├── zsyscall_linux_mipsle.go
│ ├── zsyscall_linux_ppc64.go
│ ├── zsyscall_linux_ppc64le.go
│ ├── zsyscall_linux_riscv64.go
│ ├── zsyscall_linux_s390x.go
│ ├── zsyscall_linux_sparc64.go
│ ├── zsyscall_netbsd_386.go
│ ├── zsyscall_netbsd_amd64.go
│ ├── zsyscall_netbsd_arm.go
│ ├── zsyscall_netbsd_arm64.go
│ ├── zsyscall_openbsd_386.go
│ ├── zsyscall_openbsd_amd64.go
│ ├── zsyscall_openbsd_arm.go
│ ├── zsyscall_openbsd_arm64.go
│ ├── zsyscall_solaris_amd64.go
│ ├── zsysctl_openbsd_386.go
│ ├── zsysctl_openbsd_amd64.go
│ ├── zsysctl_openbsd_arm.go
│ ├── zsysctl_openbsd_arm64.go
│ ├── zsysnum_darwin_386.go
│ ├── zsysnum_darwin_amd64.go
│ ├── zsysnum_darwin_arm.go
│ ├── zsysnum_darwin_arm64.go
│ ├── zsysnum_dragonfly_amd64.go
│ ├── zsysnum_freebsd_386.go
│ ├── zsysnum_freebsd_amd64.go
│ ├── zsysnum_freebsd_arm.go
│ ├── zsysnum_freebsd_arm64.go
│ ├── zsysnum_linux_386.go
│ ├── zsysnum_linux_amd64.go
│ ├── zsysnum_linux_arm.go
│ ├── zsysnum_linux_arm64.go
│ ├── zsysnum_linux_mips.go
│ ├── zsysnum_linux_mips64.go
│ ├── zsysnum_linux_mips64le.go
│ ├── zsysnum_linux_mipsle.go
│ ├── zsysnum_linux_ppc64.go
│ ├── zsysnum_linux_ppc64le.go
│ ├── zsysnum_linux_riscv64.go
│ ├── zsysnum_linux_s390x.go
│ ├── zsysnum_linux_sparc64.go
│ ├── zsysnum_netbsd_386.go
│ ├── zsysnum_netbsd_amd64.go
│ ├── zsysnum_netbsd_arm.go
│ ├── zsysnum_netbsd_arm64.go
│ ├── zsysnum_openbsd_386.go
│ ├── zsysnum_openbsd_amd64.go
│ ├── zsysnum_openbsd_arm.go
│ ├── zsysnum_openbsd_arm64.go
│ ├── ztypes_aix_ppc.go
│ ├── ztypes_aix_ppc64.go
│ ├── ztypes_darwin_386.go
│ ├── ztypes_darwin_amd64.go
│ ├── ztypes_darwin_arm.go
│ ├── ztypes_darwin_arm64.go
│ ├── ztypes_dragonfly_amd64.go
│ ├── ztypes_freebsd_386.go
│ ├── ztypes_freebsd_amd64.go
│ ├── ztypes_freebsd_arm.go
│ ├── ztypes_freebsd_arm64.go
│ ├── ztypes_linux_386.go
│ ├── ztypes_linux_amd64.go
│ ├── ztypes_linux_arm.go
│ ├── ztypes_linux_arm64.go
│ ├── ztypes_linux_mips.go
│ ├── ztypes_linux_mips64.go
│ ├── ztypes_linux_mips64le.go
│ ├── ztypes_linux_mipsle.go
│ ├── ztypes_linux_ppc64.go
│ ├── ztypes_linux_ppc64le.go
│ ├── ztypes_linux_riscv64.go
│ ├── ztypes_linux_s390x.go
│ ├── ztypes_linux_sparc64.go
│ ├── ztypes_netbsd_386.go
│ ├── ztypes_netbsd_amd64.go
│ ├── ztypes_netbsd_arm.go
│ ├── ztypes_netbsd_arm64.go
│ ├── ztypes_openbsd_386.go
│ ├── ztypes_openbsd_amd64.go
│ ├── ztypes_openbsd_arm.go
│ ├── ztypes_openbsd_arm64.go
│ └── ztypes_solaris_amd64.go
├── gopkg.in
└── yaml.v2
│ ├── .travis.yml
│ ├── LICENSE
│ ├── LICENSE.libyaml
│ ├── NOTICE
│ ├── README.md
│ ├── apic.go
│ ├── decode.go
│ ├── emitterc.go
│ ├── encode.go
│ ├── go.mod
│ ├── parserc.go
│ ├── readerc.go
│ ├── resolve.go
│ ├── scannerc.go
│ ├── sorter.go
│ ├── writerc.go
│ ├── yaml.go
│ ├── yamlh.go
│ └── yamlprivateh.go
└── modules.txt
/cmd/app/main.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "github.com/gin-gonic/gin"
5 | "github.com/yamiljuri/hex_arq/internal/infrastructure/server"
6 | "log"
7 | )
8 |
9 | func main(){
10 | engine := gin.Default()
11 | server.RegisterRouter(engine)
12 | log.Fatal(engine.Run(":8080"))
13 | }
14 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/yamiljuri/hex_arq
2 |
3 | go 1.14
4 |
5 | require github.com/gin-gonic/gin v1.6.3
6 |
--------------------------------------------------------------------------------
/internal/core/domain/person.go:
--------------------------------------------------------------------------------
1 | package domain
2 |
3 | type Person struct {
4 | Id int
5 | Name string
6 | }
7 |
--------------------------------------------------------------------------------
/internal/core/ports/repositories.go:
--------------------------------------------------------------------------------
1 | package ports
2 |
3 | import "github.com/yamiljuri/hex_arq/internal/core/domain"
4 |
5 | type PersonsRepository interface {
6 | Get(id int) (domain.Person, error)
7 | Save(person domain.Person) error
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/internal/core/ports/services.go:
--------------------------------------------------------------------------------
1 | package ports
2 |
3 | import "github.com/yamiljuri/hex_arq/internal/core/domain"
4 |
5 | type PersonsService interface {
6 | Get(id int) (domain.Person,error)
7 | Create(person domain.Person) error
8 | }
9 |
10 |
--------------------------------------------------------------------------------
/internal/core/services/personssrv/service.go:
--------------------------------------------------------------------------------
1 | package personssrv
2 |
3 | import (
4 | "github.com/yamiljuri/hex_arq/internal/core/domain"
5 | "github.com/yamiljuri/hex_arq/internal/core/ports"
6 | )
7 |
8 | type service struct {
9 | repo ports.PersonsRepository
10 | }
11 |
12 | func NewService(repo ports.PersonsRepository) * service{
13 | return &service{
14 | repo:repo,
15 | }
16 | }
17 |
18 | func (s *service) Get(id int) (domain.Person,error){
19 | return s.repo.Get(id)
20 | }
21 |
22 | func (s * service) Create(person domain.Person) error {
23 | return s.repo.Save(person)
24 | }
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/internal/infrastructure/repositories/memory/personsrepo.go:
--------------------------------------------------------------------------------
1 | package memory
2 |
3 | import (
4 | "github.com/yamiljuri/hex_arq/internal/core/domain"
5 | "sync"
6 | )
7 |
8 | var (
9 | oncePersonsRepo sync.Once
10 | instancePersonsRepo *repository
11 | )
12 |
13 | type repository struct {
14 | dataMemory map[int]domain.Person
15 | lastId int
16 | }
17 |
18 |
19 | func NewPersonsRepository() *repository{
20 | oncePersonsRepo.Do(func() {
21 | instancePersonsRepo = &repository{
22 | dataMemory: map[int]domain.Person{},
23 | lastId: 0,
24 | }
25 | })
26 | return instancePersonsRepo
27 | }
28 |
29 | func (r *repository) Get(id int) (domain.Person,error){
30 | var person domain.Person
31 | person = r.dataMemory[id]
32 | return person, nil
33 | }
34 |
35 | func (r *repository) Save(person domain.Person) error{
36 | r.dataMemory[r.lastId] = person
37 | r.lastId++
38 | return nil
39 | }
--------------------------------------------------------------------------------
/internal/infrastructure/server/dto_get.go:
--------------------------------------------------------------------------------
1 | package server
2 |
3 | import "github.com/yamiljuri/hex_arq/internal/core/domain"
4 |
5 | type ResponsePersonGet domain.Person
6 |
7 | func BuildResponsePersonGet(person domain.Person) ResponsePersonGet{
8 | return ResponsePersonGet(person)
9 | }
10 |
11 |
--------------------------------------------------------------------------------
/internal/infrastructure/server/handlers.go:
--------------------------------------------------------------------------------
1 | package server
2 |
3 | import (
4 | "github.com/gin-gonic/gin"
5 | "github.com/yamiljuri/hex_arq/internal/core/domain"
6 | "github.com/yamiljuri/hex_arq/internal/core/ports"
7 | "net/http"
8 | "strconv"
9 | )
10 |
11 | func GetPersonEndpoint(service ports.PersonsService) func(c *gin.Context){
12 | return func(c *gin.Context) {
13 | var person domain.Person
14 | id ,isExist := c.Params.Get("id")
15 | if isExist {
16 | idNumb, err := strconv.Atoi(id)
17 | if err != nil {
18 | c.AbortWithStatus(http.StatusNotFound)
19 | return
20 | }
21 | person , err = service.Get(idNumb)
22 | if err != nil {
23 | c.AbortWithStatus(http.StatusNoContent)
24 | return
25 | }
26 | }
27 | c.JSON(http.StatusOK, BuildResponsePersonGet(person))
28 | }
29 | }
30 |
31 | //func GetPersonEndpoint(service ports.PersonsService) func(c *gin.Context){
32 | // return func(c *gin.Context) {
33 | // var person domain.Person
34 | // id ,isExist := c.Params.Get("id")
35 | // if isExist {
36 | // idNumb, err := strconv.Atoi(id)
37 | // if err != nil {
38 | // c.AbortWithStatus(http.StatusNotFound)
39 | // return
40 | // }
41 | // person , err = service.Get(idNumb)
42 | // if err != nil {
43 | // c.AbortWithStatus(http.StatusNoContent)
44 | // return
45 | // }
46 | // }
47 | // return person, nil
48 | // }
49 | //}
--------------------------------------------------------------------------------
/internal/infrastructure/server/http.go:
--------------------------------------------------------------------------------
1 | package server
2 |
3 | import (
4 | "github.com/gin-gonic/gin"
5 | "github.com/yamiljuri/hex_arq/internal/core/ports"
6 | "github.com/yamiljuri/hex_arq/internal/core/services/personssrv"
7 | "github.com/yamiljuri/hex_arq/internal/core/services/usersrv"
8 | "github.com/yamiljuri/hex_arq/internal/infrastructure/repositories/memory"
9 | "github.com/yamiljuri/hex_arq/internal/infrastructure/repositories/sql"
10 | )
11 |
12 |
13 | func RegisterRouter(engine *gin.Engine){
14 |
15 | repoPerson := memory.NewPersonsRepository()
16 | servPerson := personssrv.NewService(repoPerson)
17 | getEndpoint := GetPersonEndpoint(servPerson)
18 |
19 | engine.GET("person/:id", getEndpoint)
20 |
21 | }
--------------------------------------------------------------------------------
/vendor/github.com/gin-contrib/sse/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 | go:
4 | - 1.8.x
5 | - 1.9.x
6 | - 1.10.x
7 | - 1.11.x
8 | - 1.12.x
9 | - master
10 |
11 | git:
12 | depth: 10
13 |
14 | matrix:
15 | fast_finish: true
16 | include:
17 | - go: 1.11.x
18 | env: GO111MODULE=on
19 | - go: 1.12.x
20 | env: GO111MODULE=on
21 |
22 | script:
23 | - go test -v -covermode=count -coverprofile=coverage.out
24 |
25 | after_success:
26 | - bash <(curl -s https://codecov.io/bash)
27 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-contrib/sse/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Manuel Martínez-Almeida
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-contrib/sse/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gin-contrib/sse
2 |
3 | go 1.12
4 |
5 | require github.com/stretchr/testify v1.3.0
6 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-contrib/sse/go.sum:
--------------------------------------------------------------------------------
1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
6 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
7 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
8 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-contrib/sse/writer.go:
--------------------------------------------------------------------------------
1 | package sse
2 |
3 | import "io"
4 |
5 | type stringWriter interface {
6 | io.Writer
7 | WriteString(string) (int, error)
8 | }
9 |
10 | type stringWrapper struct {
11 | io.Writer
12 | }
13 |
14 | func (w stringWrapper) WriteString(str string) (int, error) {
15 | return w.Writer.Write([]byte(str))
16 | }
17 |
18 | func checkWriter(writer io.Writer) stringWriter {
19 | if w, ok := writer.(stringWriter); ok {
20 | return w
21 | } else {
22 | return stringWrapper{writer}
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/*
2 | !vendor/vendor.json
3 | coverage.out
4 | count.out
5 | test
6 | profile.out
7 | tmp.out
8 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | matrix:
4 | fast_finish: true
5 | include:
6 | - go: 1.11.x
7 | env: GO111MODULE=on
8 | - go: 1.12.x
9 | env: GO111MODULE=on
10 | - go: 1.13.x
11 | - go: 1.13.x
12 | env:
13 | - TESTTAGS=nomsgpack
14 | - go: 1.14.x
15 | - go: 1.14.x
16 | env:
17 | - TESTTAGS=nomsgpack
18 | - go: master
19 |
20 | git:
21 | depth: 10
22 |
23 | before_install:
24 | - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; fi
25 |
26 | install:
27 | - if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
28 | - if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
29 | - if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
30 |
31 | go_import_path: github.com/gin-gonic/gin
32 |
33 | script:
34 | - make vet
35 | - make fmt-check
36 | - make misspell-check
37 | - make test
38 |
39 | after_success:
40 | - bash <(curl -s https://codecov.io/bash)
41 |
42 | notifications:
43 | webhooks:
44 | urls:
45 | - https://webhooks.gitter.im/e/7f95bf605c4d356372f4
46 | on_success: change # options: [always|never|change] default: always
47 | on_failure: always # options: [always|never|change] default: always
48 | on_start: false # default: false
49 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing
2 |
3 | - With issues:
4 | - Use the search tool before opening a new issue.
5 | - Please provide source code and commit sha if you found a bug.
6 | - Review existing issues and provide feedback or react to them.
7 |
8 | - With pull requests:
9 | - Open your pull request against `master`
10 | - Your pull request should have no more than two commits, if not you should squash them.
11 | - It should pass all tests in the available continuous integrations systems such as TravisCI.
12 | - You should add/modify tests to cover your proposed code changes.
13 | - If your pull request contains a new feature, please document it on the README.
14 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 Manuel Martínez-Almeida
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/default_validator.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package binding
6 |
7 | import (
8 | "reflect"
9 | "sync"
10 |
11 | "github.com/go-playground/validator/v10"
12 | )
13 |
14 | type defaultValidator struct {
15 | once sync.Once
16 | validate *validator.Validate
17 | }
18 |
19 | var _ StructValidator = &defaultValidator{}
20 |
21 | // ValidateStruct receives any kind of type, but only performed struct or pointer to struct type.
22 | func (v *defaultValidator) ValidateStruct(obj interface{}) error {
23 | value := reflect.ValueOf(obj)
24 | valueType := value.Kind()
25 | if valueType == reflect.Ptr {
26 | valueType = value.Elem().Kind()
27 | }
28 | if valueType == reflect.Struct {
29 | v.lazyinit()
30 | if err := v.validate.Struct(obj); err != nil {
31 | return err
32 | }
33 | }
34 | return nil
35 | }
36 |
37 | // Engine returns the underlying validator engine which powers the default
38 | // Validator instance. This is useful if you want to register custom validations
39 | // or struct level validations. See validator GoDoc for more info -
40 | // https://godoc.org/gopkg.in/go-playground/validator.v8
41 | func (v *defaultValidator) Engine() interface{} {
42 | v.lazyinit()
43 | return v.validate
44 | }
45 |
46 | func (v *defaultValidator) lazyinit() {
47 | v.once.Do(func() {
48 | v.validate = validator.New()
49 | v.validate.SetTagName("binding")
50 | })
51 | }
52 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/header.go:
--------------------------------------------------------------------------------
1 | package binding
2 |
3 | import (
4 | "net/http"
5 | "net/textproto"
6 | "reflect"
7 | )
8 |
9 | type headerBinding struct{}
10 |
11 | func (headerBinding) Name() string {
12 | return "header"
13 | }
14 |
15 | func (headerBinding) Bind(req *http.Request, obj interface{}) error {
16 |
17 | if err := mapHeader(obj, req.Header); err != nil {
18 | return err
19 | }
20 |
21 | return validate(obj)
22 | }
23 |
24 | func mapHeader(ptr interface{}, h map[string][]string) error {
25 | return mappingByPtr(ptr, headerSource(h), "header")
26 | }
27 |
28 | type headerSource map[string][]string
29 |
30 | var _ setter = headerSource(nil)
31 |
32 | func (hs headerSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string, opt setOptions) (isSetted bool, err error) {
33 | return setByForm(value, field, hs, textproto.CanonicalMIMEHeaderKey(tagValue), opt)
34 | }
35 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/msgpack.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !nomsgpack
6 |
7 | package binding
8 |
9 | import (
10 | "bytes"
11 | "io"
12 | "net/http"
13 |
14 | "github.com/ugorji/go/codec"
15 | )
16 |
17 | type msgpackBinding struct{}
18 |
19 | func (msgpackBinding) Name() string {
20 | return "msgpack"
21 | }
22 |
23 | func (msgpackBinding) Bind(req *http.Request, obj interface{}) error {
24 | return decodeMsgPack(req.Body, obj)
25 | }
26 |
27 | func (msgpackBinding) BindBody(body []byte, obj interface{}) error {
28 | return decodeMsgPack(bytes.NewReader(body), obj)
29 | }
30 |
31 | func decodeMsgPack(r io.Reader, obj interface{}) error {
32 | cdc := new(codec.MsgpackHandle)
33 | if err := codec.NewDecoder(r, cdc).Decode(&obj); err != nil {
34 | return err
35 | }
36 | return validate(obj)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/protobuf.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package binding
6 |
7 | import (
8 | "io/ioutil"
9 | "net/http"
10 |
11 | "github.com/golang/protobuf/proto"
12 | )
13 |
14 | type protobufBinding struct{}
15 |
16 | func (protobufBinding) Name() string {
17 | return "protobuf"
18 | }
19 |
20 | func (b protobufBinding) Bind(req *http.Request, obj interface{}) error {
21 | buf, err := ioutil.ReadAll(req.Body)
22 | if err != nil {
23 | return err
24 | }
25 | return b.BindBody(buf, obj)
26 | }
27 |
28 | func (protobufBinding) BindBody(body []byte, obj interface{}) error {
29 | if err := proto.Unmarshal(body, obj.(proto.Message)); err != nil {
30 | return err
31 | }
32 | // Here it's same to return validate(obj), but util now we can't add
33 | // `binding:""` to the struct which automatically generate by gen-proto
34 | return nil
35 | // return validate(obj)
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/query.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package binding
6 |
7 | import "net/http"
8 |
9 | type queryBinding struct{}
10 |
11 | func (queryBinding) Name() string {
12 | return "query"
13 | }
14 |
15 | func (queryBinding) Bind(req *http.Request, obj interface{}) error {
16 | values := req.URL.Query()
17 | if err := mapForm(obj, values); err != nil {
18 | return err
19 | }
20 | return validate(obj)
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/uri.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Gin Core Team. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package binding
6 |
7 | type uriBinding struct{}
8 |
9 | func (uriBinding) Name() string {
10 | return "uri"
11 | }
12 |
13 | func (uriBinding) BindUri(m map[string][]string, obj interface{}) error {
14 | if err := mapUri(obj, m); err != nil {
15 | return err
16 | }
17 | return validate(obj)
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/xml.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package binding
6 |
7 | import (
8 | "bytes"
9 | "encoding/xml"
10 | "io"
11 | "net/http"
12 | )
13 |
14 | type xmlBinding struct{}
15 |
16 | func (xmlBinding) Name() string {
17 | return "xml"
18 | }
19 |
20 | func (xmlBinding) Bind(req *http.Request, obj interface{}) error {
21 | return decodeXML(req.Body, obj)
22 | }
23 |
24 | func (xmlBinding) BindBody(body []byte, obj interface{}) error {
25 | return decodeXML(bytes.NewReader(body), obj)
26 | }
27 | func decodeXML(r io.Reader, obj interface{}) error {
28 | decoder := xml.NewDecoder(r)
29 | if err := decoder.Decode(obj); err != nil {
30 | return err
31 | }
32 | return validate(obj)
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/binding/yaml.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Gin Core Team. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package binding
6 |
7 | import (
8 | "bytes"
9 | "io"
10 | "net/http"
11 |
12 | "gopkg.in/yaml.v2"
13 | )
14 |
15 | type yamlBinding struct{}
16 |
17 | func (yamlBinding) Name() string {
18 | return "yaml"
19 | }
20 |
21 | func (yamlBinding) Bind(req *http.Request, obj interface{}) error {
22 | return decodeYAML(req.Body, obj)
23 | }
24 |
25 | func (yamlBinding) BindBody(body []byte, obj interface{}) error {
26 | return decodeYAML(bytes.NewReader(body), obj)
27 | }
28 |
29 | func decodeYAML(r io.Reader, obj interface{}) error {
30 | decoder := yaml.NewDecoder(r)
31 | if err := decoder.Decode(obj); err != nil {
32 | return err
33 | }
34 | return validate(obj)
35 | }
36 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/codecov.yml:
--------------------------------------------------------------------------------
1 | coverage:
2 | notify:
3 | gitter:
4 | default:
5 | url: https://webhooks.gitter.im/e/d90dcdeeab2f1e357165
6 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/context_appengine.go:
--------------------------------------------------------------------------------
1 | // +build appengine
2 |
3 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
4 | // Use of this source code is governed by a MIT style
5 | // license that can be found in the LICENSE file.
6 |
7 | package gin
8 |
9 | func init() {
10 | defaultAppEngine = true
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/deprecated.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package gin
6 |
7 | import (
8 | "log"
9 |
10 | "github.com/gin-gonic/gin/binding"
11 | )
12 |
13 | // BindWith binds the passed struct pointer using the specified binding engine.
14 | // See the binding package.
15 | func (c *Context) BindWith(obj interface{}, b binding.Binding) error {
16 | log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to
17 | be deprecated, please check issue #662 and either use MustBindWith() if you
18 | want HTTP 400 to be automatically returned if any error occur, or use
19 | ShouldBindWith() if you need to manage the error.`)
20 | return c.MustBindWith(obj, b)
21 | }
22 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package gin implements a HTTP web framework called gin.
3 |
4 | See https://gin-gonic.com/ for more information about gin.
5 | */
6 | package gin // import "github.com/gin-gonic/gin"
7 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/fs.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package gin
6 |
7 | import (
8 | "net/http"
9 | "os"
10 | )
11 |
12 | type onlyfilesFS struct {
13 | fs http.FileSystem
14 | }
15 |
16 | type neuteredReaddirFile struct {
17 | http.File
18 | }
19 |
20 | // Dir returns a http.Filesystem that can be used by http.FileServer(). It is used internally
21 | // in router.Static().
22 | // if listDirectory == true, then it works the same as http.Dir() otherwise it returns
23 | // a filesystem that prevents http.FileServer() to list the directory files.
24 | func Dir(root string, listDirectory bool) http.FileSystem {
25 | fs := http.Dir(root)
26 | if listDirectory {
27 | return fs
28 | }
29 | return &onlyfilesFS{fs}
30 | }
31 |
32 | // Open conforms to http.Filesystem.
33 | func (fs onlyfilesFS) Open(name string) (http.File, error) {
34 | f, err := fs.fs.Open(name)
35 | if err != nil {
36 | return nil, err
37 | }
38 | return neuteredReaddirFile{f}, nil
39 | }
40 |
41 | // Readdir overrides the http.File default implementation.
42 | func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) {
43 | // this disables directory listing
44 | return nil, nil
45 | }
46 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/gin-gonic/gin
2 |
3 | go 1.13
4 |
5 | require (
6 | github.com/gin-contrib/sse v0.1.0
7 | github.com/go-playground/validator/v10 v10.2.0
8 | github.com/golang/protobuf v1.3.3
9 | github.com/json-iterator/go v1.1.9
10 | github.com/mattn/go-isatty v0.0.12
11 | github.com/stretchr/testify v1.4.0
12 | github.com/ugorji/go/codec v1.1.7
13 | gopkg.in/yaml.v2 v2.2.8
14 | )
15 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/internal/bytesconv/bytesconv.go:
--------------------------------------------------------------------------------
1 | package bytesconv
2 |
3 | import (
4 | "reflect"
5 | "unsafe"
6 | )
7 |
8 | // StringToBytes converts string to byte slice without a memory allocation.
9 | func StringToBytes(s string) (b []byte) {
10 | sh := *(*reflect.StringHeader)(unsafe.Pointer(&s))
11 | bh := (*reflect.SliceHeader)(unsafe.Pointer(&b))
12 | bh.Data, bh.Len, bh.Cap = sh.Data, sh.Len, sh.Len
13 | return b
14 | }
15 |
16 | // BytesToString converts byte slice to string without a memory allocation.
17 | func BytesToString(b []byte) string {
18 | return *(*string)(unsafe.Pointer(&b))
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/internal/json/json.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Bo-Yi Wu. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !jsoniter
6 |
7 | package json
8 |
9 | import "encoding/json"
10 |
11 | var (
12 | // Marshal is exported by gin/json package.
13 | Marshal = json.Marshal
14 | // Unmarshal is exported by gin/json package.
15 | Unmarshal = json.Unmarshal
16 | // MarshalIndent is exported by gin/json package.
17 | MarshalIndent = json.MarshalIndent
18 | // NewDecoder is exported by gin/json package.
19 | NewDecoder = json.NewDecoder
20 | // NewEncoder is exported by gin/json package.
21 | NewEncoder = json.NewEncoder
22 | )
23 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Bo-Yi Wu. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build jsoniter
6 |
7 | package json
8 |
9 | import "github.com/json-iterator/go"
10 |
11 | var (
12 | json = jsoniter.ConfigCompatibleWithStandardLibrary
13 | // Marshal is exported by gin/json package.
14 | Marshal = json.Marshal
15 | // Unmarshal is exported by gin/json package.
16 | Unmarshal = json.Unmarshal
17 | // MarshalIndent is exported by gin/json package.
18 | MarshalIndent = json.MarshalIndent
19 | // NewDecoder is exported by gin/json package.
20 | NewDecoder = json.NewDecoder
21 | // NewEncoder is exported by gin/json package.
22 | NewEncoder = json.NewEncoder
23 | )
24 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/data.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import "net/http"
8 |
9 | // Data contains ContentType and bytes data.
10 | type Data struct {
11 | ContentType string
12 | Data []byte
13 | }
14 |
15 | // Render (Data) writes data with custom ContentType.
16 | func (r Data) Render(w http.ResponseWriter) (err error) {
17 | r.WriteContentType(w)
18 | _, err = w.Write(r.Data)
19 | return
20 | }
21 |
22 | // WriteContentType (Data) writes custom ContentType.
23 | func (r Data) WriteContentType(w http.ResponseWriter) {
24 | writeContentType(w, []string{r.ContentType})
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/msgpack.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !nomsgpack
6 |
7 | package render
8 |
9 | import (
10 | "net/http"
11 |
12 | "github.com/ugorji/go/codec"
13 | )
14 |
15 | var (
16 | _ Render = MsgPack{}
17 | )
18 |
19 | // MsgPack contains the given interface object.
20 | type MsgPack struct {
21 | Data interface{}
22 | }
23 |
24 | var msgpackContentType = []string{"application/msgpack; charset=utf-8"}
25 |
26 | // WriteContentType (MsgPack) writes MsgPack ContentType.
27 | func (r MsgPack) WriteContentType(w http.ResponseWriter) {
28 | writeContentType(w, msgpackContentType)
29 | }
30 |
31 | // Render (MsgPack) encodes the given interface object and writes data with custom ContentType.
32 | func (r MsgPack) Render(w http.ResponseWriter) error {
33 | return WriteMsgPack(w, r.Data)
34 | }
35 |
36 | // WriteMsgPack writes MsgPack ContentType and encodes the given interface object.
37 | func WriteMsgPack(w http.ResponseWriter, obj interface{}) error {
38 | writeContentType(w, msgpackContentType)
39 | var mh codec.MsgpackHandle
40 | return codec.NewEncoder(w, &mh).Encode(obj)
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/protobuf.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Gin Core Team. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import (
8 | "net/http"
9 |
10 | "github.com/golang/protobuf/proto"
11 | )
12 |
13 | // ProtoBuf contains the given interface object.
14 | type ProtoBuf struct {
15 | Data interface{}
16 | }
17 |
18 | var protobufContentType = []string{"application/x-protobuf"}
19 |
20 | // Render (ProtoBuf) marshals the given interface object and writes data with custom ContentType.
21 | func (r ProtoBuf) Render(w http.ResponseWriter) error {
22 | r.WriteContentType(w)
23 |
24 | bytes, err := proto.Marshal(r.Data.(proto.Message))
25 | if err != nil {
26 | return err
27 | }
28 |
29 | _, err = w.Write(bytes)
30 | return err
31 | }
32 |
33 | // WriteContentType (ProtoBuf) writes ProtoBuf ContentType.
34 | func (r ProtoBuf) WriteContentType(w http.ResponseWriter) {
35 | writeContentType(w, protobufContentType)
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/reader.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Gin Core Team. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import (
8 | "io"
9 | "net/http"
10 | "strconv"
11 | )
12 |
13 | // Reader contains the IO reader and its length, and custom ContentType and other headers.
14 | type Reader struct {
15 | ContentType string
16 | ContentLength int64
17 | Reader io.Reader
18 | Headers map[string]string
19 | }
20 |
21 | // Render (Reader) writes data with custom ContentType and headers.
22 | func (r Reader) Render(w http.ResponseWriter) (err error) {
23 | r.WriteContentType(w)
24 | if r.ContentLength >= 0 {
25 | if r.Headers == nil {
26 | r.Headers = map[string]string{}
27 | }
28 | r.Headers["Content-Length"] = strconv.FormatInt(r.ContentLength, 10)
29 | }
30 | r.writeHeaders(w, r.Headers)
31 | _, err = io.Copy(w, r.Reader)
32 | return
33 | }
34 |
35 | // WriteContentType (Reader) writes custom ContentType.
36 | func (r Reader) WriteContentType(w http.ResponseWriter) {
37 | writeContentType(w, []string{r.ContentType})
38 | }
39 |
40 | // writeHeaders writes custom Header.
41 | func (r Reader) writeHeaders(w http.ResponseWriter, headers map[string]string) {
42 | header := w.Header()
43 | for k, v := range headers {
44 | if header.Get(k) == "" {
45 | header.Set(k, v)
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/redirect.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import (
8 | "fmt"
9 | "net/http"
10 | )
11 |
12 | // Redirect contains the http request reference and redirects status code and location.
13 | type Redirect struct {
14 | Code int
15 | Request *http.Request
16 | Location string
17 | }
18 |
19 | // Render (Redirect) redirects the http request to new location and writes redirect response.
20 | func (r Redirect) Render(w http.ResponseWriter) error {
21 | if (r.Code < http.StatusMultipleChoices || r.Code > http.StatusPermanentRedirect) && r.Code != http.StatusCreated {
22 | panic(fmt.Sprintf("Cannot redirect with status code %d", r.Code))
23 | }
24 | http.Redirect(w, r.Request, r.Location, r.Code)
25 | return nil
26 | }
27 |
28 | // WriteContentType (Redirect) don't write any ContentType.
29 | func (r Redirect) WriteContentType(http.ResponseWriter) {}
30 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/render.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import "net/http"
8 |
9 | // Render interface is to be implemented by JSON, XML, HTML, YAML and so on.
10 | type Render interface {
11 | // Render writes data with custom ContentType.
12 | Render(http.ResponseWriter) error
13 | // WriteContentType writes custom ContentType.
14 | WriteContentType(w http.ResponseWriter)
15 | }
16 |
17 | var (
18 | _ Render = JSON{}
19 | _ Render = IndentedJSON{}
20 | _ Render = SecureJSON{}
21 | _ Render = JsonpJSON{}
22 | _ Render = XML{}
23 | _ Render = String{}
24 | _ Render = Redirect{}
25 | _ Render = Data{}
26 | _ Render = HTML{}
27 | _ HTMLRender = HTMLDebug{}
28 | _ HTMLRender = HTMLProduction{}
29 | _ Render = YAML{}
30 | _ Render = Reader{}
31 | _ Render = AsciiJSON{}
32 | _ Render = ProtoBuf{}
33 | )
34 |
35 | func writeContentType(w http.ResponseWriter, value []string) {
36 | header := w.Header()
37 | if val := header["Content-Type"]; len(val) == 0 {
38 | header["Content-Type"] = value
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/text.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import (
8 | "fmt"
9 | "io"
10 | "net/http"
11 | )
12 |
13 | // String contains the given interface object slice and its format.
14 | type String struct {
15 | Format string
16 | Data []interface{}
17 | }
18 |
19 | var plainContentType = []string{"text/plain; charset=utf-8"}
20 |
21 | // Render (String) writes data with custom ContentType.
22 | func (r String) Render(w http.ResponseWriter) error {
23 | return WriteString(w, r.Format, r.Data)
24 | }
25 |
26 | // WriteContentType (String) writes Plain ContentType.
27 | func (r String) WriteContentType(w http.ResponseWriter) {
28 | writeContentType(w, plainContentType)
29 | }
30 |
31 | // WriteString writes data according to its format and write custom ContentType.
32 | func WriteString(w http.ResponseWriter, format string, data []interface{}) (err error) {
33 | writeContentType(w, plainContentType)
34 | if len(data) > 0 {
35 | _, err = fmt.Fprintf(w, format, data...)
36 | return
37 | }
38 | _, err = io.WriteString(w, format)
39 | return
40 | }
41 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/xml.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import (
8 | "encoding/xml"
9 | "net/http"
10 | )
11 |
12 | // XML contains the given interface object.
13 | type XML struct {
14 | Data interface{}
15 | }
16 |
17 | var xmlContentType = []string{"application/xml; charset=utf-8"}
18 |
19 | // Render (XML) encodes the given interface object and writes data with custom ContentType.
20 | func (r XML) Render(w http.ResponseWriter) error {
21 | r.WriteContentType(w)
22 | return xml.NewEncoder(w).Encode(r.Data)
23 | }
24 |
25 | // WriteContentType (XML) writes XML ContentType for response.
26 | func (r XML) WriteContentType(w http.ResponseWriter) {
27 | writeContentType(w, xmlContentType)
28 | }
29 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/render/yaml.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package render
6 |
7 | import (
8 | "net/http"
9 |
10 | "gopkg.in/yaml.v2"
11 | )
12 |
13 | // YAML contains the given interface object.
14 | type YAML struct {
15 | Data interface{}
16 | }
17 |
18 | var yamlContentType = []string{"application/x-yaml; charset=utf-8"}
19 |
20 | // Render (YAML) marshals the given interface object and writes data with custom ContentType.
21 | func (r YAML) Render(w http.ResponseWriter) error {
22 | r.WriteContentType(w)
23 |
24 | bytes, err := yaml.Marshal(r.Data)
25 | if err != nil {
26 | return err
27 | }
28 |
29 | _, err = w.Write(bytes)
30 | return err
31 | }
32 |
33 | // WriteContentType (YAML) writes YAML ContentType for response.
34 | func (r YAML) WriteContentType(w http.ResponseWriter) {
35 | writeContentType(w, yamlContentType)
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/test_helpers.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package gin
6 |
7 | import "net/http"
8 |
9 | // CreateTestContext returns a fresh engine and context for testing purposes
10 | func CreateTestContext(w http.ResponseWriter) (c *Context, r *Engine) {
11 | r = New()
12 | c = r.allocateContext()
13 | c.reset()
14 | c.writermem.reset(w)
15 | return
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/github.com/gin-gonic/gin/version.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 Gin Core Team. All rights reserved.
2 | // Use of this source code is governed by a MIT style
3 | // license that can be found in the LICENSE file.
4 |
5 | package gin
6 |
7 | // Version is the current gin framework's version.
8 | const Version = "v1.6.3"
9 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/locales/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/locales/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.13.1
4 | - tip
5 | matrix:
6 | allow_failures:
7 | - go: tip
8 |
9 | notifications:
10 | email:
11 | recipients: dean.karn@gmail.com
12 | on_success: change
13 | on_failure: always
14 |
15 | before_install:
16 | - go install github.com/mattn/goveralls
17 |
18 | # Only clone the most recent commit.
19 | git:
20 | depth: 1
21 |
22 | script:
23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./...
24 |
25 | after_success: |
26 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/locales/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Go Playground
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/locales/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/go-playground/locales
2 |
3 | go 1.13
4 |
5 | require golang.org/x/text v0.3.2
6 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/locales/go.sum:
--------------------------------------------------------------------------------
1 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
2 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
3 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
4 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/locales/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/go-playground/locales/logo.png
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/universal-translator/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 | *.coverprofile
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/universal-translator/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.13.4
4 | - tip
5 | matrix:
6 | allow_failures:
7 | - go: tip
8 |
9 | notifications:
10 | email:
11 | recipients: dean.karn@gmail.com
12 | on_success: change
13 | on_failure: always
14 |
15 | before_install:
16 | - go install github.com/mattn/goveralls
17 |
18 | # Only clone the most recent commit.
19 | git:
20 | depth: 1
21 |
22 | script:
23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./...
24 |
25 | after_success: |
26 | [ $TRAVIS_GO_VERSION = 1.13.4 ] &&
27 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/universal-translator/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Go Playground
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/universal-translator/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/go-playground/universal-translator
2 |
3 | go 1.13
4 |
5 | require github.com/go-playground/locales v0.13.0
6 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/universal-translator/go.sum:
--------------------------------------------------------------------------------
1 | github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q=
2 | github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
3 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
4 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
5 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/universal-translator/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/go-playground/universal-translator/logo.png
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/validator/v10/.gitignore:
--------------------------------------------------------------------------------
1 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
2 | *.o
3 | *.a
4 | *.so
5 |
6 | # Folders
7 | _obj
8 | _test
9 |
10 | # Architecture specific extensions/prefixes
11 | *.[568vq]
12 | [568vq].out
13 |
14 | *.cgo1.go
15 | *.cgo2.c
16 | _cgo_defun.c
17 | _cgo_gotypes.go
18 | _cgo_export.*
19 |
20 | _testmain.go
21 |
22 | *.exe
23 | *.test
24 | *.prof
25 | *.test
26 | *.out
27 | *.txt
28 | cover.html
29 | README.html
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/validator/v10/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | go:
3 | - 1.13.4
4 | - tip
5 | matrix:
6 | allow_failures:
7 | - go: tip
8 |
9 | notifications:
10 | email:
11 | recipients: dean.karn@gmail.com
12 | on_success: change
13 | on_failure: always
14 |
15 | before_install:
16 | - go install github.com/mattn/goveralls
17 | - mkdir -p $GOPATH/src/gopkg.in
18 | - ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/validator.v9
19 |
20 | # Only clone the most recent commit.
21 | git:
22 | depth: 1
23 |
24 | script:
25 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./...
26 |
27 | after_success: |
28 | [ $TRAVIS_GO_VERSION = 1.13.4 ] &&
29 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/validator/v10/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Dean Karn
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/validator/v10/Makefile:
--------------------------------------------------------------------------------
1 | GOCMD=GO111MODULE=on go
2 |
3 | linters-install:
4 | @golangci-lint --version >/dev/null 2>&1 || { \
5 | echo "installing linting tools..."; \
6 | curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \
7 | }
8 |
9 | lint: linters-install
10 | $(PWD)/bin/golangci-lint run
11 |
12 | test:
13 | $(GOCMD) test -cover -race ./...
14 |
15 | bench:
16 | $(GOCMD) test -bench=. -benchmem ./...
17 |
18 | .PHONY: test lint linters-install
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/validator/v10/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/go-playground/validator/v10
2 |
3 | go 1.13
4 |
5 | require (
6 | github.com/go-playground/assert/v2 v2.0.1
7 | github.com/go-playground/locales v0.13.0
8 | github.com/go-playground/universal-translator v0.17.0
9 | github.com/leodido/go-urn v1.2.0
10 | )
11 |
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/validator/v10/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/go-playground/validator/v10/logo.png
--------------------------------------------------------------------------------
/vendor/github.com/go-playground/validator/v10/translations.go:
--------------------------------------------------------------------------------
1 | package validator
2 |
3 | import ut "github.com/go-playground/universal-translator"
4 |
5 | // TranslationFunc is the function type used to register or override
6 | // custom translations
7 | type TranslationFunc func(ut ut.Translator, fe FieldError) string
8 |
9 | // RegisterTranslationsFunc allows for registering of translations
10 | // for a 'ut.Translator' for use within the 'TranslationFunc'
11 | type RegisterTranslationsFunc func(ut ut.Translator) error
12 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/protobuf/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/protobuf/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/github.com/golang/protobuf/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2010 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
29 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/.codecov.yml:
--------------------------------------------------------------------------------
1 | ignore:
2 | - "output_tests/.*"
3 |
4 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | /bug_test.go
3 | /coverage.txt
4 | /.idea
5 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.8.x
5 | - 1.x
6 |
7 | before_install:
8 | - go get -t -v ./...
9 |
10 | script:
11 | - ./test.sh
12 |
13 | after_success:
14 | - bash <(curl -s https://codecov.io/bash)
15 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/Gopkg.lock:
--------------------------------------------------------------------------------
1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
2 |
3 |
4 | [[projects]]
5 | name = "github.com/modern-go/concurrent"
6 | packages = ["."]
7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a"
8 | version = "1.0.0"
9 |
10 | [[projects]]
11 | name = "github.com/modern-go/reflect2"
12 | packages = ["."]
13 | revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd"
14 | version = "1.0.1"
15 |
16 | [solve-meta]
17 | analyzer-name = "dep"
18 | analyzer-version = 1
19 | inputs-digest = "ea54a775e5a354cb015502d2e7aa4b74230fc77e894f34a838b268c25ec8eeb8"
20 | solver-name = "gps-cdcl"
21 | solver-version = 1
22 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/Gopkg.toml:
--------------------------------------------------------------------------------
1 | # Gopkg.toml example
2 | #
3 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
4 | # for detailed Gopkg.toml documentation.
5 | #
6 | # required = ["github.com/user/thing/cmd/thing"]
7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8 | #
9 | # [[constraint]]
10 | # name = "github.com/user/project"
11 | # version = "1.0.0"
12 | #
13 | # [[constraint]]
14 | # name = "github.com/user/project2"
15 | # branch = "dev"
16 | # source = "github.com/myfork/project2"
17 | #
18 | # [[override]]
19 | # name = "github.com/x/y"
20 | # version = "2.4.0"
21 |
22 | ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"]
23 |
24 | [[constraint]]
25 | name = "github.com/modern-go/reflect2"
26 | version = "1.0.1"
27 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 json-iterator
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/any_int32.go:
--------------------------------------------------------------------------------
1 | package jsoniter
2 |
3 | import (
4 | "strconv"
5 | )
6 |
7 | type int32Any struct {
8 | baseAny
9 | val int32
10 | }
11 |
12 | func (any *int32Any) LastError() error {
13 | return nil
14 | }
15 |
16 | func (any *int32Any) ValueType() ValueType {
17 | return NumberValue
18 | }
19 |
20 | func (any *int32Any) MustBeValid() Any {
21 | return any
22 | }
23 |
24 | func (any *int32Any) ToBool() bool {
25 | return any.val != 0
26 | }
27 |
28 | func (any *int32Any) ToInt() int {
29 | return int(any.val)
30 | }
31 |
32 | func (any *int32Any) ToInt32() int32 {
33 | return any.val
34 | }
35 |
36 | func (any *int32Any) ToInt64() int64 {
37 | return int64(any.val)
38 | }
39 |
40 | func (any *int32Any) ToUint() uint {
41 | return uint(any.val)
42 | }
43 |
44 | func (any *int32Any) ToUint32() uint32 {
45 | return uint32(any.val)
46 | }
47 |
48 | func (any *int32Any) ToUint64() uint64 {
49 | return uint64(any.val)
50 | }
51 |
52 | func (any *int32Any) ToFloat32() float32 {
53 | return float32(any.val)
54 | }
55 |
56 | func (any *int32Any) ToFloat64() float64 {
57 | return float64(any.val)
58 | }
59 |
60 | func (any *int32Any) ToString() string {
61 | return strconv.FormatInt(int64(any.val), 10)
62 | }
63 |
64 | func (any *int32Any) WriteTo(stream *Stream) {
65 | stream.WriteInt32(any.val)
66 | }
67 |
68 | func (any *int32Any) Parse() *Iterator {
69 | return nil
70 | }
71 |
72 | func (any *int32Any) GetInterface() interface{} {
73 | return any.val
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/any_int64.go:
--------------------------------------------------------------------------------
1 | package jsoniter
2 |
3 | import (
4 | "strconv"
5 | )
6 |
7 | type int64Any struct {
8 | baseAny
9 | val int64
10 | }
11 |
12 | func (any *int64Any) LastError() error {
13 | return nil
14 | }
15 |
16 | func (any *int64Any) ValueType() ValueType {
17 | return NumberValue
18 | }
19 |
20 | func (any *int64Any) MustBeValid() Any {
21 | return any
22 | }
23 |
24 | func (any *int64Any) ToBool() bool {
25 | return any.val != 0
26 | }
27 |
28 | func (any *int64Any) ToInt() int {
29 | return int(any.val)
30 | }
31 |
32 | func (any *int64Any) ToInt32() int32 {
33 | return int32(any.val)
34 | }
35 |
36 | func (any *int64Any) ToInt64() int64 {
37 | return any.val
38 | }
39 |
40 | func (any *int64Any) ToUint() uint {
41 | return uint(any.val)
42 | }
43 |
44 | func (any *int64Any) ToUint32() uint32 {
45 | return uint32(any.val)
46 | }
47 |
48 | func (any *int64Any) ToUint64() uint64 {
49 | return uint64(any.val)
50 | }
51 |
52 | func (any *int64Any) ToFloat32() float32 {
53 | return float32(any.val)
54 | }
55 |
56 | func (any *int64Any) ToFloat64() float64 {
57 | return float64(any.val)
58 | }
59 |
60 | func (any *int64Any) ToString() string {
61 | return strconv.FormatInt(any.val, 10)
62 | }
63 |
64 | func (any *int64Any) WriteTo(stream *Stream) {
65 | stream.WriteInt64(any.val)
66 | }
67 |
68 | func (any *int64Any) Parse() *Iterator {
69 | return nil
70 | }
71 |
72 | func (any *int64Any) GetInterface() interface{} {
73 | return any.val
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/any_nil.go:
--------------------------------------------------------------------------------
1 | package jsoniter
2 |
3 | type nilAny struct {
4 | baseAny
5 | }
6 |
7 | func (any *nilAny) LastError() error {
8 | return nil
9 | }
10 |
11 | func (any *nilAny) ValueType() ValueType {
12 | return NilValue
13 | }
14 |
15 | func (any *nilAny) MustBeValid() Any {
16 | return any
17 | }
18 |
19 | func (any *nilAny) ToBool() bool {
20 | return false
21 | }
22 |
23 | func (any *nilAny) ToInt() int {
24 | return 0
25 | }
26 |
27 | func (any *nilAny) ToInt32() int32 {
28 | return 0
29 | }
30 |
31 | func (any *nilAny) ToInt64() int64 {
32 | return 0
33 | }
34 |
35 | func (any *nilAny) ToUint() uint {
36 | return 0
37 | }
38 |
39 | func (any *nilAny) ToUint32() uint32 {
40 | return 0
41 | }
42 |
43 | func (any *nilAny) ToUint64() uint64 {
44 | return 0
45 | }
46 |
47 | func (any *nilAny) ToFloat32() float32 {
48 | return 0
49 | }
50 |
51 | func (any *nilAny) ToFloat64() float64 {
52 | return 0
53 | }
54 |
55 | func (any *nilAny) ToString() string {
56 | return ""
57 | }
58 |
59 | func (any *nilAny) WriteTo(stream *Stream) {
60 | stream.WriteNil()
61 | }
62 |
63 | func (any *nilAny) Parse() *Iterator {
64 | return nil
65 | }
66 |
67 | func (any *nilAny) GetInterface() interface{} {
68 | return nil
69 | }
70 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/any_uint32.go:
--------------------------------------------------------------------------------
1 | package jsoniter
2 |
3 | import (
4 | "strconv"
5 | )
6 |
7 | type uint32Any struct {
8 | baseAny
9 | val uint32
10 | }
11 |
12 | func (any *uint32Any) LastError() error {
13 | return nil
14 | }
15 |
16 | func (any *uint32Any) ValueType() ValueType {
17 | return NumberValue
18 | }
19 |
20 | func (any *uint32Any) MustBeValid() Any {
21 | return any
22 | }
23 |
24 | func (any *uint32Any) ToBool() bool {
25 | return any.val != 0
26 | }
27 |
28 | func (any *uint32Any) ToInt() int {
29 | return int(any.val)
30 | }
31 |
32 | func (any *uint32Any) ToInt32() int32 {
33 | return int32(any.val)
34 | }
35 |
36 | func (any *uint32Any) ToInt64() int64 {
37 | return int64(any.val)
38 | }
39 |
40 | func (any *uint32Any) ToUint() uint {
41 | return uint(any.val)
42 | }
43 |
44 | func (any *uint32Any) ToUint32() uint32 {
45 | return any.val
46 | }
47 |
48 | func (any *uint32Any) ToUint64() uint64 {
49 | return uint64(any.val)
50 | }
51 |
52 | func (any *uint32Any) ToFloat32() float32 {
53 | return float32(any.val)
54 | }
55 |
56 | func (any *uint32Any) ToFloat64() float64 {
57 | return float64(any.val)
58 | }
59 |
60 | func (any *uint32Any) ToString() string {
61 | return strconv.FormatInt(int64(any.val), 10)
62 | }
63 |
64 | func (any *uint32Any) WriteTo(stream *Stream) {
65 | stream.WriteUint32(any.val)
66 | }
67 |
68 | func (any *uint32Any) Parse() *Iterator {
69 | return nil
70 | }
71 |
72 | func (any *uint32Any) GetInterface() interface{} {
73 | return any.val
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/any_uint64.go:
--------------------------------------------------------------------------------
1 | package jsoniter
2 |
3 | import (
4 | "strconv"
5 | )
6 |
7 | type uint64Any struct {
8 | baseAny
9 | val uint64
10 | }
11 |
12 | func (any *uint64Any) LastError() error {
13 | return nil
14 | }
15 |
16 | func (any *uint64Any) ValueType() ValueType {
17 | return NumberValue
18 | }
19 |
20 | func (any *uint64Any) MustBeValid() Any {
21 | return any
22 | }
23 |
24 | func (any *uint64Any) ToBool() bool {
25 | return any.val != 0
26 | }
27 |
28 | func (any *uint64Any) ToInt() int {
29 | return int(any.val)
30 | }
31 |
32 | func (any *uint64Any) ToInt32() int32 {
33 | return int32(any.val)
34 | }
35 |
36 | func (any *uint64Any) ToInt64() int64 {
37 | return int64(any.val)
38 | }
39 |
40 | func (any *uint64Any) ToUint() uint {
41 | return uint(any.val)
42 | }
43 |
44 | func (any *uint64Any) ToUint32() uint32 {
45 | return uint32(any.val)
46 | }
47 |
48 | func (any *uint64Any) ToUint64() uint64 {
49 | return any.val
50 | }
51 |
52 | func (any *uint64Any) ToFloat32() float32 {
53 | return float32(any.val)
54 | }
55 |
56 | func (any *uint64Any) ToFloat64() float64 {
57 | return float64(any.val)
58 | }
59 |
60 | func (any *uint64Any) ToString() string {
61 | return strconv.FormatUint(any.val, 10)
62 | }
63 |
64 | func (any *uint64Any) WriteTo(stream *Stream) {
65 | stream.WriteUint64(any.val)
66 | }
67 |
68 | func (any *uint64Any) Parse() *Iterator {
69 | return nil
70 | }
71 |
72 | func (any *uint64Any) GetInterface() interface{} {
73 | return any.val
74 | }
75 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | set -e
3 | set -x
4 |
5 | if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then
6 | mkdir -p /tmp/build-golang/src/github.com/json-iterator
7 | ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go
8 | fi
9 | export GOPATH=/tmp/build-golang
10 | go get -u github.com/golang/dep/cmd/dep
11 | cd /tmp/build-golang/src/github.com/json-iterator/go
12 | exec $GOPATH/bin/dep ensure -update
13 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/fuzzy_mode_convert_table.md:
--------------------------------------------------------------------------------
1 | | json type \ dest type | bool | int | uint | float |string|
2 | | --- | --- | --- | --- |--|--|
3 | | number | positive => true
negative => true
zero => false| 23.2 => 23
-32.1 => -32| 12.1 => 12
-12.1 => 0|as normal|same as origin|
4 | | string | empty string => false
string "0" => false
other strings => true | "123.32" => 123
"-123.4" => -123
"123.23xxxw" => 123
"abcde12" => 0
"-32.1" => -32| 13.2 => 13
-1.1 => 0 |12.1 => 12.1
-12.3 => -12.3
12.4xxa => 12.4
+1.1e2 =>110 |same as origin|
5 | | bool | true => true
false => false| true => 1
false => 0 | true => 1
false => 0 |true => 1
false => 0|true => "true"
false => "false"|
6 | | object | true | 0 | 0 |0|originnal json|
7 | | array | empty array => false
nonempty array => true| [] => 0
[1,2] => 1 | [] => 0
[1,2] => 1 |[] => 0
[1,2] => 1|original json|
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/json-iterator/go
2 |
3 | go 1.12
4 |
5 | require (
6 | github.com/davecgh/go-spew v1.1.1
7 | github.com/google/gofuzz v1.0.0
8 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
9 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742
10 | github.com/stretchr/testify v1.3.0
11 | )
12 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/go.sum:
--------------------------------------------------------------------------------
1 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
3 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4 | github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
5 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
6 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc=
7 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
8 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 h1:Esafd1046DLDQ0W1YjYsBW+p8U2u7vzgW2SQVmlNazg=
9 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
10 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
11 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
12 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
13 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
14 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
15 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/jsoniter.go:
--------------------------------------------------------------------------------
1 | // Package jsoniter implements encoding and decoding of JSON as defined in
2 | // RFC 4627 and provides interfaces with identical syntax of standard lib encoding/json.
3 | // Converting from encoding/json to jsoniter is no more than replacing the package with jsoniter
4 | // and variable type declarations (if any).
5 | // jsoniter interfaces gives 100% compatibility with code using standard lib.
6 | //
7 | // "JSON and Go"
8 | // (https://golang.org/doc/articles/json_and_go.html)
9 | // gives a description of how Marshal/Unmarshal operate
10 | // between arbitrary or predefined json objects and bytes,
11 | // and it applies to jsoniter.Marshal/Unmarshal as well.
12 | //
13 | // Besides, jsoniter.Iterator provides a different set of interfaces
14 | // iterating given bytes/string/reader
15 | // and yielding parsed elements one by one.
16 | // This set of interfaces reads input as required and gives
17 | // better performance.
18 | package jsoniter
19 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/pool.go:
--------------------------------------------------------------------------------
1 | package jsoniter
2 |
3 | import (
4 | "io"
5 | )
6 |
7 | // IteratorPool a thread safe pool of iterators with same configuration
8 | type IteratorPool interface {
9 | BorrowIterator(data []byte) *Iterator
10 | ReturnIterator(iter *Iterator)
11 | }
12 |
13 | // StreamPool a thread safe pool of streams with same configuration
14 | type StreamPool interface {
15 | BorrowStream(writer io.Writer) *Stream
16 | ReturnStream(stream *Stream)
17 | }
18 |
19 | func (cfg *frozenConfig) BorrowStream(writer io.Writer) *Stream {
20 | stream := cfg.streamPool.Get().(*Stream)
21 | stream.Reset(writer)
22 | return stream
23 | }
24 |
25 | func (cfg *frozenConfig) ReturnStream(stream *Stream) {
26 | stream.out = nil
27 | stream.Error = nil
28 | stream.Attachment = nil
29 | cfg.streamPool.Put(stream)
30 | }
31 |
32 | func (cfg *frozenConfig) BorrowIterator(data []byte) *Iterator {
33 | iter := cfg.iteratorPool.Get().(*Iterator)
34 | iter.ResetBytes(data)
35 | return iter
36 | }
37 |
38 | func (cfg *frozenConfig) ReturnIterator(iter *Iterator) {
39 | iter.Error = nil
40 | iter.Attachment = nil
41 | cfg.iteratorPool.Put(iter)
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/github.com/json-iterator/go/test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | echo "" > coverage.txt
5 |
6 | for d in $(go list ./... | grep -v vendor); do
7 | go test -coverprofile=profile.out -coverpkg=github.com/json-iterator/go $d
8 | if [ -f profile.out ]; then
9 | cat profile.out >> coverage.txt
10 | rm profile.out
11 | fi
12 | done
13 |
--------------------------------------------------------------------------------
/vendor/github.com/leodido/go-urn/.gitignore:
--------------------------------------------------------------------------------
1 | *.exe
2 | *.dll
3 | *.so
4 | *.dylib
5 |
6 | *.test
7 |
8 | *.out
9 | *.txt
10 |
11 | vendor/
--------------------------------------------------------------------------------
/vendor/github.com/leodido/go-urn/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.9.x
5 | - 1.10.x
6 | - 1.11.x
7 | - 1.12.x
8 | - 1.13.x
9 | - tip
10 |
11 | before_install:
12 | - go get -t -v ./...
13 |
14 | script:
15 | - go test -race -coverprofile=coverage.txt -covermode=atomic
16 |
17 | after_success:
18 | - bash <(curl -s https://codecov.io/bash)
--------------------------------------------------------------------------------
/vendor/github.com/leodido/go-urn/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Leonardo Di Donato
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/vendor/github.com/leodido/go-urn/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/leodido/go-urn
2 |
3 | go 1.13
4 |
5 | require github.com/stretchr/testify v1.4.0
6 |
--------------------------------------------------------------------------------
/vendor/github.com/leodido/go-urn/go.sum:
--------------------------------------------------------------------------------
1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
6 | github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
7 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
8 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
9 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
10 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
11 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
12 |
--------------------------------------------------------------------------------
/vendor/github.com/leodido/go-urn/makefile:
--------------------------------------------------------------------------------
1 | SHELL := /bin/bash
2 |
3 | build: machine.go
4 |
5 | images: docs/urn.png
6 |
7 | machine.go: machine.go.rl
8 | ragel -Z -G2 -e -o $@ $<
9 | @sed -i '/^\/\/line/d' $@
10 | @$(MAKE) -s file=$@ snake2camel
11 | @gofmt -w -s $@
12 |
13 | docs/urn.dot: machine.go.rl
14 | @mkdir -p docs
15 | ragel -Z -e -Vp $< -o $@
16 |
17 | docs/urn.png: docs/urn.dot
18 | dot $< -Tpng -o $@
19 |
20 | .PHONY: bench
21 | bench: *_test.go machine.go
22 | go test -bench=. -benchmem -benchtime=5s ./...
23 |
24 | .PHONY: tests
25 | tests: *_test.go machine.go
26 | go test -race -timeout 10s -coverprofile=coverage.out -covermode=atomic -v ./...
27 |
28 | .PHONY: clean
29 | clean:
30 | @rm -rf docs
31 | @rm -f machine.go
32 |
33 | .PHONY: snake2camel
34 | snake2camel:
35 | @awk -i inplace '{ \
36 | while ( match($$0, /(.*)([a-z]+[0-9]*)_([a-zA-Z0-9])(.*)/, cap) ) \
37 | $$0 = cap[1] cap[2] toupper(cap[3]) cap[4]; \
38 | print \
39 | }' $(file)
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 | go:
4 | - 1.13.x
5 | - tip
6 |
7 | before_install:
8 | - go get -t -v ./...
9 |
10 | script:
11 | - ./go.test.sh
12 |
13 | after_success:
14 | - bash <(curl -s https://codecov.io/bash)
15 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) Yasuhiro MATSUMOTO
2 |
3 | MIT License (Expat)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/README.md:
--------------------------------------------------------------------------------
1 | # go-isatty
2 |
3 | [](http://godoc.org/github.com/mattn/go-isatty)
4 | [](https://codecov.io/gh/mattn/go-isatty)
5 | [](https://coveralls.io/github/mattn/go-isatty?branch=master)
6 | [](https://goreportcard.com/report/mattn/go-isatty)
7 |
8 | isatty for golang
9 |
10 | ## Usage
11 |
12 | ```go
13 | package main
14 |
15 | import (
16 | "fmt"
17 | "github.com/mattn/go-isatty"
18 | "os"
19 | )
20 |
21 | func main() {
22 | if isatty.IsTerminal(os.Stdout.Fd()) {
23 | fmt.Println("Is Terminal")
24 | } else if isatty.IsCygwinTerminal(os.Stdout.Fd()) {
25 | fmt.Println("Is Cygwin/MSYS2 Terminal")
26 | } else {
27 | fmt.Println("Is Not Terminal")
28 | }
29 | }
30 | ```
31 |
32 | ## Installation
33 |
34 | ```
35 | $ go get github.com/mattn/go-isatty
36 | ```
37 |
38 | ## License
39 |
40 | MIT
41 |
42 | ## Author
43 |
44 | Yasuhiro Matsumoto (a.k.a mattn)
45 |
46 | ## Thanks
47 |
48 | * k-takata: base idea for IsCygwinTerminal
49 |
50 | https://github.com/k-takata/go-iscygpty
51 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/doc.go:
--------------------------------------------------------------------------------
1 | // Package isatty implements interface to isatty
2 | package isatty
3 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/mattn/go-isatty
2 |
3 | go 1.12
4 |
5 | require golang.org/x/sys v0.0.0-20200116001909-b77594299b42
6 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/go.sum:
--------------------------------------------------------------------------------
1 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
2 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
3 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/go.test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | echo "" > coverage.txt
5 |
6 | for d in $(go list ./... | grep -v vendor); do
7 | go test -race -coverprofile=profile.out -covermode=atomic "$d"
8 | if [ -f profile.out ]; then
9 | cat profile.out >> coverage.txt
10 | rm profile.out
11 | fi
12 | done
13 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_bsd.go:
--------------------------------------------------------------------------------
1 | // +build darwin freebsd openbsd netbsd dragonfly
2 | // +build !appengine
3 |
4 | package isatty
5 |
6 | import "golang.org/x/sys/unix"
7 |
8 | // IsTerminal return true if the file descriptor is terminal.
9 | func IsTerminal(fd uintptr) bool {
10 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA)
11 | return err == nil
12 | }
13 |
14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
15 | // terminal. This is also always false on this environment.
16 | func IsCygwinTerminal(fd uintptr) bool {
17 | return false
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_others.go:
--------------------------------------------------------------------------------
1 | // +build appengine js nacl
2 |
3 | package isatty
4 |
5 | // IsTerminal returns true if the file descriptor is terminal which
6 | // is always false on js and appengine classic which is a sandboxed PaaS.
7 | func IsTerminal(fd uintptr) bool {
8 | return false
9 | }
10 |
11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2
12 | // terminal. This is also always false on this environment.
13 | func IsCygwinTerminal(fd uintptr) bool {
14 | return false
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_plan9.go:
--------------------------------------------------------------------------------
1 | // +build plan9
2 |
3 | package isatty
4 |
5 | import (
6 | "syscall"
7 | )
8 |
9 | // IsTerminal returns true if the given file descriptor is a terminal.
10 | func IsTerminal(fd uintptr) bool {
11 | path, err := syscall.Fd2path(int(fd))
12 | if err != nil {
13 | return false
14 | }
15 | return path == "/dev/cons" || path == "/mnt/term/dev/cons"
16 | }
17 |
18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
19 | // terminal. This is also always false on this environment.
20 | func IsCygwinTerminal(fd uintptr) bool {
21 | return false
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_solaris.go:
--------------------------------------------------------------------------------
1 | // +build solaris
2 | // +build !appengine
3 |
4 | package isatty
5 |
6 | import (
7 | "golang.org/x/sys/unix"
8 | )
9 |
10 | // IsTerminal returns true if the given file descriptor is a terminal.
11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
12 | func IsTerminal(fd uintptr) bool {
13 | var termio unix.Termio
14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
15 | return err == nil
16 | }
17 |
18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
19 | // terminal. This is also always false on this environment.
20 | func IsCygwinTerminal(fd uintptr) bool {
21 | return false
22 | }
23 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/isatty_tcgets.go:
--------------------------------------------------------------------------------
1 | // +build linux aix
2 | // +build !appengine
3 |
4 | package isatty
5 |
6 | import "golang.org/x/sys/unix"
7 |
8 | // IsTerminal return true if the file descriptor is terminal.
9 | func IsTerminal(fd uintptr) bool {
10 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS)
11 | return err == nil
12 | }
13 |
14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2
15 | // terminal. This is also always false on this environment.
16 | func IsCygwinTerminal(fd uintptr) bool {
17 | return false
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/github.com/mattn/go-isatty/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "config:base"
4 | ],
5 | "postUpdateOptions": [
6 | "gomodTidy"
7 | ]
8 | }
9 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/concurrent/README.md:
--------------------------------------------------------------------------------
1 | # concurrent
2 | concurrency utilities
3 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/concurrent/executor.go:
--------------------------------------------------------------------------------
1 | package concurrent
2 |
3 | import "context"
4 |
5 | type Executor interface {
6 | Go(handler func(ctx context.Context))
7 | }
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/concurrent/go_above_19.go:
--------------------------------------------------------------------------------
1 | //+build go1.9
2 |
3 | package concurrent
4 |
5 | import "sync"
6 |
7 | type Map struct {
8 | sync.Map
9 | }
10 |
11 | func NewMap() *Map {
12 | return &Map{}
13 | }
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/concurrent/go_below_19.go:
--------------------------------------------------------------------------------
1 | //+build !go1.9
2 |
3 | package concurrent
4 |
5 | import "sync"
6 |
7 | type Map struct {
8 | lock sync.RWMutex
9 | data map[interface{}]interface{}
10 | }
11 |
12 | func NewMap() *Map {
13 | return &Map{
14 | data: make(map[interface{}]interface{}, 32),
15 | }
16 | }
17 |
18 | func (m *Map) Load(key interface{}) (elem interface{}, found bool) {
19 | m.lock.RLock()
20 | elem, found = m.data[key]
21 | m.lock.RUnlock()
22 | return
23 | }
24 |
25 | func (m *Map) Store(key interface{}, elem interface{}) {
26 | m.lock.Lock()
27 | m.data[key] = elem
28 | m.lock.Unlock()
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/.gitignore:
--------------------------------------------------------------------------------
1 | /vendor
2 | /coverage.txt
3 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - 1.8.x
5 | - 1.x
6 |
7 | before_install:
8 | - go get -t -v ./...
9 | - go get -t -v github.com/modern-go/reflect2-tests/...
10 |
11 | script:
12 | - ./test.sh
13 |
14 | after_success:
15 | - bash <(curl -s https://codecov.io/bash)
16 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/Gopkg.lock:
--------------------------------------------------------------------------------
1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
2 |
3 |
4 | [[projects]]
5 | name = "github.com/modern-go/concurrent"
6 | packages = ["."]
7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a"
8 | version = "1.0.0"
9 |
10 | [solve-meta]
11 | analyzer-name = "dep"
12 | analyzer-version = 1
13 | inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7"
14 | solver-name = "gps-cdcl"
15 | solver-version = 1
16 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/Gopkg.toml:
--------------------------------------------------------------------------------
1 | # Gopkg.toml example
2 | #
3 | # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
4 | # for detailed Gopkg.toml documentation.
5 | #
6 | # required = ["github.com/user/thing/cmd/thing"]
7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
8 | #
9 | # [[constraint]]
10 | # name = "github.com/user/project"
11 | # version = "1.0.0"
12 | #
13 | # [[constraint]]
14 | # name = "github.com/user/project2"
15 | # branch = "dev"
16 | # source = "github.com/myfork/project2"
17 | #
18 | # [[override]]
19 | # name = "github.com/x/y"
20 | # version = "2.4.0"
21 | #
22 | # [prune]
23 | # non-go = false
24 | # go-tests = true
25 | # unused-packages = true
26 |
27 | ignored = []
28 |
29 | [[constraint]]
30 | name = "github.com/modern-go/concurrent"
31 | version = "1.0.0"
32 |
33 | [prune]
34 | go-tests = true
35 | unused-packages = true
36 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/go_above_17.go:
--------------------------------------------------------------------------------
1 | //+build go1.7
2 |
3 | package reflect2
4 |
5 | import "unsafe"
6 |
7 | //go:linkname resolveTypeOff reflect.resolveTypeOff
8 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer
9 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/go_above_19.go:
--------------------------------------------------------------------------------
1 | //+build go1.9
2 |
3 | package reflect2
4 |
5 | import (
6 | "unsafe"
7 | )
8 |
9 | //go:linkname makemap reflect.makemap
10 | func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer)
11 |
12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer {
13 | return makemap(rtype, cap)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/go_below_17.go:
--------------------------------------------------------------------------------
1 | //+build !go1.7
2 |
3 | package reflect2
4 |
5 | import "unsafe"
6 |
7 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
8 | return nil
9 | }
10 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/go_below_19.go:
--------------------------------------------------------------------------------
1 | //+build !go1.9
2 |
3 | package reflect2
4 |
5 | import (
6 | "unsafe"
7 | )
8 |
9 | //go:linkname makemap reflect.makemap
10 | func makemap(rtype unsafe.Pointer) (m unsafe.Pointer)
11 |
12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer {
13 | return makemap(rtype)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/reflect2_amd64.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/reflect2_amd64.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/reflect2_kind.go:
--------------------------------------------------------------------------------
1 | package reflect2
2 |
3 | import (
4 | "reflect"
5 | "unsafe"
6 | )
7 |
8 | // DefaultTypeOfKind return the non aliased default type for the kind
9 | func DefaultTypeOfKind(kind reflect.Kind) Type {
10 | return kindTypes[kind]
11 | }
12 |
13 | var kindTypes = map[reflect.Kind]Type{
14 | reflect.Bool: TypeOf(true),
15 | reflect.Uint8: TypeOf(uint8(0)),
16 | reflect.Int8: TypeOf(int8(0)),
17 | reflect.Uint16: TypeOf(uint16(0)),
18 | reflect.Int16: TypeOf(int16(0)),
19 | reflect.Uint32: TypeOf(uint32(0)),
20 | reflect.Int32: TypeOf(int32(0)),
21 | reflect.Uint64: TypeOf(uint64(0)),
22 | reflect.Int64: TypeOf(int64(0)),
23 | reflect.Uint: TypeOf(uint(0)),
24 | reflect.Int: TypeOf(int(0)),
25 | reflect.Float32: TypeOf(float32(0)),
26 | reflect.Float64: TypeOf(float64(0)),
27 | reflect.Uintptr: TypeOf(uintptr(0)),
28 | reflect.String: TypeOf(""),
29 | reflect.UnsafePointer: TypeOf(unsafe.Pointer(nil)),
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_386.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_386.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_arm.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_arm.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_arm64.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_arm64.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/relfect2_s390x.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/modern-go/reflect2/relfect2_s390x.s
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/safe_field.go:
--------------------------------------------------------------------------------
1 | package reflect2
2 |
3 | import (
4 | "reflect"
5 | "unsafe"
6 | )
7 |
8 | type safeField struct {
9 | reflect.StructField
10 | }
11 |
12 | func (field *safeField) Offset() uintptr {
13 | return field.StructField.Offset
14 | }
15 |
16 | func (field *safeField) Name() string {
17 | return field.StructField.Name
18 | }
19 |
20 | func (field *safeField) PkgPath() string {
21 | return field.StructField.PkgPath
22 | }
23 |
24 | func (field *safeField) Type() Type {
25 | panic("not implemented")
26 | }
27 |
28 | func (field *safeField) Tag() reflect.StructTag {
29 | return field.StructField.Tag
30 | }
31 |
32 | func (field *safeField) Index() []int {
33 | return field.StructField.Index
34 | }
35 |
36 | func (field *safeField) Anonymous() bool {
37 | return field.StructField.Anonymous
38 | }
39 |
40 | func (field *safeField) Set(obj interface{}, value interface{}) {
41 | val := reflect.ValueOf(obj).Elem()
42 | val.FieldByIndex(field.Index()).Set(reflect.ValueOf(value).Elem())
43 | }
44 |
45 | func (field *safeField) UnsafeSet(obj unsafe.Pointer, value unsafe.Pointer) {
46 | panic("unsafe operation is not supported")
47 | }
48 |
49 | func (field *safeField) Get(obj interface{}) interface{} {
50 | val := reflect.ValueOf(obj).Elem().FieldByIndex(field.Index())
51 | ptr := reflect.New(val.Type())
52 | ptr.Elem().Set(val)
53 | return ptr.Interface()
54 | }
55 |
56 | func (field *safeField) UnsafeGet(obj unsafe.Pointer) unsafe.Pointer {
57 | panic("does not support unsafe operation")
58 | }
59 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/safe_struct.go:
--------------------------------------------------------------------------------
1 | package reflect2
2 |
3 | type safeStructType struct {
4 | safeType
5 | }
6 |
7 | func (type2 *safeStructType) FieldByName(name string) StructField {
8 | field, found := type2.Type.FieldByName(name)
9 | if !found {
10 | panic("field " + name + " not found")
11 | }
12 | return &safeField{StructField: field}
13 | }
14 |
15 | func (type2 *safeStructType) Field(i int) StructField {
16 | return &safeField{StructField: type2.Type.Field(i)}
17 | }
18 |
19 | func (type2 *safeStructType) FieldByIndex(index []int) StructField {
20 | return &safeField{StructField: type2.Type.FieldByIndex(index)}
21 | }
22 |
23 | func (type2 *safeStructType) FieldByNameFunc(match func(string) bool) StructField {
24 | field, found := type2.Type.FieldByNameFunc(match)
25 | if !found {
26 | panic("field match condition not found in " + type2.Type.String())
27 | }
28 | return &safeField{StructField: field}
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/test.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | echo "" > coverage.txt
5 |
6 | for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do
7 | go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d
8 | if [ -f profile.out ]; then
9 | cat profile.out >> coverage.txt
10 | rm profile.out
11 | fi
12 | done
13 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/unsafe_eface.go:
--------------------------------------------------------------------------------
1 | package reflect2
2 |
3 | import (
4 | "reflect"
5 | "unsafe"
6 | )
7 |
8 | type eface struct {
9 | rtype unsafe.Pointer
10 | data unsafe.Pointer
11 | }
12 |
13 | func unpackEFace(obj interface{}) *eface {
14 | return (*eface)(unsafe.Pointer(&obj))
15 | }
16 |
17 | func packEFace(rtype unsafe.Pointer, data unsafe.Pointer) interface{} {
18 | var i interface{}
19 | e := (*eface)(unsafe.Pointer(&i))
20 | e.rtype = rtype
21 | e.data = data
22 | return i
23 | }
24 |
25 | type UnsafeEFaceType struct {
26 | unsafeType
27 | }
28 |
29 | func newUnsafeEFaceType(cfg *frozenConfig, type1 reflect.Type) *UnsafeEFaceType {
30 | return &UnsafeEFaceType{
31 | unsafeType: *newUnsafeType(cfg, type1),
32 | }
33 | }
34 |
35 | func (type2 *UnsafeEFaceType) IsNil(obj interface{}) bool {
36 | if obj == nil {
37 | return true
38 | }
39 | objEFace := unpackEFace(obj)
40 | assertType("Type.IsNil argument 1", type2.ptrRType, objEFace.rtype)
41 | return type2.UnsafeIsNil(objEFace.data)
42 | }
43 |
44 | func (type2 *UnsafeEFaceType) UnsafeIsNil(ptr unsafe.Pointer) bool {
45 | if ptr == nil {
46 | return true
47 | }
48 | return unpackEFace(*(*interface{})(ptr)).data == nil
49 | }
50 |
51 | func (type2 *UnsafeEFaceType) Indirect(obj interface{}) interface{} {
52 | objEFace := unpackEFace(obj)
53 | assertType("Type.Indirect argument 1", type2.ptrRType, objEFace.rtype)
54 | return type2.UnsafeIndirect(objEFace.data)
55 | }
56 |
57 | func (type2 *UnsafeEFaceType) UnsafeIndirect(ptr unsafe.Pointer) interface{} {
58 | return *(*interface{})(ptr)
59 | }
60 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/unsafe_iface.go:
--------------------------------------------------------------------------------
1 | package reflect2
2 |
3 | import (
4 | "reflect"
5 | "unsafe"
6 | )
7 |
8 | type iface struct {
9 | itab *itab
10 | data unsafe.Pointer
11 | }
12 |
13 | type itab struct {
14 | ignore unsafe.Pointer
15 | rtype unsafe.Pointer
16 | }
17 |
18 | func IFaceToEFace(ptr unsafe.Pointer) interface{} {
19 | iface := (*iface)(ptr)
20 | if iface.itab == nil {
21 | return nil
22 | }
23 | return packEFace(iface.itab.rtype, iface.data)
24 | }
25 |
26 | type UnsafeIFaceType struct {
27 | unsafeType
28 | }
29 |
30 | func newUnsafeIFaceType(cfg *frozenConfig, type1 reflect.Type) *UnsafeIFaceType {
31 | return &UnsafeIFaceType{
32 | unsafeType: *newUnsafeType(cfg, type1),
33 | }
34 | }
35 |
36 | func (type2 *UnsafeIFaceType) Indirect(obj interface{}) interface{} {
37 | objEFace := unpackEFace(obj)
38 | assertType("Type.Indirect argument 1", type2.ptrRType, objEFace.rtype)
39 | return type2.UnsafeIndirect(objEFace.data)
40 | }
41 |
42 | func (type2 *UnsafeIFaceType) UnsafeIndirect(ptr unsafe.Pointer) interface{} {
43 | return IFaceToEFace(ptr)
44 | }
45 |
46 | func (type2 *UnsafeIFaceType) IsNil(obj interface{}) bool {
47 | if obj == nil {
48 | return true
49 | }
50 | objEFace := unpackEFace(obj)
51 | assertType("Type.IsNil argument 1", type2.ptrRType, objEFace.rtype)
52 | return type2.UnsafeIsNil(objEFace.data)
53 | }
54 |
55 | func (type2 *UnsafeIFaceType) UnsafeIsNil(ptr unsafe.Pointer) bool {
56 | if ptr == nil {
57 | return true
58 | }
59 | iface := (*iface)(ptr)
60 | if iface.itab == nil {
61 | return true
62 | }
63 | return false
64 | }
65 |
--------------------------------------------------------------------------------
/vendor/github.com/modern-go/reflect2/unsafe_ptr.go:
--------------------------------------------------------------------------------
1 | package reflect2
2 |
3 | import (
4 | "reflect"
5 | "unsafe"
6 | )
7 |
8 | type UnsafePtrType struct {
9 | unsafeType
10 | }
11 |
12 | func newUnsafePtrType(cfg *frozenConfig, type1 reflect.Type) *UnsafePtrType {
13 | return &UnsafePtrType{
14 | unsafeType: *newUnsafeType(cfg, type1),
15 | }
16 | }
17 |
18 | func (type2 *UnsafePtrType) IsNil(obj interface{}) bool {
19 | if obj == nil {
20 | return true
21 | }
22 | objEFace := unpackEFace(obj)
23 | assertType("Type.IsNil argument 1", type2.ptrRType, objEFace.rtype)
24 | return type2.UnsafeIsNil(objEFace.data)
25 | }
26 |
27 | func (type2 *UnsafePtrType) UnsafeIsNil(ptr unsafe.Pointer) bool {
28 | if ptr == nil {
29 | return true
30 | }
31 | return *(*unsafe.Pointer)(ptr) == nil
32 | }
33 |
34 | func (type2 *UnsafePtrType) LikePtr() bool {
35 | return true
36 | }
37 |
38 | func (type2 *UnsafePtrType) Indirect(obj interface{}) interface{} {
39 | objEFace := unpackEFace(obj)
40 | assertType("Type.Indirect argument 1", type2.ptrRType, objEFace.rtype)
41 | return type2.UnsafeIndirect(objEFace.data)
42 | }
43 |
44 | func (type2 *UnsafePtrType) UnsafeIndirect(ptr unsafe.Pointer) interface{} {
45 | return packEFace(type2.rtype, *(*unsafe.Pointer)(ptr))
46 | }
47 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/0_importpath.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | package codec // import "github.com/ugorji/go/codec"
5 |
6 | // This establishes that this package must be imported as github.com/ugorji/go/codec.
7 | // It makes forking easier, and plays well with pre-module releases of go.
8 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2012-2015 Ugorji Nwoke.
4 | All rights reserved.
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/codecgen.go:
--------------------------------------------------------------------------------
1 | // +build codecgen generated
2 |
3 | package codec
4 |
5 | // this file is here, to set the codecgen variable to true
6 | // when the build tag codecgen is set.
7 | //
8 | // this allows us do specific things e.g. skip missing fields tests,
9 | // when running in codecgen mode.
10 |
11 | func init() {
12 | codecgen = true
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/fast-path.not.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build notfastpath
5 |
6 | package codec
7 |
8 | import "reflect"
9 |
10 | const fastpathEnabled = false
11 |
12 | // The generated fast-path code is very large, and adds a few seconds to the build time.
13 | // This causes test execution, execution of small tools which use codec, etc
14 | // to take a long time.
15 | //
16 | // To mitigate, we now support the notfastpath tag.
17 | // This tag disables fastpath during build, allowing for faster build, test execution,
18 | // short-program runs, etc.
19 |
20 | func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool { return false }
21 | func fastpathEncodeTypeSwitch(iv interface{}, e *Encoder) bool { return false }
22 | func fastpathEncodeTypeSwitchSlice(iv interface{}, e *Encoder) bool { return false }
23 | func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool { return false }
24 | func fastpathDecodeSetZeroTypeSwitch(iv interface{}) bool { return false }
25 |
26 | type fastpathT struct{}
27 | type fastpathE struct {
28 | rtid uintptr
29 | rt reflect.Type
30 | encfn func(*Encoder, *codecFnInfo, reflect.Value)
31 | decfn func(*Decoder, *codecFnInfo, reflect.Value)
32 | }
33 | type fastpathA [0]fastpathE
34 |
35 | func (x fastpathA) index(rtid uintptr) int { return -1 }
36 |
37 | var fastpathAV fastpathA
38 | var fastpathTV fastpathT
39 |
40 | // ----
41 | type TestMammoth2Wrapper struct{} // to allow testMammoth work in notfastpath mode
42 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl:
--------------------------------------------------------------------------------
1 | {{.Label}}:
2 | switch timeout{{.Sfx}} := z.EncBasicHandle().ChanRecvTimeout; {
3 | case timeout{{.Sfx}} == 0: // only consume available
4 | for {
5 | select {
6 | case b{{.Sfx}} := <-{{.Chan}}:
7 | {{ .Slice }} = append({{.Slice}}, b{{.Sfx}})
8 | default:
9 | break {{.Label}}
10 | }
11 | }
12 | case timeout{{.Sfx}} > 0: // consume until timeout
13 | tt{{.Sfx}} := time.NewTimer(timeout{{.Sfx}})
14 | for {
15 | select {
16 | case b{{.Sfx}} := <-{{.Chan}}:
17 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}})
18 | case <-tt{{.Sfx}}.C:
19 | // close(tt.C)
20 | break {{.Label}}
21 | }
22 | }
23 | default: // consume until close
24 | for b{{.Sfx}} := range {{.Chan}} {
25 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}})
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/ugorji/go/codec
2 |
3 | require (
4 | github.com/ugorji/go v1.1.7
5 | )
6 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.5
5 |
6 | package codec
7 |
8 | import "reflect"
9 |
10 | const reflectArrayOfSupported = true
11 |
12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type {
13 | return reflect.ArrayOf(count, elem)
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build !go1.5
5 |
6 | package codec
7 |
8 | import "reflect"
9 |
10 | const reflectArrayOfSupported = false
11 |
12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type {
13 | panic("codec: reflect.ArrayOf unsupported in this go version")
14 | }
15 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_fmt_time_gte_go15.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.5
5 |
6 | package codec
7 |
8 | import "time"
9 |
10 | func fmtTime(t time.Time, b []byte) []byte {
11 | return t.AppendFormat(b, time.RFC3339Nano)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_fmt_time_lt_go15.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build !go1.5
5 |
6 | package codec
7 |
8 | import "time"
9 |
10 | func fmtTime(t time.Time, b []byte) []byte {
11 | s := t.Format(time.RFC3339Nano)
12 | b = b[:len(s)]
13 | copy(b, s)
14 | return b
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.9
5 |
6 | package codec
7 |
8 | import "reflect"
9 |
10 | func makeMapReflect(t reflect.Type, size int) reflect.Value {
11 | if size < 0 {
12 | return reflect.MakeMapWithSize(t, 4)
13 | }
14 | return reflect.MakeMapWithSize(t, size)
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build !go1.9
5 |
6 | package codec
7 |
8 | import "reflect"
9 |
10 | func makeMapReflect(t reflect.Type, size int) reflect.Value {
11 | return reflect.MakeMap(t)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_maprange_gte_go112.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.12
5 | // +build safe
6 |
7 | package codec
8 |
9 | import "reflect"
10 |
11 | type mapIter struct {
12 | t *reflect.MapIter
13 | m reflect.Value
14 | values bool
15 | }
16 |
17 | func (t *mapIter) ValidKV() (r bool) {
18 | return true
19 | }
20 |
21 | func (t *mapIter) Next() (r bool) {
22 | return t.t.Next()
23 | }
24 |
25 | func (t *mapIter) Key() reflect.Value {
26 | return t.t.Key()
27 | }
28 |
29 | func (t *mapIter) Value() (r reflect.Value) {
30 | if t.values {
31 | return t.t.Value()
32 | }
33 | return
34 | }
35 |
36 | func (t *mapIter) Done() {}
37 |
38 | func mapRange(t *mapIter, m, k, v reflect.Value, values bool) {
39 | *t = mapIter{
40 | m: m,
41 | t: m.MapRange(),
42 | values: values,
43 | }
44 | }
45 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_maprange_lt_go112.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build !go1.12
5 | // +build !go1.7 safe
6 |
7 | package codec
8 |
9 | import "reflect"
10 |
11 | type mapIter struct {
12 | m reflect.Value
13 | keys []reflect.Value
14 | j int
15 | values bool
16 | }
17 |
18 | func (t *mapIter) ValidKV() (r bool) {
19 | return true
20 | }
21 |
22 | func (t *mapIter) Next() (r bool) {
23 | t.j++
24 | return t.j < len(t.keys)
25 | }
26 |
27 | func (t *mapIter) Key() reflect.Value {
28 | return t.keys[t.j]
29 | }
30 |
31 | func (t *mapIter) Value() (r reflect.Value) {
32 | if t.values {
33 | return t.m.MapIndex(t.keys[t.j])
34 | }
35 | return
36 | }
37 |
38 | func (t *mapIter) Done() {}
39 |
40 | func mapRange(t *mapIter, m, k, v reflect.Value, values bool) {
41 | *t = mapIter{
42 | m: m,
43 | keys: m.MapKeys(),
44 | values: values,
45 | j: -1,
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.10
5 |
6 | package codec
7 |
8 | const allowSetUnexportedEmbeddedPtr = false
9 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build !go1.10
5 |
6 | package codec
7 |
8 | const allowSetUnexportedEmbeddedPtr = true
9 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build !go1.4
5 |
6 | package codec
7 |
8 | // This codec package will only work for go1.4 and above.
9 | // This is for the following reasons:
10 | // - go 1.4 was released in 2014
11 | // - go runtime is written fully in go
12 | // - interface only holds pointers
13 | // - reflect.Value is stabilized as 3 words
14 |
15 | func init() {
16 | panic("codec: go 1.3 and below are not supported")
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.5,!go1.6
5 |
6 | package codec
7 |
8 | import "os"
9 |
10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1"
11 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.6,!go1.7
5 |
6 | package codec
7 |
8 | import "os"
9 |
10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0"
11 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build go1.7
5 |
6 | package codec
7 |
8 | const genCheckVendor = true
9 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | // +build !go1.5
5 |
6 | package codec
7 |
8 | var genCheckVendor = false
9 |
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/helper.s:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/yamiljuri/go-hexagonal-architecture/c98f78f614148a1c5d501bf688993d47170f26c3/vendor/github.com/ugorji/go/codec/helper.s
--------------------------------------------------------------------------------
/vendor/github.com/ugorji/go/codec/register_ext.go:
--------------------------------------------------------------------------------
1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved.
2 | // Use of this source code is governed by a MIT license found in the LICENSE file.
3 |
4 | package codec
5 |
6 | import "reflect"
7 |
8 | // This file exists, so that the files for specific formats do not all import reflect.
9 | // This just helps us ensure that reflect package is isolated to a few files.
10 |
11 | // SetInterfaceExt sets an extension
12 | func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) {
13 | return h.SetExt(rt, tag, makeExt(ext))
14 | }
15 |
16 | // SetInterfaceExt sets an extension
17 | func (h *CborHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) {
18 | return h.SetExt(rt, tag, makeExt(ext))
19 | }
20 |
21 | // SetBytesExt sets an extension
22 | func (h *MsgpackHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) {
23 | return h.SetExt(rt, tag, makeExt(ext))
24 | }
25 |
26 | // SetBytesExt sets an extension
27 | func (h *SimpleHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) {
28 | return h.SetExt(rt, tag, makeExt(ext))
29 | }
30 |
31 | // SetBytesExt sets an extension
32 | func (h *BincHandle) SetBytesExt(rt reflect.Type, tag uint64, ext BytesExt) (err error) {
33 | return h.SetExt(rt, tag, makeExt(ext))
34 | }
35 |
36 | // func (h *XMLHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) {
37 | // return h.SetExt(rt, tag, &interfaceExtWrapper{InterfaceExt: ext})
38 | // }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/AUTHORS:
--------------------------------------------------------------------------------
1 | # This source code refers to The Go Authors for copyright purposes.
2 | # The master list of authors is in the main Go distribution,
3 | # visible at http://tip.golang.org/AUTHORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/CONTRIBUTORS:
--------------------------------------------------------------------------------
1 | # This source code was written by the Go contributors.
2 | # The master list of contributors is in the main Go distribution,
3 | # visible at http://tip.golang.org/CONTRIBUTORS.
4 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2009 The Go Authors. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/PATENTS:
--------------------------------------------------------------------------------
1 | Additional IP Rights Grant (Patents)
2 |
3 | "This implementation" means the copyrightable works distributed by
4 | Google as part of the Go project.
5 |
6 | Google hereby grants to You a perpetual, worldwide, non-exclusive,
7 | no-charge, royalty-free, irrevocable (except as stated in this section)
8 | patent license to make, have made, use, offer to sell, sell, import,
9 | transfer and otherwise run, modify and propagate the contents of this
10 | implementation of Go, where such license applies only to those patent
11 | claims, both currently owned or controlled by Google and acquired in
12 | the future, licensable by Google that are necessarily infringed by this
13 | implementation of Go. This grant does not include claims that would be
14 | infringed only as a consequence of further modification of this
15 | implementation. If you or your agent or exclusive licensee institute or
16 | order or agree to the institution of patent litigation against any
17 | entity (including a cross-claim or counterclaim in a lawsuit) alleging
18 | that this implementation of Go or any code incorporated within this
19 | implementation of Go constitutes direct or contributory patent
20 | infringement, or inducement of patent infringement, then any patent
21 | rights granted to you under this License for this implementation of Go
22 | shall terminate as of the date such litigation is filed.
23 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/.gitignore:
--------------------------------------------------------------------------------
1 | _obj/
2 | unix.test
3 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/aliases.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build go1.9
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | type Signal = syscall.Signal
13 | type Errno = syscall.Errno
14 | type SysProcAttr = syscall.SysProcAttr
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_aix_ppc64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go
11 | //
12 |
13 | TEXT ·syscall6(SB),NOSPLIT,$0-88
14 | JMP syscall·syscall6(SB)
15 |
16 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSyscall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, Darwin
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for ARM, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-28
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 | // +build arm64,darwin
7 |
8 | #include "textflag.h"
9 |
10 | //
11 | // System call support for AMD64, Darwin
12 | //
13 |
14 | // Just jump to package syscall's implementation for all these functions.
15 | // The runtime may know about them.
16 |
17 | TEXT ·Syscall(SB),NOSPLIT,$0-56
18 | B syscall·Syscall(SB)
19 |
20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
21 | B syscall·Syscall6(SB)
22 |
23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
24 | B syscall·Syscall9(SB)
25 |
26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
27 | B syscall·RawSyscall(SB)
28 |
29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
30 | B syscall·RawSyscall6(SB)
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, DragonFly
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_freebsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM64, FreeBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for AMD64, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
23 | CALL runtime·entersyscall(SB)
24 | MOVQ a1+8(FP), DI
25 | MOVQ a2+16(FP), SI
26 | MOVQ a3+24(FP), DX
27 | MOVQ $0, R10
28 | MOVQ $0, R8
29 | MOVQ $0, R9
30 | MOVQ trap+0(FP), AX // syscall entry
31 | SYSCALL
32 | MOVQ AX, r1+32(FP)
33 | MOVQ DX, r2+40(FP)
34 | CALL runtime·exitsyscall(SB)
35 | RET
36 |
37 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
38 | JMP syscall·RawSyscall(SB)
39 |
40 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
41 | JMP syscall·RawSyscall6(SB)
42 |
43 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
44 | MOVQ a1+8(FP), DI
45 | MOVQ a2+16(FP), SI
46 | MOVQ a3+24(FP), DX
47 | MOVQ $0, R10
48 | MOVQ $0, R8
49 | MOVQ $0, R9
50 | MOVQ trap+0(FP), AX // syscall entry
51 | SYSCALL
52 | MOVQ AX, r1+32(FP)
53 | MOVQ DX, r2+40(FP)
54 | RET
55 |
56 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16
57 | JMP syscall·gettimeofday(SB)
58 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for arm, Linux
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
23 | BL runtime·entersyscall(SB)
24 | MOVW trap+0(FP), R7
25 | MOVW a1+4(FP), R0
26 | MOVW a2+8(FP), R1
27 | MOVW a3+12(FP), R2
28 | MOVW $0, R3
29 | MOVW $0, R4
30 | MOVW $0, R5
31 | SWI $0
32 | MOVW R0, r1+16(FP)
33 | MOVW $0, R0
34 | MOVW R0, r2+20(FP)
35 | BL runtime·exitsyscall(SB)
36 | RET
37 |
38 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
39 | B syscall·RawSyscall(SB)
40 |
41 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
42 | B syscall·RawSyscall6(SB)
43 |
44 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
45 | MOVW trap+0(FP), R7 // syscall entry
46 | MOVW a1+4(FP), R0
47 | MOVW a2+8(FP), R1
48 | MOVW a3+12(FP), R2
49 | SWI $0
50 | MOVW R0, r1+16(FP)
51 | MOVW $0, R0
52 | MOVW R0, r2+20(FP)
53 | RET
54 |
55 | TEXT ·seek(SB),NOSPLIT,$0-28
56 | B syscall·seek(SB)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build arm64
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | // Just jump to package syscall's implementation for all these functions.
12 | // The runtime may know about them.
13 |
14 | TEXT ·Syscall(SB),NOSPLIT,$0-56
15 | B syscall·Syscall(SB)
16 |
17 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
18 | B syscall·Syscall6(SB)
19 |
20 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
21 | BL runtime·entersyscall(SB)
22 | MOVD a1+8(FP), R0
23 | MOVD a2+16(FP), R1
24 | MOVD a3+24(FP), R2
25 | MOVD $0, R3
26 | MOVD $0, R4
27 | MOVD $0, R5
28 | MOVD trap+0(FP), R8 // syscall entry
29 | SVC
30 | MOVD R0, r1+32(FP) // r1
31 | MOVD R1, r2+40(FP) // r2
32 | BL runtime·exitsyscall(SB)
33 | RET
34 |
35 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
36 | B syscall·RawSyscall(SB)
37 |
38 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
39 | B syscall·RawSyscall6(SB)
40 |
41 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
42 | MOVD a1+8(FP), R0
43 | MOVD a2+16(FP), R1
44 | MOVD a3+24(FP), R2
45 | MOVD $0, R3
46 | MOVD $0, R4
47 | MOVD $0, R5
48 | MOVD trap+0(FP), R8 // syscall entry
49 | SVC
50 | MOVD R0, r1+32(FP)
51 | MOVD R1, r2+40(FP)
52 | RET
53 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips64 mips64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | JAL runtime·entersyscall(SB)
26 | MOVV a1+8(FP), R4
27 | MOVV a2+16(FP), R5
28 | MOVV a3+24(FP), R6
29 | MOVV R0, R7
30 | MOVV R0, R8
31 | MOVV R0, R9
32 | MOVV trap+0(FP), R2 // syscall entry
33 | SYSCALL
34 | MOVV R2, r1+32(FP)
35 | MOVV R3, r2+40(FP)
36 | JAL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | JMP syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | JMP syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVV a1+8(FP), R4
47 | MOVV a2+16(FP), R5
48 | MOVV a3+24(FP), R6
49 | MOVV R0, R7
50 | MOVV R0, R8
51 | MOVV R0, R9
52 | MOVV trap+0(FP), R2 // syscall entry
53 | SYSCALL
54 | MOVV R2, r1+32(FP)
55 | MOVV R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build mips mipsle
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for mips, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-28
19 | JMP syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
22 | JMP syscall·Syscall6(SB)
23 |
24 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
25 | JMP syscall·Syscall9(SB)
26 |
27 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-24
28 | JAL runtime·entersyscall(SB)
29 | MOVW a1+4(FP), R4
30 | MOVW a2+8(FP), R5
31 | MOVW a3+12(FP), R6
32 | MOVW R0, R7
33 | MOVW trap+0(FP), R2 // syscall entry
34 | SYSCALL
35 | MOVW R2, r1+16(FP) // r1
36 | MOVW R3, r2+20(FP) // r2
37 | JAL runtime·exitsyscall(SB)
38 | RET
39 |
40 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
41 | JMP syscall·RawSyscall(SB)
42 |
43 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
44 | JMP syscall·RawSyscall6(SB)
45 |
46 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-24
47 | MOVW a1+4(FP), R4
48 | MOVW a2+8(FP), R5
49 | MOVW a3+12(FP), R6
50 | MOVW trap+0(FP), R2 // syscall entry
51 | SYSCALL
52 | MOVW R2, r1+16(FP)
53 | MOVW R3, r2+20(FP)
54 | RET
55 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64 ppc64le
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for ppc64, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
19 | BL runtime·entersyscall(SB)
20 | MOVD a1+8(FP), R3
21 | MOVD a2+16(FP), R4
22 | MOVD a3+24(FP), R5
23 | MOVD R0, R6
24 | MOVD R0, R7
25 | MOVD R0, R8
26 | MOVD trap+0(FP), R9 // syscall entry
27 | SYSCALL R9
28 | MOVD R3, r1+32(FP)
29 | MOVD R4, r2+40(FP)
30 | BL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
34 | MOVD a1+8(FP), R3
35 | MOVD a2+16(FP), R4
36 | MOVD a3+24(FP), R5
37 | MOVD R0, R6
38 | MOVD R0, R7
39 | MOVD R0, R8
40 | MOVD trap+0(FP), R9 // syscall entry
41 | SYSCALL R9
42 | MOVD R3, r1+32(FP)
43 | MOVD R4, r2+40(FP)
44 | RET
45 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_riscv64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build riscv64,!gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for linux/riscv64.
11 | //
12 | // Where available, just jump to package syscall's implementation of
13 | // these functions.
14 |
15 | TEXT ·Syscall(SB),NOSPLIT,$0-56
16 | JMP syscall·Syscall(SB)
17 |
18 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
19 | JMP syscall·Syscall6(SB)
20 |
21 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
22 | CALL runtime·entersyscall(SB)
23 | MOV a1+8(FP), A0
24 | MOV a2+16(FP), A1
25 | MOV a3+24(FP), A2
26 | MOV trap+0(FP), A7 // syscall entry
27 | ECALL
28 | MOV A0, r1+32(FP) // r1
29 | MOV A1, r2+40(FP) // r2
30 | CALL runtime·exitsyscall(SB)
31 | RET
32 |
33 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
34 | JMP syscall·RawSyscall(SB)
35 |
36 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
37 | JMP syscall·RawSyscall6(SB)
38 |
39 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
40 | MOV a1+8(FP), A0
41 | MOV a2+16(FP), A1
42 | MOV a3+24(FP), A2
43 | MOV trap+0(FP), A7 // syscall entry
44 | ECALL
45 | MOV A0, r1+32(FP)
46 | MOV A1, r2+40(FP)
47 | RET
48 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_linux_s390x.s:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build s390x
6 | // +build linux
7 | // +build !gccgo
8 |
9 | #include "textflag.h"
10 |
11 | //
12 | // System calls for s390x, Linux
13 | //
14 |
15 | // Just jump to package syscall's implementation for all these functions.
16 | // The runtime may know about them.
17 |
18 | TEXT ·Syscall(SB),NOSPLIT,$0-56
19 | BR syscall·Syscall(SB)
20 |
21 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
22 | BR syscall·Syscall6(SB)
23 |
24 | TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
25 | BL runtime·entersyscall(SB)
26 | MOVD a1+8(FP), R2
27 | MOVD a2+16(FP), R3
28 | MOVD a3+24(FP), R4
29 | MOVD $0, R5
30 | MOVD $0, R6
31 | MOVD $0, R7
32 | MOVD trap+0(FP), R1 // syscall entry
33 | SYSCALL
34 | MOVD R2, r1+32(FP)
35 | MOVD R3, r2+40(FP)
36 | BL runtime·exitsyscall(SB)
37 | RET
38 |
39 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
40 | BR syscall·RawSyscall(SB)
41 |
42 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
43 | BR syscall·RawSyscall6(SB)
44 |
45 | TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
46 | MOVD a1+8(FP), R2
47 | MOVD a2+16(FP), R3
48 | MOVD a3+24(FP), R4
49 | MOVD $0, R5
50 | MOVD $0, R6
51 | MOVD $0, R7
52 | MOVD trap+0(FP), R1 // syscall entry
53 | SYSCALL
54 | MOVD R2, r1+32(FP)
55 | MOVD R3, r2+40(FP)
56 | RET
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_netbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM64, NetBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_386.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for 386, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for AMD64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_arm.s:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for ARM, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-28
17 | B syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40
20 | B syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52
23 | B syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28
26 | B syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
29 | B syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_openbsd_arm64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System call support for arm64, OpenBSD
11 | //
12 |
13 | // Just jump to package syscall's implementation for all these functions.
14 | // The runtime may know about them.
15 |
16 | TEXT ·Syscall(SB),NOSPLIT,$0-56
17 | JMP syscall·Syscall(SB)
18 |
19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80
20 | JMP syscall·Syscall6(SB)
21 |
22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104
23 | JMP syscall·Syscall9(SB)
24 |
25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56
26 | JMP syscall·RawSyscall(SB)
27 |
28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
29 | JMP syscall·RawSyscall6(SB)
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !gccgo
6 |
7 | #include "textflag.h"
8 |
9 | //
10 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
11 | //
12 |
13 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88
14 | JMP syscall·sysvicall6(SB)
15 |
16 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
17 | JMP syscall·rawSysvicall6(SB)
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/bluetooth_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Bluetooth sockets and messages
6 |
7 | package unix
8 |
9 | // Bluetooth Protocols
10 | const (
11 | BTPROTO_L2CAP = 0
12 | BTPROTO_HCI = 1
13 | BTPROTO_SCO = 2
14 | BTPROTO_RFCOMM = 3
15 | BTPROTO_BNEP = 4
16 | BTPROTO_CMTP = 5
17 | BTPROTO_HIDP = 6
18 | BTPROTO_AVDTP = 7
19 | )
20 |
21 | const (
22 | HCI_CHANNEL_RAW = 0
23 | HCI_CHANNEL_USER = 1
24 | HCI_CHANNEL_MONITOR = 2
25 | HCI_CHANNEL_CONTROL = 3
26 | HCI_CHANNEL_LOGGING = 4
27 | )
28 |
29 | // Socketoption Level
30 | const (
31 | SOL_BLUETOOTH = 0x112
32 | SOL_HCI = 0x0
33 | SOL_L2CAP = 0x6
34 | SOL_RFCOMM = 0x12
35 | SOL_SCO = 0x11
36 | )
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/constants.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | const (
10 | R_OK = 0x4
11 | W_OK = 0x2
12 | X_OK = 0x1
13 | )
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used by AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev >> 16) & 0xffff)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32(dev & 0xffff)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | return uint64(((major) << 16) | (minor))
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_aix_ppc64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix
6 | // +build ppc64
7 |
8 | // Functions to access/create device major and minor numbers matching the
9 | // encoding used AIX.
10 |
11 | package unix
12 |
13 | // Major returns the major component of a Linux device number.
14 | func Major(dev uint64) uint32 {
15 | return uint32((dev & 0x3fffffff00000000) >> 32)
16 | }
17 |
18 | // Minor returns the minor component of a Linux device number.
19 | func Minor(dev uint64) uint32 {
20 | return uint32((dev & 0x00000000ffffffff) >> 0)
21 | }
22 |
23 | // Mkdev returns a Linux device number generated from the given major and minor
24 | // components.
25 | func Mkdev(major, minor uint32) uint64 {
26 | var DEVNO64 uint64
27 | DEVNO64 = 0x8000000000000000
28 | return ((uint64(major) << 32) | (uint64(minor) & 0x00000000FFFFFFFF) | DEVNO64)
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Darwin's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a Darwin device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev >> 24) & 0xff)
13 | }
14 |
15 | // Minor returns the minor component of a Darwin device number.
16 | func Minor(dev uint64) uint32 {
17 | return uint32(dev & 0xffffff)
18 | }
19 |
20 | // Mkdev returns a Darwin device number generated from the given major and minor
21 | // components.
22 | func Mkdev(major, minor uint32) uint64 {
23 | return (uint64(major) << 24) | uint64(minor)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in Dragonfly's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a DragonFlyBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a DragonFlyBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a DragonFlyBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_freebsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in FreeBSD's sys/types.h header.
7 | //
8 | // The information below is extracted and adapted from sys/types.h:
9 | //
10 | // Minor gives a cookie instead of an index since in order to avoid changing the
11 | // meanings of bits 0-15 or wasting time and space shifting bits 16-31 for
12 | // devices that don't use them.
13 |
14 | package unix
15 |
16 | // Major returns the major component of a FreeBSD device number.
17 | func Major(dev uint64) uint32 {
18 | return uint32((dev >> 8) & 0xff)
19 | }
20 |
21 | // Minor returns the minor component of a FreeBSD device number.
22 | func Minor(dev uint64) uint32 {
23 | return uint32(dev & 0xffff00ff)
24 | }
25 |
26 | // Mkdev returns a FreeBSD device number generated from the given major and
27 | // minor components.
28 | func Mkdev(major, minor uint32) uint64 {
29 | return (uint64(major) << 8) | uint64(minor)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_netbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in NetBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of a NetBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x000fff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of a NetBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xfff00000) >> 12)
19 | return minor
20 | }
21 |
22 | // Mkdev returns a NetBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x000fff00
26 | dev |= (uint64(minor) << 12) & 0xfff00000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/dev_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Functions to access/create device major and minor numbers matching the
6 | // encoding used in OpenBSD's sys/types.h header.
7 |
8 | package unix
9 |
10 | // Major returns the major component of an OpenBSD device number.
11 | func Major(dev uint64) uint32 {
12 | return uint32((dev & 0x0000ff00) >> 8)
13 | }
14 |
15 | // Minor returns the minor component of an OpenBSD device number.
16 | func Minor(dev uint64) uint32 {
17 | minor := uint32((dev & 0x000000ff) >> 0)
18 | minor |= uint32((dev & 0xffff0000) >> 8)
19 | return minor
20 | }
21 |
22 | // Mkdev returns an OpenBSD device number generated from the given major and minor
23 | // components.
24 | func Mkdev(major, minor uint32) uint64 {
25 | dev := (uint64(major) << 8) & 0x0000ff00
26 | dev |= (uint64(minor) << 8) & 0xffff0000
27 | dev |= (uint64(minor) << 0) & 0x000000ff
28 | return dev
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_big.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build ppc64 s390x mips mips64
6 |
7 | package unix
8 |
9 | const isBigEndian = true
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/endian_little.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 | //
5 | // +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le riscv64
6 |
7 | package unix
8 |
9 | const isBigEndian = false
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/env_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // Unix environment variables.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getenv(key string) (value string, found bool) {
14 | return syscall.Getenv(key)
15 | }
16 |
17 | func Setenv(key, value string) error {
18 | return syscall.Setenv(key, value)
19 | }
20 |
21 | func Clearenv() {
22 | syscall.Clearenv()
23 | }
24 |
25 | func Environ() []string {
26 | return syscall.Environ()
27 | }
28 |
29 | func Unsetenv(key string) error {
30 | return syscall.Unsetenv(key)
31 | }
32 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build dragonfly freebsd linux netbsd openbsd
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
12 | // systems by fcntl_linux_32bit.go to be SYS_FCNTL64.
13 | var fcntl64Syscall uintptr = SYS_FCNTL
14 |
15 | func fcntl(fd int, cmd, arg int) (int, error) {
16 | valptr, _, errno := Syscall(fcntl64Syscall, uintptr(fd), uintptr(cmd), uintptr(arg))
17 | var err error
18 | if errno != 0 {
19 | err = errno
20 | }
21 | return int(valptr), err
22 | }
23 |
24 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
25 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
26 | return fcntl(int(fd), cmd, arg)
27 | }
28 |
29 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
30 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
31 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
32 | if errno == 0 {
33 | return nil
34 | }
35 | return errno
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_darwin.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | import "unsafe"
8 |
9 | // FcntlInt performs a fcntl syscall on fd with the provided command and argument.
10 | func FcntlInt(fd uintptr, cmd, arg int) (int, error) {
11 | return fcntl(int(fd), cmd, arg)
12 | }
13 |
14 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
15 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
16 | _, err := fcntl(int(fd), cmd, int(uintptr(unsafe.Pointer(lk))))
17 | return err
18 | }
19 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go:
--------------------------------------------------------------------------------
1 | // +build linux,386 linux,arm linux,mips linux,mipsle
2 |
3 | // Copyright 2014 The Go Authors. All rights reserved.
4 | // Use of this source code is governed by a BSD-style
5 | // license that can be found in the LICENSE file.
6 |
7 | package unix
8 |
9 | func init() {
10 | // On 32-bit Linux systems, the fcntl syscall that matches Go's
11 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
12 | fcntl64Syscall = SYS_FCNTL64
13 | }
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/fdset.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | // Set adds fd to the set fds.
10 | func (fds *FdSet) Set(fd int) {
11 | fds.Bits[fd/NFDBITS] |= (1 << (uintptr(fd) % NFDBITS))
12 | }
13 |
14 | // Clear removes fd from the set fds.
15 | func (fds *FdSet) Clear(fd int) {
16 | fds.Bits[fd/NFDBITS] &^= (1 << (uintptr(fd) % NFDBITS))
17 | }
18 |
19 | // IsSet returns whether fd is in the set fds.
20 | func (fds *FdSet) IsSet(fd int) bool {
21 | return fds.Bits[fd/NFDBITS]&(1<<(uintptr(fd)%NFDBITS)) != 0
22 | }
23 |
24 | // Zero clears the set fds.
25 | func (fds *FdSet) Zero() {
26 | for i := range fds.Bits {
27 | fds.Bits[i] = 0
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_c.c:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo
6 | // +build !aix
7 |
8 | #include
9 | #include
10 | #include
11 |
12 | #define _STRINGIFY2_(x) #x
13 | #define _STRINGIFY_(x) _STRINGIFY2_(x)
14 | #define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
15 |
16 | // Call syscall from C code because the gccgo support for calling from
17 | // Go to C does not support varargs functions.
18 |
19 | struct ret {
20 | uintptr_t r;
21 | uintptr_t err;
22 | };
23 |
24 | struct ret
25 | gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
26 | {
27 | struct ret r;
28 |
29 | errno = 0;
30 | r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
31 | r.err = errno;
32 | return r;
33 | }
34 |
35 | uintptr_t
36 | gccgoRealSyscallNoError(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
37 | {
38 | return syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
39 | }
40 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build gccgo,linux,amd64
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | //extern gettimeofday
12 | func realGettimeofday(*Timeval, *byte) int32
13 |
14 | func gettimeofday(tv *Timeval) (err syscall.Errno) {
15 | r := realGettimeofday(tv, nil)
16 | if r < 0 {
17 | return syscall.GetErrno()
18 | }
19 | return 0
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/pagesize_unix.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | // For Unix, get the pagesize from the runtime.
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Getpagesize() int {
14 | return syscall.Getpagesize()
15 | }
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,race linux,race freebsd,race
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | "unsafe"
12 | )
13 |
14 | const raceenabled = true
15 |
16 | func raceAcquire(addr unsafe.Pointer) {
17 | runtime.RaceAcquire(addr)
18 | }
19 |
20 | func raceReleaseMerge(addr unsafe.Pointer) {
21 | runtime.RaceReleaseMerge(addr)
22 | }
23 |
24 | func raceReadRange(addr unsafe.Pointer, len int) {
25 | runtime.RaceReadRange(addr, len)
26 | }
27 |
28 | func raceWriteRange(addr unsafe.Pointer, len int) {
29 | runtime.RaceWriteRange(addr, len)
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/race0.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | const raceenabled = false
14 |
15 | func raceAcquire(addr unsafe.Pointer) {
16 | }
17 |
18 | func raceReleaseMerge(addr unsafe.Pointer) {
19 | }
20 |
21 | func raceReadRange(addr unsafe.Pointer, len int) {
22 | }
23 |
24 | func raceWriteRange(addr unsafe.Pointer, len int) {
25 | }
26 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdents.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix dragonfly freebsd linux netbsd openbsd
6 |
7 | package unix
8 |
9 | // ReadDirent reads directory entries from fd and writes them into buf.
10 | func ReadDirent(fd int, buf []byte) (n int, err error) {
11 | return Getdents(fd, buf)
12 | }
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/readdirent_getdirentries.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // ReadDirent reads directory entries from fd and writes them into buf.
12 | func ReadDirent(fd int, buf []byte) (n int, err error) {
13 | // Final argument is (basep *uintptr) and the syscall doesn't take nil.
14 | // 64 bits should be enough. (32 bits isn't even on 386). Since the
15 | // actual system call is getdirentries64, 64 is a good guess.
16 | // TODO(rsc): Can we use a single global basep for all calls?
17 | var base = (*uintptr)(unsafe.Pointer(new(uint64)))
18 | return Getdirentries(fd, buf, base)
19 | }
20 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | // Round the length of a raw sockaddr up to align it properly.
8 | func cmsgAlignOf(salen int) int {
9 | salign := SizeofPtr
10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) {
11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires
12 | // 32-bit aligned access to network subsystem.
13 | salign = 4
14 | }
15 | return (salen + salign - 1) & ^(salign - 1)
16 | }
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_linux.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // Socket control messages
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // UnixCredentials encodes credentials into a socket control message
12 | // for sending to another process. This can be used for
13 | // authentication.
14 | func UnixCredentials(ucred *Ucred) []byte {
15 | b := make([]byte, CmsgSpace(SizeofUcred))
16 | h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
17 | h.Level = SOL_SOCKET
18 | h.Type = SCM_CREDENTIALS
19 | h.SetLen(CmsgLen(SizeofUcred))
20 | *(*Ucred)(h.data(0)) = *ucred
21 | return b
22 | }
23 |
24 | // ParseUnixCredentials decodes a socket control message that contains
25 | // credentials in a Ucred structure. To receive such a message, the
26 | // SO_PASSCRED option must be enabled on the socket.
27 | func ParseUnixCredentials(m *SocketControlMessage) (*Ucred, error) {
28 | if m.Header.Level != SOL_SOCKET {
29 | return nil, EINVAL
30 | }
31 | if m.Header.Type != SCM_CREDENTIALS {
32 | return nil, EINVAL
33 | }
34 | ucred := *(*Ucred)(unsafe.Pointer(&m.Data[0]))
35 | return &ucred, nil
36 | }
37 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/sockcmsg_unix_other.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | import (
10 | "runtime"
11 | )
12 |
13 | // Round the length of a raw sockaddr up to align it properly.
14 | func cmsgAlignOf(salen int) int {
15 | salign := SizeofPtr
16 |
17 | // dragonfly needs to check ABI version at runtime, see cmsgAlignOf in
18 | // sockcmsg_dragonfly.go
19 | switch runtime.GOOS {
20 | case "aix":
21 | // There is no alignment on AIX.
22 | salign = 1
23 | case "darwin", "illumos", "solaris":
24 | // NOTE: It seems like 64-bit Darwin, Illumos and Solaris
25 | // kernels still require 32-bit aligned access to network
26 | // subsystem.
27 | if SizeofPtr == 8 {
28 | salign = 4
29 | }
30 | case "netbsd", "openbsd":
31 | // NetBSD and OpenBSD armv7 require 64-bit alignment.
32 | if runtime.GOARCH == "arm" {
33 | salign = 8
34 | }
35 | }
36 |
37 | return (salen + salign - 1) & ^(salign - 1)
38 | }
39 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/str.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
6 |
7 | package unix
8 |
9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency
10 | if val < 0 {
11 | return "-" + uitoa(uint(-val))
12 | }
13 | return uitoa(uint(val))
14 | }
15 |
16 | func uitoa(val uint) string {
17 | var buf [32]byte // big enough for int64
18 | i := len(buf) - 1
19 | for val >= 10 {
20 | buf[i] = byte(val%10 + '0')
21 | i--
22 | val /= 10
23 | }
24 | buf[i] = byte(val + '0')
25 | return string(buf[i:])
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,go1.12,!go1.13
6 |
7 | package unix
8 |
9 | import (
10 | "unsafe"
11 | )
12 |
13 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
14 | // To implement this using libSystem we'd need syscall_syscallPtr for
15 | // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
16 | // back to raw syscalls for this func on Go 1.12.
17 | var p unsafe.Pointer
18 | if len(buf) > 0 {
19 | p = unsafe.Pointer(&buf[0])
20 | } else {
21 | p = unsafe.Pointer(&_zero)
22 | }
23 | r0, _, e1 := Syscall6(SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
24 | n = int(r0)
25 | if e1 != 0 {
26 | return n, errnoErr(e1)
27 | }
28 | return n, nil
29 | }
30 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_386.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,386,!go1.12
6 |
7 | package unix
8 |
9 | //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,amd64,!go1.12
6 |
7 | package unix
8 |
9 | //sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
10 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_arm.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,arm,!go1.12
6 |
7 | package unix
8 |
9 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
10 | return 0, ENOSYS
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.1_11.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,arm64,!go1.12
6 |
7 | package unix
8 |
9 | func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
10 | return 0, ENOSYS
11 | }
12 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_darwin_libSystem.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin,go1.12
6 |
7 | package unix
8 |
9 | import "unsafe"
10 |
11 | // Implemented in the runtime package (runtime/sys_darwin.go)
12 | func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
13 | func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
14 | func syscall_syscall6X(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
15 | func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) // 32-bit only
16 | func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
17 | func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
18 | func syscall_syscallPtr(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
19 |
20 | //go:linkname syscall_syscall syscall.syscall
21 | //go:linkname syscall_syscall6 syscall.syscall6
22 | //go:linkname syscall_syscall6X syscall.syscall6X
23 | //go:linkname syscall_syscall9 syscall.syscall9
24 | //go:linkname syscall_rawSyscall syscall.rawSyscall
25 | //go:linkname syscall_rawSyscall6 syscall.rawSyscall6
26 | //go:linkname syscall_syscallPtr syscall.syscallPtr
27 |
28 | // Find the entry point for f. See comments in runtime/proc.go for the
29 | // function of the same name.
30 | //go:nosplit
31 | func funcPC(f func()) uintptr {
32 | return **(**uintptr)(unsafe.Pointer(&f))
33 | }
34 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,dragonfly
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetIovlen(length int) {
37 | msghdr.Iovlen = int32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
44 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
45 | var writtenOut uint64 = 0
46 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
47 |
48 | written = int(writtenOut)
49 |
50 | if e1 != 0 {
51 | err = e1
52 | }
53 | return
54 | }
55 |
56 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: int32(sec), Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: int32(sec), Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetIovlen(length int) {
37 | msghdr.Iovlen = int32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
44 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
45 | var writtenOut uint64 = 0
46 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
47 |
48 | written = int(writtenOut)
49 |
50 | if e1 != 0 {
51 | err = e1
52 | }
53 | return
54 | }
55 |
56 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetIovlen(length int) {
37 | msghdr.Iovlen = int32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
44 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
45 | var writtenOut uint64 = 0
46 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
47 |
48 | written = int(writtenOut)
49 |
50 | if e1 != 0 {
51 | err = e1
52 | }
53 | return
54 | }
55 |
56 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: int32(nsec)}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: int32(usec)}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint32(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint32(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetIovlen(length int) {
37 | msghdr.Iovlen = int32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
44 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
45 | var writtenOut uint64 = 0
46 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
47 |
48 | written = int(writtenOut)
49 |
50 | if e1 != 0 {
51 | err = e1
52 | }
53 | return
54 | }
55 |
56 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64,freebsd
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func setTimespec(sec, nsec int64) Timespec {
15 | return Timespec{Sec: sec, Nsec: nsec}
16 | }
17 |
18 | func setTimeval(sec, usec int64) Timeval {
19 | return Timeval{Sec: sec, Usec: usec}
20 | }
21 |
22 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
23 | k.Ident = uint64(fd)
24 | k.Filter = int16(mode)
25 | k.Flags = uint16(flags)
26 | }
27 |
28 | func (iov *Iovec) SetLen(length int) {
29 | iov.Len = uint64(length)
30 | }
31 |
32 | func (msghdr *Msghdr) SetControllen(length int) {
33 | msghdr.Controllen = uint32(length)
34 | }
35 |
36 | func (msghdr *Msghdr) SetIovlen(length int) {
37 | msghdr.Iovlen = int32(length)
38 | }
39 |
40 | func (cmsg *Cmsghdr) SetLen(length int) {
41 | cmsg.Len = uint32(length)
42 | }
43 |
44 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
45 | var writtenOut uint64 = 0
46 | _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
47 |
48 | written = int(writtenOut)
49 |
50 | if e1 != 0 {
51 | err = e1
52 | }
53 | return
54 | }
55 |
56 | func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
57 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,linux
6 | // +build !gccgo
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | //go:noescape
13 | func gettimeofday(tv *Timeval) (err syscall.Errno)
14 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo
6 |
7 | package unix
8 |
9 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail.
10 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
11 |
12 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't
13 | // fail.
14 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr)
15 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,!gccgo,386
6 |
7 | package unix
8 |
9 | import "syscall"
10 |
11 | // Underlying system call writes to newoffset via pointer.
12 | // Implemented in assembly to avoid allocation.
13 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
14 |
15 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
16 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
17 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,386
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
22 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
23 | fd, _, err := Syscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
24 | return int(fd), err
25 | }
26 |
27 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno) {
28 | fd, _, err := RawSyscall(SYS_SOCKETCALL, uintptr(call), uintptr(unsafe.Pointer(&a0)), 0)
29 | return int(fd), err
30 | }
31 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux,gccgo,arm
6 |
7 | package unix
8 |
9 | import (
10 | "syscall"
11 | "unsafe"
12 | )
13 |
14 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) {
15 | var newoffset int64
16 | offsetLow := uint32(offset & 0xffffffff)
17 | offsetHigh := uint32((offset >> 32) & 0xffffffff)
18 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0)
19 | return newoffset, err
20 | }
21 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_netbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64,netbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = uint32(mode)
20 | k.Flags = uint32(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = int32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build 386,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/386 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: int32(nsec)}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: int32(usec)}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint32(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint32(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/arm the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_openbsd_arm64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2019 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build arm64,openbsd
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func SetKevent(k *Kevent_t, fd, mode, flags int) {
18 | k.Ident = uint64(fd)
19 | k.Filter = int16(mode)
20 | k.Flags = uint16(flags)
21 | }
22 |
23 | func (iov *Iovec) SetLen(length int) {
24 | iov.Len = uint64(length)
25 | }
26 |
27 | func (msghdr *Msghdr) SetControllen(length int) {
28 | msghdr.Controllen = uint32(length)
29 | }
30 |
31 | func (msghdr *Msghdr) SetIovlen(length int) {
32 | msghdr.Iovlen = uint32(length)
33 | }
34 |
35 | func (cmsg *Cmsghdr) SetLen(length int) {
36 | cmsg.Len = uint32(length)
37 | }
38 |
39 | // SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
40 | // of openbsd/amd64 the syscall is called sysctl instead of __sysctl.
41 | const SYS___SYSCTL = SYS_SYSCTL
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build amd64,solaris
6 |
7 | package unix
8 |
9 | func setTimespec(sec, nsec int64) Timespec {
10 | return Timespec{Sec: sec, Nsec: nsec}
11 | }
12 |
13 | func setTimeval(sec, usec int64) Timeval {
14 | return Timeval{Sec: sec, Usec: usec}
15 | }
16 |
17 | func (iov *Iovec) SetLen(length int) {
18 | iov.Len = uint64(length)
19 | }
20 |
21 | func (msghdr *Msghdr) SetIovlen(length int) {
22 | msghdr.Iovlen = int32(length)
23 | }
24 |
25 | func (cmsg *Cmsghdr) SetLen(length int) {
26 | cmsg.Len = uint32(length)
27 | }
28 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris
6 | // +build !gccgo,!ppc64le,!ppc64
7 |
8 | package unix
9 |
10 | import "syscall"
11 |
12 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
13 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
14 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
15 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
16 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/syscall_unix_gc_ppc64x.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build linux
6 | // +build ppc64le ppc64
7 | // +build !gccgo
8 |
9 | package unix
10 |
11 | import "syscall"
12 |
13 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
14 | return syscall.Syscall(trap, a1, a2, a3)
15 | }
16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
17 | return syscall.Syscall6(trap, a1, a2, a3, a4, a5, a6)
18 | }
19 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
20 | return syscall.RawSyscall(trap, a1, a2, a3)
21 | }
22 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
23 | return syscall.RawSyscall6(trap, a1, a2, a3, a4, a5, a6)
24 | }
25 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/unveil_openbsd.go:
--------------------------------------------------------------------------------
1 | // Copyright 2018 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package unix
6 |
7 | import (
8 | "syscall"
9 | "unsafe"
10 | )
11 |
12 | // Unveil implements the unveil syscall.
13 | // For more information see unveil(2).
14 | // Note that the special case of blocking further
15 | // unveil calls is handled by UnveilBlock.
16 | func Unveil(path string, flags string) error {
17 | pathPtr, err := syscall.BytePtrFromString(path)
18 | if err != nil {
19 | return err
20 | }
21 | flagsPtr, err := syscall.BytePtrFromString(flags)
22 | if err != nil {
23 | return err
24 | }
25 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(unsafe.Pointer(pathPtr)), uintptr(unsafe.Pointer(flagsPtr)), 0)
26 | if e != 0 {
27 | return e
28 | }
29 | return nil
30 | }
31 |
32 | // UnveilBlock blocks future unveil calls.
33 | // For more information see unveil(2).
34 | func UnveilBlock() error {
35 | // Both pointers must be nil.
36 | var pathUnsafe, flagsUnsafe unsafe.Pointer
37 | _, _, e := syscall.Syscall(SYS_UNVEIL, uintptr(pathUnsafe), uintptr(flagsUnsafe), 0)
38 | if e != 0 {
39 | return e
40 | }
41 | return nil
42 | }
43 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptrace_armnn_linux.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtracePair("arm", "arm64"). DO NOT EDIT.
2 |
3 | // +build linux
4 | // +build arm arm64
5 |
6 | package unix
7 |
8 | import "unsafe"
9 |
10 | // PtraceRegsArm is the registers used by arm binaries.
11 | type PtraceRegsArm struct {
12 | Uregs [18]uint32
13 | }
14 |
15 | // PtraceGetRegsArm fetches the registers used by arm binaries.
16 | func PtraceGetRegsArm(pid int, regsout *PtraceRegsArm) error {
17 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
18 | }
19 |
20 | // PtraceSetRegsArm sets the registers used by arm binaries.
21 | func PtraceSetRegsArm(pid int, regs *PtraceRegsArm) error {
22 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
23 | }
24 |
25 | // PtraceRegsArm64 is the registers used by arm64 binaries.
26 | type PtraceRegsArm64 struct {
27 | Regs [31]uint64
28 | Sp uint64
29 | Pc uint64
30 | Pstate uint64
31 | }
32 |
33 | // PtraceGetRegsArm64 fetches the registers used by arm64 binaries.
34 | func PtraceGetRegsArm64(pid int, regsout *PtraceRegsArm64) error {
35 | return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
36 | }
37 |
38 | // PtraceSetRegsArm64 sets the registers used by arm64 binaries.
39 | func PtraceSetRegsArm64(pid int, regs *PtraceRegsArm64) error {
40 | return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
41 | }
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go:
--------------------------------------------------------------------------------
1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT.
2 |
3 | package unix
4 |
5 | import "unsafe"
6 |
7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries.
8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error {
9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))}
10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
11 | }
12 |
13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries.
14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error {
15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))}
16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec)))
17 | }
18 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -l32 -tags darwin,386,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,386,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_386.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go 386
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,amd64,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go amd64
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -l32 -tags darwin,arm,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,arm,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go arm
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go:
--------------------------------------------------------------------------------
1 | // go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
2 | // Code generated by the command above; see README.md. DO NOT EDIT.
3 |
4 | // +build darwin,arm64,go1.13
5 |
6 | package unix
7 |
8 | import (
9 | "syscall"
10 | "unsafe"
11 | )
12 |
13 | var _ syscall.Errno
14 |
15 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
16 |
17 | func closedir(dir uintptr) (err error) {
18 | _, _, e1 := syscall_syscall(funcPC(libc_closedir_trampoline), uintptr(dir), 0, 0)
19 | if e1 != 0 {
20 | err = errnoErr(e1)
21 | }
22 | return
23 | }
24 |
25 | func libc_closedir_trampoline()
26 |
27 | //go:linkname libc_closedir libc_closedir
28 | //go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
29 |
30 | // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
31 |
32 | func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
33 | r0, _, _ := syscall_syscall(funcPC(libc_readdir_r_trampoline), uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
34 | res = Errno(r0)
35 | return
36 | }
37 |
38 | func libc_readdir_r_trampoline()
39 |
40 | //go:linkname libc_readdir_r libc_readdir_r
41 | //go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
42 |
--------------------------------------------------------------------------------
/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s:
--------------------------------------------------------------------------------
1 | // go run mkasm_darwin.go arm64
2 | // Code generated by the command above; DO NOT EDIT.
3 |
4 | // +build go1.13
5 |
6 | #include "textflag.h"
7 | TEXT ·libc_fdopendir_trampoline(SB),NOSPLIT,$0-0
8 | JMP libc_fdopendir(SB)
9 | TEXT ·libc_closedir_trampoline(SB),NOSPLIT,$0-0
10 | JMP libc_closedir(SB)
11 | TEXT ·libc_readdir_r_trampoline(SB),NOSPLIT,$0-0
12 | JMP libc_readdir_r(SB)
13 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | go:
4 | - "1.4.x"
5 | - "1.5.x"
6 | - "1.6.x"
7 | - "1.7.x"
8 | - "1.8.x"
9 | - "1.9.x"
10 | - "1.10.x"
11 | - "1.11.x"
12 | - "1.12.x"
13 | - "1.13.x"
14 | - "tip"
15 |
16 | go_import_path: gopkg.in/yaml.v2
17 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/LICENSE.libyaml:
--------------------------------------------------------------------------------
1 | The following files were ported to Go from C files of libyaml, and thus
2 | are still covered by their original copyright and license:
3 |
4 | apic.go
5 | emitterc.go
6 | parserc.go
7 | readerc.go
8 | scannerc.go
9 | writerc.go
10 | yamlh.go
11 | yamlprivateh.go
12 |
13 | Copyright (c) 2006 Kirill Simonov
14 |
15 | Permission is hereby granted, free of charge, to any person obtaining a copy of
16 | this software and associated documentation files (the "Software"), to deal in
17 | the Software without restriction, including without limitation the rights to
18 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
19 | of the Software, and to permit persons to whom the Software is furnished to do
20 | so, subject to the following conditions:
21 |
22 | The above copyright notice and this permission notice shall be included in all
23 | copies or substantial portions of the Software.
24 |
25 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31 | SOFTWARE.
32 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/NOTICE:
--------------------------------------------------------------------------------
1 | Copyright 2011-2016 Canonical Ltd.
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
14 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/go.mod:
--------------------------------------------------------------------------------
1 | module "gopkg.in/yaml.v2"
2 |
3 | require (
4 | "gopkg.in/check.v1" v0.0.0-20161208181325-20d25e280405
5 | )
6 |
--------------------------------------------------------------------------------
/vendor/gopkg.in/yaml.v2/writerc.go:
--------------------------------------------------------------------------------
1 | package yaml
2 |
3 | // Set the writer error and return false.
4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool {
5 | emitter.error = yaml_WRITER_ERROR
6 | emitter.problem = problem
7 | return false
8 | }
9 |
10 | // Flush the output buffer.
11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool {
12 | if emitter.write_handler == nil {
13 | panic("write handler not set")
14 | }
15 |
16 | // Check if the buffer is empty.
17 | if emitter.buffer_pos == 0 {
18 | return true
19 | }
20 |
21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil {
22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error())
23 | }
24 | emitter.buffer_pos = 0
25 | return true
26 | }
27 |
--------------------------------------------------------------------------------
/vendor/modules.txt:
--------------------------------------------------------------------------------
1 | # github.com/gin-contrib/sse v0.1.0
2 | github.com/gin-contrib/sse
3 | # github.com/gin-gonic/gin v1.6.3
4 | ## explicit
5 | github.com/gin-gonic/gin
6 | github.com/gin-gonic/gin/binding
7 | github.com/gin-gonic/gin/internal/bytesconv
8 | github.com/gin-gonic/gin/internal/json
9 | github.com/gin-gonic/gin/render
10 | # github.com/go-playground/locales v0.13.0
11 | github.com/go-playground/locales
12 | github.com/go-playground/locales/currency
13 | # github.com/go-playground/universal-translator v0.17.0
14 | github.com/go-playground/universal-translator
15 | # github.com/go-playground/validator/v10 v10.2.0
16 | github.com/go-playground/validator/v10
17 | # github.com/golang/protobuf v1.3.3
18 | github.com/golang/protobuf/proto
19 | # github.com/json-iterator/go v1.1.9
20 | github.com/json-iterator/go
21 | # github.com/leodido/go-urn v1.2.0
22 | github.com/leodido/go-urn
23 | # github.com/mattn/go-isatty v0.0.12
24 | github.com/mattn/go-isatty
25 | # github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421
26 | github.com/modern-go/concurrent
27 | # github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742
28 | github.com/modern-go/reflect2
29 | # github.com/ugorji/go/codec v1.1.7
30 | github.com/ugorji/go/codec
31 | # golang.org/x/sys v0.0.0-20200116001909-b77594299b42
32 | golang.org/x/sys/unix
33 | # gopkg.in/yaml.v2 v2.2.8
34 | gopkg.in/yaml.v2
35 |
--------------------------------------------------------------------------------