├── .gitignore ├── .travis.yml ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── ROADMAP.md ├── api ├── admin.go ├── client.go ├── config.go ├── document.go ├── export.go ├── graveyard.go ├── info.go ├── label.go ├── login.go ├── profile.go ├── store.go ├── token.go └── webhook.go ├── cli └── main.go ├── cmd ├── admin │ ├── cmd.go │ ├── info │ │ └── cmd.go │ ├── job │ │ ├── cmd.go │ │ ├── create.go │ │ ├── get.go │ │ └── info.go │ └── user │ │ ├── cmd.go │ │ ├── get.go │ │ └── list.go ├── commands │ └── commands.go ├── common │ ├── main.go │ └── template.go ├── document │ ├── cmd.go │ ├── create.go │ ├── destroy.go │ ├── get.go │ ├── list.go │ ├── restore.go │ └── rm.go ├── export │ ├── cmd.go │ ├── download.go │ ├── schedule.go │ └── status.go ├── label │ ├── cmd.go │ ├── create.go │ ├── destroy.go │ ├── get.go │ ├── list.go │ ├── restore.go │ └── rm.go ├── login │ └── cmd.go ├── logout │ └── cmd.go ├── main.go ├── profile │ └── cmd.go ├── trash │ ├── cmd.go │ ├── empty.go │ └── list.go ├── version │ └── cmd.go └── webhook │ ├── cmd.go │ ├── create.go │ ├── get.go │ ├── list.go │ ├── rm.go │ └── update.go ├── glide.lock ├── glide.yaml ├── install.sh ├── keepctl.go ├── makefiles ├── docker.Makefile └── help.Makefile ├── screenshot.png ├── vendor ├── github.com │ ├── bgentry │ │ └── speakeasy │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── LICENSE_WINDOWS │ │ │ ├── Readme.md │ │ │ ├── example │ │ │ └── main.go │ │ │ ├── speakeasy.go │ │ │ ├── speakeasy_unix.go │ │ │ └── speakeasy_windows.go │ ├── 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 │ ├── mattn │ │ └── go-runewidth │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.mkd │ │ │ ├── runewidth.go │ │ │ ├── runewidth_js.go │ │ │ ├── runewidth_posix.go │ │ │ ├── runewidth_test.go │ │ │ └── runewidth_windows.go │ ├── mitchellh │ │ └── 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-buffruneio │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── README.md │ │ │ ├── buffruneio.go │ │ │ └── buffruneio_test.go │ │ └── go-toml │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── 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 │ └── 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 │ │ ├── mem │ │ │ ├── dir.go │ │ │ ├── dirmap.go │ │ │ └── file.go │ │ ├── memmap.go │ │ ├── memmap_test.go │ │ ├── memradix.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 │ │ ├── bash_completions.go │ │ ├── bash_completions.md │ │ ├── bash_completions_test.go │ │ ├── cobra.go │ │ ├── cobra │ │ │ ├── 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 │ │ │ ├── util.go │ │ │ ├── yaml_docs.go │ │ │ ├── yaml_docs.md │ │ │ └── yaml_docs_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 │ │ ├── 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_solaris_amd64.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── constants.go │ │ │ ├── creds_test.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── env_unset.go │ │ │ ├── export_test.go │ │ │ ├── flock.go │ │ │ ├── flock_linux_32bit.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── gccgo_linux_sparc64.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 │ │ │ ├── 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_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_solaris_test.go │ │ │ ├── syscall_test.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_unix_test.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_solaris_amd64.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_solaris_amd64.go │ │ │ ├── zsysctl_openbsd.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_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_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 │ │ │ ├── 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 │ │ │ ├── zsyscall_windows.go │ │ │ ├── ztypes_windows.go │ │ │ ├── ztypes_windows_386.go │ │ │ └── ztypes_windows_amd64.go │ │ └── text │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── AUTHORS │ │ ├── CONTRIBUTING.md │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── README │ │ ├── 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 │ │ ├── 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 │ │ │ ├── gen.go │ │ │ ├── gen_common.go │ │ │ ├── plural.go │ │ │ ├── plural_test.go │ │ │ └── tables.go │ │ ├── gen.go │ │ ├── internal │ │ ├── catmsg │ │ │ ├── catmsg.go │ │ │ ├── catmsg_test.go │ │ │ ├── codec.go │ │ │ ├── varint.go │ │ │ └── varint_test.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 │ │ │ ├── gen.go │ │ │ ├── gen_common.go │ │ │ ├── number.go │ │ │ ├── number_test.go │ │ │ ├── pattern.go │ │ │ ├── pattern_test.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 │ │ ├── data_test.go │ │ ├── display │ │ │ ├── dict.go │ │ │ ├── dict_test.go │ │ │ ├── display.go │ │ │ ├── display_test.go │ │ │ ├── examples_test.go │ │ │ ├── lookup.go │ │ │ ├── maketables.go │ │ │ └── tables.go │ │ ├── examples_test.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 │ │ ├── maketables.go │ │ ├── match.go │ │ ├── match_test.go │ │ ├── parse.go │ │ ├── parse_test.go │ │ ├── tables.go │ │ └── tags.go │ │ ├── message │ │ ├── catalog.go │ │ ├── catalog_test.go │ │ ├── message.go │ │ └── message_test.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 │ │ │ ├── norm_test.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 │ ├── cheggaaa │ └── pb.v1 │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── example_copy_test.go │ │ ├── example_multiple_test.go │ │ ├── example_test.go │ │ ├── format.go │ │ ├── format_test.go │ │ ├── pb.go │ │ ├── pb_appengine.go │ │ ├── pb_nix.go │ │ ├── pb_solaris.go │ │ ├── pb_test.go │ │ ├── pb_win.go │ │ ├── pb_x.go │ │ ├── pool.go │ │ ├── pool_win.go │ │ ├── pool_x.go │ │ ├── reader.go │ │ ├── runecount.go │ │ ├── runecount_test.go │ │ ├── termios_bsd.go │ │ └── termios_nix.go │ └── yaml.v2 │ ├── .travis.yml │ ├── LICENSE │ ├── LICENSE.libyaml │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── decode_test.go │ ├── emitterc.go │ ├── encode.go │ ├── encode_test.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── suite_test.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go └── version └── keeper_version.go /.gitignore: -------------------------------------------------------------------------------- 1 | release 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.8 4 | deploy: 5 | provider: releases 6 | api_key: 7 | secure: 5QO9L/1713lJC6FqR0R45oBM/hJyJSgHnoI7svjGF5AzjWhRl3OfAc5ZwyZRXBWIu+WCn470qxkNN/PPJyPAnNjiVqmN1kE5JJAZfpFIc/9vAhqJIIoT1DGIICmQ0pO2BXASRxwx9XC9rhqKZqAZ5OiPQQiijYUmCw/E7E35B3COvbLKMc/79O50Wx7JMU6+x/swbbcg2PCR/8TTZQ9iiLEXf9xlNckalpEsi/s/0uJ4lub8YzF4n1O51bXIxqYwwxM4vFwm/KjHXMOe82TG8Um2kWRAcMQBhX5x/pVcMwThpuUjqK/2gRSklazQv3EemEDltNBUsSl/VOKYAce9/ROnA9Uf11yrp8iWg3rtIWbDjLLzB9eGof2hmcwVgcWMryeQfGdmuUw6Jh2uGnDIxkXp1Z3+rSlWVFjzKsSHtKCcAK4BpwmL0mhWQH2WRu/Tm1IoTw6AP5W+DhmyoNuXsyGTkT9s/aKqAodQ3BPCgGyxm6hSFWcib2Ecf5WCJ17i0pqI75/5vX+mW9hRFu1Vhx11lADUpx4ips6BHKd6V4272kMglaFCDNN5MFlcUXaKqh3NxoFP20g8ZAUdIIg46aoqN6w6ohL5VLcn/FoZK7WWkOF06HSXTgX+90A7XN9gablh7deVMUJMi6lrwInPOP/dI5TKvUAFWlSPlWDGrhs= 8 | file: 9 | - release/keepctl-linux-amd64 10 | skip_cleanup: true 11 | on: 12 | repo: nunux-keeper/keeper-cli 13 | tags: true 14 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing guide 2 | 3 | ## Release 4 | 5 | ``` 6 | $ git tag -a 0.0.6 7 | $ git push --tags 8 | ``` 9 | -------------------------------------------------------------------------------- /ROADMAP.md: -------------------------------------------------------------------------------- 1 | # Roadmap 2 | 3 | - Full feature document command: 4 | - Update a document 5 | - Create with content-type 6 | - Create by upload file 7 | - Full feature attachment command 8 | - List/Upload/Remove/Get attachment 9 | - Create MAN: https://github.com/spf13/cobra/blob/master/doc/man_docs.md 10 | - Have bash completion: 11 | https://github.com/spf13/cobra/blob/master/bash_completions.md 12 | 13 | -------------------------------------------------------------------------------- /api/config.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | type TokenInfos struct { 4 | TokenService string `json:"token_service"` 5 | TokenType string `json:"token_type"` 6 | AccessToken string `json:"access_token"` 7 | RefreshToken string `json:"refresh_token"` 8 | ExpiresIn int `json:"expires_in"` 9 | RefreshExpiresIn int `json:"refresh_expires_in"` 10 | } 11 | 12 | type Config struct { 13 | Endpoint string 14 | ClientId string 15 | ClientSecret string 16 | Credentials *TokenInfos 17 | } 18 | -------------------------------------------------------------------------------- /api/info.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import "encoding/json" 4 | 5 | type Href struct { 6 | Href string `json:href` 7 | } 8 | 9 | type ApiInfoResponse struct { 10 | Name string `json:name` 11 | Description string `json:description` 12 | Version string `json:version` 13 | APIVersion string `json:apiVersion` 14 | Env string `json:env` 15 | Links struct { 16 | AuthRealm *Href `json:"auth-realm"` 17 | } `json:"_links"` 18 | } 19 | 20 | func (k *Client) GetApiInfo() (*ApiInfoResponse, error) { 21 | r, err := k.Get("/", nil) 22 | if err != nil { 23 | return nil, err 24 | } 25 | defer r.Body.Close() 26 | 27 | var result ApiInfoResponse 28 | err = json.NewDecoder(r.Body).Decode(&result) 29 | return &result, err 30 | } 31 | -------------------------------------------------------------------------------- /api/login.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | "errors" 5 | "strings" 6 | ) 7 | 8 | func (k *Client) Login(username string, password string) (*TokenInfos, error) { 9 | if username = strings.TrimSpace(username); username == "" { 10 | return nil, errors.New("Username not specified.") 11 | } 12 | info, err := k.GetApiInfo() 13 | if err != nil { 14 | return nil, err 15 | } 16 | 17 | realm, err := GetAuthRealm(info.Links.AuthRealm.Href) 18 | if err != nil { 19 | return nil, err 20 | } 21 | 22 | creds := &Credentials{ 23 | Username: username, 24 | Password: password, 25 | } 26 | 27 | return GetOfflineToken(realm.TokenService, creds) 28 | } 29 | -------------------------------------------------------------------------------- /api/profile.go: -------------------------------------------------------------------------------- 1 | package api 2 | 3 | import ( 4 | "encoding/json" 5 | "errors" 6 | "io" 7 | "os" 8 | ) 9 | 10 | type ProfileResponse struct { 11 | Admin bool `json:admin` 12 | Date string `json:date` 13 | Hash string `json:hash` 14 | Name string `json:name` 15 | Uid string `json:uid` 16 | } 17 | 18 | func (k *Client) GetProfile() (*ProfileResponse, error) { 19 | res, err := k.Get("/v2/profiles/current", nil) 20 | if err != nil { 21 | return nil, err 22 | } 23 | defer res.Body.Close() 24 | if res.StatusCode >= 400 { 25 | io.Copy(os.Stderr, res.Body) 26 | return nil, errors.New(res.Status) 27 | } 28 | 29 | var result ProfileResponse 30 | err = json.NewDecoder(res.Body).Decode(&result) 31 | return &result, err 32 | } 33 | -------------------------------------------------------------------------------- /cli/main.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/api" 5 | "github.com/spf13/viper" 6 | ) 7 | 8 | // KeeperCLI Command Line Interface 9 | type KeeperCLI struct { 10 | API *api.Client 11 | JSON bool 12 | } 13 | 14 | // NewKeeperCLI returns new CLI instance 15 | func NewKeeperCLI() (*KeeperCLI, error) { 16 | endpoint := viper.GetString("endpoint") 17 | c, err := api.NewAPIClient(endpoint) 18 | if err != nil { 19 | return nil, err 20 | } 21 | json := viper.GetBool("json") 22 | 23 | return &KeeperCLI{ 24 | API: c, 25 | JSON: json, 26 | }, nil 27 | } 28 | -------------------------------------------------------------------------------- /cmd/admin/cmd.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/admin/info" 5 | "github.com/nunux-keeper/keeper-cli/cmd/admin/job" 6 | "github.com/nunux-keeper/keeper-cli/cmd/admin/user" 7 | "github.com/nunux-keeper/keeper-cli/cmd/common" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func NewCommand() *cobra.Command { 12 | cmd := &cobra.Command{ 13 | Use: "admin", 14 | Short: "Admin commands", 15 | RunE: common.ShowHelp(), 16 | } 17 | cmd.AddCommand( 18 | info.NewCommand(), 19 | job.NewCommand(), 20 | user.NewCommand(), 21 | ) 22 | return cmd 23 | } 24 | -------------------------------------------------------------------------------- /cmd/admin/info/cmd.go: -------------------------------------------------------------------------------- 1 | package info 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cli" 5 | "github.com/nunux-keeper/keeper-cli/cmd/common" 6 | "github.com/spf13/cobra" 7 | ) 8 | 9 | func NewCommand() *cobra.Command { 10 | cmd := &cobra.Command{ 11 | Use: "info", 12 | Short: "Get server informations", 13 | RunE: func(cc *cobra.Command, args []string) error { 14 | return runGetServerInfos(cc) 15 | }, 16 | } 17 | return cmd 18 | } 19 | 20 | func runGetServerInfos(cmd *cobra.Command) error { 21 | kli, err := cli.NewKeeperCLI() 22 | if err != nil { 23 | return err 24 | } 25 | resp, err := kli.API.GetServerInfos() 26 | if err != nil { 27 | return err 28 | } 29 | return common.WriteCmdResponse(resp, common.SERVER_INFOS, kli.JSON) 30 | } 31 | -------------------------------------------------------------------------------- /cmd/admin/job/cmd.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/common" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | func NewCommand() *cobra.Command { 9 | cmd := &cobra.Command{ 10 | Use: "job", 11 | Short: "Manage jobs", 12 | RunE: common.ShowHelp(), 13 | } 14 | cmd.AddCommand( 15 | newCreateCommand(), 16 | newGetCommand(), 17 | newInfoCommand(), 18 | ) 19 | return cmd 20 | } 21 | -------------------------------------------------------------------------------- /cmd/admin/job/get.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/nunux-keeper/keeper-cli/cmd/common" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newGetCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "get ", 14 | Short: "Get job details", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("Job ID required.") 18 | } 19 | id := args[0] 20 | return runGetCommand(cc, id) 21 | }, 22 | } 23 | } 24 | 25 | func runGetCommand(cmd *cobra.Command, id string) error { 26 | kli, err := cli.NewKeeperCLI() 27 | if err != nil { 28 | return err 29 | } 30 | resp, err := kli.API.GetJob(id) 31 | if err != nil { 32 | return err 33 | } 34 | return common.WriteCmdResponse(resp, common.JOB, kli.JSON) 35 | } 36 | -------------------------------------------------------------------------------- /cmd/admin/job/info.go: -------------------------------------------------------------------------------- 1 | package job 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cli" 5 | "github.com/nunux-keeper/keeper-cli/cmd/common" 6 | "github.com/spf13/cobra" 7 | ) 8 | 9 | func newInfoCommand() *cobra.Command { 10 | return &cobra.Command{ 11 | Use: "info", 12 | Short: "Get jobs informations", 13 | RunE: func(cc *cobra.Command, args []string) error { 14 | return runInfoCommand(cc) 15 | }, 16 | } 17 | } 18 | 19 | func runInfoCommand(cmd *cobra.Command) error { 20 | kli, err := cli.NewKeeperCLI() 21 | if err != nil { 22 | return err 23 | } 24 | 25 | resp, err := kli.API.GetJobsInfos() 26 | if err != nil { 27 | return err 28 | } 29 | return common.WriteCmdResponse(resp, common.JOBS_INFO, kli.JSON) 30 | } 31 | -------------------------------------------------------------------------------- /cmd/admin/user/cmd.go: -------------------------------------------------------------------------------- 1 | package user 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/common" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | func NewCommand() *cobra.Command { 9 | cmd := &cobra.Command{ 10 | Use: "user", 11 | Short: "Manage users", 12 | RunE: common.ShowHelp(), 13 | } 14 | cmd.AddCommand( 15 | newGetCommand(), 16 | newListCommand(), 17 | ) 18 | return cmd 19 | } 20 | -------------------------------------------------------------------------------- /cmd/admin/user/get.go: -------------------------------------------------------------------------------- 1 | package user 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/nunux-keeper/keeper-cli/cmd/common" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newGetCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "get (UID)", 14 | Short: "Get user details", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("User ID required.") 18 | } 19 | uid := args[0] 20 | return runGetCommand(cc, uid) 21 | }, 22 | } 23 | } 24 | 25 | func runGetCommand(cmd *cobra.Command, uid string) error { 26 | kli, err := cli.NewKeeperCLI() 27 | if err != nil { 28 | return err 29 | } 30 | 31 | resp, err := kli.API.GetUser(uid) 32 | if err != nil { 33 | return err 34 | } 35 | return common.WriteCmdResponse(resp, common.USER, kli.JSON) 36 | } 37 | -------------------------------------------------------------------------------- /cmd/common/main.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/spf13/cobra" 7 | ) 8 | 9 | func ShowHelp() func(*cobra.Command, []string) error { 10 | return func(cmd *cobra.Command, args []string) error { 11 | cmd.SetOutput(os.Stderr) 12 | cmd.HelpFunc()(cmd, args) 13 | return nil 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /cmd/document/cmd.go: -------------------------------------------------------------------------------- 1 | package document 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/common" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | func NewCommand() *cobra.Command { 9 | cmd := &cobra.Command{ 10 | Use: "document", 11 | Aliases: []string{"doc"}, 12 | Short: "Manage documents", 13 | RunE: common.ShowHelp(), 14 | } 15 | cmd.AddCommand( 16 | newCreateCommand(), 17 | newGetCommand(), 18 | newListCommand(), 19 | newRemoveCommand(), 20 | newRestoreCommand(), 21 | newDestroyCommand(), 22 | ) 23 | return cmd 24 | } 25 | -------------------------------------------------------------------------------- /cmd/document/destroy.go: -------------------------------------------------------------------------------- 1 | package document 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | 7 | "github.com/spf13/cobra" 8 | 9 | "github.com/nunux-keeper/keeper-cli/cli" 10 | ) 11 | 12 | func newDestroyCommand() *cobra.Command { 13 | return &cobra.Command{ 14 | Use: "destroy (ID)", 15 | Short: "Remove a document from the trash", 16 | RunE: func(cc *cobra.Command, args []string) error { 17 | if len(args) < 1 { 18 | return errors.New("Document ID required.") 19 | } 20 | docid := args[0] 21 | return runDestroyCommand(cc, docid) 22 | }, 23 | } 24 | } 25 | 26 | func runDestroyCommand(cmd *cobra.Command, docid string) error { 27 | kli, err := cli.NewKeeperCLI() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | err = kli.API.DestroyDocument(docid) 33 | if err != nil { 34 | return err 35 | } 36 | fmt.Println("Document destroyed.") 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /cmd/document/get.go: -------------------------------------------------------------------------------- 1 | package document 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/spf13/cobra" 7 | 8 | "github.com/nunux-keeper/keeper-cli/cli" 9 | "github.com/nunux-keeper/keeper-cli/cmd/common" 10 | ) 11 | 12 | func newGetCommand() *cobra.Command { 13 | return &cobra.Command{ 14 | Use: "get (ID)", 15 | Short: "Get a document", 16 | RunE: func(cc *cobra.Command, args []string) error { 17 | if len(args) < 1 { 18 | return errors.New("Document ID required.") 19 | } 20 | docid := args[0] 21 | return runGetCommand(cc, docid) 22 | }, 23 | } 24 | } 25 | 26 | func runGetCommand(cmd *cobra.Command, docid string) error { 27 | kli, err := cli.NewKeeperCLI() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | resp, err := kli.API.GetDocument(docid) 33 | if err != nil { 34 | return err 35 | } 36 | 37 | return common.WriteCmdResponse(resp, common.DOCUMENT, kli.JSON) 38 | } 39 | -------------------------------------------------------------------------------- /cmd/document/restore.go: -------------------------------------------------------------------------------- 1 | package document 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/nunux-keeper/keeper-cli/cmd/common" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newRestoreCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "restore (ID)", 14 | Short: "Restore a deleted document", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("Document ID required.") 18 | } 19 | docid := args[0] 20 | return runRestoreCommand(cc, docid) 21 | }, 22 | } 23 | } 24 | 25 | func runRestoreCommand(cmd *cobra.Command, docid string) error { 26 | kli, err := cli.NewKeeperCLI() 27 | if err != nil { 28 | return err 29 | } 30 | 31 | resp, err := kli.API.RestoreDocument(docid) 32 | if err != nil { 33 | return err 34 | } 35 | return common.WriteCmdResponse(resp, common.DOCUMENT, kli.JSON) 36 | } 37 | -------------------------------------------------------------------------------- /cmd/document/rm.go: -------------------------------------------------------------------------------- 1 | package document 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | 7 | "github.com/nunux-keeper/keeper-cli/cli" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newRemoveCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "rm (ID)", 14 | Short: "Remove a document", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("Document ID required.") 18 | } 19 | docid := args[0] 20 | return runRemoveCommand(cc, docid) 21 | }, 22 | } 23 | } 24 | 25 | func runRemoveCommand(cmd *cobra.Command, docid string) error { 26 | kli, err := cli.NewKeeperCLI() 27 | if err != nil { 28 | return err 29 | } 30 | 31 | err = kli.API.RemoveDocument(docid) 32 | if err != nil { 33 | return err 34 | } 35 | fmt.Println("Document removed.") 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /cmd/export/cmd.go: -------------------------------------------------------------------------------- 1 | package export 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/common" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | // NewCommand Declare new command 9 | func NewCommand() *cobra.Command { 10 | cmd := &cobra.Command{ 11 | Use: "export", 12 | Short: "Manage exports", 13 | RunE: common.ShowHelp(), 14 | } 15 | cmd.AddCommand( 16 | newScheduleCommand(), 17 | newStatusCommand(), 18 | newDownloadCommand(), 19 | ) 20 | return cmd 21 | } 22 | -------------------------------------------------------------------------------- /cmd/export/schedule.go: -------------------------------------------------------------------------------- 1 | package export 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func newScheduleCommand() *cobra.Command { 11 | return &cobra.Command{ 12 | Use: "schedule", 13 | Short: "Schedule a new export", 14 | RunE: func(cc *cobra.Command, args []string) error { 15 | return runScheduleCommand(cc) 16 | }, 17 | } 18 | } 19 | 20 | func runScheduleCommand(cmd *cobra.Command) error { 21 | kli, err := cli.NewKeeperCLI() 22 | if err != nil { 23 | return err 24 | } 25 | err = kli.API.ScheduleExport() 26 | if err != nil { 27 | return err 28 | } 29 | fmt.Println("Export scheduled.") 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /cmd/export/status.go: -------------------------------------------------------------------------------- 1 | package export 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func newStatusCommand() *cobra.Command { 11 | return &cobra.Command{ 12 | Use: "status", 13 | Short: "Get status of an export", 14 | RunE: func(cc *cobra.Command, args []string) error { 15 | return runStatusCommand(cc) 16 | }, 17 | } 18 | } 19 | 20 | func runStatusCommand(cmd *cobra.Command) error { 21 | kli, err := cli.NewKeeperCLI() 22 | if err != nil { 23 | return err 24 | } 25 | 26 | err = kli.API.GetExportStatus(os.Stdout) 27 | if err != nil { 28 | return err 29 | } 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /cmd/label/cmd.go: -------------------------------------------------------------------------------- 1 | package label 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/common" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | func NewCommand() *cobra.Command { 9 | cmd := &cobra.Command{ 10 | Use: "label", 11 | Short: "Manage labels", 12 | RunE: common.ShowHelp(), 13 | } 14 | cmd.AddCommand( 15 | newCreateCommand(), 16 | newGetCommand(), 17 | newListCommand(), 18 | newRemoveCommand(), 19 | newRestoreCommand(), 20 | // newDestroyCommand(), 21 | ) 22 | return cmd 23 | } 24 | -------------------------------------------------------------------------------- /cmd/label/destroy.go: -------------------------------------------------------------------------------- 1 | package label 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | 7 | "github.com/spf13/cobra" 8 | 9 | "github.com/nunux-keeper/keeper-cli/cli" 10 | ) 11 | 12 | func newDestroyCommand() *cobra.Command { 13 | return &cobra.Command{ 14 | Use: "destroy (ID)", 15 | Short: "Remove a label from the trash", 16 | RunE: func(cc *cobra.Command, args []string) error { 17 | if len(args) < 1 { 18 | return errors.New("Label ID required.") 19 | } 20 | docid := args[0] 21 | return runDestroyCommand(cc, docid) 22 | }, 23 | } 24 | } 25 | 26 | func runDestroyCommand(cmd *cobra.Command, id string) error { 27 | kli, err := cli.NewKeeperCLI() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | err = kli.API.DestroyLabel(id) 33 | if err != nil { 34 | return err 35 | } 36 | fmt.Println("Label destroyed.") 37 | return nil 38 | } 39 | -------------------------------------------------------------------------------- /cmd/label/get.go: -------------------------------------------------------------------------------- 1 | package label 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/nunux-keeper/keeper-cli/cmd/common" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newGetCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "get (ID)", 14 | Short: "Get a label", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("Label ID required.") 18 | } 19 | docid := args[0] 20 | 21 | return runGetCommand(cc, docid) 22 | }, 23 | } 24 | } 25 | 26 | func runGetCommand(cmd *cobra.Command, id string) error { 27 | kli, err := cli.NewKeeperCLI() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | resp, err := kli.API.GetLabel(id) 33 | if err != nil { 34 | return err 35 | } 36 | return common.WriteCmdResponse(resp, common.LABEL, kli.JSON) 37 | } 38 | -------------------------------------------------------------------------------- /cmd/label/restore.go: -------------------------------------------------------------------------------- 1 | package label 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/nunux-keeper/keeper-cli/cmd/common" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newRestoreCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "restore (ID)", 14 | Short: "Restore a deleted label", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("Label ID required.") 18 | } 19 | docid := args[0] 20 | 21 | return runRestoreCommand(cc, docid) 22 | }, 23 | } 24 | } 25 | 26 | func runRestoreCommand(cmd *cobra.Command, id string) error { 27 | kli, err := cli.NewKeeperCLI() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | resp, err := kli.API.RestoreLabel(id) 33 | if err != nil { 34 | return err 35 | } 36 | return common.WriteCmdResponse(resp, common.LABEL, kli.JSON) 37 | } 38 | -------------------------------------------------------------------------------- /cmd/label/rm.go: -------------------------------------------------------------------------------- 1 | package label 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | 7 | "github.com/nunux-keeper/keeper-cli/cli" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newRemoveCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "rm (ID)", 14 | Short: "Remove a label", 15 | RunE: func(cmd *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("Label ID required.") 18 | } 19 | docid := args[0] 20 | return runRemoveCommand(cmd, docid) 21 | }, 22 | } 23 | } 24 | 25 | func runRemoveCommand(cmd *cobra.Command, id string) error { 26 | kli, err := cli.NewKeeperCLI() 27 | if err != nil { 28 | return err 29 | } 30 | 31 | err = kli.API.RemoveLabel(id) 32 | if err != nil { 33 | return err 34 | } 35 | fmt.Println("Label removed.") 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /cmd/logout/cmd.go: -------------------------------------------------------------------------------- 1 | package logout 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/spf13/cobra" 7 | 8 | "github.com/nunux-keeper/keeper-cli/api" 9 | ) 10 | 11 | func NewCommand() *cobra.Command { 12 | cmd := &cobra.Command{ 13 | Use: "logout", 14 | Short: "Logout from a Nunux Keeper instance", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | return runLogoutCommand(cc) 17 | }, 18 | } 19 | return cmd 20 | } 21 | 22 | func runLogoutCommand(cmd *cobra.Command) error { 23 | err := api.RemoveTokenInfos() 24 | if err != nil { 25 | return err 26 | } 27 | 28 | fmt.Println("User logged out.") 29 | return nil 30 | } 31 | -------------------------------------------------------------------------------- /cmd/profile/cmd.go: -------------------------------------------------------------------------------- 1 | package profile 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cli" 5 | "github.com/nunux-keeper/keeper-cli/cmd/common" 6 | "github.com/spf13/cobra" 7 | ) 8 | 9 | func NewCommand() *cobra.Command { 10 | cmd := &cobra.Command{ 11 | Use: "profile", 12 | Short: "Get current user profile", 13 | RunE: func(cc *cobra.Command, args []string) error { 14 | return runProfileCommand(cc) 15 | }, 16 | } 17 | return cmd 18 | } 19 | 20 | func runProfileCommand(cmd *cobra.Command) error { 21 | kli, err := cli.NewKeeperCLI() 22 | if err != nil { 23 | return err 24 | } 25 | 26 | resp, err := kli.API.GetProfile() 27 | if err != nil { 28 | return err 29 | } 30 | return common.WriteCmdResponse(resp, common.PROFILE, kli.JSON) 31 | } 32 | -------------------------------------------------------------------------------- /cmd/trash/cmd.go: -------------------------------------------------------------------------------- 1 | package trash 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/common" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | func NewCommand() *cobra.Command { 9 | cmd := &cobra.Command{ 10 | Use: "trash", 11 | Short: "Manage the trash", 12 | RunE: common.ShowHelp(), 13 | } 14 | cmd.AddCommand( 15 | newEmptyCommand(), 16 | newListCommand(), 17 | ) 18 | return cmd 19 | } 20 | -------------------------------------------------------------------------------- /cmd/trash/empty.go: -------------------------------------------------------------------------------- 1 | package trash 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func newEmptyCommand() *cobra.Command { 11 | cmd := &cobra.Command{ 12 | Use: "empty", 13 | Short: "Empty the trash", 14 | RunE: func(cc *cobra.Command, args []string) error { 15 | return runEmptyCommand(cc) 16 | }, 17 | } 18 | return cmd 19 | } 20 | 21 | func runEmptyCommand(cmd *cobra.Command) error { 22 | kli, err := cli.NewKeeperCLI() 23 | if err != nil { 24 | return err 25 | } 26 | 27 | err = kli.API.EmptyGraveyard() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | fmt.Println("Trash is empty.") 33 | return nil 34 | } 35 | -------------------------------------------------------------------------------- /cmd/webhook/cmd.go: -------------------------------------------------------------------------------- 1 | package webhook 2 | 3 | import ( 4 | "github.com/nunux-keeper/keeper-cli/cmd/common" 5 | "github.com/spf13/cobra" 6 | ) 7 | 8 | func deleteEmpty(s []string) []string { 9 | var r []string 10 | for _, str := range s { 11 | if str != "" { 12 | r = append(r, str) 13 | } 14 | } 15 | return r 16 | } 17 | 18 | // NewCommand Create new command 19 | func NewCommand() *cobra.Command { 20 | cmd := &cobra.Command{ 21 | Use: "webhook", 22 | Short: "Manage webhooks", 23 | RunE: common.ShowHelp(), 24 | } 25 | cmd.AddCommand( 26 | newCreateCommand(), 27 | newUpdateCommand(), 28 | newGetCommand(), 29 | newListCommand(), 30 | newRemoveCommand(), 31 | ) 32 | return cmd 33 | } 34 | -------------------------------------------------------------------------------- /cmd/webhook/get.go: -------------------------------------------------------------------------------- 1 | package webhook 2 | 3 | import ( 4 | "errors" 5 | 6 | "github.com/nunux-keeper/keeper-cli/cli" 7 | "github.com/nunux-keeper/keeper-cli/cmd/common" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newGetCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "get (ID)", 14 | Short: "Get a webhook", 15 | RunE: func(cc *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("webhook ID required") 18 | } 19 | id := args[0] 20 | 21 | return runGetCommand(cc, id) 22 | }, 23 | } 24 | } 25 | 26 | func runGetCommand(cmd *cobra.Command, id string) error { 27 | kli, err := cli.NewKeeperCLI() 28 | if err != nil { 29 | return err 30 | } 31 | 32 | resp, err := kli.API.GetWebhook(id) 33 | if err != nil { 34 | return err 35 | } 36 | return common.WriteCmdResponse(resp, common.WEBHOOK, kli.JSON) 37 | } 38 | -------------------------------------------------------------------------------- /cmd/webhook/rm.go: -------------------------------------------------------------------------------- 1 | package webhook 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | 7 | "github.com/nunux-keeper/keeper-cli/cli" 8 | "github.com/spf13/cobra" 9 | ) 10 | 11 | func newRemoveCommand() *cobra.Command { 12 | return &cobra.Command{ 13 | Use: "rm (ID)", 14 | Short: "Remove a webhook", 15 | RunE: func(cmd *cobra.Command, args []string) error { 16 | if len(args) < 1 { 17 | return errors.New("webhook ID required") 18 | } 19 | id := args[0] 20 | return runRemoveCommand(cmd, id) 21 | }, 22 | } 23 | } 24 | 25 | func runRemoveCommand(cmd *cobra.Command, id string) error { 26 | kli, err := cli.NewKeeperCLI() 27 | if err != nil { 28 | return err 29 | } 30 | 31 | err = kli.API.RemoveWebhook(id) 32 | if err != nil { 33 | return err 34 | } 35 | fmt.Println("webhook removed.") 36 | return nil 37 | } 38 | -------------------------------------------------------------------------------- /glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/nunux-keeper/keeper-cli 2 | import: 3 | - package: github.com/bgentry/speakeasy 4 | version: ^0.1.0 5 | - package: github.com/spf13/cobra 6 | - package: github.com/spf13/viper 7 | - package: gopkg.in/cheggaaa/pb.v1 8 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | release_url="https://api.github.com/repos/nunux-keeper/keeper-cli/releases/latest" 4 | download_url=`curl -s $release_url | grep browser_download_url | head -n 1 | cut -d '"' -f 4` 5 | 6 | sudo curl -o /usr/local/bin/keepctl -L $download_url 7 | sudo chmod +x /usr/local/bin/keepctl 8 | 9 | -------------------------------------------------------------------------------- /keepctl.go: -------------------------------------------------------------------------------- 1 | // Copyright © 2016 Nicolas Carlier 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 ( 18 | "os" 19 | 20 | "github.com/nunux-keeper/keeper-cli/cmd" 21 | ) 22 | 23 | func main() { 24 | if err := cmd.Execute(); err != nil { 25 | os.Exit(1) 26 | } 27 | os.Exit(0) 28 | } 29 | -------------------------------------------------------------------------------- /makefiles/help.Makefile: -------------------------------------------------------------------------------- 1 | .SILENT : 2 | .PHONY : help 3 | 4 | ## This help screen 5 | help: 6 | printf "Available targets:\n\n" 7 | awk '/^[a-zA-Z\-\_0-9]+:/ { \ 8 | helpMessage = match(lastLine, /^## (.*)/); \ 9 | if (helpMessage) { \ 10 | helpCommand = substr($$1, 0, index($$1, ":")); \ 11 | helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ 12 | printf "%-15s %s\n", helpCommand, helpMessage; \ 13 | } \ 14 | } \ 15 | { lastLine = $$0 }' $(MAKEFILE_LIST) 16 | 17 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/screenshot.png -------------------------------------------------------------------------------- /vendor/github.com/bgentry/speakeasy/.gitignore: -------------------------------------------------------------------------------- 1 | example/example 2 | example/example.exe 3 | -------------------------------------------------------------------------------- /vendor/github.com/bgentry/speakeasy/example/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | "github.com/bgentry/speakeasy" 8 | ) 9 | 10 | func main() { 11 | password, err := speakeasy.Ask("Please enter a password: ") 12 | if err != nil { 13 | fmt.Println(err) 14 | os.Exit(1) 15 | } 16 | fmt.Printf("Password result: %q\n", password) 17 | fmt.Printf("Password len: %d\n", len(password)) 18 | } 19 | -------------------------------------------------------------------------------- /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.8 6 | - 1.7.x 7 | - tip 8 | 9 | matrix: 10 | allow_failures: 11 | - go: tip 12 | fast_finish: true 13 | 14 | before_script: 15 | - go get -u github.com/golang/lint/golint 16 | 17 | script: 18 | - go test -v --race ./... 19 | 20 | after_script: 21 | - test -z "$(gofmt -s -l -w . | tee /dev/stderr)" 22 | - test -z "$(golint ./... | tee /dev/stderr)" 23 | - go vet ./... 24 | 25 | os: 26 | - linux 27 | - osx 28 | 29 | notifications: 30 | email: false 31 | -------------------------------------------------------------------------------- /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/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.8 7 | 8 | branches: 9 | only: 10 | - master 11 | 12 | script: make test 13 | -------------------------------------------------------------------------------- /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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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_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 = <- 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 -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 | -------------------------------------------------------------------------------- /vendor/github.com/spf13/afero/memradix.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 afero 15 | -------------------------------------------------------------------------------- /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.5 6 | - go: 1.8.1 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 | // Licensed under the Apache License, Version 2.0 (the "License"); 3 | // you may not use this file except in compliance with the License. 4 | // You may obtain a copy of the License at 5 | // 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/testproject/cmd" 17 | 18 | func main() { 19 | cmd.Execute() 20 | } 21 | -------------------------------------------------------------------------------- /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 | // enables an information splash screen on Windows if the CLI is started from explorer.exe. 15 | var MousetrapHelpText string = `This is a command line tool 16 | 17 | You need to open cmd.exe and run it from there. 18 | ` 19 | 20 | func preExecHook(c *Command) { 21 | if mousetrap.StartedByExplorer() { 22 | c.Print(MousetrapHelpText) 23 | time.Sleep(5 * time.Second) 24 | os.Exit(1) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /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/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 | - go test -v ./... 21 | 22 | after_success: 23 | - go get -u -d github.com/spf13/hugo 24 | - cd $GOPATH/src/github.com/spf13/hugo && make && ./hugo -s docs && cd - 25 | 26 | sudo: false 27 | -------------------------------------------------------------------------------- /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: -------------------------------------------------------------------------------- 1 | This repository holds supplemental Go packages for low-level interactions with the operating system. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | -------------------------------------------------------------------------------- /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_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/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 | // +build linux darwin freebsd openbsd netbsd dragonfly 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 | // +build darwin dragonfly freebsd linux netbsd openbsd 8 | 9 | package unix 10 | 11 | import "unsafe" 12 | 13 | // fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux 14 | // systems by flock_linux_32bit.go to be SYS_FCNTL64. 15 | var fcntl64Syscall uintptr = SYS_FCNTL 16 | 17 | // FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command. 18 | func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error { 19 | _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk))) 20 | if errno == 0 { 21 | return nil 22 | } 23 | return errno 24 | } 25 | -------------------------------------------------------------------------------- /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/gccgo_linux_sparc64.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,linux,sparc64 6 | 7 | package unix 8 | 9 | import "syscall" 10 | 11 | //extern sysconf 12 | func realSysconf(name int) int64 13 | 14 | func sysconf(name int) (n int64, err syscall.Errno) { 15 | r := realSysconf(name) 16 | if r < 0 { 17 | return 0, syscall.GetErrno() 18 | } 19 | return r, 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_freebsd_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 | // +build freebsd 6 | 7 | package unix_test 8 | 9 | import ( 10 | "testing" 11 | 12 | "golang.org/x/sys/unix" 13 | ) 14 | 15 | func TestSysctlUint64(t *testing.T) { 16 | _, err := unix.SysctlUint64("security.mac.labeled") 17 | if err != nil { 18 | t.Fatal(err) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /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_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_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/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/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 windows 6 | 7 | package windows_test 8 | 9 | import ( 10 | "testing" 11 | 12 | "golang.org/x/sys/windows" 13 | ) 14 | 15 | func testSetGetenv(t *testing.T, key, value string) { 16 | err := windows.Setenv(key, value) 17 | if err != nil { 18 | t.Fatalf("Setenv failed to set %q: %v", value, err) 19 | } 20 | newvalue, found := windows.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/windows/ztypes_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/ztypes_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/README: -------------------------------------------------------------------------------- 1 | This repository holds supplementary Go libraries for text processing, many involving Unicode. 2 | 3 | To submit changes to this repository, see http://golang.org/doc/contribute.html. 4 | 5 | To generate the tables in this repository (except for the encoding tables), 6 | run go generate from this directory. By default tables are generated for the 7 | Unicode version in core and the CLDR version defined in 8 | golang.org/x/text/unicode/cldr. 9 | 10 | Running go generate will as a side effect create a DATA subdirectory in this 11 | directory which holds all files that are used as a source for generating the 12 | tables. This directory will also serve as a cache. 13 | 14 | Run 15 | 16 | go test ./... 17 | 18 | from this directory to run all tests. Add the "-tags icu" flag to also run 19 | ICU conformance tests (if available). This requires that you have the correct 20 | ICU version installed on your system. 21 | 22 | TODO: 23 | - updating unversioned source files. -------------------------------------------------------------------------------- /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/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/nunux-keeper/keeper-cli/fcdd166218bb098c2a5d22a5449c284516368362/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/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/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/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/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 7564. It also contains several pre-defined profiles for 8 | // passwords, nicknames, and usernames as defined in RFC 7613 and RFC 7700. 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/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 initalized 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/unicode/norm/norm_test.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 norm_test 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestPlaceHolder(t *testing.T) { 12 | // Does nothing, just allows the Makefile to be canonical 13 | // while waiting for the package itself to be written. 14 | } 15 | -------------------------------------------------------------------------------- /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/cheggaaa/pb.v1/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.4.2 4 | sudo: false 5 | os: 6 | - linux 7 | - osx 8 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/example_multiple_test.go: -------------------------------------------------------------------------------- 1 | package pb_test 2 | 3 | import ( 4 | "math/rand" 5 | "sync" 6 | "time" 7 | 8 | "gopkg.in/cheggaaa/pb.v1" 9 | ) 10 | 11 | func Example_multiple() { 12 | // create bars 13 | first := pb.New(200).Prefix("First ") 14 | second := pb.New(200).Prefix("Second ") 15 | third := pb.New(200).Prefix("Third ") 16 | // start pool 17 | pool, err := pb.StartPool(first, second, third) 18 | if err != nil { 19 | panic(err) 20 | } 21 | // update bars 22 | wg := new(sync.WaitGroup) 23 | for _, bar := range []*pb.ProgressBar{first, second, third} { 24 | wg.Add(1) 25 | go func(cb *pb.ProgressBar) { 26 | for n := 0; n < 200; n++ { 27 | cb.Increment() 28 | time.Sleep(time.Millisecond * time.Duration(rand.Intn(100))) 29 | } 30 | cb.Finish() 31 | wg.Done() 32 | }(bar) 33 | } 34 | wg.Wait() 35 | // close pool 36 | pool.Stop() 37 | } 38 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/example_test.go: -------------------------------------------------------------------------------- 1 | package pb_test 2 | 3 | import ( 4 | "time" 5 | 6 | "gopkg.in/cheggaaa/pb.v1" 7 | ) 8 | 9 | func Example() { 10 | count := 5000 11 | bar := pb.New(count) 12 | 13 | // show percents (by default already true) 14 | bar.ShowPercent = true 15 | 16 | // show bar (by default already true) 17 | bar.ShowBar = true 18 | 19 | bar.ShowCounters = true 20 | 21 | bar.ShowTimeLeft = true 22 | 23 | // and start 24 | bar.Start() 25 | for i := 0; i < count; i++ { 26 | bar.Increment() 27 | time.Sleep(time.Millisecond) 28 | } 29 | bar.FinishPrint("The End!") 30 | } 31 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pb_appengine.go: -------------------------------------------------------------------------------- 1 | // +build appengine 2 | 3 | package pb 4 | 5 | import "errors" 6 | 7 | // terminalWidth returns width of the terminal, which is not supported 8 | // and should always failed on appengine classic which is a sandboxed PaaS. 9 | func terminalWidth() (int, error) { 10 | return 0, errors.New("Not supported") 11 | } 12 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pb_nix.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd netbsd openbsd dragonfly 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | import "syscall" 7 | 8 | const sysIoctl = syscall.SYS_IOCTL 9 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pb_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | const sysIoctl = 54 7 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pool_win.go: -------------------------------------------------------------------------------- 1 | // +build windows 2 | 3 | package pb 4 | 5 | import ( 6 | "fmt" 7 | "log" 8 | ) 9 | 10 | func (p *Pool) print(first bool) bool { 11 | p.m.Lock() 12 | defer p.m.Unlock() 13 | var out string 14 | if !first { 15 | coords, err := getCursorPos() 16 | if err != nil { 17 | log.Panic(err) 18 | } 19 | coords.Y -= int16(p.lastBarsCount) 20 | if coords.Y < 0 { 21 | coords.Y = 0 22 | } 23 | coords.X = 0 24 | 25 | err = setCursorPos(coords) 26 | if err != nil { 27 | log.Panic(err) 28 | } 29 | } 30 | isFinished := true 31 | for _, bar := range p.bars { 32 | if !bar.IsFinished() { 33 | isFinished = false 34 | } 35 | bar.Update() 36 | out += fmt.Sprintf("\r%s\n", bar.String()) 37 | } 38 | if p.Output != nil { 39 | fmt.Fprint(p.Output, out) 40 | } else { 41 | fmt.Print(out) 42 | } 43 | p.lastBarsCount = len(p.bars) 44 | return isFinished 45 | } 46 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/pool_x.go: -------------------------------------------------------------------------------- 1 | // +build linux darwin freebsd netbsd openbsd solaris dragonfly 2 | 3 | package pb 4 | 5 | import "fmt" 6 | 7 | func (p *Pool) print(first bool) bool { 8 | p.m.Lock() 9 | defer p.m.Unlock() 10 | var out string 11 | if !first { 12 | out = fmt.Sprintf("\033[%dA", p.lastBarsCount) 13 | } 14 | isFinished := true 15 | for _, bar := range p.bars { 16 | if !bar.IsFinished() { 17 | isFinished = false 18 | } 19 | bar.Update() 20 | out += fmt.Sprintf("\r%s\n", bar.String()) 21 | } 22 | if p.Output != nil { 23 | fmt.Fprint(p.Output, out) 24 | } else { 25 | fmt.Print(out) 26 | } 27 | p.lastBarsCount = len(p.bars) 28 | return isFinished 29 | } 30 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/reader.go: -------------------------------------------------------------------------------- 1 | package pb 2 | 3 | import ( 4 | "io" 5 | ) 6 | 7 | // It's proxy reader, implement io.Reader 8 | type Reader struct { 9 | io.Reader 10 | bar *ProgressBar 11 | } 12 | 13 | func (r *Reader) Read(p []byte) (n int, err error) { 14 | n, err = r.Reader.Read(p) 15 | r.bar.Add(n) 16 | return 17 | } 18 | 19 | // Close the reader when it implements io.Closer 20 | func (r *Reader) Close() (err error) { 21 | if closer, ok := r.Reader.(io.Closer); ok { 22 | return closer.Close() 23 | } 24 | return 25 | } 26 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/runecount.go: -------------------------------------------------------------------------------- 1 | package pb 2 | 3 | import ( 4 | "github.com/mattn/go-runewidth" 5 | "regexp" 6 | ) 7 | 8 | // Finds the control character sequences (like colors) 9 | var ctrlFinder = regexp.MustCompile("\x1b\x5b[0-9]+\x6d") 10 | 11 | func escapeAwareRuneCountInString(s string) int { 12 | n := runewidth.StringWidth(s) 13 | for _, sm := range ctrlFinder.FindAllString(s, -1) { 14 | n -= runewidth.StringWidth(sm) 15 | } 16 | return n 17 | } 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/runecount_test.go: -------------------------------------------------------------------------------- 1 | package pb 2 | 3 | import "testing" 4 | 5 | func Test_RuneCount(t *testing.T) { 6 | s := string([]byte{ 7 | 27, 91, 51, 49, 109, // {Red} 8 | 72, 101, 108, 108, 111, // Hello 9 | 44, 32, // , 10 | 112, 108, 97, 121, 103, 114, 111, 117, 110, 100, // Playground 11 | 27, 91, 48, 109, // {Reset} 12 | }) 13 | if e, l := 17, escapeAwareRuneCountInString(s); l != e { 14 | t.Errorf("Invalid length %d, expected %d", l, e) 15 | } 16 | s = "進捗 " 17 | if e, l := 5, escapeAwareRuneCountInString(s); l != e { 18 | t.Errorf("Invalid length %d, expected %d", l, e) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/termios_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd netbsd openbsd dragonfly 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | import "syscall" 7 | 8 | const ioctlReadTermios = syscall.TIOCGETA 9 | const ioctlWriteTermios = syscall.TIOCSETA 10 | -------------------------------------------------------------------------------- /vendor/gopkg.in/cheggaaa/pb.v1/termios_nix.go: -------------------------------------------------------------------------------- 1 | // +build linux solaris 2 | // +build !appengine 3 | 4 | package pb 5 | 6 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 7 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 8 | -------------------------------------------------------------------------------- /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/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/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 | -------------------------------------------------------------------------------- /version/keeper_version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | var ( 4 | App string = "snapshot" 5 | Api string = "2" 6 | ) 7 | --------------------------------------------------------------------------------