├── .gitignore ├── .goreleaser.yml ├── Dockerfile ├── Gopkg.lock ├── Gopkg.toml ├── LICENSE ├── Makefile ├── README.md ├── cmd ├── helpers.go └── root.go ├── main.go ├── templates ├── Dockerfile.tmpl ├── Makefile.tmpl ├── envrc.tmpl ├── goreleaser.yml.tmpl └── main.go.tmpl └── vendor ├── github.com ├── fsnotify │ └── fsnotify │ │ ├── .editorconfig │ │ ├── .github │ │ ├── ISSUE_TEMPLATE.md │ │ └── PULL_REQUEST_TEMPLATE.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── AUTHORS │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── example_test.go │ │ ├── fen.go │ │ ├── fsnotify.go │ │ ├── fsnotify_test.go │ │ ├── inotify.go │ │ ├── inotify_poller.go │ │ ├── inotify_poller_test.go │ │ ├── inotify_test.go │ │ ├── integration_darwin_test.go │ │ ├── integration_test.go │ │ ├── kqueue.go │ │ ├── open_mode_bsd.go │ │ ├── open_mode_darwin.go │ │ └── windows.go ├── hashicorp │ └── hcl │ │ ├── .github │ │ └── ISSUE_TEMPLATE.md │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── decoder.go │ │ ├── decoder_test.go │ │ ├── hcl.go │ │ ├── hcl │ │ ├── ast │ │ │ ├── ast.go │ │ │ ├── ast_test.go │ │ │ └── walk.go │ │ ├── fmtcmd │ │ │ ├── fmtcmd.go │ │ │ ├── fmtcmd_test.go │ │ │ └── test-fixtures │ │ │ │ ├── .hidden.ignore │ │ │ │ ├── dir.ignore │ │ │ │ ├── file.ignore │ │ │ │ └── good.hcl │ │ ├── parser │ │ │ ├── error.go │ │ │ ├── error_test.go │ │ │ ├── parser.go │ │ │ ├── parser_test.go │ │ │ └── test-fixtures │ │ │ │ ├── array_comment.hcl │ │ │ │ ├── array_comment_2.hcl │ │ │ │ ├── assign_colon.hcl │ │ │ │ ├── assign_deep.hcl │ │ │ │ ├── comment.hcl │ │ │ │ ├── comment_crlf.hcl │ │ │ │ ├── comment_lastline.hcl │ │ │ │ ├── comment_single.hcl │ │ │ │ ├── complex.hcl │ │ │ │ ├── complex_crlf.hcl │ │ │ │ ├── complex_key.hcl │ │ │ │ ├── empty.hcl │ │ │ │ ├── git_crypt.hcl │ │ │ │ ├── key_without_value.hcl │ │ │ │ ├── list.hcl │ │ │ │ ├── list_comma.hcl │ │ │ │ ├── missing_braces.hcl │ │ │ │ ├── multiple.hcl │ │ │ │ ├── object_key_assign_without_value.hcl │ │ │ │ ├── object_key_assign_without_value2.hcl │ │ │ │ ├── object_key_assign_without_value3.hcl │ │ │ │ ├── object_key_without_value.hcl │ │ │ │ ├── object_list_comma.hcl │ │ │ │ ├── old.hcl │ │ │ │ ├── structure.hcl │ │ │ │ ├── structure_basic.hcl │ │ │ │ ├── structure_empty.hcl │ │ │ │ ├── types.hcl │ │ │ │ ├── unterminated_object.hcl │ │ │ │ └── unterminated_object_2.hcl │ │ ├── printer │ │ │ ├── nodes.go │ │ │ ├── printer.go │ │ │ ├── printer_test.go │ │ │ └── testdata │ │ │ │ ├── comment.golden │ │ │ │ ├── comment.input │ │ │ │ ├── comment_aligned.golden │ │ │ │ ├── comment_aligned.input │ │ │ │ ├── comment_array.golden │ │ │ │ ├── comment_array.input │ │ │ │ ├── comment_crlf.input │ │ │ │ ├── comment_end_file.golden │ │ │ │ ├── comment_end_file.input │ │ │ │ ├── comment_multiline_indent.golden │ │ │ │ ├── comment_multiline_indent.input │ │ │ │ ├── comment_multiline_no_stanza.golden │ │ │ │ ├── comment_multiline_no_stanza.input │ │ │ │ ├── comment_multiline_stanza.golden │ │ │ │ ├── comment_multiline_stanza.input │ │ │ │ ├── comment_newline.golden │ │ │ │ ├── comment_newline.input │ │ │ │ ├── comment_object_multi.golden │ │ │ │ ├── comment_object_multi.input │ │ │ │ ├── comment_standalone.golden │ │ │ │ ├── comment_standalone.input │ │ │ │ ├── complexhcl.golden │ │ │ │ ├── complexhcl.input │ │ │ │ ├── empty_block.golden │ │ │ │ ├── empty_block.input │ │ │ │ ├── list.golden │ │ │ │ ├── list.input │ │ │ │ ├── list_comment.golden │ │ │ │ ├── list_comment.input │ │ │ │ ├── list_of_objects.golden │ │ │ │ ├── list_of_objects.input │ │ │ │ ├── multiline_string.golden │ │ │ │ ├── multiline_string.input │ │ │ │ ├── object_singleline.golden │ │ │ │ ├── object_singleline.input │ │ │ │ ├── object_with_heredoc.golden │ │ │ │ └── object_with_heredoc.input │ │ ├── scanner │ │ │ ├── scanner.go │ │ │ └── scanner_test.go │ │ ├── strconv │ │ │ ├── quote.go │ │ │ └── quote_test.go │ │ ├── test-fixtures │ │ │ ├── array_comment.hcl │ │ │ ├── assign_colon.hcl │ │ │ ├── comment.hcl │ │ │ ├── comment_single.hcl │ │ │ ├── complex.hcl │ │ │ ├── complex_key.hcl │ │ │ ├── empty.hcl │ │ │ ├── list.hcl │ │ │ ├── list_comma.hcl │ │ │ ├── multiple.hcl │ │ │ ├── old.hcl │ │ │ ├── structure.hcl │ │ │ ├── structure_basic.hcl │ │ │ ├── structure_empty.hcl │ │ │ └── types.hcl │ │ └── token │ │ │ ├── position.go │ │ │ ├── token.go │ │ │ └── token_test.go │ │ ├── hcl_test.go │ │ ├── json │ │ ├── parser │ │ │ ├── flatten.go │ │ │ ├── parser.go │ │ │ ├── parser_test.go │ │ │ └── test-fixtures │ │ │ │ ├── array.json │ │ │ │ ├── bad_input_128.json │ │ │ │ ├── bad_input_tf_8110.json │ │ │ │ ├── basic.json │ │ │ │ ├── good_input_tf_8110.json │ │ │ │ ├── object.json │ │ │ │ └── types.json │ │ ├── scanner │ │ │ ├── scanner.go │ │ │ └── scanner_test.go │ │ ├── test-fixtures │ │ │ ├── array.json │ │ │ ├── basic.json │ │ │ ├── object.json │ │ │ └── types.json │ │ └── token │ │ │ ├── position.go │ │ │ ├── token.go │ │ │ └── token_test.go │ │ ├── lex.go │ │ ├── lex_test.go │ │ ├── parse.go │ │ ├── test-fixtures │ │ ├── assign_deep.hcl │ │ ├── basic.hcl │ │ ├── basic.json │ │ ├── basic_int_string.hcl │ │ ├── basic_squish.hcl │ │ ├── block_assign.hcl │ │ ├── decode_policy.hcl │ │ ├── decode_policy.json │ │ ├── decode_tf_variable.hcl │ │ ├── decode_tf_variable.json │ │ ├── empty.hcl │ │ ├── escape.hcl │ │ ├── escape_backslash.hcl │ │ ├── flat.hcl │ │ ├── float.hcl │ │ ├── float.json │ │ ├── git_crypt.hcl │ │ ├── interpolate.json │ │ ├── list_of_lists.hcl │ │ ├── list_of_maps.hcl │ │ ├── multiline.hcl │ │ ├── multiline.json │ │ ├── multiline_bad.hcl │ │ ├── multiline_indented.hcl │ │ ├── multiline_literal.hcl │ │ ├── multiline_literal_with_hil.hcl │ │ ├── multiline_no_eof.hcl │ │ ├── multiline_no_hanging_indent.hcl │ │ ├── multiline_no_marker.hcl │ │ ├── nested_block_comment.hcl │ │ ├── nested_provider_bad.hcl │ │ ├── null_strings.json │ │ ├── object_list.json │ │ ├── object_with_bool.hcl │ │ ├── scientific.hcl │ │ ├── scientific.json │ │ ├── slice_expand.hcl │ │ ├── structure.hcl │ │ ├── structure.json │ │ ├── structure2.hcl │ │ ├── structure2.json │ │ ├── structure_flat.json │ │ ├── structure_flatmap.hcl │ │ ├── structure_list.hcl │ │ ├── structure_list.json │ │ ├── structure_list_deep.json │ │ ├── structure_list_empty.json │ │ ├── structure_multi.hcl │ │ ├── structure_multi.json │ │ ├── terraform_heroku.hcl │ │ ├── terraform_heroku.json │ │ ├── terraform_variable_invalid.json │ │ ├── tfvars.hcl │ │ ├── unterminated_block_comment.hcl │ │ └── unterminated_brace.hcl │ │ └── testhelper │ │ └── unix2dos.go ├── inconshreveable │ └── mousetrap │ │ ├── LICENSE │ │ ├── README.md │ │ ├── trap_others.go │ │ ├── trap_windows.go │ │ └── trap_windows_1.4.go ├── magiconair │ └── properties │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── assert │ │ ├── assert.go │ │ └── assert_test.go │ │ ├── benchmark_test.go │ │ ├── decode.go │ │ ├── decode_test.go │ │ ├── doc.go │ │ ├── example_test.go │ │ ├── integrate.go │ │ ├── integrate_test.go │ │ ├── lex.go │ │ ├── load.go │ │ ├── load_test.go │ │ ├── parser.go │ │ ├── properties.go │ │ ├── properties_test.go │ │ └── rangecheck.go ├── mitchellh │ ├── go-homedir │ │ ├── LICENSE │ │ ├── README.md │ │ ├── homedir.go │ │ └── homedir_test.go │ └── mapstructure │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── decode_hooks.go │ │ ├── decode_hooks_test.go │ │ ├── error.go │ │ ├── mapstructure.go │ │ ├── mapstructure_benchmark_test.go │ │ ├── mapstructure_bugs_test.go │ │ ├── mapstructure_examples_test.go │ │ └── mapstructure_test.go ├── pelletier │ └── go-toml │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── benchmark.json │ │ ├── benchmark.sh │ │ ├── benchmark.toml │ │ ├── benchmark.yml │ │ ├── benchmark_test.go │ │ ├── cmd │ │ ├── test_program.go │ │ ├── tomljson │ │ │ ├── main.go │ │ │ └── main_test.go │ │ └── tomll │ │ │ └── main.go │ │ ├── doc.go │ │ ├── doc_test.go │ │ ├── example-crlf.toml │ │ ├── example.toml │ │ ├── keysparsing.go │ │ ├── keysparsing_test.go │ │ ├── lexer.go │ │ ├── lexer_test.go │ │ ├── marshal.go │ │ ├── marshal_test.go │ │ ├── marshal_test.toml │ │ ├── parser.go │ │ ├── parser_test.go │ │ ├── position.go │ │ ├── position_test.go │ │ ├── query │ │ ├── doc.go │ │ ├── lexer.go │ │ ├── lexer_test.go │ │ ├── match.go │ │ ├── match_test.go │ │ ├── parser.go │ │ ├── parser_test.go │ │ ├── query.go │ │ ├── query_test.go │ │ └── tokens.go │ │ ├── test.sh │ │ ├── token.go │ │ ├── token_test.go │ │ ├── toml.go │ │ ├── toml_test.go │ │ ├── tomltree_create.go │ │ ├── tomltree_create_test.go │ │ ├── tomltree_write.go │ │ └── tomltree_write_test.go ├── pkg │ └── errors │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── appveyor.yml │ │ ├── bench_test.go │ │ ├── errors.go │ │ ├── errors_test.go │ │ ├── example_test.go │ │ ├── format_test.go │ │ ├── stack.go │ │ └── stack_test.go └── spf13 │ ├── afero │ ├── .travis.yml │ ├── LICENSE.txt │ ├── README.md │ ├── afero.go │ ├── afero_test.go │ ├── appveyor.yml │ ├── basepath.go │ ├── basepath_test.go │ ├── cacheOnReadFs.go │ ├── composite_test.go │ ├── const_bsds.go │ ├── const_win_unix.go │ ├── copyOnWriteFs.go │ ├── copyOnWriteFs_test.go │ ├── httpFs.go │ ├── ioutil.go │ ├── ioutil_test.go │ ├── match.go │ ├── match_test.go │ ├── mem │ │ ├── dir.go │ │ ├── dirmap.go │ │ ├── file.go │ │ └── file_test.go │ ├── memmap.go │ ├── memmap_test.go │ ├── os.go │ ├── path.go │ ├── path_test.go │ ├── readonlyfs.go │ ├── regexpfs.go │ ├── ro_regexp_test.go │ ├── sftpfs │ │ ├── file.go │ │ ├── sftp.go │ │ └── sftp_test_go │ ├── unionFile.go │ ├── util.go │ └── util_test.go │ ├── cast │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── cast.go │ ├── cast_test.go │ └── caste.go │ ├── cobra │ ├── .gitignore │ ├── .mailmap │ ├── .travis.yml │ ├── LICENSE.txt │ ├── README.md │ ├── args.go │ ├── bash_completions.go │ ├── bash_completions.md │ ├── bash_completions_test.go │ ├── cobra.go │ ├── cobra │ │ ├── README.md │ │ ├── cmd │ │ │ ├── add.go │ │ │ ├── add_test.go │ │ │ ├── golden_test.go │ │ │ ├── helpers.go │ │ │ ├── init.go │ │ │ ├── init_test.go │ │ │ ├── license_agpl.go │ │ │ ├── license_apache_2.go │ │ │ ├── license_bsd_clause_2.go │ │ │ ├── license_bsd_clause_3.go │ │ │ ├── license_gpl_2.go │ │ │ ├── license_gpl_3.go │ │ │ ├── license_lgpl.go │ │ │ ├── license_mit.go │ │ │ ├── licenses.go │ │ │ ├── project.go │ │ │ ├── project_test.go │ │ │ ├── root.go │ │ │ └── testdata │ │ │ │ ├── LICENSE.golden │ │ │ │ ├── main.go.golden │ │ │ │ ├── root.go.golden │ │ │ │ └── test.go.golden │ │ └── main.go │ ├── cobra_test.go │ ├── command.go │ ├── command_notwin.go │ ├── command_test.go │ ├── command_win.go │ ├── doc │ │ ├── cmd_test.go │ │ ├── man_docs.go │ │ ├── man_docs.md │ │ ├── man_docs_test.go │ │ ├── man_examples_test.go │ │ ├── md_docs.go │ │ ├── md_docs.md │ │ ├── md_docs_test.go │ │ ├── rest_docs.go │ │ ├── rest_docs.md │ │ ├── rest_docs_test.go │ │ ├── util.go │ │ ├── yaml_docs.go │ │ ├── yaml_docs.md │ │ └── yaml_docs_test.go │ ├── zsh_completions.go │ └── zsh_completions_test.go │ ├── jwalterweatherman │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── default_notepad.go │ ├── default_notepad_test.go │ ├── log_counter.go │ ├── notepad.go │ └── notepad_test.go │ ├── pflag │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── bool.go │ ├── bool_slice.go │ ├── bool_slice_test.go │ ├── bool_test.go │ ├── count.go │ ├── count_test.go │ ├── duration.go │ ├── example_test.go │ ├── export_test.go │ ├── flag.go │ ├── flag_test.go │ ├── float32.go │ ├── float64.go │ ├── golangflag.go │ ├── golangflag_test.go │ ├── int.go │ ├── int32.go │ ├── int64.go │ ├── int8.go │ ├── int_slice.go │ ├── int_slice_test.go │ ├── ip.go │ ├── ip_slice.go │ ├── ip_slice_test.go │ ├── ip_test.go │ ├── ipmask.go │ ├── ipnet.go │ ├── ipnet_test.go │ ├── string.go │ ├── string_array.go │ ├── string_array_test.go │ ├── string_slice.go │ ├── string_slice_test.go │ ├── uint.go │ ├── uint16.go │ ├── uint32.go │ ├── uint64.go │ ├── uint8.go │ ├── uint_slice.go │ ├── uint_slice_test.go │ └── verify │ │ ├── all.sh │ │ ├── gofmt.sh │ │ └── golint.sh │ └── viper │ ├── .gitignore │ ├── .travis.yml │ ├── LICENSE │ ├── README.md │ ├── flags.go │ ├── flags_test.go │ ├── nohup.out │ ├── overrides_test.go │ ├── remote │ └── remote.go │ ├── util.go │ ├── util_test.go │ ├── viper.go │ └── viper_test.go ├── golang.org └── x │ ├── sys │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── codereview.cfg │ ├── plan9 │ │ ├── asm.s │ │ ├── asm_plan9_386.s │ │ ├── asm_plan9_amd64.s │ │ ├── const_plan9.go │ │ ├── dir_plan9.go │ │ ├── env_plan9.go │ │ ├── env_unset.go │ │ ├── errors_plan9.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mksyscall.pl │ │ ├── mksysnum_plan9.sh │ │ ├── pwd_go15_plan9.go │ │ ├── pwd_plan9.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_plan9.go │ │ ├── syscall_test.go │ │ ├── zsyscall_plan9_386.go │ │ ├── zsyscall_plan9_amd64.go │ │ └── zsysnum_plan9.go │ ├── unix │ │ ├── .gitignore │ │ ├── README.md │ │ ├── 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_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_s390x.s │ │ ├── asm_netbsd_386.s │ │ ├── asm_netbsd_amd64.s │ │ ├── asm_netbsd_arm.s │ │ ├── asm_openbsd_386.s │ │ ├── asm_openbsd_amd64.s │ │ ├── asm_openbsd_arm.s │ │ ├── asm_solaris_amd64.s │ │ ├── bluetooth_linux.go │ │ ├── cap_freebsd.go │ │ ├── constants.go │ │ ├── creds_test.go │ │ ├── dev_darwin.go │ │ ├── dev_darwin_test.go │ │ ├── dev_dragonfly.go │ │ ├── dev_dragonfly_test.go │ │ ├── dev_freebsd.go │ │ ├── dev_linux.go │ │ ├── dev_linux_test.go │ │ ├── dev_netbsd.go │ │ ├── dev_netbsd_test.go │ │ ├── dev_openbsd.go │ │ ├── dev_openbsd_test.go │ │ ├── dev_solaris_test.go │ │ ├── dirent.go │ │ ├── endian_big.go │ │ ├── endian_little.go │ │ ├── env_unix.go │ │ ├── env_unset.go │ │ ├── errors_freebsd_386.go │ │ ├── errors_freebsd_amd64.go │ │ ├── errors_freebsd_arm.go │ │ ├── export_test.go │ │ ├── flock.go │ │ ├── flock_linux_32bit.go │ │ ├── gccgo.go │ │ ├── gccgo_c.c │ │ ├── gccgo_linux_amd64.go │ │ ├── linux │ │ │ ├── Dockerfile │ │ │ ├── mkall.go │ │ │ ├── mksysnum.pl │ │ │ └── types.go │ │ ├── mkall.sh │ │ ├── mkerrors.sh │ │ ├── mkpost.go │ │ ├── mksyscall.pl │ │ ├── mksyscall_solaris.pl │ │ ├── mksysctl_openbsd.pl │ │ ├── mksysnum_darwin.pl │ │ ├── mksysnum_dragonfly.pl │ │ ├── mksysnum_freebsd.pl │ │ ├── mksysnum_netbsd.pl │ │ ├── mksysnum_openbsd.pl │ │ ├── mmap_unix_test.go │ │ ├── openbsd_pledge.go │ │ ├── openbsd_test.go │ │ ├── pagesize_unix.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── sockcmsg_linux.go │ │ ├── sockcmsg_unix.go │ │ ├── str.go │ │ ├── syscall.go │ │ ├── syscall_bsd.go │ │ ├── syscall_bsd_test.go │ │ ├── syscall_darwin.go │ │ ├── syscall_darwin_386.go │ │ ├── syscall_darwin_amd64.go │ │ ├── syscall_darwin_arm.go │ │ ├── syscall_darwin_arm64.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_test.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_mips64x.go │ │ ├── syscall_linux_mipsx.go │ │ ├── syscall_linux_ppc64x.go │ │ ├── syscall_linux_s390x.go │ │ ├── syscall_linux_sparc64.go │ │ ├── syscall_linux_test.go │ │ ├── syscall_netbsd.go │ │ ├── syscall_netbsd_386.go │ │ ├── syscall_netbsd_amd64.go │ │ ├── syscall_netbsd_arm.go │ │ ├── syscall_no_getwd.go │ │ ├── syscall_openbsd.go │ │ ├── syscall_openbsd_386.go │ │ ├── syscall_openbsd_amd64.go │ │ ├── syscall_openbsd_arm.go │ │ ├── syscall_solaris.go │ │ ├── syscall_solaris_amd64.go │ │ ├── syscall_solaris_test.go │ │ ├── syscall_test.go │ │ ├── syscall_unix.go │ │ ├── syscall_unix_gc.go │ │ ├── syscall_unix_test.go │ │ ├── timestruct.go │ │ ├── types_darwin.go │ │ ├── types_dragonfly.go │ │ ├── types_freebsd.go │ │ ├── types_netbsd.go │ │ ├── types_openbsd.go │ │ ├── types_solaris.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_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_s390x.go │ │ ├── zerrors_linux_sparc64.go │ │ ├── zerrors_netbsd_386.go │ │ ├── zerrors_netbsd_amd64.go │ │ ├── zerrors_netbsd_arm.go │ │ ├── zerrors_openbsd_386.go │ │ ├── zerrors_openbsd_amd64.go │ │ ├── zerrors_openbsd_arm.go │ │ ├── zerrors_solaris_amd64.go │ │ ├── zptrace386_linux.go │ │ ├── zptracearm_linux.go │ │ ├── zptracemips_linux.go │ │ ├── zptracemipsle_linux.go │ │ ├── zsyscall_darwin_386.go │ │ ├── zsyscall_darwin_amd64.go │ │ ├── zsyscall_darwin_arm.go │ │ ├── zsyscall_darwin_arm64.go │ │ ├── zsyscall_dragonfly_amd64.go │ │ ├── zsyscall_freebsd_386.go │ │ ├── zsyscall_freebsd_amd64.go │ │ ├── zsyscall_freebsd_arm.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_s390x.go │ │ ├── zsyscall_linux_sparc64.go │ │ ├── zsyscall_netbsd_386.go │ │ ├── zsyscall_netbsd_amd64.go │ │ ├── zsyscall_netbsd_arm.go │ │ ├── zsyscall_openbsd_386.go │ │ ├── zsyscall_openbsd_amd64.go │ │ ├── zsyscall_openbsd_arm.go │ │ ├── zsyscall_solaris_amd64.go │ │ ├── zsysctl_openbsd_386.go │ │ ├── zsysctl_openbsd_amd64.go │ │ ├── zsysctl_openbsd_arm.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_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_s390x.go │ │ ├── zsysnum_linux_sparc64.go │ │ ├── zsysnum_netbsd_386.go │ │ ├── zsysnum_netbsd_amd64.go │ │ ├── zsysnum_netbsd_arm.go │ │ ├── zsysnum_openbsd_386.go │ │ ├── zsysnum_openbsd_amd64.go │ │ ├── zsysnum_openbsd_arm.go │ │ ├── zsysnum_solaris_amd64.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_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_s390x.go │ │ ├── ztypes_linux_sparc64.go │ │ ├── ztypes_netbsd_386.go │ │ ├── ztypes_netbsd_amd64.go │ │ ├── ztypes_netbsd_arm.go │ │ ├── ztypes_openbsd_386.go │ │ ├── ztypes_openbsd_amd64.go │ │ ├── ztypes_openbsd_arm.go │ │ └── ztypes_solaris_amd64.go │ └── windows │ │ ├── asm_windows_386.s │ │ ├── asm_windows_amd64.s │ │ ├── dll_windows.go │ │ ├── env_unset.go │ │ ├── env_windows.go │ │ ├── eventlog.go │ │ ├── exec_windows.go │ │ ├── memory_windows.go │ │ ├── mksyscall.go │ │ ├── race.go │ │ ├── race0.go │ │ ├── registry │ │ ├── export_test.go │ │ ├── key.go │ │ ├── mksyscall.go │ │ ├── registry_test.go │ │ ├── syscall.go │ │ ├── value.go │ │ └── zsyscall_windows.go │ │ ├── security_windows.go │ │ ├── service.go │ │ ├── str.go │ │ ├── svc │ │ ├── debug │ │ │ ├── log.go │ │ │ └── service.go │ │ ├── event.go │ │ ├── eventlog │ │ │ ├── install.go │ │ │ ├── log.go │ │ │ └── log_test.go │ │ ├── example │ │ │ ├── beep.go │ │ │ ├── install.go │ │ │ ├── main.go │ │ │ ├── manage.go │ │ │ └── service.go │ │ ├── go12.c │ │ ├── go12.go │ │ ├── go13.go │ │ ├── mgr │ │ │ ├── config.go │ │ │ ├── mgr.go │ │ │ ├── mgr_test.go │ │ │ └── service.go │ │ ├── security.go │ │ ├── service.go │ │ ├── svc_test.go │ │ ├── sys_386.s │ │ └── sys_amd64.s │ │ ├── syscall.go │ │ ├── syscall_test.go │ │ ├── syscall_windows.go │ │ ├── syscall_windows_test.go │ │ ├── types_windows.go │ │ ├── types_windows_386.go │ │ ├── types_windows_amd64.go │ │ └── zsyscall_windows.go │ └── text │ ├── .gitattributes │ ├── .gitignore │ ├── AUTHORS │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── PATENTS │ ├── README.md │ ├── cases │ ├── cases.go │ ├── context.go │ ├── context_test.go │ ├── example_test.go │ ├── fold.go │ ├── fold_test.go │ ├── gen.go │ ├── gen_trieval.go │ ├── icu.go │ ├── icu_test.go │ ├── info.go │ ├── map.go │ ├── map_test.go │ ├── tables.go │ ├── tables_test.go │ └── trieval.go │ ├── cmd │ └── gotext │ │ ├── doc.go │ │ ├── extract.go │ │ ├── main.go │ │ └── message.go │ ├── codereview.cfg │ ├── collate │ ├── build │ │ ├── builder.go │ │ ├── builder_test.go │ │ ├── colelem.go │ │ ├── colelem_test.go │ │ ├── contract.go │ │ ├── contract_test.go │ │ ├── order.go │ │ ├── order_test.go │ │ ├── table.go │ │ ├── trie.go │ │ └── trie_test.go │ ├── collate.go │ ├── collate_test.go │ ├── export_test.go │ ├── index.go │ ├── maketables.go │ ├── option.go │ ├── option_test.go │ ├── reg_test.go │ ├── sort.go │ ├── sort_test.go │ ├── table_test.go │ ├── tables.go │ └── tools │ │ └── colcmp │ │ ├── Makefile │ │ ├── chars.go │ │ ├── col.go │ │ ├── colcmp.go │ │ ├── darwin.go │ │ ├── gen.go │ │ └── icu.go │ ├── currency │ ├── common.go │ ├── currency.go │ ├── currency_test.go │ ├── example_test.go │ ├── format.go │ ├── format_test.go │ ├── gen.go │ ├── gen_common.go │ ├── query.go │ ├── query_test.go │ ├── tables.go │ └── tables_test.go │ ├── date │ ├── data_test.go │ ├── gen.go │ ├── gen_test.go │ └── tables.go │ ├── doc.go │ ├── encoding │ ├── charmap │ │ ├── charmap.go │ │ ├── charmap_test.go │ │ ├── maketables.go │ │ └── tables.go │ ├── encoding.go │ ├── encoding_test.go │ ├── example_test.go │ ├── htmlindex │ │ ├── gen.go │ │ ├── htmlindex.go │ │ ├── htmlindex_test.go │ │ ├── map.go │ │ └── tables.go │ ├── ianaindex │ │ ├── example_test.go │ │ ├── gen.go │ │ ├── ianaindex.go │ │ ├── ianaindex_test.go │ │ └── tables.go │ ├── internal │ │ ├── enctest │ │ │ └── enctest.go │ │ ├── identifier │ │ │ ├── gen.go │ │ │ ├── identifier.go │ │ │ └── mib.go │ │ └── internal.go │ ├── japanese │ │ ├── all.go │ │ ├── all_test.go │ │ ├── eucjp.go │ │ ├── iso2022jp.go │ │ ├── maketables.go │ │ ├── shiftjis.go │ │ └── tables.go │ ├── korean │ │ ├── all_test.go │ │ ├── euckr.go │ │ ├── maketables.go │ │ └── tables.go │ ├── simplifiedchinese │ │ ├── all.go │ │ ├── all_test.go │ │ ├── gbk.go │ │ ├── hzgb2312.go │ │ ├── maketables.go │ │ └── tables.go │ ├── testdata │ │ ├── candide-gb18030.txt │ │ ├── candide-utf-16le.txt │ │ ├── candide-utf-32be.txt │ │ ├── candide-utf-8.txt │ │ ├── candide-windows-1252.txt │ │ ├── rashomon-euc-jp.txt │ │ ├── rashomon-iso-2022-jp.txt │ │ ├── rashomon-shift-jis.txt │ │ ├── rashomon-utf-8.txt │ │ ├── sunzi-bingfa-gb-levels-1-and-2-hz-gb2312.txt │ │ ├── sunzi-bingfa-gb-levels-1-and-2-utf-8.txt │ │ ├── sunzi-bingfa-simplified-gbk.txt │ │ ├── sunzi-bingfa-simplified-utf-8.txt │ │ ├── sunzi-bingfa-traditional-big5.txt │ │ ├── sunzi-bingfa-traditional-utf-8.txt │ │ ├── unsu-joh-eun-nal-euc-kr.txt │ │ └── unsu-joh-eun-nal-utf-8.txt │ ├── traditionalchinese │ │ ├── all_test.go │ │ ├── big5.go │ │ ├── maketables.go │ │ └── tables.go │ └── unicode │ │ ├── override.go │ │ ├── unicode.go │ │ ├── unicode_test.go │ │ └── utf32 │ │ ├── utf32.go │ │ └── utf32_test.go │ ├── feature │ └── plural │ │ ├── common.go │ │ ├── data_test.go │ │ ├── example_test.go │ │ ├── gen.go │ │ ├── gen_common.go │ │ ├── message.go │ │ ├── message_test.go │ │ ├── plural.go │ │ ├── plural_test.go │ │ └── tables.go │ ├── gen.go │ ├── internal │ ├── catmsg │ │ ├── catmsg.go │ │ ├── catmsg_test.go │ │ ├── codec.go │ │ ├── varint.go │ │ └── varint_test.go │ ├── cldrtree │ │ ├── cldrtree.go │ │ ├── cldrtree_test.go │ │ ├── generate.go │ │ ├── option.go │ │ ├── testdata │ │ │ ├── test1 │ │ │ │ ├── common │ │ │ │ │ └── main │ │ │ │ │ │ └── root.xml │ │ │ │ └── output.go │ │ │ └── test2 │ │ │ │ ├── common │ │ │ │ └── main │ │ │ │ │ ├── en.xml │ │ │ │ │ ├── en_001.xml │ │ │ │ │ ├── en_GB.xml │ │ │ │ │ └── root.xml │ │ │ │ └── output.go │ │ ├── tree.go │ │ └── type.go │ ├── colltab │ │ ├── collate_test.go │ │ ├── collelem.go │ │ ├── collelem_test.go │ │ ├── colltab.go │ │ ├── colltab_test.go │ │ ├── contract.go │ │ ├── contract_test.go │ │ ├── iter.go │ │ ├── iter_test.go │ │ ├── numeric.go │ │ ├── numeric_test.go │ │ ├── table.go │ │ ├── trie.go │ │ ├── trie_test.go │ │ ├── weighter.go │ │ └── weighter_test.go │ ├── export │ │ ├── README │ │ └── idna │ │ │ ├── common_test.go │ │ │ ├── example_test.go │ │ │ ├── gen.go │ │ │ ├── gen_common.go │ │ │ ├── gen_test.go │ │ │ ├── gen_trieval.go │ │ │ ├── idna.go │ │ │ ├── idna_test.go │ │ │ ├── punycode.go │ │ │ ├── punycode_test.go │ │ │ ├── tables.go │ │ │ ├── trie.go │ │ │ └── trieval.go │ ├── format │ │ └── format.go │ ├── gen.go │ ├── gen │ │ ├── code.go │ │ └── gen.go │ ├── gen_test.go │ ├── internal.go │ ├── internal_test.go │ ├── match.go │ ├── match_test.go │ ├── number │ │ ├── common.go │ │ ├── decimal.go │ │ ├── decimal_test.go │ │ ├── format.go │ │ ├── format_test.go │ │ ├── gen.go │ │ ├── gen_common.go │ │ ├── number.go │ │ ├── number_test.go │ │ ├── pattern.go │ │ ├── pattern_test.go │ │ ├── roundingmode_string.go │ │ ├── tables.go │ │ └── tables_test.go │ ├── stringset │ │ ├── set.go │ │ └── set_test.go │ ├── tables.go │ ├── tag │ │ ├── tag.go │ │ └── tag_test.go │ ├── testtext │ │ ├── codesize.go │ │ ├── flag.go │ │ ├── gc.go │ │ ├── gccgo.go │ │ ├── go1_6.go │ │ ├── go1_7.go │ │ └── text.go │ ├── triegen │ │ ├── compact.go │ │ ├── data_test.go │ │ ├── example_compact_test.go │ │ ├── example_test.go │ │ ├── gen_test.go │ │ ├── print.go │ │ └── triegen.go │ ├── ucd │ │ ├── example_test.go │ │ ├── ucd.go │ │ └── ucd_test.go │ └── utf8internal │ │ └── utf8internal.go │ ├── language │ ├── Makefile │ ├── common.go │ ├── coverage.go │ ├── coverage_test.go │ ├── display │ │ ├── dict.go │ │ ├── dict_test.go │ │ ├── display.go │ │ ├── display_test.go │ │ ├── examples_test.go │ │ ├── lookup.go │ │ ├── maketables.go │ │ └── tables.go │ ├── doc.go │ ├── examples_test.go │ ├── gen.go │ ├── gen_common.go │ ├── gen_index.go │ ├── go1_1.go │ ├── go1_2.go │ ├── httpexample_test.go │ ├── index.go │ ├── language.go │ ├── language_test.go │ ├── lookup.go │ ├── lookup_test.go │ ├── match.go │ ├── match_test.go │ ├── parse.go │ ├── parse_test.go │ ├── tables.go │ ├── tags.go │ └── testdata │ │ ├── CLDRLocaleMatcherTest.txt │ │ └── GoLocaleMatcherTest.txt │ ├── message │ ├── catalog.go │ ├── catalog │ │ ├── catalog.go │ │ ├── catalog_test.go │ │ └── dict.go │ ├── doc.go │ ├── examples_test.go │ ├── fmt_test.go │ ├── format.go │ ├── message.go │ ├── message_test.go │ └── print.go │ ├── number │ ├── doc.go │ ├── examples_test.go │ ├── format.go │ ├── format_test.go │ ├── number.go │ ├── number_test.go │ └── option.go │ ├── runes │ ├── cond.go │ ├── cond_test.go │ ├── example_test.go │ ├── runes.go │ └── runes_test.go │ ├── search │ ├── index.go │ ├── pattern.go │ ├── pattern_test.go │ ├── search.go │ └── tables.go │ ├── secure │ ├── bidirule │ │ ├── bench_test.go │ │ ├── bidirule.go │ │ └── bidirule_test.go │ ├── doc.go │ └── precis │ │ ├── benchmark_test.go │ │ ├── class.go │ │ ├── class_test.go │ │ ├── context.go │ │ ├── doc.go │ │ ├── enforce_test.go │ │ ├── gen.go │ │ ├── gen_trieval.go │ │ ├── nickname.go │ │ ├── options.go │ │ ├── profile.go │ │ ├── profile_test.go │ │ ├── profiles.go │ │ ├── tables.go │ │ ├── tables_test.go │ │ ├── transformer.go │ │ └── trieval.go │ ├── transform │ ├── examples_test.go │ ├── transform.go │ └── transform_test.go │ ├── unicode │ ├── bidi │ │ ├── bidi.go │ │ ├── bracket.go │ │ ├── core.go │ │ ├── core_test.go │ │ ├── gen.go │ │ ├── gen_ranges.go │ │ ├── gen_trieval.go │ │ ├── prop.go │ │ ├── ranges_test.go │ │ ├── tables.go │ │ ├── tables_test.go │ │ └── trieval.go │ ├── cldr │ │ ├── base.go │ │ ├── cldr.go │ │ ├── cldr_test.go │ │ ├── collate.go │ │ ├── collate_test.go │ │ ├── data_test.go │ │ ├── decode.go │ │ ├── examples_test.go │ │ ├── makexml.go │ │ ├── resolve.go │ │ ├── resolve_test.go │ │ ├── slice.go │ │ ├── slice_test.go │ │ └── xml.go │ ├── doc.go │ ├── norm │ │ ├── composition.go │ │ ├── composition_test.go │ │ ├── example_iter_test.go │ │ ├── example_test.go │ │ ├── forminfo.go │ │ ├── forminfo_test.go │ │ ├── input.go │ │ ├── iter.go │ │ ├── iter_test.go │ │ ├── maketables.go │ │ ├── normalize.go │ │ ├── normalize_test.go │ │ ├── readwriter.go │ │ ├── readwriter_test.go │ │ ├── tables.go │ │ ├── transform.go │ │ ├── transform_test.go │ │ ├── trie.go │ │ ├── triegen.go │ │ └── ucd_test.go │ ├── rangetable │ │ ├── gen.go │ │ ├── merge.go │ │ ├── merge_test.go │ │ ├── rangetable.go │ │ ├── rangetable_test.go │ │ └── tables.go │ └── runenames │ │ ├── bits.go │ │ ├── example_test.go │ │ ├── gen.go │ │ ├── gen_bits.go │ │ ├── runenames.go │ │ ├── runenames_test.go │ │ └── tables.go │ └── width │ ├── common_test.go │ ├── example_test.go │ ├── gen.go │ ├── gen_common.go │ ├── gen_trieval.go │ ├── kind_string.go │ ├── runes_test.go │ ├── tables.go │ ├── tables_test.go │ ├── transform.go │ ├── transform_test.go │ ├── trieval.go │ └── width.go └── gopkg.in └── yaml.v2 ├── .travis.yml ├── LICENSE ├── LICENSE.libyaml ├── README.md ├── apic.go ├── decode.go ├── decode_test.go ├── emitterc.go ├── encode.go ├── encode_test.go ├── example_embedded_test.go ├── parserc.go ├── readerc.go ├── resolve.go ├── scannerc.go ├── sorter.go ├── suite_test.go ├── writerc.go ├── yaml.go ├── yamlh.go └── yamlprivateh.go /.gitignore: -------------------------------------------------------------------------------- 1 | /.GOPATH 2 | /bin 3 | .vscode/ 4 | newgo 5 | dist/ 6 | build/ 7 | .envrc 8 | -------------------------------------------------------------------------------- /.goreleaser.yml: -------------------------------------------------------------------------------- 1 | project_name: ngc 2 | release: 3 | github: 4 | owner: bketelsen 5 | name: ngc 6 | name_template: '{{.Tag}}' 7 | brew: 8 | commit_author: 9 | name: ngc 10 | email: bketelsen@gmail.com 11 | install: bin.install "ngc" 12 | builds: 13 | - goos: 14 | - linux 15 | - darwin 16 | - windows 17 | goarch: 18 | - amd64 19 | - "386" 20 | goarm: 21 | - "6" 22 | main: . 23 | ldflags: -s -w -X main.Version={{.Version}} -X main.BuildDate={{.Date}} 24 | binary: ngc 25 | archive: 26 | format: tar.gz 27 | name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ 28 | .Arm }}{{ end }}' 29 | files: 30 | - licence* 31 | - LICENCE* 32 | - license* 33 | - LICENSE* 34 | - readme* 35 | - README* 36 | - changelog* 37 | - CHANGELOG* 38 | fpm: 39 | bindir: /usr/local/bin 40 | snapshot: 41 | name_template: SNAPSHOT-{{ .Commit }} 42 | checksum: 43 | name_template: '{{ .ProjectName }}_{{ .Version }}_checksums.txt' 44 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang 2 | RUN go get -u github.com/golang/dep/cmd/dep 3 | ADD . /go/src/github.com/bketelsen/ngc 4 | WORKDIR /go/src/github.com/bketelsen/ngc 5 | RUN make clean 6 | RUN make all 7 | CMD /go/src/github.com/bketelsen/ngc/bin/ngc 8 | -------------------------------------------------------------------------------- /Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | branch = "master" 26 | name = "github.com/mitchellh/go-homedir" 27 | 28 | [[constraint]] 29 | name = "github.com/pkg/errors" 30 | version = "0.8.0" 31 | 32 | [[constraint]] 33 | name = "github.com/spf13/cobra" 34 | version = "0.0.1" 35 | 36 | [[constraint]] 37 | name = "github.com/spf13/viper" 38 | version = "1.0.0" 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright © 2017 Brian Ketelsen 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 | -------------------------------------------------------------------------------- /templates/Dockerfile.tmpl: -------------------------------------------------------------------------------- 1 | FROM golang 2 | RUN go get -u github.com/golang/dep/cmd/dep 3 | ADD . /go/src/{{.ProjectPath}} 4 | WORKDIR /go/src/{{.ProjectPath}} 5 | RUN make clean 6 | RUN make all 7 | CMD /go/src/{{.ProjectPath}}/bin/{{.DockerImage}} 8 | -------------------------------------------------------------------------------- /templates/envrc.tmpl: -------------------------------------------------------------------------------- 1 | # for goreleaser 2 | export GITHUB_TOKEN=REPLACEME 3 | -------------------------------------------------------------------------------- /templates/goreleaser.yml.tmpl: -------------------------------------------------------------------------------- 1 | project_name: {{.DockerImage}} 2 | release: 3 | github: 4 | owner: bketelsen 5 | name: {{.DockerImage}} 6 | name_template: '{{`{{.Tag}}`}}' 7 | brew: 8 | commit_author: 9 | name: {{.DockerImage}} 10 | email: bketelsen@gmail.com 11 | install: bin.install "{{.DockerImage}}" 12 | builds: 13 | - goos: 14 | - linux 15 | - darwin 16 | - windows 17 | goarch: 18 | - amd64 19 | - "386" 20 | goarm: 21 | - "6" 22 | main: . 23 | ldflags: -s -w -X main.Version={{`{{.Version}}`}} -X main.BuildDate={{`{{.Date}}`}} 24 | binary: newgo 25 | archive: 26 | format: tar.gz 27 | name_template: '{{`{{.Binary}}`}}_{{`{{.Version}}`}}_{{`{{.Os}}`}}_{{`{{.Arch }}`}}{{`{{if .Arm}}`}}v{{`{{.Arm }}`}}{{`{{end }}`}}' 28 | files: 29 | - licence* 30 | - LICENCE* 31 | - license* 32 | - LICENSE* 33 | - readme* 34 | - README* 35 | - changelog* 36 | - CHANGELOG* 37 | fpm: 38 | bindir: /usr/local/bin 39 | snapshot: 40 | name_template: SNAPSHOT-{{`{{.Commit }}`}} 41 | checksum: 42 | name_template: '{{`{{.ProjectName }}`}}_{{`{{.Version }}`}}_checksums.txt' 43 | 44 | -------------------------------------------------------------------------------- /templates/main.go.tmpl: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "fmt" 4 | 5 | var ( 6 | Version = "N/A" 7 | BuildTime = "N/A" 8 | ) 9 | 10 | func main() { 11 | fmt.Printf("Version: %s, Built: %s\n", Version, BuildTime) 12 | } -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = tab 5 | indent_size = 4 6 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Before reporting an issue, please ensure you are using the latest release of fsnotify. 2 | 3 | ### Which operating system (GOOS) and version are you using? 4 | 5 | Linux: lsb_release -a 6 | macOS: sw_vers 7 | Windows: systeminfo | findstr /B /C:OS 8 | 9 | ### Please describe the issue that occurred. 10 | 11 | ### Are you able to reproduce the issue? Please provide steps to reproduce and a code sample if possible. 12 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | #### What does this pull request do? 2 | 3 | 4 | #### Where should the reviewer start? 5 | 6 | 7 | #### How should this be manually tested? 8 | 9 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.gitignore: -------------------------------------------------------------------------------- 1 | # Setup a Global .gitignore for OS and editor generated files: 2 | # https://help.github.com/articles/ignoring-files 3 | # git config --global core.excludesfile ~/.gitignore_global 4 | 5 | .vagrant 6 | *.sublime-project 7 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.6.3 6 | - tip 7 | 8 | matrix: 9 | allow_failures: 10 | - go: tip 11 | 12 | before_script: 13 | - go get -u github.com/golang/lint/golint 14 | 15 | script: 16 | - go test -v --race ./... 17 | 18 | after_script: 19 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" 20 | - test -z "$(golint ./... | tee /dev/stderr)" 21 | - go vet ./... 22 | 23 | os: 24 | - linux 25 | - osx 26 | 27 | notifications: 28 | email: false 29 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/example_test.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 !plan9 6 | 7 | package fsnotify_test 8 | 9 | import ( 10 | "log" 11 | 12 | "github.com/fsnotify/fsnotify" 13 | ) 14 | 15 | func ExampleNewWatcher() { 16 | watcher, err := fsnotify.NewWatcher() 17 | if err != nil { 18 | log.Fatal(err) 19 | } 20 | defer watcher.Close() 21 | 22 | done := make(chan bool) 23 | go func() { 24 | for { 25 | select { 26 | case event := <-watcher.Events: 27 | log.Println("event:", event) 28 | if event.Op&fsnotify.Write == fsnotify.Write { 29 | log.Println("modified file:", event.Name) 30 | } 31 | case err := <-watcher.Errors: 32 | log.Println("error:", err) 33 | } 34 | } 35 | }() 36 | 37 | err = watcher.Add("/tmp/foo") 38 | if err != nil { 39 | log.Fatal(err) 40 | } 41 | <-done 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/fen.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 solaris 6 | 7 | package fsnotify 8 | 9 | import ( 10 | "errors" 11 | ) 12 | 13 | // Watcher watches a set of files, delivering events to a channel. 14 | type Watcher struct { 15 | Events chan Event 16 | Errors chan error 17 | } 18 | 19 | // NewWatcher establishes a new watcher with the underlying OS and begins waiting for events. 20 | func NewWatcher() (*Watcher, error) { 21 | return nil, errors.New("FEN based watcher not yet supported for fsnotify\n") 22 | } 23 | 24 | // Close removes all watches and closes the events channel. 25 | func (w *Watcher) Close() error { 26 | return nil 27 | } 28 | 29 | // Add starts watching the named file or directory (non-recursively). 30 | func (w *Watcher) Add(name string) error { 31 | return nil 32 | } 33 | 34 | // Remove stops watching the the named file or directory (non-recursively). 35 | func (w *Watcher) Remove(name string) error { 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_bsd.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 freebsd openbsd netbsd dragonfly 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | const openMode = unix.O_NONBLOCK | unix.O_RDONLY 12 | -------------------------------------------------------------------------------- /vendor/github.com/fsnotify/fsnotify/open_mode_darwin.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 darwin 6 | 7 | package fsnotify 8 | 9 | import "golang.org/x/sys/unix" 10 | 11 | // note: this constant is not defined on BSD 12 | const openMode = unix.O_EVTONLY 13 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### HCL Template 2 | ```hcl 3 | # Place your HCL configuration file here 4 | ``` 5 | 6 | ### Expected behavior 7 | What should have happened? 8 | 9 | ### Actual behavior 10 | What actually happened? 11 | 12 | ### Steps to reproduce 13 | 1. 14 | 2. 15 | 3. 16 | 17 | ### References 18 | Are there any other GitHub issues (open or closed) that should 19 | be linked here? For example: 20 | - GH-1234 21 | - ... 22 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.gitignore: -------------------------------------------------------------------------------- 1 | y.output 2 | 3 | # ignore intellij files 4 | .idea 5 | *.iml 6 | *.ipr 7 | *.iws 8 | 9 | *.test 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.x 7 | - tip 8 | 9 | branches: 10 | only: 11 | - master 12 | 13 | script: make test 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: test 4 | 5 | fmt: generate 6 | go fmt ./... 7 | 8 | test: generate 9 | go get -t ./... 10 | go test $(TEST) $(TESTARGS) 11 | 12 | generate: 13 | go generate ./... 14 | 15 | updatedeps: 16 | go get -u golang.org/x/tools/cmd/stringer 17 | 18 | .PHONY: default generate test updatedeps 19 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "build-{branch}-{build}" 2 | image: Visual Studio 2015 3 | clone_folder: c:\gopath\src\github.com\hashicorp\hcl 4 | environment: 5 | GOPATH: c:\gopath 6 | init: 7 | - git config --global core.autocrlf false 8 | install: 9 | - cmd: >- 10 | echo %Path% 11 | 12 | go version 13 | 14 | go env 15 | 16 | go get -t ./... 17 | 18 | build_script: 19 | - cmd: go test -v ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl.go: -------------------------------------------------------------------------------- 1 | // Package hcl decodes HCL into usable Go structures. 2 | // 3 | // hcl input can come in either pure HCL format or JSON format. 4 | // It can be parsed into an AST, and then decoded into a structure, 5 | // or it can be decoded directly from a string into a structure. 6 | // 7 | // If you choose to parse HCL into a raw AST, the benefit is that you 8 | // can write custom visitor implementations to implement custom 9 | // semantic checks. By default, HCL does not perform any semantic 10 | // checks. 11 | package hcl 12 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/.hidden.ignore: -------------------------------------------------------------------------------- 1 | invalid 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/dir.ignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/dir.ignore -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/file.ignore: -------------------------------------------------------------------------------- 1 | invalid 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/good.hcl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/github.com/hashicorp/hcl/hcl/fmtcmd/test-fixtures/good.hcl -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/error.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/hashicorp/hcl/hcl/token" 7 | ) 8 | 9 | // PosError is a parse error that contains a position. 10 | type PosError struct { 11 | Pos token.Pos 12 | Err error 13 | } 14 | 15 | func (e *PosError) Error() string { 16 | return fmt.Sprintf("At %s: %s", e.Pos, e.Err) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/error_test.go: -------------------------------------------------------------------------------- 1 | package parser 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestPosError_impl(t *testing.T) { 8 | var _ error = new(PosError) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment.hcl: -------------------------------------------------------------------------------- 1 | foo = [ 2 | "1", 3 | "2", # comment 4 | ] 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/array_comment_2.hcl: -------------------------------------------------------------------------------- 1 | provisioner "remote-exec" { 2 | scripts = [ 3 | "${path.module}/scripts/install-consul.sh" // missing comma 4 | "${path.module}/scripts/install-haproxy.sh" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_colon.hcl: -------------------------------------------------------------------------------- 1 | resource = [{ 2 | "foo": { 3 | "bar": {}, 4 | "baz": [1, 2, "foo"], 5 | } 6 | }] 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/assign_deep.hcl: -------------------------------------------------------------------------------- 1 | resource = [{ 2 | foo = [{ 3 | bar = {} 4 | }] 5 | }] 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment.hcl: -------------------------------------------------------------------------------- 1 | // Foo 2 | 3 | /* Bar */ 4 | 5 | /* 6 | /* 7 | Baz 8 | */ 9 | 10 | # Another 11 | 12 | # Multiple 13 | # Lines 14 | 15 | foo = "bar" 16 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_crlf.hcl: -------------------------------------------------------------------------------- 1 | // Foo 2 | 3 | /* Bar */ 4 | 5 | /* 6 | /* 7 | Baz 8 | */ 9 | 10 | # Another 11 | 12 | # Multiple 13 | # Lines 14 | 15 | foo = "bar" 16 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_lastline.hcl: -------------------------------------------------------------------------------- 1 | #foo -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/comment_single.hcl: -------------------------------------------------------------------------------- 1 | # Hello 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex.hcl: -------------------------------------------------------------------------------- 1 | variable "foo" { 2 | default = "bar" 3 | description = "bar" 4 | } 5 | 6 | variable "groups" { } 7 | 8 | provider "aws" { 9 | access_key = "foo" 10 | secret_key = "bar" 11 | } 12 | 13 | provider "do" { 14 | api_key = "${var.foo}" 15 | } 16 | 17 | resource "aws_security_group" "firewall" { 18 | count = 5 19 | } 20 | 21 | resource aws_instance "web" { 22 | ami = "${var.foo}" 23 | security_groups = [ 24 | "foo", 25 | "${aws_security_group.firewall.foo}", 26 | "${element(split(\",\", var.groups)}", 27 | ] 28 | network_interface = { 29 | device_index = 0 30 | description = "Main network interface" 31 | } 32 | } 33 | 34 | resource "aws_instance" "db" { 35 | security_groups = "${aws_security_group.firewall.*.id}" 36 | VPC = "foo" 37 | depends_on = ["aws_instance.web"] 38 | } 39 | 40 | output "web_ip" { 41 | value = "${aws_instance.web.private_ip}" 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_crlf.hcl: -------------------------------------------------------------------------------- 1 | variable "foo" { 2 | default = "bar" 3 | description = "bar" 4 | } 5 | 6 | variable "groups" { } 7 | 8 | provider "aws" { 9 | access_key = "foo" 10 | secret_key = "bar" 11 | } 12 | 13 | provider "do" { 14 | api_key = "${var.foo}" 15 | } 16 | 17 | resource "aws_security_group" "firewall" { 18 | count = 5 19 | } 20 | 21 | resource aws_instance "web" { 22 | ami = "${var.foo}" 23 | security_groups = [ 24 | "foo", 25 | "${aws_security_group.firewall.foo}", 26 | "${element(split(\",\", var.groups)}", 27 | ] 28 | network_interface = { 29 | device_index = 0 30 | description = "Main network interface" 31 | } 32 | } 33 | 34 | resource "aws_instance" "db" { 35 | security_groups = "${aws_security_group.firewall.*.id}" 36 | VPC = "foo" 37 | depends_on = ["aws_instance.web"] 38 | } 39 | 40 | output "web_ip" { 41 | value = "${aws_instance.web.private_ip}" 42 | } 43 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/complex_key.hcl: -------------------------------------------------------------------------------- 1 | foo.bar = "baz" 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/empty.hcl -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/git_crypt.hcl: -------------------------------------------------------------------------------- 1 | GITCRYPT 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/key_without_value.hcl: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo"] 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/list_comma.hcl: -------------------------------------------------------------------------------- 1 | foo = [1, 2, "foo",] 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/missing_braces.hcl: -------------------------------------------------------------------------------- 1 | # should error, but not crash 2 | resource "template_file" "cloud_config" { 3 | template = "$file("${path.module}/some/path")" 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/multiple.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | key = 7 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value.hcl: -------------------------------------------------------------------------------- 1 | foo { 2 | bar = 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value2.hcl: -------------------------------------------------------------------------------- 1 | foo { 2 | baz = 7 3 | bar = 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_assign_without_value3.hcl: -------------------------------------------------------------------------------- 1 | foo { 2 | bar = 3 | baz = 7 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_key_without_value.hcl: -------------------------------------------------------------------------------- 1 | foo { 2 | bar 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/object_list_comma.hcl: -------------------------------------------------------------------------------- 1 | foo = {one = 1, two = 2} 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/old.hcl: -------------------------------------------------------------------------------- 1 | default = { 2 | "eu-west-1": "ami-b1cf19c6", 3 | } 4 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure.hcl: -------------------------------------------------------------------------------- 1 | // This is a test structure for the lexer 2 | foo bar "baz" { 3 | key = 7 4 | foo = "bar" 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_basic.hcl: -------------------------------------------------------------------------------- 1 | foo { 2 | value = 7 3 | "value" = 8 4 | "complex::value" = 9 5 | } 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/structure_empty.hcl: -------------------------------------------------------------------------------- 1 | resource "foo" "bar" {} 2 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/types.hcl: -------------------------------------------------------------------------------- 1 | foo = "bar" 2 | bar = 7 3 | baz = [1,2,3] 4 | foo = -12 5 | bar = 3.14159 6 | foo = true 7 | bar = false 8 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object.hcl: -------------------------------------------------------------------------------- 1 | foo "baz" { 2 | bar = "baz" 3 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/parser/test-fixtures/unterminated_object_2.hcl: -------------------------------------------------------------------------------- 1 | resource "aws_eip" "EIP1" { a { a { a { a { a { 2 | count = "1" 3 | 4 | resource "aws_eip" "EIP2" { 5 | count = "1" 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.golden: -------------------------------------------------------------------------------- 1 | // A standalone comment is a comment which is not attached to any kind of node 2 | 3 | // This comes from Terraform, as a test 4 | variable "foo" { 5 | # Standalone comment should be still here 6 | 7 | default = "bar" 8 | description = "bar" # yooo 9 | } 10 | 11 | /* This is a multi line standalone 12 | comment*/ 13 | 14 | // fatih arslan 15 | /* This is a developer test 16 | account and a multine comment */ 17 | developer = ["fatih", "arslan"] // fatih arslan 18 | 19 | # One line here 20 | numbers = [1, 2] // another line here 21 | 22 | # Another comment 23 | variable = { 24 | description = "bar" # another yooo 25 | 26 | foo { 27 | # Nested standalone 28 | 29 | bar = "fatih" 30 | } 31 | } 32 | 33 | // lead comment 34 | foo { 35 | bar = "fatih" // line comment 2 36 | } // line comment 3 37 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment.input: -------------------------------------------------------------------------------- 1 | // A standalone comment is a comment which is not attached to any kind of node 2 | 3 | // This comes from Terraform, as a test 4 | variable "foo" { 5 | # Standalone comment should be still here 6 | 7 | default = "bar" 8 | description = "bar" # yooo 9 | } 10 | 11 | /* This is a multi line standalone 12 | comment*/ 13 | 14 | 15 | // fatih arslan 16 | /* This is a developer test 17 | account and a multine comment */ 18 | developer = [ "fatih", "arslan"] // fatih arslan 19 | 20 | # One line here 21 | numbers = [1,2] // another line here 22 | 23 | # Another comment 24 | variable = { 25 | description = "bar" # another yooo 26 | foo { 27 | # Nested standalone 28 | 29 | bar = "fatih" 30 | } 31 | } 32 | 33 | // lead comment 34 | foo { 35 | bar = "fatih" // line comment 2 36 | } // line comment 3 37 | 38 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.golden: -------------------------------------------------------------------------------- 1 | aligned { 2 | # We have some aligned items below 3 | foo = "fatih" # yoo1 4 | default = "bar" # yoo2 5 | bar = "bar and foo" # yoo3 6 | 7 | default = { 8 | bar = "example" 9 | } 10 | 11 | #deneme arslan 12 | fatih = ["fatih"] # yoo4 13 | 14 | #fatih arslan 15 | fatiharslan = ["arslan"] // yoo5 16 | 17 | default = { 18 | bar = "example" 19 | } 20 | 21 | security_groups = [ 22 | "foo", # kenya 1 23 | "${aws_security_group.firewall.foo}", # kenya 2 24 | ] 25 | 26 | security_groups2 = [ 27 | "foo", # kenya 1 28 | "bar", # kenya 1.5 29 | "${aws_security_group.firewall.foo}", # kenya 2 30 | "foobar", # kenya 3 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_aligned.input: -------------------------------------------------------------------------------- 1 | aligned { 2 | # We have some aligned items below 3 | foo = "fatih" # yoo1 4 | default = "bar" # yoo2 5 | bar = "bar and foo" # yoo3 6 | default = { 7 | bar = "example" 8 | } 9 | #deneme arslan 10 | fatih = ["fatih"] # yoo4 11 | #fatih arslan 12 | fatiharslan = ["arslan"] // yoo5 13 | default = { 14 | bar = "example" 15 | } 16 | 17 | security_groups = [ 18 | "foo", # kenya 1 19 | "${aws_security_group.firewall.foo}", # kenya 2 20 | ] 21 | 22 | security_groups2 = [ 23 | "foo", # kenya 1 24 | "bar", # kenya 1.5 25 | "${aws_security_group.firewall.foo}", # kenya 2 26 | "foobar", # kenya 3 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.golden: -------------------------------------------------------------------------------- 1 | banana = [ 2 | # I really want to comment this item in the array. 3 | "a", 4 | 5 | # This as well 6 | "b", 7 | 8 | "c", # And C 9 | "d", 10 | 11 | # And another 12 | "e", 13 | ] 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_array.input: -------------------------------------------------------------------------------- 1 | banana = [ 2 | # I really want to comment this item in the array. 3 | "a", 4 | 5 | # This as well 6 | "b", 7 | 8 | "c", # And C 9 | "d", 10 | 11 | # And another 12 | "e", 13 | ] 14 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_crlf.input: -------------------------------------------------------------------------------- 1 | // A standalone comment is a comment which is not attached to any kind of node 2 | 3 | // This comes from Terraform, as a test 4 | variable "foo" { 5 | # Standalone comment should be still here 6 | 7 | default = "bar" 8 | description = "bar" # yooo 9 | } 10 | 11 | /* This is a multi line standalone 12 | comment*/ 13 | 14 | 15 | // fatih arslan 16 | /* This is a developer test 17 | account and a multine comment */ 18 | developer = [ "fatih", "arslan"] // fatih arslan 19 | 20 | # One line here 21 | numbers = [1,2] // another line here 22 | 23 | # Another comment 24 | variable = { 25 | description = "bar" # another yooo 26 | foo { 27 | # Nested standalone 28 | 29 | bar = "fatih" 30 | } 31 | } 32 | 33 | // lead comment 34 | foo { 35 | bar = "fatih" // line comment 2 36 | } // line comment 3 37 | 38 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.golden: -------------------------------------------------------------------------------- 1 | resource "blah" "blah" {} 2 | 3 | // 4 | // 5 | // 6 | 7 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_end_file.input: -------------------------------------------------------------------------------- 1 | resource "blah" "blah" {} 2 | 3 | // 4 | // 5 | // 6 | -------------------------------------------------------------------------------- /vendor/github.com/hashicorp/hcl/hcl/printer/testdata/comment_multiline_indent.golden: -------------------------------------------------------------------------------- 1 | resource "provider" "resource" { 2 | /* 3 | SPACE_SENSITIVE_CODE = < math.MaxInt32) { 19 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 20 | } 21 | return int(v) 22 | } 23 | 24 | // uintRangeCheck checks if the value fits into the uint type and 25 | // panics if it does not. 26 | func uintRangeCheck(key string, v uint64) uint { 27 | if is32Bit && v > math.MaxUint32 { 28 | panic(fmt.Sprintf("Value %d for key %s out of range", v, key)) 29 | } 30 | return uint(v) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/go-homedir/README.md: -------------------------------------------------------------------------------- 1 | # go-homedir 2 | 3 | This is a Go library for detecting the user's home directory without 4 | the use of cgo, so the library can be used in cross-compilation environments. 5 | 6 | Usage is incredibly simple, just call `homedir.Dir()` to get the home directory 7 | for a user, and `homedir.Expand()` to expand the `~` in a path to the home 8 | directory. 9 | 10 | **Why not just use `os/user`?** The built-in `os/user` package requires 11 | cgo on Darwin systems. This means that any Go code that uses that package 12 | cannot cross compile. But 99% of the time the use for `os/user` is just to 13 | retrieve the home directory, which we can do for the current user without 14 | cgo. This library does that, enabling cross-compilation. 15 | -------------------------------------------------------------------------------- /vendor/github.com/mitchellh/mapstructure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.1 5 | 6 | script: 7 | - go test 8 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/.gitignore: -------------------------------------------------------------------------------- 1 | test_program/test_program_bin 2 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | go: 4 | - 1.7.6 5 | - 1.8.3 6 | - 1.9 7 | - tip 8 | matrix: 9 | allow_failures: 10 | - go: tip 11 | fast_finish: true 12 | script: 13 | - if [ -n "$(go fmt ./...)" ]; then exit 1; fi 14 | - ./test.sh 15 | - ./benchmark.sh $TRAVIS_BRANCH https://github.com/$TRAVIS_REPO_SLUG.git 16 | before_install: 17 | - go get github.com/axw/gocov/gocov 18 | - go get github.com/mattn/goveralls 19 | - if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi 20 | branches: 21 | only: [master] 22 | after_success: 23 | - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.out -repotoken $COVERALLS_TOKEN 24 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/benchmark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | reference_ref=${1:-master} 6 | reference_git=${2:-.} 7 | 8 | if ! `hash benchstat 2>/dev/null`; then 9 | echo "Installing benchstat" 10 | go get golang.org/x/perf/cmd/benchstat 11 | go install golang.org/x/perf/cmd/benchstat 12 | fi 13 | 14 | tempdir=`mktemp -d /tmp/go-toml-benchmark-XXXXXX` 15 | ref_tempdir="${tempdir}/ref" 16 | ref_benchmark="${ref_tempdir}/benchmark-`echo -n ${reference_ref}|tr -s '/' '-'`.txt" 17 | local_benchmark="`pwd`/benchmark-local.txt" 18 | 19 | echo "=== ${reference_ref} (${ref_tempdir})" 20 | git clone ${reference_git} ${ref_tempdir} >/dev/null 2>/dev/null 21 | pushd ${ref_tempdir} >/dev/null 22 | git checkout ${reference_ref} >/dev/null 2>/dev/null 23 | go test -bench=. -benchmem | tee ${ref_benchmark} 24 | popd >/dev/null 25 | 26 | echo "" 27 | echo "=== local" 28 | go test -bench=. -benchmem | tee ${local_benchmark} 29 | 30 | echo "" 31 | echo "=== diff" 32 | benchstat -delta-test=none ${ref_benchmark} ${local_benchmark} -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/doc.go: -------------------------------------------------------------------------------- 1 | // Package toml is a TOML parser and manipulation library. 2 | // 3 | // This version supports the specification as described in 4 | // https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.4.0.md 5 | // 6 | // Marshaling 7 | // 8 | // Go-toml can marshal and unmarshal TOML documents from and to data 9 | // structures. 10 | // 11 | // TOML document as a tree 12 | // 13 | // Go-toml can operate on a TOML document as a tree. Use one of the Load* 14 | // functions to parse TOML data and obtain a Tree instance, then one of its 15 | // methods to manipulate the tree. 16 | // 17 | // JSONPath-like queries 18 | // 19 | // The package github.com/pelletier/go-toml/query implements a system 20 | // similar to JSONPath to quickly retrive elements of a TOML document using a 21 | // single expression. See the package documentation for more information. 22 | // 23 | package toml 24 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/example-crlf.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML document. Boom. 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | organization = "GitHub" 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not? 10 | 11 | [database] 12 | server = "192.168.1.1" 13 | ports = [ 8001, 8001, 8002 ] 14 | connection_max = 5000 15 | enabled = true 16 | 17 | [servers] 18 | 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/example.toml: -------------------------------------------------------------------------------- 1 | # This is a TOML document. Boom. 2 | 3 | title = "TOML Example" 4 | 5 | [owner] 6 | name = "Tom Preston-Werner" 7 | organization = "GitHub" 8 | bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." 9 | dob = 1979-05-27T07:32:00Z # First class dates? Why not? 10 | 11 | [database] 12 | server = "192.168.1.1" 13 | ports = [ 8001, 8001, 8002 ] 14 | connection_max = 5000 15 | enabled = true 16 | 17 | [servers] 18 | 19 | # You can indent as you please. Tabs or spaces. TOML don't care. 20 | [servers.alpha] 21 | ip = "10.0.0.1" 22 | dc = "eqdc10" 23 | 24 | [servers.beta] 25 | ip = "10.0.0.2" 26 | dc = "eqdc10" 27 | 28 | [clients] 29 | data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it 30 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/marshal_test.toml: -------------------------------------------------------------------------------- 1 | title = "TOML Marshal Testing" 2 | 3 | [basic] 4 | bool = true 5 | date = 1979-05-27T07:32:00Z 6 | float = 123.4 7 | int = 5000 8 | string = "Bite me" 9 | uint = 5001 10 | 11 | [basic_lists] 12 | bools = [true,false,true] 13 | dates = [1979-05-27T07:32:00Z,1980-05-27T07:32:00Z] 14 | floats = [12.3,45.6,78.9] 15 | ints = [8001,8001,8002] 16 | strings = ["One","Two","Three"] 17 | uints = [5002,5003] 18 | 19 | [basic_map] 20 | one = "one" 21 | two = "two" 22 | 23 | [subdoc] 24 | 25 | [subdoc.first] 26 | name = "First" 27 | 28 | [subdoc.second] 29 | name = "Second" 30 | 31 | [[subdoclist]] 32 | name = "List.First" 33 | 34 | [[subdoclist]] 35 | name = "List.Second" 36 | 37 | [[subdocptrs]] 38 | name = "Second" 39 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/position.go: -------------------------------------------------------------------------------- 1 | // Position support for go-toml 2 | 3 | package toml 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | // Position of a document element within a TOML document. 10 | // 11 | // Line and Col are both 1-indexed positions for the element's line number and 12 | // column number, respectively. Values of zero or less will cause Invalid(), 13 | // to return true. 14 | type Position struct { 15 | Line int // line within the document 16 | Col int // column within the line 17 | } 18 | 19 | // String representation of the position. 20 | // Displays 1-indexed line and column numbers. 21 | func (p Position) String() string { 22 | return fmt.Sprintf("(%d, %d)", p.Line, p.Col) 23 | } 24 | 25 | // Invalid returns whether or not the position is valid (i.e. with negative or 26 | // null values) 27 | func (p Position) Invalid() bool { 28 | return p.Line <= 0 || p.Col <= 0 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/pelletier/go-toml/position_test.go: -------------------------------------------------------------------------------- 1 | // Testing support for go-toml 2 | 3 | package toml 4 | 5 | import ( 6 | "testing" 7 | ) 8 | 9 | func TestPositionString(t *testing.T) { 10 | p := Position{123, 456} 11 | expected := "(123, 456)" 12 | value := p.String() 13 | 14 | if value != expected { 15 | t.Errorf("Expected %v, got %v instead", expected, value) 16 | } 17 | } 18 | 19 | func TestInvalid(t *testing.T) { 20 | for i, v := range []Position{ 21 | {0, 1234}, 22 | {1234, 0}, 23 | {0, 0}, 24 | } { 25 | if !v.Invalid() { 26 | t.Errorf("Position at %v is valid: %v", i, v) 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.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/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.4.3 5 | - 1.5.4 6 | - 1.6.2 7 | - 1.7.1 8 | - tip 9 | 10 | script: 11 | - go test -v ./... 12 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.7.5 6 | - 1.8 7 | - tip 8 | 9 | os: 10 | - linux 11 | - osx 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | fast_finish: true 17 | 18 | script: 19 | - go build 20 | - go test -race -v ./... 21 | 22 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | clone_folder: C:\gopath\src\github.com\spf13\afero 3 | environment: 4 | GOPATH: C:\gopath 5 | build_script: 6 | - cmd: >- 7 | go version 8 | 9 | go env 10 | 11 | go get -v github.com/spf13/afero/... 12 | 13 | go build github.com/spf13/afero 14 | test_script: 15 | - cmd: go test -race -v github.com/spf13/afero/... 16 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/const_bsds.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2016 Steve Francia . 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 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | // +build darwin openbsd freebsd netbsd dragonfly 15 | 16 | package afero 17 | 18 | import ( 19 | "syscall" 20 | ) 21 | 22 | const BADFD = syscall.EBADF 23 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/const_win_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2016 Steve Francia . 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 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | // +build !darwin 14 | // +build !openbsd 15 | // +build !freebsd 16 | // +build !dragonfly 17 | // +build !netbsd 18 | 19 | package afero 20 | 21 | import ( 22 | "syscall" 23 | ) 24 | 25 | const BADFD = syscall.EBADFD 26 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/copyOnWriteFs_test.go: -------------------------------------------------------------------------------- 1 | package afero 2 | 3 | import "testing" 4 | 5 | func TestCopyOnWrite(t *testing.T) { 6 | var fs Fs 7 | var err error 8 | base := NewOsFs() 9 | roBase := NewReadOnlyFs(base) 10 | ufs := NewCopyOnWriteFs(roBase, NewMemMapFs()) 11 | fs = ufs 12 | err = fs.MkdirAll("nonexistent/directory/", 0744) 13 | if err != nil { 14 | t.Error(err) 15 | return 16 | } 17 | _, err = fs.Create("nonexistent/directory/newfile") 18 | if err != nil { 19 | t.Error(err) 20 | return 21 | } 22 | 23 | } 24 | 25 | func TestCopyOnWriteFileInMemMapBase(t *testing.T) { 26 | base := &MemMapFs{} 27 | layer := &MemMapFs{} 28 | 29 | if err := WriteFile(base, "base.txt", []byte("base"), 0755); err != nil { 30 | t.Fatalf("Failed to write file: %s", err) 31 | } 32 | 33 | ufs := NewCopyOnWriteFs(base, layer) 34 | 35 | _, err := ufs.Stat("base.txt") 36 | if err != nil { 37 | t.Fatal(err) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/mem/dir.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2014 Steve Francia . 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 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | package mem 15 | 16 | type Dir interface { 17 | Len() int 18 | Names() []string 19 | Files() []*FileData 20 | Add(*FileData) 21 | Remove(*FileData) 22 | } 23 | 24 | func RemoveFromMemDir(dir *FileData, f *FileData) { 25 | dir.memDir.Remove(f) 26 | } 27 | 28 | func AddToMemDir(dir *FileData, f *FileData) { 29 | dir.memDir.Add(f) 30 | } 31 | 32 | func InitializeDir(d *FileData) { 33 | if d.memDir == nil { 34 | d.dir = true 35 | d.memDir = &DirMap{} 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/.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 | 25 | *.bench 26 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cast/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: required 3 | go: 4 | - 1.7.5 5 | - 1.8 6 | - tip 7 | os: 8 | - linux 9 | matrix: 10 | allow_failures: 11 | - go: tip 12 | fast_finish: true 13 | script: 14 | - make check 15 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.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 | # Vim files https://github.com/github/gitignore/blob/master/Global/Vim.gitignore 23 | # swap 24 | [._]*.s[a-w][a-z] 25 | [._]s[a-w][a-z] 26 | # session 27 | Session.vim 28 | # temporary 29 | .netrwhist 30 | *~ 31 | # auto-generated tag files 32 | tags 33 | 34 | *.exe 35 | 36 | cobra.test 37 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.mailmap: -------------------------------------------------------------------------------- 1 | Steve Francia 2 | Bjørn Erik Pedersen 3 | Fabiano Franz 4 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | matrix: 4 | include: 5 | - go: 1.7.6 6 | - go: 1.8.3 7 | - go: tip 8 | allow_failures: 9 | - go: tip 10 | 11 | before_install: 12 | - mkdir -p bin 13 | - curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.3/shellcheck 14 | - chmod +x bin/shellcheck 15 | script: 16 | - PATH=$PATH:$PWD/bin go test -v ./... 17 | - go build 18 | - diff -u <(echo -n) <(gofmt -d -s .) 19 | - if [ -z $NOVET ]; then 20 | diff -u <(echo -n) <(go tool vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint'); 21 | fi 22 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/cobra/cmd/project_test.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestFindExistingPackage(t *testing.T) { 8 | path := findPackage("github.com/spf13/cobra") 9 | if path == "" { 10 | t.Fatal("findPackage didn't find the existing package") 11 | } 12 | if !hasGoPathPrefix(path) { 13 | t.Fatalf("%q is not in GOPATH, but must be", path) 14 | } 15 | } 16 | 17 | func hasGoPathPrefix(path string) bool { 18 | for _, srcPath := range srcPaths { 19 | if filepathHasPrefix(path, srcPath) { 20 | return true 21 | } 22 | } 23 | return false 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/cobra/cmd/testdata/main.go.golden: -------------------------------------------------------------------------------- 1 | // Copyright © 2017 NAME HERE 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 | 15 | package main 16 | 17 | import "github.com/spf13/testproject/cmd" 18 | 19 | func main() { 20 | cmd.Execute() 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/cobra/main.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2015 Steve Francia . 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 | // http://www.apache.org/licenses/LICENSE-2.0 7 | // 8 | // Unless required by applicable law or agreed to in writing, software 9 | // distributed under the License is distributed on an "AS IS" BASIS, 10 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | // See the License for the specific language governing permissions and 12 | // limitations under the License. 13 | 14 | package main 15 | 16 | import "github.com/spf13/cobra/cobra/cmd" 17 | 18 | func main() { 19 | cmd.Execute() 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_notwin.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package cobra 4 | 5 | var preExecHookFn func(*Command) 6 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/command_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package cobra 4 | 5 | import ( 6 | "os" 7 | "time" 8 | 9 | "github.com/inconshreveable/mousetrap" 10 | ) 11 | 12 | var preExecHookFn = preExecHook 13 | 14 | func preExecHook(c *Command) { 15 | if MousetrapHelpText != "" && mousetrap.StartedByExplorer() { 16 | c.Print(MousetrapHelpText) 17 | time.Sleep(5 * time.Second) 18 | os.Exit(1) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/doc/man_docs.md: -------------------------------------------------------------------------------- 1 | # Generating Man Pages For Your Own cobra.Command 2 | 3 | Generating man pages from a cobra command is incredibly easy. An example is as follows: 4 | 5 | ```go 6 | package main 7 | 8 | import ( 9 | "log" 10 | 11 | "github.com/spf13/cobra" 12 | "github.com/spf13/cobra/doc" 13 | ) 14 | 15 | func main() { 16 | cmd := &cobra.Command{ 17 | Use: "test", 18 | Short: "my test program", 19 | } 20 | header := &doc.GenManHeader{ 21 | Title: "MINE", 22 | Section: "3", 23 | } 24 | err := doc.GenManTree(cmd, header, "/tmp") 25 | if err != nil { 26 | log.Fatal(err) 27 | } 28 | } 29 | ``` 30 | 31 | That will get you a man page `/tmp/test.3` 32 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/cobra/doc/man_examples_test.go: -------------------------------------------------------------------------------- 1 | package doc_test 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | 7 | "github.com/spf13/cobra" 8 | "github.com/spf13/cobra/doc" 9 | ) 10 | 11 | func ExampleGenManTree() { 12 | cmd := &cobra.Command{ 13 | Use: "test", 14 | Short: "my test program", 15 | } 16 | header := &doc.GenManHeader{ 17 | Title: "MINE", 18 | Section: "3", 19 | } 20 | doc.GenManTree(cmd, header, "/tmp") 21 | } 22 | 23 | func ExampleGenMan() { 24 | cmd := &cobra.Command{ 25 | Use: "test", 26 | Short: "my test program", 27 | } 28 | header := &doc.GenManHeader{ 29 | Title: "MINE", 30 | Section: "3", 31 | } 32 | out := new(bytes.Buffer) 33 | doc.GenMan(cmd, header, out) 34 | fmt.Print(out.String()) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/jwalterweatherman/.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 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | 3 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.7.3 7 | - 1.8.1 8 | - tip 9 | 10 | matrix: 11 | allow_failures: 12 | - go: tip 13 | 14 | install: 15 | - go get github.com/golang/lint/golint 16 | - export PATH=$GOPATH/bin:$PATH 17 | - go install ./... 18 | 19 | script: 20 | - verify/all.sh -v 21 | - go test ./... 22 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/example_test.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 | package pflag_test 6 | 7 | import ( 8 | "fmt" 9 | 10 | "github.com/spf13/pflag" 11 | ) 12 | 13 | func ExampleShorthandLookup() { 14 | name := "verbose" 15 | short := name[:1] 16 | 17 | pflag.BoolP(name, short, false, "verbose output") 18 | 19 | // len(short) must be == 1 20 | flag := pflag.ShorthandLookup(short) 21 | 22 | fmt.Println(flag.Name) 23 | } 24 | 25 | func ExampleFlagSet_ShorthandLookup() { 26 | name := "verbose" 27 | short := name[:1] 28 | 29 | fs := pflag.NewFlagSet("Example", pflag.ContinueOnError) 30 | fs.BoolP(name, short, false, "verbose output") 31 | 32 | // len(short) must be == 1 33 | flag := fs.ShorthandLookup(short) 34 | 35 | fmt.Println(flag.Name) 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/export_test.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 | package pflag 6 | 7 | import ( 8 | "io/ioutil" 9 | "os" 10 | ) 11 | 12 | // Additional routines compiled into the package only during testing. 13 | 14 | // ResetForTesting clears all flag state and sets the usage function as directed. 15 | // After calling ResetForTesting, parse errors in flag handling will not 16 | // exit the program. 17 | func ResetForTesting(usage func()) { 18 | CommandLine = &FlagSet{ 19 | name: os.Args[0], 20 | errorHandling: ContinueOnError, 21 | output: ioutil.Discard, 22 | } 23 | Usage = usage 24 | } 25 | 26 | // GetCommandLine returns the default FlagSet. 27 | func GetCommandLine() *FlagSet { 28 | return CommandLine 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/golangflag_test.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 | package pflag 6 | 7 | import ( 8 | goflag "flag" 9 | "testing" 10 | ) 11 | 12 | func TestGoflags(t *testing.T) { 13 | goflag.String("stringFlag", "stringFlag", "stringFlag") 14 | goflag.Bool("boolFlag", false, "boolFlag") 15 | 16 | f := NewFlagSet("test", ContinueOnError) 17 | 18 | f.AddGoFlagSet(goflag.CommandLine) 19 | err := f.Parse([]string{"--stringFlag=bob", "--boolFlag"}) 20 | if err != nil { 21 | t.Fatal("expected no error; get", err) 22 | } 23 | 24 | getString, err := f.GetString("stringFlag") 25 | if err != nil { 26 | t.Fatal("expected no error; get", err) 27 | } 28 | if getString != "bob" { 29 | t.Fatalf("expected getString=bob but got getString=%s", getString) 30 | } 31 | 32 | getBool, err := f.GetBool("boolFlag") 33 | if err != nil { 34 | t.Fatal("expected no error; get", err) 35 | } 36 | if getBool != true { 37 | t.Fatalf("expected getBool=true but got getBool=%v", getBool) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/verify/gofmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o errexit 4 | set -o nounset 5 | set -o pipefail 6 | 7 | ROOT=$(dirname "${BASH_SOURCE}")/.. 8 | 9 | pushd "${ROOT}" > /dev/null 10 | 11 | GOFMT=${GOFMT:-"gofmt"} 12 | bad_files=$(find . -name '*.go' | xargs $GOFMT -s -l) 13 | if [[ -n "${bad_files}" ]]; then 14 | echo "!!! '$GOFMT' needs to be run on the following files: " 15 | echo "${bad_files}" 16 | exit 1 17 | fi 18 | 19 | # ex: ts=2 sw=2 et filetype=sh 20 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/pflag/verify/golint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOT=$(dirname "${BASH_SOURCE}")/.. 4 | GOLINT=${GOLINT:-"golint"} 5 | 6 | pushd "${ROOT}" > /dev/null 7 | bad_files=$($GOLINT -min_confidence=0.9 ./...) 8 | if [[ -n "${bad_files}" ]]; then 9 | echo "!!! '$GOLINT' problems: " 10 | echo "${bad_files}" 11 | exit 1 12 | fi 13 | popd > /dev/null 14 | 15 | # ex: ts=2 sw=2 et filetype=sh 16 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.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 | *.bench -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/.travis.yml: -------------------------------------------------------------------------------- 1 | go_import_path: github.com/spf13/viper 2 | 3 | language: go 4 | go: 5 | - 1.7.5 6 | - 1.8 7 | - tip 8 | 9 | os: 10 | - linux 11 | - osx 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | fast_finish: true 17 | 18 | script: 19 | - go install ./... 20 | - diff -u <(echo -n) <(gofmt -d .) 21 | - go test -v ./... 22 | 23 | after_success: 24 | - go get -u -d github.com/spf13/hugo 25 | - cd $GOPATH/src/github.com/spf13/hugo && make && ./hugo -s docs && cd - 26 | 27 | sudo: false 28 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/viper/nohup.out: -------------------------------------------------------------------------------- 1 | QProcess::start: Process is already running 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .hgignore except for files generated by the build. 2 | last-change 3 | -------------------------------------------------------------------------------- /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/README.md: -------------------------------------------------------------------------------- 1 | # sys 2 | 3 | This repository holds supplemental Go packages for low-level interactions with 4 | the operating system. 5 | 6 | ## Download/Install 7 | 8 | The easiest way to install is to run `go get -u golang.org/x/sys`. You can 9 | also manually git clone the repository to `$GOPATH/src/golang.org/x/sys`. 10 | 11 | ## Report Issues / Send Patches 12 | 13 | This repository uses Gerrit for code changes. To learn how to submit changes to 14 | this repository, see https://golang.org/doc/contribute.html. 15 | 16 | The main issue tracker for the sys repository is located at 17 | https://github.com/golang/go/issues. Prefix your issue with "x/sys:" in the 18 | subject line, so it is easy to find. 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm.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 | #include "textflag.h" 6 | 7 | TEXT ·use(SB),NOSPLIT,$0 8 | RET 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // 8 | // System call support for 386, Plan 9 9 | // 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-32 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-44 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-36 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$4-4 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/asm_plan9_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 | #include "textflag.h" 6 | 7 | // 8 | // System call support for amd64, Plan 9 9 | // 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-64 15 | JMP syscall·Syscall(SB) 16 | 17 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·Syscall6(SB) 19 | 20 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 21 | JMP syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | JMP syscall·RawSyscall6(SB) 25 | 26 | TEXT ·seek(SB),NOSPLIT,$0-56 27 | JMP syscall·seek(SB) 28 | 29 | TEXT ·exit(SB),NOSPLIT,$8-8 30 | JMP syscall·exit(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_plan9.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 | // Plan 9 environment variables. 6 | 7 | package plan9 8 | 9 | import ( 10 | "syscall" 11 | ) 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/env_unset.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 go1.4 6 | 7 | package plan9 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/mksysnum_plan9.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | 6 | COMMAND="mksysnum_plan9.sh $@" 7 | 8 | cat <= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/plan9/syscall_test.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 plan9 6 | 7 | package plan9_test 8 | 9 | import ( 10 | "testing" 11 | 12 | "golang.org/x/sys/plan9" 13 | ) 14 | 15 | func testSetGetenv(t *testing.T, key, value string) { 16 | err := plan9.Setenv(key, value) 17 | if err != nil { 18 | t.Fatalf("Setenv failed to set %q: %v", value, err) 19 | } 20 | newvalue, found := plan9.Getenv(key) 21 | if !found { 22 | t.Fatalf("Getenv failed to find %v variable (want value %q)", key, value) 23 | } 24 | if newvalue != value { 25 | t.Fatalf("Getenv(%v) = %q; want %q", key, newvalue, value) 26 | } 27 | } 28 | 29 | func TestEnv(t *testing.T) { 30 | testSetGetenv(t, "TESTENV", "AVALUE") 31 | // make sure TESTENV gets set to "", not deleted 32 | testSetGetenv(t, "TESTENV", "") 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | -------------------------------------------------------------------------------- /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-64 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-88 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-112 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-64 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-88 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_linux_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 calls for 386, 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 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·socketcall(SB),NOSPLIT,$0-36 29 | JMP syscall·socketcall(SB) 30 | 31 | TEXT ·rawsocketcall(SB),NOSPLIT,$0-36 32 | JMP syscall·rawsocketcall(SB) 33 | 34 | TEXT ·seek(SB),NOSPLIT,$0-28 35 | JMP syscall·seek(SB) 36 | -------------------------------------------------------------------------------- /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 ·RawSyscall(SB),NOSPLIT,$0-56 23 | JMP syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 26 | JMP syscall·RawSyscall6(SB) 27 | 28 | TEXT ·gettimeofday(SB),NOSPLIT,$0-16 29 | JMP syscall·gettimeofday(SB) 30 | -------------------------------------------------------------------------------- /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 ·RawSyscall(SB),NOSPLIT,$0-28 23 | B syscall·RawSyscall(SB) 24 | 25 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 26 | B syscall·RawSyscall6(SB) 27 | 28 | TEXT ·seek(SB),NOSPLIT,$0-32 29 | B syscall·seek(SB) 30 | -------------------------------------------------------------------------------- /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 ·RawSyscall(SB),NOSPLIT,$0-56 21 | B syscall·RawSyscall(SB) 22 | 23 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 24 | B syscall·RawSyscall6(SB) 25 | -------------------------------------------------------------------------------- /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 ·RawSyscall(SB),NOSPLIT,$0-56 25 | JMP syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | JMP syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /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 ·RawSyscall(SB),NOSPLIT,$0-28 28 | JMP syscall·RawSyscall(SB) 29 | 30 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 31 | JMP syscall·RawSyscall6(SB) 32 | -------------------------------------------------------------------------------- /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 ·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 ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /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 ·RawSyscall(SB),NOSPLIT,$0-56 25 | BR syscall·RawSyscall(SB) 26 | 27 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 28 | BR syscall·RawSyscall6(SB) 29 | -------------------------------------------------------------------------------- /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_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_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 | ) 27 | 28 | // Socketoption Level 29 | const ( 30 | SOL_BLUETOOTH = 0x112 31 | SOL_HCI = 0x0 32 | SOL_L2CAP = 0x6 33 | SOL_RFCOMM = 0x12 34 | SOL_SCO = 0x11 35 | ) 36 | -------------------------------------------------------------------------------- /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 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_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_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 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 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 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unset.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 go1.4 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | func Unsetenv(key string) error { 12 | // This was added in Go 1.4. 13 | return syscall.Unsetenv(key) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/export_test.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 darwin dragonfly freebsd linux netbsd openbsd solaris 6 | 7 | package unix 8 | 9 | var Itoa = itoa 10 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock.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 darwin 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 flock_linux_32bit.go to be SYS_FCNTL64. 13 | var fcntl64Syscall uintptr = SYS_FCNTL 14 | 15 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 16 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 17 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 18 | if errno == 0 { 19 | return nil 20 | } 21 | return errno 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/flock_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/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/mksysnum_darwin.pl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env perl 2 | # Copyright 2009 The Go Authors. All rights reserved. 3 | # Use of this source code is governed by a BSD-style 4 | # license that can be found in the LICENSE file. 5 | # 6 | # Generate system call table for Darwin from sys/syscall.h 7 | 8 | use strict; 9 | 10 | if($ENV{'GOARCH'} eq "" || $ENV{'GOOS'} eq "") { 11 | print STDERR "GOARCH or GOOS not defined in environment\n"; 12 | exit 1; 13 | } 14 | 15 | my $command = "mksysnum_darwin.pl " . join(' ', @ARGV); 16 | 17 | print <){ 29 | if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){ 30 | my $name = $1; 31 | my $num = $2; 32 | $name =~ y/a-z/A-Z/; 33 | print " SYS_$name = $num;" 34 | } 35 | } 36 | 37 | print <= 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_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_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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_no_getwd.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 dragonfly freebsd netbsd openbsd 6 | 7 | package unix 8 | 9 | const ImplementsGetwd = false 10 | 11 | func Getwd() (string, error) { return "", ENOTSUP } 12 | -------------------------------------------------------------------------------- /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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 (cmsg *Cmsghdr) SetLen(length int) { 32 | cmsg.Len = uint32(length) 33 | } 34 | -------------------------------------------------------------------------------- /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 (cmsg *Cmsghdr) SetLen(length int) { 22 | cmsg.Len = uint32(length) 23 | } 24 | 25 | func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) { 26 | // TODO(aram): implement this, see issue 5847. 27 | panic("unimplemented") 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_test.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 solaris 6 | 7 | package unix_test 8 | 9 | import ( 10 | "os/exec" 11 | "testing" 12 | 13 | "golang.org/x/sys/unix" 14 | ) 15 | 16 | func TestStatvfs(t *testing.T) { 17 | if err := unix.Statvfs("", nil); err == nil { 18 | t.Fatal(`Statvfs("") expected failure`) 19 | } 20 | 21 | statvfs := unix.Statvfs_t{} 22 | if err := unix.Statvfs("/", &statvfs); err != nil { 23 | t.Errorf(`Statvfs("/") failed: %v`, err) 24 | } 25 | 26 | if t.Failed() { 27 | mount, err := exec.Command("mount").CombinedOutput() 28 | if err != nil { 29 | t.Logf("mount: %v\n%s", err, mount) 30 | } else { 31 | t.Logf("mount: %s", mount) 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /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 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/zsysnum_solaris_amd64.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 amd64,solaris 6 | 7 | package unix 8 | 9 | // TODO(aram): remove these before Go 1.3. 10 | const ( 11 | SYS_EXECVE = 59 12 | SYS_FCNTL = 62 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_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 | // 6 | // System calls for 386, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-8 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-4 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/asm_windows_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 | // 6 | // System calls for amd64, Windows are implemented in runtime/syscall_windows.goc 7 | // 8 | 9 | TEXT ·getprocaddress(SB), 7, $0-32 10 | JMP syscall·getprocaddress(SB) 11 | 12 | TEXT ·loadlibrary(SB), 7, $0-8 13 | JMP syscall·loadlibrary(SB) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_unset.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 windows 6 | // +build go1.4 7 | 8 | package windows 9 | 10 | import "syscall" 11 | 12 | func Unsetenv(key string) error { 13 | // This was added in Go 1.4. 14 | return syscall.Unsetenv(key) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/env_windows.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 | // Windows environment variables. 6 | 7 | package windows 8 | 9 | import "syscall" 10 | 11 | func Getenv(key string) (value string, found bool) { 12 | return syscall.Getenv(key) 13 | } 14 | 15 | func Setenv(key, value string) error { 16 | return syscall.Setenv(key, value) 17 | } 18 | 19 | func Clearenv() { 20 | syscall.Clearenv() 21 | } 22 | 23 | func Environ() []string { 24 | return syscall.Environ() 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/eventlog.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 windows 6 | 7 | package windows 8 | 9 | const ( 10 | EVENTLOG_SUCCESS = 0 11 | EVENTLOG_ERROR_TYPE = 1 12 | EVENTLOG_WARNING_TYPE = 2 13 | EVENTLOG_INFORMATION_TYPE = 4 14 | EVENTLOG_AUDIT_SUCCESS = 8 15 | EVENTLOG_AUDIT_FAILURE = 16 16 | ) 17 | 18 | //sys RegisterEventSource(uncServerName *uint16, sourceName *uint16) (handle Handle, err error) [failretval==0] = advapi32.RegisterEventSourceW 19 | //sys DeregisterEventSource(handle Handle) (err error) = advapi32.DeregisterEventSource 20 | //sys ReportEvent(log Handle, etype uint16, category uint16, eventId uint32, usrSId uintptr, numStrings uint16, dataSize uint32, strings **uint16, rawData *byte) (err error) = advapi32.ReportEventW 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/memory_windows.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 | package windows 6 | 7 | const ( 8 | MEM_COMMIT = 0x00001000 9 | MEM_RESERVE = 0x00002000 10 | MEM_DECOMMIT = 0x00004000 11 | MEM_RELEASE = 0x00008000 12 | MEM_RESET = 0x00080000 13 | MEM_TOP_DOWN = 0x00100000 14 | MEM_WRITE_WATCH = 0x00200000 15 | MEM_PHYSICAL = 0x00400000 16 | MEM_RESET_UNDO = 0x01000000 17 | MEM_LARGE_PAGES = 0x20000000 18 | 19 | PAGE_NOACCESS = 0x01 20 | PAGE_READONLY = 0x02 21 | PAGE_READWRITE = 0x04 22 | PAGE_WRITECOPY = 0x08 23 | PAGE_EXECUTE_READ = 0x20 24 | PAGE_EXECUTE_READWRITE = 0x40 25 | PAGE_EXECUTE_WRITECOPY = 0x80 26 | ) 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/mksyscall.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 | package windows 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go eventlog.go service.go syscall_windows.go security_windows.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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 windows,race 6 | 7 | package windows 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/windows/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 windows,!race 6 | 7 | package windows 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/windows/registry/export_test.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 windows 6 | 7 | package registry 8 | 9 | func (k Key) SetValue(name string, valtype uint32, data []byte) error { 10 | return k.setValue(name, valtype, data) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/registry/mksyscall.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 | package registry 6 | 7 | //go:generate go run $GOROOT/src/syscall/mksyscall_windows.go -output zsyscall_windows.go syscall.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/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 windows 6 | 7 | package windows 8 | 9 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 10 | if val < 0 { 11 | return "-" + itoa(-val) 12 | } 13 | var buf [32]byte // big enough for int64 14 | i := len(buf) - 1 15 | for val >= 10 { 16 | buf[i] = byte(val%10 + '0') 17 | i-- 18 | val /= 10 19 | } 20 | buf[i] = byte(val + '0') 21 | return string(buf[i:]) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/example/beep.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 windows 6 | 7 | package main 8 | 9 | import ( 10 | "syscall" 11 | ) 12 | 13 | // BUG(brainman): MessageBeep Windows api is broken on Windows 7, 14 | // so this example does not beep when runs as service on Windows 7. 15 | 16 | var ( 17 | beepFunc = syscall.MustLoadDLL("user32.dll").MustFindProc("MessageBeep") 18 | ) 19 | 20 | func beep() { 21 | beepFunc.Call(0xffffffff) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.c: -------------------------------------------------------------------------------- 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 windows 6 | // +build !go1.3 7 | 8 | // copied from pkg/runtime 9 | typedef unsigned int uint32; 10 | typedef unsigned long long int uint64; 11 | #ifdef _64BIT 12 | typedef uint64 uintptr; 13 | #else 14 | typedef uint32 uintptr; 15 | #endif 16 | 17 | // from sys_386.s or sys_amd64.s 18 | void ·servicemain(void); 19 | 20 | void 21 | ·getServiceMain(uintptr *r) 22 | { 23 | *r = (uintptr)·servicemain; 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go12.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 windows 6 | // +build !go1.3 7 | 8 | package svc 9 | 10 | // from go12.c 11 | func getServiceMain(r *uintptr) 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/svc/go13.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 windows 6 | // +build go1.3 7 | 8 | package svc 9 | 10 | import "unsafe" 11 | 12 | const ptrSize = 4 << (^uintptr(0) >> 63) // unsafe.Sizeof(uintptr(0)) but an ideal const 13 | 14 | // Should be a built-in for unsafe.Pointer? 15 | func add(p unsafe.Pointer, x uintptr) unsafe.Pointer { 16 | return unsafe.Pointer(uintptr(p) + x) 17 | } 18 | 19 | // funcPC returns the entry PC of the function f. 20 | // It assumes that f is a func value. Otherwise the behavior is undefined. 21 | func funcPC(f interface{}) uintptr { 22 | return **(**uintptr)(add(unsafe.Pointer(&f), ptrSize)) 23 | } 24 | 25 | // from sys_386.s and sys_amd64.s 26 | func servicectlhandler(ctl uint32) uintptr 27 | func servicemain(argc uint32, argv **uint16) 28 | 29 | func getServiceMain(r *uintptr) { 30 | *r = funcPC(servicemain) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_386.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 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | Description [WSADESCRIPTION_LEN + 1]byte 11 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 12 | MaxSockets uint16 13 | MaxUdpDg uint16 14 | VendorInfo *byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Port uint16 21 | Proto *byte 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/windows/types_windows_amd64.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 | package windows 6 | 7 | type WSAData struct { 8 | Version uint16 9 | HighVersion uint16 10 | MaxSockets uint16 11 | MaxUdpDg uint16 12 | VendorInfo *byte 13 | Description [WSADESCRIPTION_LEN + 1]byte 14 | SystemStatus [WSASYS_STATUS_LEN + 1]byte 15 | } 16 | 17 | type Servent struct { 18 | Name *byte 19 | Aliases **byte 20 | Proto *byte 21 | Port uint16 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/.gitattributes: -------------------------------------------------------------------------------- 1 | # Treat all files in this repo as binary, with no git magic updating 2 | # line endings. Windows users contributing to Go will need to use a 3 | # modern version of git and editors capable of LF line endings. 4 | # 5 | # We'll prevent accidental CRLF line endings from entering the repo 6 | # via the git-review gofmt checks. 7 | # 8 | # See golang.org/issue/9281 9 | 10 | * -text 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/.gitignore: -------------------------------------------------------------------------------- 1 | # Add no patterns to .gitignore except for files generated by the build. 2 | last-change 3 | /DATA 4 | # This file is rather large and the tests really only need to be run 5 | # after generation. 6 | /unicode/norm/data_test.go -------------------------------------------------------------------------------- /vendor/golang.org/x/text/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/text/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/text/cases/fold.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 | package cases 6 | 7 | import "golang.org/x/text/transform" 8 | 9 | type caseFolder struct{ transform.NopResetter } 10 | 11 | // caseFolder implements the Transformer interface for doing case folding. 12 | func (t *caseFolder) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { 13 | c := context{dst: dst, src: src, atEOF: atEOF} 14 | for c.next() { 15 | foldFull(&c) 16 | c.checkpoint() 17 | } 18 | return c.ret() 19 | } 20 | 21 | func (t *caseFolder) Span(src []byte, atEOF bool) (n int, err error) { 22 | c := context{src: src, atEOF: atEOF} 23 | for c.next() && isFoldFull(&c) { 24 | c.checkpoint() 25 | } 26 | return c.retSpan() 27 | } 28 | 29 | func makeFold(o options) transform.SpanningTransformer { 30 | // TODO: Special case folding, through option Language, Special/Turkic, or 31 | // both. 32 | // TODO: Implement Compact options. 33 | return &caseFolder{} 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/cmd/gotext/doc.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 | // DO NOT EDIT THIS FILE. GENERATED BY go generate. 6 | // Edit the documentation in other files and rerun go generate to generate this one. 7 | 8 | // gotext is a tool for managing text in Go source code. 9 | // 10 | // Usage: 11 | // 12 | // gotext command [arguments] 13 | // 14 | // The commands are: 15 | // 16 | // extract extract strings to be translated from code 17 | // 18 | // Use "go help [command]" for more information about a command. 19 | // 20 | // Additional help topics: 21 | // 22 | // 23 | // Use "gotext help [topic]" for more information about that topic. 24 | // 25 | // 26 | // Extract strings to be translated from code 27 | // 28 | // Usage: 29 | // 30 | // go extract * 31 | // 32 | // 33 | // 34 | // 35 | package main 36 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/codereview.cfg: -------------------------------------------------------------------------------- 1 | issuerepo: golang/go 2 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/collate/index.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 | package collate 6 | 7 | import "golang.org/x/text/internal/colltab" 8 | 9 | const blockSize = 64 10 | 11 | func getTable(t tableIndex) *colltab.Table { 12 | return &colltab.Table{ 13 | Index: colltab.Trie{ 14 | Index0: mainLookup[:][blockSize*t.lookupOffset:], 15 | Values0: mainValues[:][blockSize*t.valuesOffset:], 16 | Index: mainLookup[:], 17 | Values: mainValues[:], 18 | }, 19 | ExpandElem: mainExpandElem[:], 20 | ContractTries: colltab.ContractTrieSet(mainCTEntries[:]), 21 | ContractElem: mainContractElem[:], 22 | MaxContractLen: 18, 23 | VariableTop: varTop, 24 | } 25 | } 26 | 27 | // tableIndex holds information for constructing a table 28 | // for a certain locale based on the main table. 29 | type tableIndex struct { 30 | lookupOffset uint32 31 | valuesOffset uint32 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/collate/tools/colcmp/Makefile: -------------------------------------------------------------------------------- 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 | chars: 6 | go run ../../maketables.go -tables=chars -package=main > chars.go 7 | gofmt -w -s chars.go 8 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/currency/example_test.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 | package currency_test 6 | 7 | import ( 8 | "fmt" 9 | "time" 10 | 11 | "golang.org/x/text/currency" 12 | ) 13 | 14 | func ExampleQuery() { 15 | t1799, _ := time.Parse("2006-01-02", "1799-01-01") 16 | for it := currency.Query(currency.Date(t1799)); it.Next(); { 17 | from := "" 18 | if t, ok := it.From(); ok { 19 | from = t.Format("2006-01-01") 20 | } 21 | fmt.Printf("%v is used in %v since: %v\n", it.Unit(), it.Region(), from) 22 | } 23 | // Output: 24 | // GBP is used in GB since: 1694-07-07 25 | // GIP is used in GI since: 1713-01-01 26 | // USD is used in US since: 1792-01-01 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/doc.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 | //go:generate go run gen.go 6 | 7 | // text is a repository of text-related packages related to internationalization 8 | // (i18n) and localization (l10n), such as character encodings, text 9 | // transformations, and locale-specific text handling. 10 | package text 11 | 12 | // TODO: more documentation on general concepts, such as Transformers, use 13 | // of normalization, etc. 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/ianaindex/example_test.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 | package ianaindex_test 6 | 7 | import ( 8 | "fmt" 9 | 10 | "golang.org/x/text/encoding/charmap" 11 | "golang.org/x/text/encoding/ianaindex" 12 | ) 13 | 14 | func ExampleIndex() { 15 | fmt.Println(ianaindex.MIME.Name(charmap.ISO8859_7)) 16 | fmt.Println(ianaindex.IANA.Name(charmap.ISO8859_7)) 17 | fmt.Println(ianaindex.MIB.Name(charmap.ISO8859_7)) 18 | 19 | e, _ := ianaindex.IANA.Encoding("cp437") 20 | fmt.Println(ianaindex.IANA.Name(e)) 21 | 22 | // Output: 23 | // ISO-8859-7 24 | // ISO_8859-7:1987 25 | // ISOLatinGreek 26 | // IBM437 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/japanese/all.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 | package japanese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{EUCJP, ISO2022JP, ShiftJIS} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/simplifiedchinese/all.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 | package simplifiedchinese 6 | 7 | import ( 8 | "golang.org/x/text/encoding" 9 | ) 10 | 11 | // All is a list of all defined encodings in this package. 12 | var All = []encoding.Encoding{GB18030, GBK, HZGB2312} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/candide-gb18030.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/candide-gb18030.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/candide-utf-16le.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/candide-utf-16le.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/candide-utf-32be.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/candide-utf-32be.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/candide-windows-1252.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/candide-windows-1252.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/rashomon-euc-jp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/rashomon-euc-jp.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/rashomon-shift-jis.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/rashomon-shift-jis.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-simplified-gbk.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-simplified-gbk.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-traditional-big5.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/sunzi-bingfa-traditional-big5.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/encoding/testdata/unsu-joh-eun-nal-euc-kr.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bketelsen/ngc/10ad4c9e7e1a4d2f0877b38e264bcf7a8c7e9856/vendor/golang.org/x/text/encoding/testdata/unsu-joh-eun-nal-euc-kr.txt -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/export/README: -------------------------------------------------------------------------------- 1 | The export directory contains packages that are generated using the x/text 2 | infrastructure, but live elsewhere. 3 | At some point we can expose some of the infrastructure, but for now this 4 | is not done. 5 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/gen_test.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 | package internal 6 | 7 | import ( 8 | "testing" 9 | 10 | "golang.org/x/text/language" 11 | ) 12 | 13 | func TestParents(t *testing.T) { 14 | testCases := []struct { 15 | tag, parent string 16 | }{ 17 | {"af", "und"}, 18 | {"en", "und"}, 19 | {"en-001", "en"}, 20 | {"en-AU", "en-001"}, 21 | {"en-US", "en"}, 22 | {"en-US-u-va-posix", "en-US"}, 23 | {"ca-ES-valencia", "ca-ES"}, 24 | } 25 | for _, tc := range testCases { 26 | tag, ok := language.CompactIndex(language.MustParse(tc.tag)) 27 | if !ok { 28 | t.Fatalf("Could not get index of flag %s", tc.tag) 29 | } 30 | want, ok := language.CompactIndex(language.MustParse(tc.parent)) 31 | if !ok { 32 | t.Fatalf("Could not get index of parent %s of tag %s", tc.parent, tc.tag) 33 | } 34 | if got := int(Parent[tag]); got != want { 35 | t.Errorf("Parent[%s] = %d; want %d (%s)", tc.tag, got, want, tc.parent) 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/internal_test.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 | package internal 6 | 7 | import ( 8 | "fmt" 9 | "strings" 10 | "testing" 11 | 12 | "golang.org/x/text/language" 13 | ) 14 | 15 | func TestUnique(t *testing.T) { 16 | testCases := []struct { 17 | in, want string 18 | }{ 19 | {"", "[]"}, 20 | {"en", "[en]"}, 21 | {"en en", "[en]"}, 22 | {"en en en", "[en]"}, 23 | {"en-u-cu-eur en", "[en en-u-cu-eur]"}, 24 | {"nl en", "[en nl]"}, 25 | {"pt-Pt pt", "[pt pt-PT]"}, 26 | } 27 | for _, tc := range testCases { 28 | tags := []language.Tag{} 29 | for _, s := range strings.Split(tc.in, " ") { 30 | if s != "" { 31 | tags = append(tags, language.MustParse(s)) 32 | } 33 | } 34 | if got := fmt.Sprint(UniqueTags(tags)); got != tc.want { 35 | t.Errorf("Unique(%s) = %s; want %s", tc.in, got, tc.want) 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/number/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package number 4 | 5 | import "unicode/utf8" 6 | 7 | // A system identifies a CLDR numbering system. 8 | type system byte 9 | 10 | type systemData struct { 11 | id system 12 | digitSize byte // number of UTF-8 bytes per digit 13 | zero [utf8.UTFMax]byte // UTF-8 sequence of zero digit. 14 | } 15 | 16 | // A SymbolType identifies a symbol of a specific kind. 17 | type SymbolType int 18 | 19 | const ( 20 | SymDecimal SymbolType = iota 21 | SymGroup 22 | SymList 23 | SymPercentSign 24 | SymPlusSign 25 | SymMinusSign 26 | SymExponential 27 | SymSuperscriptingExponent 28 | SymPerMille 29 | SymInfinity 30 | SymNan 31 | SymTimeSeparator 32 | 33 | NumSymbolTypes 34 | ) 35 | 36 | type altSymData struct { 37 | compactTag uint16 38 | system system 39 | symIndex byte 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/number/gen_common.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 ignore 6 | 7 | package main 8 | 9 | import "unicode/utf8" 10 | 11 | // A system identifies a CLDR numbering system. 12 | type system byte 13 | 14 | type systemData struct { 15 | id system 16 | digitSize byte // number of UTF-8 bytes per digit 17 | zero [utf8.UTFMax]byte // UTF-8 sequence of zero digit. 18 | } 19 | 20 | // A SymbolType identifies a symbol of a specific kind. 21 | type SymbolType int 22 | 23 | const ( 24 | SymDecimal SymbolType = iota 25 | SymGroup 26 | SymList 27 | SymPercentSign 28 | SymPlusSign 29 | SymMinusSign 30 | SymExponential 31 | SymSuperscriptingExponent 32 | SymPerMille 33 | SymInfinity 34 | SymNan 35 | SymTimeSeparator 36 | 37 | NumSymbolTypes 38 | ) 39 | 40 | type altSymData struct { 41 | compactTag uint16 42 | system system 43 | symIndex byte 44 | } 45 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/number/roundingmode_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type RoundingMode"; DO NOT EDIT. 2 | 3 | package number 4 | 5 | import "fmt" 6 | 7 | const _RoundingMode_name = "ToNearestEvenToNearestZeroToNearestAwayToPositiveInfToNegativeInfToZeroAwayFromZeronumModes" 8 | 9 | var _RoundingMode_index = [...]uint8{0, 13, 26, 39, 52, 65, 71, 83, 91} 10 | 11 | func (i RoundingMode) String() string { 12 | if i >= RoundingMode(len(_RoundingMode_index)-1) { 13 | return fmt.Sprintf("RoundingMode(%d)", i) 14 | } 15 | return _RoundingMode_name[_RoundingMode_index[i]:_RoundingMode_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/testtext/flag.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 | package testtext 6 | 7 | import ( 8 | "flag" 9 | "testing" 10 | 11 | "golang.org/x/text/internal/gen" 12 | ) 13 | 14 | var long = flag.Bool("long", false, 15 | "run tests that require fetching data online") 16 | 17 | // SkipIfNotLong returns whether long tests should be performed. 18 | func SkipIfNotLong(t *testing.T) { 19 | if testing.Short() || !(gen.IsLocal() || *long) { 20 | t.Skip("skipping test to prevent downloading; to run use -long or use -local or UNICODE_DIR to specify a local source") 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/testtext/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 !gccgo 6 | 7 | package testtext 8 | 9 | import "testing" 10 | 11 | // AllocsPerRun wraps testing.AllocsPerRun. 12 | func AllocsPerRun(runs int, f func()) (avg float64) { 13 | return testing.AllocsPerRun(runs, f) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/testtext/gccgo.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 gccgo 6 | 7 | package testtext 8 | 9 | // AllocsPerRun always returns 0 for gccgo until gccgo implements escape 10 | // analysis equal or better to that of gc. 11 | func AllocsPerRun(runs int, f func()) (avg float64) { return 0 } 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/testtext/go1_6.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 !go1.7 6 | 7 | package testtext 8 | 9 | import "testing" 10 | 11 | func Run(t *testing.T, name string, fn func(t *testing.T)) bool { 12 | t.Logf("Running %s...", name) 13 | fn(t) 14 | return t.Failed() 15 | } 16 | 17 | // Bench runs the given benchmark function. This pre-1.7 implementation renders 18 | // the measurement useless, but allows the code to be compiled at least. 19 | func Bench(b *testing.B, name string, fn func(b *testing.B)) bool { 20 | b.Logf("Running %s...", name) 21 | fn(b) 22 | return b.Failed() 23 | } 24 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/testtext/go1_7.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 go1.7 6 | 7 | package testtext 8 | 9 | import "testing" 10 | 11 | func Run(t *testing.T, name string, fn func(t *testing.T)) bool { 12 | return t.Run(name, fn) 13 | } 14 | 15 | func Bench(b *testing.B, name string, fn func(b *testing.B)) bool { 16 | return b.Run(name, fn) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/Makefile: -------------------------------------------------------------------------------- 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 | CLEANFILES+=maketables 6 | 7 | maketables: maketables.go 8 | go build $^ 9 | 10 | tables: maketables 11 | ./maketables > tables.go 12 | gofmt -w -s tables.go 13 | 14 | # Build (but do not run) maketables during testing, 15 | # just to make sure it still compiles. 16 | testshort: maketables 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // langAliasType is the type of an alias in langAliasMap. 8 | type langAliasType int8 9 | 10 | const ( 11 | langDeprecated langAliasType = iota 12 | langMacro 13 | langLegacy 14 | 15 | langAliasTypeUnknown langAliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/display/dict_test.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 | package display 6 | 7 | import ( 8 | "fmt" 9 | "testing" 10 | 11 | "golang.org/x/text/internal/testtext" 12 | ) 13 | 14 | func TestLinking(t *testing.T) { 15 | base := getSize(t, `display.Tags(language.English).Name(language.English)`) 16 | compact := getSize(t, `display.English.Languages().Name(language.English)`) 17 | 18 | if d := base - compact; d < 1.5*1024*1024 { 19 | t.Errorf("size(base)-size(compact) was %d; want > 1.5MB", base, compact) 20 | } 21 | } 22 | 23 | func getSize(t *testing.T, main string) int { 24 | size, err := testtext.CodeSize(fmt.Sprintf(body, main)) 25 | if err != nil { 26 | t.Skipf("skipping link size test; binary size could not be determined: %v", err) 27 | } 28 | return size 29 | } 30 | 31 | const body = `package main 32 | import ( 33 | "golang.org/x/text/language" 34 | "golang.org/x/text/language/display" 35 | ) 36 | func main() { 37 | %s 38 | } 39 | ` 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/gen_common.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 ignore 6 | 7 | package main 8 | 9 | // This file contains code common to the maketables.go and the package code. 10 | 11 | // langAliasType is the type of an alias in langAliasMap. 12 | type langAliasType int8 13 | 14 | const ( 15 | langDeprecated langAliasType = iota 16 | langMacro 17 | langLegacy 18 | 19 | langAliasTypeUnknown langAliasType = -1 20 | ) 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_1.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 !go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | func sortStable(s sort.Interface) { 12 | ss := stableSort{ 13 | s: s, 14 | pos: make([]int, s.Len()), 15 | } 16 | for i := range ss.pos { 17 | ss.pos[i] = i 18 | } 19 | sort.Sort(&ss) 20 | } 21 | 22 | type stableSort struct { 23 | s sort.Interface 24 | pos []int 25 | } 26 | 27 | func (s *stableSort) Len() int { 28 | return len(s.pos) 29 | } 30 | 31 | func (s *stableSort) Less(i, j int) bool { 32 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j] 33 | } 34 | 35 | func (s *stableSort) Swap(i, j int) { 36 | s.s.Swap(i, j) 37 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i] 38 | } 39 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_2.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 go1.2 6 | 7 | package language 8 | 9 | import "sort" 10 | 11 | var sortStable = sort.Stable 12 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/message/catalog.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 | package message 6 | 7 | // TODO: some types in this file will need to be made public at some time. 8 | // Documentation and method names will reflect this by using the exported name. 9 | 10 | import ( 11 | "golang.org/x/text/language" 12 | "golang.org/x/text/message/catalog" 13 | ) 14 | 15 | // DefaultCatalog is used by SetString. 16 | var DefaultCatalog *catalog.Catalog = defaultCatalog 17 | 18 | var defaultCatalog = catalog.New() 19 | 20 | // SetString calls SetString on the initial default Catalog. 21 | func SetString(tag language.Tag, key string, msg string) error { 22 | return defaultCatalog.SetString(tag, key, msg) 23 | } 24 | 25 | // Set calls Set on the initial default Catalog. 26 | func Set(tag language.Tag, key string, msg ...catalog.Message) error { 27 | return defaultCatalog.Set(tag, key, msg...) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/number/examples_test.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 | package number_test 6 | 7 | import ( 8 | "golang.org/x/text/language" 9 | "golang.org/x/text/message" 10 | "golang.org/x/text/number" 11 | ) 12 | 13 | func ExampleMaxIntegerDigits() { 14 | const year = 1999 15 | p := message.NewPrinter(language.English) 16 | p.Println("Year:", number.Decimal(year, number.MaxIntegerDigits(2))) 17 | 18 | // Output: 19 | // Year: 99 20 | } 21 | 22 | func ExampleIncrementString() { 23 | p := message.NewPrinter(language.English) 24 | 25 | p.Println(number.Decimal(1.33, number.IncrementString("0.50"))) 26 | 27 | // Output: 1.50 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/doc.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 | // secure is a repository of text security related packages. 6 | package secure // import "golang.org/x/text/secure" 7 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/precis/doc.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 | // Package precis contains types and functions for the preparation, 6 | // enforcement, and comparison of internationalized strings ("PRECIS") as 7 | // defined in RFC 8264. It also contains several pre-defined profiles for 8 | // passwords, nicknames, and usernames as defined in RFC 8265 and RFC 8266. 9 | // 10 | // BE ADVISED: This package is under construction and the API may change in 11 | // backwards incompatible ways and without notice. 12 | package precis // import "golang.org/x/text/secure/precis" 13 | 14 | //go:generate go run gen.go gen_trieval.go 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/precis/transformer.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 | package precis 6 | 7 | import "golang.org/x/text/transform" 8 | 9 | // Transformer implements the transform.Transformer interface. 10 | type Transformer struct { 11 | t transform.Transformer 12 | } 13 | 14 | // Reset implements the transform.Transformer interface. 15 | func (t Transformer) Reset() { t.t.Reset() } 16 | 17 | // Transform implements the transform.Transformer interface. 18 | func (t Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { 19 | return t.t.Transform(dst, src, atEOF) 20 | } 21 | 22 | // Bytes returns a new byte slice with the result of applying t to b. 23 | func (t Transformer) Bytes(b []byte) []byte { 24 | b, _, _ = transform.Bytes(t, b) 25 | return b 26 | } 27 | 28 | // String returns a string with the result of applying t to s. 29 | func (t Transformer) String(s string) string { 30 | s, _, _ = transform.String(t, s) 31 | return s 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/transform/examples_test.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 | package transform_test 6 | 7 | import ( 8 | "fmt" 9 | "unicode" 10 | 11 | "golang.org/x/text/transform" 12 | "golang.org/x/text/unicode/norm" 13 | ) 14 | 15 | func ExampleRemoveFunc() { 16 | input := []byte(`tschüß; до свидания`) 17 | 18 | b := make([]byte, len(input)) 19 | 20 | t := transform.RemoveFunc(unicode.IsSpace) 21 | n, _, _ := t.Transform(b, input, true) 22 | fmt.Println(string(b[:n])) 23 | 24 | t = transform.RemoveFunc(func(r rune) bool { 25 | return !unicode.Is(unicode.Latin, r) 26 | }) 27 | n, _, _ = t.Transform(b, input, true) 28 | fmt.Println(string(b[:n])) 29 | 30 | n, _, _ = t.Transform(b, norm.NFD.Bytes(input), true) 31 | fmt.Println(string(b[:n])) 32 | 33 | // Output: 34 | // tschüß;досвидания 35 | // tschüß 36 | // tschuß 37 | } 38 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/cldr/cldr_test.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 | package cldr 6 | 7 | import "testing" 8 | 9 | func TestParseDraft(t *testing.T) { 10 | tests := []struct { 11 | in string 12 | draft Draft 13 | err bool 14 | }{ 15 | {"unconfirmed", Unconfirmed, false}, 16 | {"provisional", Provisional, false}, 17 | {"contributed", Contributed, false}, 18 | {"approved", Approved, false}, 19 | {"", Approved, false}, 20 | {"foo", Approved, true}, 21 | } 22 | for _, tt := range tests { 23 | if d, err := ParseDraft(tt.in); d != tt.draft || (err != nil) != tt.err { 24 | t.Errorf("%q: was %v, %v; want %v, %v", tt.in, d, err != nil, tt.draft, tt.err) 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/cldr/examples_test.go: -------------------------------------------------------------------------------- 1 | package cldr_test 2 | 3 | import ( 4 | "fmt" 5 | 6 | "golang.org/x/text/unicode/cldr" 7 | ) 8 | 9 | func ExampleSlice() { 10 | var dr *cldr.CLDR // assume this is initialized 11 | 12 | x, _ := dr.LDML("en") 13 | cs := x.Collations.Collation 14 | // remove all but the default 15 | cldr.MakeSlice(&cs).Filter(func(e cldr.Elem) bool { 16 | return e.GetCommon().Type != x.Collations.Default() 17 | }) 18 | for i, c := range cs { 19 | fmt.Println(i, c.Type) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/doc.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 | // unicode holds packages with implementations of Unicode standards that are 6 | // mostly used as building blocks for other packages in golang.org/x/text, 7 | // layout engines, or are otherwise more low-level in nature. 8 | package unicode 9 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/unicode/norm/example_test.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 | package norm_test 6 | 7 | import ( 8 | "fmt" 9 | 10 | "golang.org/x/text/unicode/norm" 11 | ) 12 | 13 | func ExampleForm_NextBoundary() { 14 | s := norm.NFD.String("Mêlée") 15 | 16 | for i := 0; i < len(s); { 17 | d := norm.NFC.NextBoundaryInString(s[i:], true) 18 | fmt.Printf("%[1]s: %+[1]q\n", s[i:i+d]) 19 | i += d 20 | } 21 | // Output: 22 | // M: "M" 23 | // ê: "e\u0302" 24 | // l: "l" 25 | // é: "e\u0301" 26 | // e: "e" 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/gen_trieval.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 ignore 6 | 7 | package main 8 | 9 | // elem is an entry of the width trie. The high byte is used to encode the type 10 | // of the rune. The low byte is used to store the index to a mapping entry in 11 | // the inverseData array. 12 | type elem uint16 13 | 14 | const ( 15 | tagNeutral elem = iota << typeShift 16 | tagAmbiguous 17 | tagWide 18 | tagNarrow 19 | tagFullwidth 20 | tagHalfwidth 21 | ) 22 | 23 | const ( 24 | numTypeBits = 3 25 | typeShift = 16 - numTypeBits 26 | 27 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 28 | // the Won sign U+20A9. 29 | tagNeedsFold = 0x1000 30 | 31 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 32 | // variant. 33 | wonSign rune = 0x20A9 34 | ) 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/kind_string.go: -------------------------------------------------------------------------------- 1 | // Code generated by "stringer -type=Kind"; DO NOT EDIT. 2 | 3 | package width 4 | 5 | import "fmt" 6 | 7 | const _Kind_name = "NeutralEastAsianAmbiguousEastAsianWideEastAsianNarrowEastAsianFullwidthEastAsianHalfwidth" 8 | 9 | var _Kind_index = [...]uint8{0, 7, 25, 38, 53, 71, 89} 10 | 11 | func (i Kind) String() string { 12 | if i < 0 || i >= Kind(len(_Kind_index)-1) { 13 | return fmt.Sprintf("Kind(%d)", i) 14 | } 15 | return _Kind_name[_Kind_index[i]:_Kind_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/trieval.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package width 4 | 5 | // elem is an entry of the width trie. The high byte is used to encode the type 6 | // of the rune. The low byte is used to store the index to a mapping entry in 7 | // the inverseData array. 8 | type elem uint16 9 | 10 | const ( 11 | tagNeutral elem = iota << typeShift 12 | tagAmbiguous 13 | tagWide 14 | tagNarrow 15 | tagFullwidth 16 | tagHalfwidth 17 | ) 18 | 19 | const ( 20 | numTypeBits = 3 21 | typeShift = 16 - numTypeBits 22 | 23 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 24 | // the Won sign U+20A9. 25 | tagNeedsFold = 0x1000 26 | 27 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 28 | // variant. 29 | wonSign rune = 0x20A9 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | - 1.5 6 | - 1.6 7 | - tip 8 | 9 | go_import_path: gopkg.in/yaml.v2 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/example_embedded_test.go: -------------------------------------------------------------------------------- 1 | package yaml_test 2 | 3 | import ( 4 | "fmt" 5 | "log" 6 | 7 | "gopkg.in/yaml.v2" 8 | ) 9 | 10 | // An example showing how to unmarshal embedded 11 | // structs from YAML. 12 | 13 | type StructA struct { 14 | A string `yaml:"a"` 15 | } 16 | 17 | type StructB struct { 18 | // Embedded structs are not treated as embedded in YAML by default. To do that, 19 | // add the ",inline" annotation below 20 | StructA `yaml:",inline"` 21 | B string `yaml:"b"` 22 | } 23 | 24 | var data = ` 25 | a: a string from struct A 26 | b: a string from struct B 27 | ` 28 | 29 | func ExampleUnmarshal_embedded() { 30 | var b StructB 31 | 32 | err := yaml.Unmarshal([]byte(data), &b) 33 | if err != nil { 34 | log.Fatal("cannot unmarshal data: %v", err) 35 | } 36 | fmt.Println(b.A) 37 | fmt.Println(b.B) 38 | // Output: 39 | // a string from struct A 40 | // a string from struct B 41 | } 42 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/suite_test.go: -------------------------------------------------------------------------------- 1 | package yaml_test 2 | 3 | import ( 4 | . "gopkg.in/check.v1" 5 | "testing" 6 | ) 7 | 8 | func Test(t *testing.T) { TestingT(t) } 9 | 10 | type S struct{} 11 | 12 | var _ = Suite(&S{}) 13 | --------------------------------------------------------------------------------