You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2015/11/21 01:43:07 UTC
[42/42] incubator-mynewt-newt git commit: Move newt source into a
"newt" subdirectory.
Move newt source into a "newt" subdirectory.
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/e95057f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/e95057f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/e95057f4
Branch: refs/heads/master
Commit: e95057f45d20958bf20461a942369c5036469fe2
Parents: e5b282f
Author: Christopher Collins <cc...@gmail.com>
Authored: Fri Nov 20 16:42:10 2015 -0800
Committer: Christopher Collins <cc...@gmail.com>
Committed: Fri Nov 20 16:42:10 2015 -0800
----------------------------------------------------------------------
.gitignore | 2 +-
Godeps/Godeps.json | 70 -
Godeps/Readme | 5 -
Godeps/_workspace/.gitignore | 2 -
.../src/github.com/BurntSushi/toml/.gitignore | 5 -
.../src/github.com/BurntSushi/toml/.travis.yml | 12 -
.../src/github.com/BurntSushi/toml/COMPATIBLE | 3 -
.../src/github.com/BurntSushi/toml/COPYING | 14 -
.../src/github.com/BurntSushi/toml/Makefile | 19 -
.../src/github.com/BurntSushi/toml/README.md | 220 -
.../toml/cmd/toml-test-decoder/COPYING | 14 -
.../toml/cmd/toml-test-decoder/README.md | 14 -
.../toml/cmd/toml-test-decoder/main.go | 90 -
.../toml/cmd/toml-test-encoder/COPYING | 14 -
.../toml/cmd/toml-test-encoder/README.md | 14 -
.../toml/cmd/toml-test-encoder/main.go | 131 -
.../BurntSushi/toml/cmd/tomlv/COPYING | 14 -
.../BurntSushi/toml/cmd/tomlv/README.md | 22 -
.../BurntSushi/toml/cmd/tomlv/main.go | 61 -
.../src/github.com/BurntSushi/toml/decode.go | 492 -
.../github.com/BurntSushi/toml/decode_meta.go | 122 -
.../github.com/BurntSushi/toml/decode_test.go | 950 -
.../src/github.com/BurntSushi/toml/doc.go | 27 -
.../src/github.com/BurntSushi/toml/encode.go | 551 -
.../github.com/BurntSushi/toml/encode_test.go | 542 -
.../BurntSushi/toml/encoding_types.go | 19 -
.../BurntSushi/toml/encoding_types_1.1.go | 18 -
.../src/github.com/BurntSushi/toml/lex.go | 874 -
.../src/github.com/BurntSushi/toml/parse.go | 498 -
.../src/github.com/BurntSushi/toml/session.vim | 1 -
.../github.com/BurntSushi/toml/type_check.go | 91 -
.../github.com/BurntSushi/toml/type_fields.go | 241 -
.../src/github.com/andelf/go-curl/.gitignore | 4 -
.../src/github.com/andelf/go-curl/.travis.yml | 15 -
.../src/github.com/andelf/go-curl/LICENSE | 13 -
.../src/github.com/andelf/go-curl/README.md | 73 -
.../src/github.com/andelf/go-curl/c-callback.c | 68 -
.../src/github.com/andelf/go-curl/callback.go | 90 -
.../src/github.com/andelf/go-curl/callback.h | 6 -
.../src/github.com/andelf/go-curl/compat.h | 380 -
.../src/github.com/andelf/go-curl/const.go | 179 -
.../src/github.com/andelf/go-curl/const_gen.go | 410 -
.../src/github.com/andelf/go-curl/core.go | 118 -
.../src/github.com/andelf/go-curl/core_test.go | 23 -
.../src/github.com/andelf/go-curl/easy.go | 495 -
.../src/github.com/andelf/go-curl/easy_test.go | 61 -
.../andelf/go-curl/examples/channal_callback.go | 47 -
.../andelf/go-curl/examples/ftpget.go | 37 -
.../github.com/andelf/go-curl/examples/https.go | 17 -
.../github.com/andelf/go-curl/examples/misc.go | 104 -
.../andelf/go-curl/examples/multi_and_select.go | 101 -
.../andelf/go-curl/examples/multi_sample.go | 36 -
.../andelf/go-curl/examples/post-callback.go | 43 -
.../andelf/go-curl/examples/progress.go | 47 -
.../andelf/go-curl/examples/renren_login.go | 36 -
.../andelf/go-curl/examples/renren_upload.go | 77 -
.../andelf/go-curl/examples/sendrecv.go | 44 -
.../andelf/go-curl/examples/sepheaders.go | 49 -
.../andelf/go-curl/examples/simple.go | 14 -
.../src/github.com/andelf/go-curl/logging.go | 56 -
.../github.com/andelf/go-curl/logging_test.go | 64 -
.../github.com/andelf/go-curl/misc/codegen.py | 88 -
.../github.com/andelf/go-curl/misc/compatgen.py | 162 -
.../src/github.com/andelf/go-curl/multi.go | 154 -
.../src/github.com/andelf/go-curl/share.go | 62 -
.../github.com/hashicorp/logutils/.gitignore | 22 -
.../src/github.com/hashicorp/logutils/LICENSE | 354 -
.../src/github.com/hashicorp/logutils/README.md | 36 -
.../src/github.com/hashicorp/logutils/level.go | 81 -
.../hashicorp/logutils/level_benchmark_test.go | 37 -
.../github.com/hashicorp/logutils/level_test.go | 94 -
.../inconshreveable/mousetrap/LICENSE | 13 -
.../inconshreveable/mousetrap/README.md | 23 -
.../inconshreveable/mousetrap/trap_others.go | 15 -
.../inconshreveable/mousetrap/trap_windows.go | 98 -
.../mousetrap/trap_windows_1.4.go | 46 -
.../src/github.com/kr/pretty/.gitignore | 4 -
.../_workspace/src/github.com/kr/pretty/License | 21 -
.../_workspace/src/github.com/kr/pretty/Readme | 9 -
.../_workspace/src/github.com/kr/pretty/diff.go | 158 -
.../src/github.com/kr/pretty/diff_test.go | 74 -
.../src/github.com/kr/pretty/example_test.go | 20 -
.../src/github.com/kr/pretty/formatter.go | 337 -
.../src/github.com/kr/pretty/formatter_test.go | 261 -
.../src/github.com/kr/pretty/pretty.go | 98 -
.../_workspace/src/github.com/kr/pretty/zero.go | 41 -
.../_workspace/src/github.com/kr/text/License | 19 -
Godeps/_workspace/src/github.com/kr/text/Readme | 3 -
.../src/github.com/kr/text/colwriter/Readme | 5 -
.../src/github.com/kr/text/colwriter/column.go | 147 -
.../github.com/kr/text/colwriter/column_test.go | 90 -
Godeps/_workspace/src/github.com/kr/text/doc.go | 3 -
.../_workspace/src/github.com/kr/text/indent.go | 74 -
.../src/github.com/kr/text/indent_test.go | 119 -
.../_workspace/src/github.com/kr/text/mc/Readme | 9 -
.../_workspace/src/github.com/kr/text/mc/mc.go | 62 -
.../_workspace/src/github.com/kr/text/wrap.go | 86 -
.../src/github.com/kr/text/wrap_test.go | 44 -
.../github.com/magiconair/properties/.gitignore | 2 -
.../magiconair/properties/.travis.yml | 5 -
.../github.com/magiconair/properties/LICENSE | 25 -
.../github.com/magiconair/properties/README.md | 121 -
.../magiconair/properties/benchmark_test.go | 22 -
.../src/github.com/magiconair/properties/doc.go | 135 -
.../magiconair/properties/example_test.go | 93 -
.../src/github.com/magiconair/properties/lex.go | 409 -
.../github.com/magiconair/properties/load.go | 124 -
.../magiconair/properties/load_test.go | 137 -
.../github.com/magiconair/properties/parser.go | 95 -
.../magiconair/properties/properties.go | 698 -
.../magiconair/properties/properties_test.go | 846 -
.../magiconair/properties/rangecheck.go | 31 -
.../src/github.com/mattn/go-sqlite3/.gitignore | 3 -
.../src/github.com/mattn/go-sqlite3/.travis.yml | 9 -
.../src/github.com/mattn/go-sqlite3/LICENSE | 21 -
.../src/github.com/mattn/go-sqlite3/README.md | 62 -
.../src/github.com/mattn/go-sqlite3/backup.go | 70 -
.../src/github.com/mattn/go-sqlite3/doc.go | 95 -
.../src/github.com/mattn/go-sqlite3/error.go | 128 -
.../github.com/mattn/go-sqlite3/error_test.go | 242 -
.../mattn/go-sqlite3/sqlite3-binding.c | 147782 ----------------
.../mattn/go-sqlite3/sqlite3-binding.h | 7478 -
.../src/github.com/mattn/go-sqlite3/sqlite3.go | 675 -
.../mattn/go-sqlite3/sqlite3_fts3_test.go | 83 -
.../mattn/go-sqlite3/sqlite3_other.go | 13 -
.../github.com/mattn/go-sqlite3/sqlite3_test.go | 1058 -
.../mattn/go-sqlite3/sqlite3_test/sqltest.go | 412 -
.../mattn/go-sqlite3/sqlite3_windows.go | 14 -
.../github.com/mattn/go-sqlite3/sqlite3ext.h | 487 -
.../mitchellh/mapstructure/.travis.yml | 7 -
.../github.com/mitchellh/mapstructure/LICENSE | 21 -
.../github.com/mitchellh/mapstructure/README.md | 46 -
.../mitchellh/mapstructure/decode_hooks.go | 151 -
.../mitchellh/mapstructure/decode_hooks_test.go | 229 -
.../github.com/mitchellh/mapstructure/error.go | 50 -
.../mitchellh/mapstructure/mapstructure.go | 745 -
.../mapstructure/mapstructure_benchmark_test.go | 243 -
.../mapstructure/mapstructure_bugs_test.go | 47 -
.../mapstructure/mapstructure_examples_test.go | 203 -
.../mitchellh/mapstructure/mapstructure_test.go | 999 -
.../src/github.com/spf13/cast/.gitignore | 23 -
.../src/github.com/spf13/cast/LICENSE | 21 -
.../src/github.com/spf13/cast/README.md | 72 -
.../src/github.com/spf13/cast/cast.go | 68 -
.../src/github.com/spf13/cast/cast_test.go | 117 -
.../src/github.com/spf13/cast/caste.go | 378 -
.../src/github.com/spf13/cobra/.gitignore | 24 -
.../src/github.com/spf13/cobra/.travis.yml | 8 -
.../src/github.com/spf13/cobra/LICENSE.txt | 174 -
.../src/github.com/spf13/cobra/README.md | 485 -
.../github.com/spf13/cobra/bash_completions.go | 370 -
.../github.com/spf13/cobra/bash_completions.md | 149 -
.../spf13/cobra/bash_completions_test.go | 80 -
.../src/github.com/spf13/cobra/cobra.go | 112 -
.../src/github.com/spf13/cobra/cobra_test.go | 965 -
.../src/github.com/spf13/cobra/command.go | 1032 -
.../src/github.com/spf13/cobra/command_test.go | 90 -
.../src/github.com/spf13/cobra/md_docs.go | 138 -
.../src/github.com/spf13/cobra/md_docs.md | 81 -
.../src/github.com/spf13/cobra/md_docs_test.go | 67 -
.../spf13/jwalterweatherman/.gitignore | 22 -
.../github.com/spf13/jwalterweatherman/LICENSE | 21 -
.../spf13/jwalterweatherman/README.md | 158 -
.../spf13/jwalterweatherman/jww_test.go | 56 -
.../thatswhyyoualwaysleaveanote.go | 183 -
.../src/github.com/spf13/pflag/.travis.yml | 8 -
.../src/github.com/spf13/pflag/LICENSE | 28 -
.../src/github.com/spf13/pflag/README.md | 228 -
.../src/github.com/spf13/pflag/bool.go | 97 -
.../src/github.com/spf13/pflag/bool_test.go | 180 -
.../src/github.com/spf13/pflag/duration.go | 86 -
.../src/github.com/spf13/pflag/example_test.go | 77 -
.../src/github.com/spf13/pflag/export_test.go | 29 -
.../src/github.com/spf13/pflag/flag.go | 749 -
.../src/github.com/spf13/pflag/flag_test.go | 755 -
.../src/github.com/spf13/pflag/float32.go | 91 -
.../src/github.com/spf13/pflag/float64.go | 87 -
.../src/github.com/spf13/pflag/int.go | 87 -
.../src/github.com/spf13/pflag/int32.go | 91 -
.../src/github.com/spf13/pflag/int64.go | 87 -
.../src/github.com/spf13/pflag/int8.go | 91 -
.../src/github.com/spf13/pflag/int_slice.go | 113 -
.../github.com/spf13/pflag/int_slice_test.go | 49 -
.../_workspace/src/github.com/spf13/pflag/ip.go | 93 -
.../src/github.com/spf13/pflag/ipmask.go | 122 -
.../src/github.com/spf13/pflag/string.go | 82 -
.../src/github.com/spf13/pflag/string_slice.go | 86 -
.../github.com/spf13/pflag/string_slice_test.go | 44 -
.../src/github.com/spf13/pflag/uint.go | 91 -
.../src/github.com/spf13/pflag/uint16.go | 89 -
.../src/github.com/spf13/pflag/uint32.go | 89 -
.../src/github.com/spf13/pflag/uint64.go | 91 -
.../src/github.com/spf13/pflag/uint8.go | 91 -
.../src/github.com/spf13/viper/.gitignore | 23 -
.../src/github.com/spf13/viper/.travis.yml | 8 -
.../src/github.com/spf13/viper/LICENSE | 21 -
.../src/github.com/spf13/viper/README.md | 445 -
.../src/github.com/spf13/viper/remote/remote.go | 77 -
.../src/github.com/spf13/viper/util.go | 198 -
.../src/github.com/spf13/viper/viper.go | 982 -
.../src/github.com/spf13/viper/viper_test.go | 559 -
Godeps/_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 -
.../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 -
.../_workspace/src/gopkg.in/yaml.v2/README.md | 128 -
Godeps/_workspace/src/gopkg.in/yaml.v2/apic.go | 742 -
.../_workspace/src/gopkg.in/yaml.v2/decode.go | 683 -
.../src/gopkg.in/yaml.v2/decode_test.go | 966 -
.../_workspace/src/gopkg.in/yaml.v2/emitterc.go | 1685 -
.../_workspace/src/gopkg.in/yaml.v2/encode.go | 306 -
.../src/gopkg.in/yaml.v2/encode_test.go | 495 -
.../_workspace/src/gopkg.in/yaml.v2/parserc.go | 1096 -
.../_workspace/src/gopkg.in/yaml.v2/readerc.go | 391 -
.../_workspace/src/gopkg.in/yaml.v2/resolve.go | 203 -
.../_workspace/src/gopkg.in/yaml.v2/scannerc.go | 2710 -
.../_workspace/src/gopkg.in/yaml.v2/sorter.go | 104 -
.../src/gopkg.in/yaml.v2/suite_test.go | 12 -
.../_workspace/src/gopkg.in/yaml.v2/writerc.go | 89 -
Godeps/_workspace/src/gopkg.in/yaml.v2/yaml.go | 344 -
Godeps/_workspace/src/gopkg.in/yaml.v2/yamlh.go | 716 -
.../src/gopkg.in/yaml.v2/yamlprivateh.go | 173 -
LICENSE | 202 -
README.md | 3 -
cli/build.go | 222 -
cli/clutch.go | 1002 -
cli/compiler.go | 619 -
cli/deps.go | 239 -
cli/downloader.go | 90 -
cli/egg.go | 775 -
cli/nest.go | 467 -
cli/project.go | 484 -
cli/remotenest.go | 121 -
cli/target.go | 806 -
cli/util.go | 357 -
coding_style.txt | 57 -
design.txt | 370 -
newt.go | 1395 -
newt/Godeps/Godeps.json | 70 +
newt/Godeps/Readme | 5 +
newt/Godeps/_workspace/.gitignore | 2 +
.../src/github.com/BurntSushi/toml/.gitignore | 5 +
.../src/github.com/BurntSushi/toml/.travis.yml | 12 +
.../src/github.com/BurntSushi/toml/COMPATIBLE | 3 +
.../src/github.com/BurntSushi/toml/COPYING | 14 +
.../src/github.com/BurntSushi/toml/Makefile | 19 +
.../src/github.com/BurntSushi/toml/README.md | 220 +
.../toml/cmd/toml-test-decoder/COPYING | 14 +
.../toml/cmd/toml-test-decoder/README.md | 14 +
.../toml/cmd/toml-test-decoder/main.go | 90 +
.../toml/cmd/toml-test-encoder/COPYING | 14 +
.../toml/cmd/toml-test-encoder/README.md | 14 +
.../toml/cmd/toml-test-encoder/main.go | 131 +
.../BurntSushi/toml/cmd/tomlv/COPYING | 14 +
.../BurntSushi/toml/cmd/tomlv/README.md | 22 +
.../BurntSushi/toml/cmd/tomlv/main.go | 61 +
.../src/github.com/BurntSushi/toml/decode.go | 492 +
.../github.com/BurntSushi/toml/decode_meta.go | 122 +
.../github.com/BurntSushi/toml/decode_test.go | 950 +
.../src/github.com/BurntSushi/toml/doc.go | 27 +
.../src/github.com/BurntSushi/toml/encode.go | 551 +
.../github.com/BurntSushi/toml/encode_test.go | 542 +
.../BurntSushi/toml/encoding_types.go | 19 +
.../BurntSushi/toml/encoding_types_1.1.go | 18 +
.../src/github.com/BurntSushi/toml/lex.go | 874 +
.../src/github.com/BurntSushi/toml/parse.go | 498 +
.../src/github.com/BurntSushi/toml/session.vim | 1 +
.../github.com/BurntSushi/toml/type_check.go | 91 +
.../github.com/BurntSushi/toml/type_fields.go | 241 +
.../src/github.com/andelf/go-curl/.gitignore | 4 +
.../src/github.com/andelf/go-curl/.travis.yml | 15 +
.../src/github.com/andelf/go-curl/LICENSE | 13 +
.../src/github.com/andelf/go-curl/README.md | 73 +
.../src/github.com/andelf/go-curl/c-callback.c | 68 +
.../src/github.com/andelf/go-curl/callback.go | 90 +
.../src/github.com/andelf/go-curl/callback.h | 6 +
.../src/github.com/andelf/go-curl/compat.h | 380 +
.../src/github.com/andelf/go-curl/const.go | 179 +
.../src/github.com/andelf/go-curl/const_gen.go | 410 +
.../src/github.com/andelf/go-curl/core.go | 118 +
.../src/github.com/andelf/go-curl/core_test.go | 23 +
.../src/github.com/andelf/go-curl/easy.go | 495 +
.../src/github.com/andelf/go-curl/easy_test.go | 61 +
.../andelf/go-curl/examples/channal_callback.go | 47 +
.../andelf/go-curl/examples/ftpget.go | 37 +
.../github.com/andelf/go-curl/examples/https.go | 17 +
.../github.com/andelf/go-curl/examples/misc.go | 104 +
.../andelf/go-curl/examples/multi_and_select.go | 101 +
.../andelf/go-curl/examples/multi_sample.go | 36 +
.../andelf/go-curl/examples/post-callback.go | 43 +
.../andelf/go-curl/examples/progress.go | 47 +
.../andelf/go-curl/examples/renren_login.go | 36 +
.../andelf/go-curl/examples/renren_upload.go | 77 +
.../andelf/go-curl/examples/sendrecv.go | 44 +
.../andelf/go-curl/examples/sepheaders.go | 49 +
.../andelf/go-curl/examples/simple.go | 14 +
.../src/github.com/andelf/go-curl/logging.go | 56 +
.../github.com/andelf/go-curl/logging_test.go | 64 +
.../github.com/andelf/go-curl/misc/codegen.py | 88 +
.../github.com/andelf/go-curl/misc/compatgen.py | 162 +
.../src/github.com/andelf/go-curl/multi.go | 154 +
.../src/github.com/andelf/go-curl/share.go | 62 +
.../github.com/hashicorp/logutils/.gitignore | 22 +
.../src/github.com/hashicorp/logutils/LICENSE | 354 +
.../src/github.com/hashicorp/logutils/README.md | 36 +
.../src/github.com/hashicorp/logutils/level.go | 81 +
.../hashicorp/logutils/level_benchmark_test.go | 37 +
.../github.com/hashicorp/logutils/level_test.go | 94 +
.../inconshreveable/mousetrap/LICENSE | 13 +
.../inconshreveable/mousetrap/README.md | 23 +
.../inconshreveable/mousetrap/trap_others.go | 15 +
.../inconshreveable/mousetrap/trap_windows.go | 98 +
.../mousetrap/trap_windows_1.4.go | 46 +
.../src/github.com/kr/pretty/.gitignore | 4 +
.../_workspace/src/github.com/kr/pretty/License | 21 +
.../_workspace/src/github.com/kr/pretty/Readme | 9 +
.../_workspace/src/github.com/kr/pretty/diff.go | 158 +
.../src/github.com/kr/pretty/diff_test.go | 74 +
.../src/github.com/kr/pretty/example_test.go | 20 +
.../src/github.com/kr/pretty/formatter.go | 337 +
.../src/github.com/kr/pretty/formatter_test.go | 261 +
.../src/github.com/kr/pretty/pretty.go | 98 +
.../_workspace/src/github.com/kr/pretty/zero.go | 41 +
.../_workspace/src/github.com/kr/text/License | 19 +
.../_workspace/src/github.com/kr/text/Readme | 3 +
.../src/github.com/kr/text/colwriter/Readme | 5 +
.../src/github.com/kr/text/colwriter/column.go | 147 +
.../github.com/kr/text/colwriter/column_test.go | 90 +
.../_workspace/src/github.com/kr/text/doc.go | 3 +
.../_workspace/src/github.com/kr/text/indent.go | 74 +
.../src/github.com/kr/text/indent_test.go | 119 +
.../_workspace/src/github.com/kr/text/mc/Readme | 9 +
.../_workspace/src/github.com/kr/text/mc/mc.go | 62 +
.../_workspace/src/github.com/kr/text/wrap.go | 86 +
.../src/github.com/kr/text/wrap_test.go | 44 +
.../github.com/magiconair/properties/.gitignore | 2 +
.../magiconair/properties/.travis.yml | 5 +
.../github.com/magiconair/properties/LICENSE | 25 +
.../github.com/magiconair/properties/README.md | 121 +
.../magiconair/properties/benchmark_test.go | 22 +
.../src/github.com/magiconair/properties/doc.go | 135 +
.../magiconair/properties/example_test.go | 93 +
.../src/github.com/magiconair/properties/lex.go | 409 +
.../github.com/magiconair/properties/load.go | 124 +
.../magiconair/properties/load_test.go | 137 +
.../github.com/magiconair/properties/parser.go | 95 +
.../magiconair/properties/properties.go | 698 +
.../magiconair/properties/properties_test.go | 846 +
.../magiconair/properties/rangecheck.go | 31 +
.../src/github.com/mattn/go-sqlite3/.gitignore | 3 +
.../src/github.com/mattn/go-sqlite3/.travis.yml | 9 +
.../src/github.com/mattn/go-sqlite3/LICENSE | 21 +
.../src/github.com/mattn/go-sqlite3/README.md | 62 +
.../src/github.com/mattn/go-sqlite3/backup.go | 70 +
.../src/github.com/mattn/go-sqlite3/doc.go | 95 +
.../src/github.com/mattn/go-sqlite3/error.go | 128 +
.../github.com/mattn/go-sqlite3/error_test.go | 242 +
.../mattn/go-sqlite3/sqlite3-binding.c | 147782 ++++++++++++++++
.../mattn/go-sqlite3/sqlite3-binding.h | 7478 +
.../src/github.com/mattn/go-sqlite3/sqlite3.go | 675 +
.../mattn/go-sqlite3/sqlite3_fts3_test.go | 83 +
.../mattn/go-sqlite3/sqlite3_other.go | 13 +
.../github.com/mattn/go-sqlite3/sqlite3_test.go | 1058 +
.../mattn/go-sqlite3/sqlite3_test/sqltest.go | 412 +
.../mattn/go-sqlite3/sqlite3_windows.go | 14 +
.../github.com/mattn/go-sqlite3/sqlite3ext.h | 487 +
.../mitchellh/mapstructure/.travis.yml | 7 +
.../github.com/mitchellh/mapstructure/LICENSE | 21 +
.../github.com/mitchellh/mapstructure/README.md | 46 +
.../mitchellh/mapstructure/decode_hooks.go | 151 +
.../mitchellh/mapstructure/decode_hooks_test.go | 229 +
.../github.com/mitchellh/mapstructure/error.go | 50 +
.../mitchellh/mapstructure/mapstructure.go | 745 +
.../mapstructure/mapstructure_benchmark_test.go | 243 +
.../mapstructure/mapstructure_bugs_test.go | 47 +
.../mapstructure/mapstructure_examples_test.go | 203 +
.../mitchellh/mapstructure/mapstructure_test.go | 999 +
.../src/github.com/spf13/cast/.gitignore | 23 +
.../src/github.com/spf13/cast/LICENSE | 21 +
.../src/github.com/spf13/cast/README.md | 72 +
.../src/github.com/spf13/cast/cast.go | 68 +
.../src/github.com/spf13/cast/cast_test.go | 117 +
.../src/github.com/spf13/cast/caste.go | 378 +
.../src/github.com/spf13/cobra/.gitignore | 24 +
.../src/github.com/spf13/cobra/.travis.yml | 8 +
.../src/github.com/spf13/cobra/LICENSE.txt | 174 +
.../src/github.com/spf13/cobra/README.md | 485 +
.../github.com/spf13/cobra/bash_completions.go | 370 +
.../github.com/spf13/cobra/bash_completions.md | 149 +
.../spf13/cobra/bash_completions_test.go | 80 +
.../src/github.com/spf13/cobra/cobra.go | 112 +
.../src/github.com/spf13/cobra/cobra_test.go | 965 +
.../src/github.com/spf13/cobra/command.go | 1032 +
.../src/github.com/spf13/cobra/command_test.go | 90 +
.../src/github.com/spf13/cobra/md_docs.go | 138 +
.../src/github.com/spf13/cobra/md_docs.md | 81 +
.../src/github.com/spf13/cobra/md_docs_test.go | 67 +
.../spf13/jwalterweatherman/.gitignore | 22 +
.../github.com/spf13/jwalterweatherman/LICENSE | 21 +
.../spf13/jwalterweatherman/README.md | 158 +
.../spf13/jwalterweatherman/jww_test.go | 56 +
.../thatswhyyoualwaysleaveanote.go | 183 +
.../src/github.com/spf13/pflag/.travis.yml | 8 +
.../src/github.com/spf13/pflag/LICENSE | 28 +
.../src/github.com/spf13/pflag/README.md | 228 +
.../src/github.com/spf13/pflag/bool.go | 97 +
.../src/github.com/spf13/pflag/bool_test.go | 180 +
.../src/github.com/spf13/pflag/duration.go | 86 +
.../src/github.com/spf13/pflag/example_test.go | 77 +
.../src/github.com/spf13/pflag/export_test.go | 29 +
.../src/github.com/spf13/pflag/flag.go | 749 +
.../src/github.com/spf13/pflag/flag_test.go | 755 +
.../src/github.com/spf13/pflag/float32.go | 91 +
.../src/github.com/spf13/pflag/float64.go | 87 +
.../src/github.com/spf13/pflag/int.go | 87 +
.../src/github.com/spf13/pflag/int32.go | 91 +
.../src/github.com/spf13/pflag/int64.go | 87 +
.../src/github.com/spf13/pflag/int8.go | 91 +
.../src/github.com/spf13/pflag/int_slice.go | 113 +
.../github.com/spf13/pflag/int_slice_test.go | 49 +
.../_workspace/src/github.com/spf13/pflag/ip.go | 93 +
.../src/github.com/spf13/pflag/ipmask.go | 122 +
.../src/github.com/spf13/pflag/string.go | 82 +
.../src/github.com/spf13/pflag/string_slice.go | 86 +
.../github.com/spf13/pflag/string_slice_test.go | 44 +
.../src/github.com/spf13/pflag/uint.go | 91 +
.../src/github.com/spf13/pflag/uint16.go | 89 +
.../src/github.com/spf13/pflag/uint32.go | 89 +
.../src/github.com/spf13/pflag/uint64.go | 91 +
.../src/github.com/spf13/pflag/uint8.go | 91 +
.../src/github.com/spf13/viper/.gitignore | 23 +
.../src/github.com/spf13/viper/.travis.yml | 8 +
.../src/github.com/spf13/viper/LICENSE | 21 +
.../src/github.com/spf13/viper/README.md | 445 +
.../src/github.com/spf13/viper/remote/remote.go | 77 +
.../src/github.com/spf13/viper/util.go | 198 +
.../src/github.com/spf13/viper/viper.go | 982 +
.../src/github.com/spf13/viper/viper_test.go | 559 +
.../_workspace/src/gopkg.in/yaml.v2/LICENSE | 188 +
.../src/gopkg.in/yaml.v2/LICENSE.libyaml | 31 +
.../_workspace/src/gopkg.in/yaml.v2/README.md | 128 +
.../_workspace/src/gopkg.in/yaml.v2/apic.go | 742 +
.../_workspace/src/gopkg.in/yaml.v2/decode.go | 683 +
.../src/gopkg.in/yaml.v2/decode_test.go | 966 +
.../_workspace/src/gopkg.in/yaml.v2/emitterc.go | 1685 +
.../_workspace/src/gopkg.in/yaml.v2/encode.go | 306 +
.../src/gopkg.in/yaml.v2/encode_test.go | 495 +
.../_workspace/src/gopkg.in/yaml.v2/parserc.go | 1096 +
.../_workspace/src/gopkg.in/yaml.v2/readerc.go | 391 +
.../_workspace/src/gopkg.in/yaml.v2/resolve.go | 203 +
.../_workspace/src/gopkg.in/yaml.v2/scannerc.go | 2710 +
.../_workspace/src/gopkg.in/yaml.v2/sorter.go | 104 +
.../src/gopkg.in/yaml.v2/suite_test.go | 12 +
.../_workspace/src/gopkg.in/yaml.v2/writerc.go | 89 +
.../_workspace/src/gopkg.in/yaml.v2/yaml.go | 344 +
.../_workspace/src/gopkg.in/yaml.v2/yamlh.go | 716 +
.../src/gopkg.in/yaml.v2/yamlprivateh.go | 173 +
newt/LICENSE | 202 +
newt/README.md | 3 +
newt/cli/build.go | 222 +
newt/cli/clutch.go | 1002 +
newt/cli/compiler.go | 619 +
newt/cli/deps.go | 239 +
newt/cli/downloader.go | 90 +
newt/cli/egg.go | 775 +
newt/cli/nest.go | 467 +
newt/cli/project.go | 484 +
newt/cli/remotenest.go | 121 +
newt/cli/target.go | 806 +
newt/cli/util.go | 357 +
newt/coding_style.txt | 57 +
newt/design.txt | 370 +
newt/newt.go | 1395 +
471 files changed, 204232 insertions(+), 204232 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 9dc5efc..40f7e1d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,4 @@
*.swp
*.swo
tags
-newt
+newt/newt
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/Godeps.json
----------------------------------------------------------------------
diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json
deleted file mode 100644
index ff5e92a..0000000
--- a/Godeps/Godeps.json
+++ /dev/null
@@ -1,70 +0,0 @@
-{
- "ImportPath": "github.com/mynewt/newt",
- "GoVersion": "go1.4.2",
- "Deps": [
- {
- "ImportPath": "github.com/BurntSushi/toml",
- "Comment": "v0.1.0-21-g056c9bc",
- "Rev": "056c9bc7be7190eaa7715723883caffa5f8fa3e4"
- },
- {
- "ImportPath": "github.com/andelf/go-curl",
- "Comment": "compatible-with-go-release.r60-63-gc965868",
- "Rev": "c965868dde67fef2abe524c33f1661d9ad233fac"
- },
- {
- "ImportPath": "github.com/hashicorp/logutils",
- "Rev": "0dc08b1671f34c4250ce212759ebd880f743d883"
- },
- {
- "ImportPath": "github.com/inconshreveable/mousetrap",
- "Rev": "76626ae9c91c4f2a10f34cad8ce83ea42c93bb75"
- },
- {
- "ImportPath": "github.com/kr/pretty",
- "Comment": "go.weekly.2011-12-22-27-ge6ac2fc",
- "Rev": "e6ac2fc51e89a3249e82157fa0bb7a18ef9dd5bb"
- },
- {
- "ImportPath": "github.com/kr/text",
- "Rev": "e373e137fafd8abd480af49182dea0513914adb4"
- },
- {
- "ImportPath": "github.com/magiconair/properties",
- "Comment": "v1.5.3",
- "Rev": "624009598839a9432bd97bb75552389422357723"
- },
- {
- "ImportPath": "github.com/mattn/go-sqlite3",
- "Rev": "542ae647f8601bafd96233961b150cae198e0295"
- },
- {
- "ImportPath": "github.com/mitchellh/mapstructure",
- "Rev": "2caf8efc93669b6c43e0441cdc6aed17546c96f3"
- },
- {
- "ImportPath": "github.com/spf13/cast",
- "Rev": "4d07383ffe94b5e5a6fa3af9211374a4507a0184"
- },
- {
- "ImportPath": "github.com/spf13/cobra",
- "Rev": "66816bcd0378e248c613e3c443c020f544c28804"
- },
- {
- "ImportPath": "github.com/spf13/jwalterweatherman",
- "Rev": "3d60171a64319ef63c78bd45bd60e6eab1e75f8b"
- },
- {
- "ImportPath": "github.com/spf13/pflag",
- "Rev": "67cbc198fd11dab704b214c1e629a97af392c085"
- },
- {
- "ImportPath": "github.com/spf13/viper",
- "Rev": "db7ff930a189b98d602179d9001d33345f42b8c7"
- },
- {
- "ImportPath": "gopkg.in/yaml.v2",
- "Rev": "c1cd2254a6dd314c9d73c338c12688c9325d85c6"
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/Readme
----------------------------------------------------------------------
diff --git a/Godeps/Readme b/Godeps/Readme
deleted file mode 100644
index 4cdaa53..0000000
--- a/Godeps/Readme
+++ /dev/null
@@ -1,5 +0,0 @@
-This directory tree is generated automatically by godep.
-
-Please do not edit.
-
-See https://github.com/tools/godep for more information.
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/.gitignore
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/.gitignore b/Godeps/_workspace/.gitignore
deleted file mode 100644
index f037d68..0000000
--- a/Godeps/_workspace/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-/pkg
-/bin
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/.gitignore
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/.gitignore b/Godeps/_workspace/src/github.com/BurntSushi/toml/.gitignore
deleted file mode 100644
index 0cd3800..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-TAGS
-tags
-.*.swp
-tomlcheck/tomlcheck
-toml.test
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/.travis.yml
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/.travis.yml b/Godeps/_workspace/src/github.com/BurntSushi/toml/.travis.yml
deleted file mode 100644
index 43caf6d..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/.travis.yml
+++ /dev/null
@@ -1,12 +0,0 @@
-language: go
-go:
- - 1.1
- - 1.2
- - tip
-install:
- - go install ./...
- - go get github.com/BurntSushi/toml-test
-script:
- - export PATH="$PATH:$HOME/gopath/bin"
- - make test
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/COMPATIBLE
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/COMPATIBLE b/Godeps/_workspace/src/github.com/BurntSushi/toml/COMPATIBLE
deleted file mode 100644
index 21e0938..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/COMPATIBLE
+++ /dev/null
@@ -1,3 +0,0 @@
-Compatible with TOML version
-[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md)
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/COPYING
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/COPYING b/Godeps/_workspace/src/github.com/BurntSushi/toml/COPYING
deleted file mode 100644
index 5a8e332..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/COPYING
+++ /dev/null
@@ -1,14 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar <sa...@hocevar.net>
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/Makefile
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/Makefile b/Godeps/_workspace/src/github.com/BurntSushi/toml/Makefile
deleted file mode 100644
index 3600848..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-install:
- go install ./...
-
-test: install
- go test -v
- toml-test toml-test-decoder
- toml-test -encoder toml-test-encoder
-
-fmt:
- gofmt -w *.go */*.go
- colcheck *.go */*.go
-
-tags:
- find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS
-
-push:
- git push origin master
- git push github master
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/README.md
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/README.md b/Godeps/_workspace/src/github.com/BurntSushi/toml/README.md
deleted file mode 100644
index 5a5df63..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/README.md
+++ /dev/null
@@ -1,220 +0,0 @@
-## TOML parser and encoder for Go with reflection
-
-TOML stands for Tom's Obvious, Minimal Language. This Go package provides a
-reflection interface similar to Go's standard library `json` and `xml`
-packages. This package also supports the `encoding.TextUnmarshaler` and
-`encoding.TextMarshaler` interfaces so that you can define custom data
-representations. (There is an example of this below.)
-
-Spec: https://github.com/mojombo/toml
-
-Compatible with TOML version
-[v0.2.0](https://github.com/toml-lang/toml/blob/master/versions/en/toml-v0.2.0.md)
-
-Documentation: http://godoc.org/github.com/BurntSushi/toml
-
-Installation:
-
-```bash
-go get github.com/BurntSushi/toml
-```
-
-Try the toml validator:
-
-```bash
-go get github.com/BurntSushi/toml/cmd/tomlv
-tomlv some-toml-file.toml
-```
-
-[![Build status](https://api.travis-ci.org/BurntSushi/toml.png)](https://travis-ci.org/BurntSushi/toml)
-
-
-### Testing
-
-This package passes all tests in
-[toml-test](https://github.com/BurntSushi/toml-test) for both the decoder
-and the encoder.
-
-### Examples
-
-This package works similarly to how the Go standard library handles `XML`
-and `JSON`. Namely, data is loaded into Go values via reflection.
-
-For the simplest example, consider some TOML file as just a list of keys
-and values:
-
-```toml
-Age = 25
-Cats = [ "Cauchy", "Plato" ]
-Pi = 3.14
-Perfection = [ 6, 28, 496, 8128 ]
-DOB = 1987-07-05T05:45:00Z
-```
-
-Which could be defined in Go as:
-
-```go
-type Config struct {
- Age int
- Cats []string
- Pi float64
- Perfection []int
- DOB time.Time // requires `import time`
-}
-```
-
-And then decoded with:
-
-```go
-var conf Config
-if _, err := toml.Decode(tomlData, &conf); err != nil {
- // handle error
-}
-```
-
-You can also use struct tags if your struct field name doesn't map to a TOML
-key value directly:
-
-```toml
-some_key_NAME = "wat"
-```
-
-```go
-type TOML struct {
- ObscureKey string `toml:"some_key_NAME"`
-}
-```
-
-### Using the `encoding.TextUnmarshaler` interface
-
-Here's an example that automatically parses duration strings into
-`time.Duration` values:
-
-```toml
-[[song]]
-name = "Thunder Road"
-duration = "4m49s"
-
-[[song]]
-name = "Stairway to Heaven"
-duration = "8m03s"
-```
-
-Which can be decoded with:
-
-```go
-type song struct {
- Name string
- Duration duration
-}
-type songs struct {
- Song []song
-}
-var favorites songs
-if _, err := toml.Decode(blob, &favorites); err != nil {
- log.Fatal(err)
-}
-
-for _, s := range favorites.Song {
- fmt.Printf("%s (%s)\n", s.Name, s.Duration)
-}
-```
-
-And you'll also need a `duration` type that satisfies the
-`encoding.TextUnmarshaler` interface:
-
-```go
-type duration struct {
- time.Duration
-}
-
-func (d *duration) UnmarshalText(text []byte) error {
- var err error
- d.Duration, err = time.ParseDuration(string(text))
- return err
-}
-```
-
-### More complex usage
-
-Here's an example of how to load the example from the official spec page:
-
-```toml
-# This is a TOML document. Boom.
-
-title = "TOML Example"
-
-[owner]
-name = "Tom Preston-Werner"
-organization = "GitHub"
-bio = "GitHub Cofounder & CEO\nLikes tater tots and beer."
-dob = 1979-05-27T07:32:00Z # First class dates? Why not?
-
-[database]
-server = "192.168.1.1"
-ports = [ 8001, 8001, 8002 ]
-connection_max = 5000
-enabled = true
-
-[servers]
-
- # You can indent as you please. Tabs or spaces. TOML don't care.
- [servers.alpha]
- ip = "10.0.0.1"
- dc = "eqdc10"
-
- [servers.beta]
- ip = "10.0.0.2"
- dc = "eqdc10"
-
-[clients]
-data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it
-
-# Line breaks are OK when inside arrays
-hosts = [
- "alpha",
- "omega"
-]
-```
-
-And the corresponding Go types are:
-
-```go
-type tomlConfig struct {
- Title string
- Owner ownerInfo
- DB database `toml:"database"`
- Servers map[string]server
- Clients clients
-}
-
-type ownerInfo struct {
- Name string
- Org string `toml:"organization"`
- Bio string
- DOB time.Time
-}
-
-type database struct {
- Server string
- Ports []int
- ConnMax int `toml:"connection_max"`
- Enabled bool
-}
-
-type server struct {
- IP string
- DC string
-}
-
-type clients struct {
- Data [][]interface{}
- Hosts []string
-}
-```
-
-Note that a case insensitive match will be tried if an exact match can't be
-found.
-
-A working example of the above can be found in `_examples/example.{go,toml}`.
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
deleted file mode 100644
index 5a8e332..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/COPYING
+++ /dev/null
@@ -1,14 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar <sa...@hocevar.net>
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
deleted file mode 100644
index 24421eb..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Implements the TOML test suite interface
-
-This is an implementation of the interface expected by
-[toml-test](https://github.com/BurntSushi/toml-test) for my
-[toml parser written in Go](https://github.com/BurntSushi/toml).
-In particular, it maps TOML data on `stdin` to a JSON format on `stdout`.
-
-
-Compatible with TOML version
-[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md)
-
-Compatible with `toml-test` version
-[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0)
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
deleted file mode 100644
index 14e7557..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-decoder/main.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Command toml-test-decoder satisfies the toml-test interface for testing
-// TOML decoders. Namely, it accepts TOML on stdin and outputs JSON on stdout.
-package main
-
-import (
- "encoding/json"
- "flag"
- "fmt"
- "log"
- "os"
- "path"
- "time"
-
- "github.com/BurntSushi/toml"
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s < toml-file\n", path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() != 0 {
- flag.Usage()
- }
-
- var tmp interface{}
- if _, err := toml.DecodeReader(os.Stdin, &tmp); err != nil {
- log.Fatalf("Error decoding TOML: %s", err)
- }
-
- typedTmp := translate(tmp)
- if err := json.NewEncoder(os.Stdout).Encode(typedTmp); err != nil {
- log.Fatalf("Error encoding JSON: %s", err)
- }
-}
-
-func translate(tomlData interface{}) interface{} {
- switch orig := tomlData.(type) {
- case map[string]interface{}:
- typed := make(map[string]interface{}, len(orig))
- for k, v := range orig {
- typed[k] = translate(v)
- }
- return typed
- case []map[string]interface{}:
- typed := make([]map[string]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v).(map[string]interface{})
- }
- return typed
- case []interface{}:
- typed := make([]interface{}, len(orig))
- for i, v := range orig {
- typed[i] = translate(v)
- }
-
- // We don't really need to tag arrays, but let's be future proof.
- // (If TOML ever supports tuples, we'll need this.)
- return tag("array", typed)
- case time.Time:
- return tag("datetime", orig.Format("2006-01-02T15:04:05Z"))
- case bool:
- return tag("bool", fmt.Sprintf("%v", orig))
- case int64:
- return tag("integer", fmt.Sprintf("%d", orig))
- case float64:
- return tag("float", fmt.Sprintf("%v", orig))
- case string:
- return tag("string", orig)
- }
-
- panic(fmt.Sprintf("Unknown type: %T", tomlData))
-}
-
-func tag(typeName string, data interface{}) map[string]interface{} {
- return map[string]interface{}{
- "type": typeName,
- "value": data,
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
deleted file mode 100644
index 5a8e332..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/COPYING
+++ /dev/null
@@ -1,14 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar <sa...@hocevar.net>
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
deleted file mode 100644
index 45a603f..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/README.md
+++ /dev/null
@@ -1,14 +0,0 @@
-# Implements the TOML test suite interface for TOML encoders
-
-This is an implementation of the interface expected by
-[toml-test](https://github.com/BurntSushi/toml-test) for the
-[TOML encoder](https://github.com/BurntSushi/toml).
-In particular, it maps JSON data on `stdin` to a TOML format on `stdout`.
-
-
-Compatible with TOML version
-[v0.2.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.2.0.md)
-
-Compatible with `toml-test` version
-[v0.2.0](https://github.com/BurntSushi/toml-test/tree/v0.2.0)
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
deleted file mode 100644
index 092cc68..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/toml-test-encoder/main.go
+++ /dev/null
@@ -1,131 +0,0 @@
-// Command toml-test-encoder satisfies the toml-test interface for testing
-// TOML encoders. Namely, it accepts JSON on stdin and outputs TOML on stdout.
-package main
-
-import (
- "encoding/json"
- "flag"
- "log"
- "os"
- "path"
- "strconv"
- "time"
-
- "github.com/BurntSushi/toml"
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s < json-file\n", path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() != 0 {
- flag.Usage()
- }
-
- var tmp interface{}
- if err := json.NewDecoder(os.Stdin).Decode(&tmp); err != nil {
- log.Fatalf("Error decoding JSON: %s", err)
- }
-
- tomlData := translate(tmp)
- if err := toml.NewEncoder(os.Stdout).Encode(tomlData); err != nil {
- log.Fatalf("Error encoding TOML: %s", err)
- }
-}
-
-func translate(typedJson interface{}) interface{} {
- switch v := typedJson.(type) {
- case map[string]interface{}:
- if len(v) == 2 && in("type", v) && in("value", v) {
- return untag(v)
- }
- m := make(map[string]interface{}, len(v))
- for k, v2 := range v {
- m[k] = translate(v2)
- }
- return m
- case []interface{}:
- tabArray := make([]map[string]interface{}, len(v))
- for i := range v {
- if m, ok := translate(v[i]).(map[string]interface{}); ok {
- tabArray[i] = m
- } else {
- log.Fatalf("JSON arrays may only contain objects. This " +
- "corresponds to only tables being allowed in " +
- "TOML table arrays.")
- }
- }
- return tabArray
- }
- log.Fatalf("Unrecognized JSON format '%T'.", typedJson)
- panic("unreachable")
-}
-
-func untag(typed map[string]interface{}) interface{} {
- t := typed["type"].(string)
- v := typed["value"]
- switch t {
- case "string":
- return v.(string)
- case "integer":
- v := v.(string)
- n, err := strconv.Atoi(v)
- if err != nil {
- log.Fatalf("Could not parse '%s' as integer: %s", v, err)
- }
- return n
- case "float":
- v := v.(string)
- f, err := strconv.ParseFloat(v, 64)
- if err != nil {
- log.Fatalf("Could not parse '%s' as float64: %s", v, err)
- }
- return f
- case "datetime":
- v := v.(string)
- t, err := time.Parse("2006-01-02T15:04:05Z", v)
- if err != nil {
- log.Fatalf("Could not parse '%s' as a datetime: %s", v, err)
- }
- return t
- case "bool":
- v := v.(string)
- switch v {
- case "true":
- return true
- case "false":
- return false
- }
- log.Fatalf("Could not parse '%s' as a boolean.", v)
- case "array":
- v := v.([]interface{})
- array := make([]interface{}, len(v))
- for i := range v {
- if m, ok := v[i].(map[string]interface{}); ok {
- array[i] = untag(m)
- } else {
- log.Fatalf("Arrays may only contain other arrays or "+
- "primitive values, but found a '%T'.", m)
- }
- }
- return array
- }
- log.Fatalf("Unrecognized tag type '%s'.", t)
- panic("unreachable")
-}
-
-func in(key string, m map[string]interface{}) bool {
- _, ok := m[key]
- return ok
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/COPYING
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/COPYING b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/COPYING
deleted file mode 100644
index 5a8e332..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/COPYING
+++ /dev/null
@@ -1,14 +0,0 @@
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- Version 2, December 2004
-
- Copyright (C) 2004 Sam Hocevar <sa...@hocevar.net>
-
- Everyone is permitted to copy and distribute verbatim or modified
- copies of this license document, and changing it is allowed as long
- as the name is changed.
-
- DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. You just DO WHAT THE FUCK YOU WANT TO.
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/README.md
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/README.md b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/README.md
deleted file mode 100644
index 5df0dc3..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-# TOML Validator
-
-If Go is installed, it's simple to try it out:
-
-```bash
-go get github.com/BurntSushi/toml/cmd/tomlv
-tomlv some-toml-file.toml
-```
-
-You can see the types of every key in a TOML file with:
-
-```bash
-tomlv -types some-toml-file.toml
-```
-
-At the moment, only one error message is reported at a time. Error messages
-include line numbers. No output means that the files given are valid TOML, or
-there is a bug in `tomlv`.
-
-Compatible with TOML version
-[v0.1.0](https://github.com/mojombo/toml/blob/master/versions/toml-v0.1.0.md)
-
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/main.go
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/main.go b/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/main.go
deleted file mode 100644
index c7d689a..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/cmd/tomlv/main.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Command tomlv validates TOML documents and prints each key's type.
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "os"
- "path"
- "strings"
- "text/tabwriter"
-
- "github.com/BurntSushi/toml"
-)
-
-var (
- flagTypes = false
-)
-
-func init() {
- log.SetFlags(0)
-
- flag.BoolVar(&flagTypes, "types", flagTypes,
- "When set, the types of every defined key will be shown.")
-
- flag.Usage = usage
- flag.Parse()
-}
-
-func usage() {
- log.Printf("Usage: %s toml-file [ toml-file ... ]\n",
- path.Base(os.Args[0]))
- flag.PrintDefaults()
-
- os.Exit(1)
-}
-
-func main() {
- if flag.NArg() < 1 {
- flag.Usage()
- }
- for _, f := range flag.Args() {
- var tmp interface{}
- md, err := toml.DecodeFile(f, &tmp)
- if err != nil {
- log.Fatalf("Error in '%s': %s", f, err)
- }
- if flagTypes {
- printTypes(md)
- }
- }
-}
-
-func printTypes(md toml.MetaData) {
- tabw := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
- for _, key := range md.Keys() {
- fmt.Fprintf(tabw, "%s%s\t%s\n",
- strings.Repeat(" ", len(key)-1), key, md.Type(key...))
- }
- tabw.Flush()
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/decode.go
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/decode.go b/Godeps/_workspace/src/github.com/BurntSushi/toml/decode.go
deleted file mode 100644
index 6c7d398..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/decode.go
+++ /dev/null
@@ -1,492 +0,0 @@
-package toml
-
-import (
- "fmt"
- "io"
- "io/ioutil"
- "math"
- "reflect"
- "strings"
- "time"
-)
-
-var e = fmt.Errorf
-
-// Unmarshaler is the interface implemented by objects that can unmarshal a
-// TOML description of themselves.
-type Unmarshaler interface {
- UnmarshalTOML(interface{}) error
-}
-
-// Unmarshal decodes the contents of `p` in TOML format into a pointer `v`.
-func Unmarshal(p []byte, v interface{}) error {
- _, err := Decode(string(p), v)
- return err
-}
-
-// Primitive is a TOML value that hasn't been decoded into a Go value.
-// When using the various `Decode*` functions, the type `Primitive` may
-// be given to any value, and its decoding will be delayed.
-//
-// A `Primitive` value can be decoded using the `PrimitiveDecode` function.
-//
-// The underlying representation of a `Primitive` value is subject to change.
-// Do not rely on it.
-//
-// N.B. Primitive values are still parsed, so using them will only avoid
-// the overhead of reflection. They can be useful when you don't know the
-// exact type of TOML data until run time.
-type Primitive struct {
- undecoded interface{}
- context Key
-}
-
-// DEPRECATED!
-//
-// Use MetaData.PrimitiveDecode instead.
-func PrimitiveDecode(primValue Primitive, v interface{}) error {
- md := MetaData{decoded: make(map[string]bool)}
- return md.unify(primValue.undecoded, rvalue(v))
-}
-
-// PrimitiveDecode is just like the other `Decode*` functions, except it
-// decodes a TOML value that has already been parsed. Valid primitive values
-// can *only* be obtained from values filled by the decoder functions,
-// including this method. (i.e., `v` may contain more `Primitive`
-// values.)
-//
-// Meta data for primitive values is included in the meta data returned by
-// the `Decode*` functions with one exception: keys returned by the Undecoded
-// method will only reflect keys that were decoded. Namely, any keys hidden
-// behind a Primitive will be considered undecoded. Executing this method will
-// update the undecoded keys in the meta data. (See the example.)
-func (md *MetaData) PrimitiveDecode(primValue Primitive, v interface{}) error {
- md.context = primValue.context
- defer func() { md.context = nil }()
- return md.unify(primValue.undecoded, rvalue(v))
-}
-
-// Decode will decode the contents of `data` in TOML format into a pointer
-// `v`.
-//
-// TOML hashes correspond to Go structs or maps. (Dealer's choice. They can be
-// used interchangeably.)
-//
-// TOML arrays of tables correspond to either a slice of structs or a slice
-// of maps.
-//
-// TOML datetimes correspond to Go `time.Time` values.
-//
-// All other TOML types (float, string, int, bool and array) correspond
-// to the obvious Go types.
-//
-// An exception to the above rules is if a type implements the
-// encoding.TextUnmarshaler interface. In this case, any primitive TOML value
-// (floats, strings, integers, booleans and datetimes) will be converted to
-// a byte string and given to the value's UnmarshalText method. See the
-// Unmarshaler example for a demonstration with time duration strings.
-//
-// Key mapping
-//
-// TOML keys can map to either keys in a Go map or field names in a Go
-// struct. The special `toml` struct tag may be used to map TOML keys to
-// struct fields that don't match the key name exactly. (See the example.)
-// A case insensitive match to struct names will be tried if an exact match
-// can't be found.
-//
-// The mapping between TOML values and Go values is loose. That is, there
-// may exist TOML values that cannot be placed into your representation, and
-// there may be parts of your representation that do not correspond to
-// TOML values. This loose mapping can be made stricter by using the IsDefined
-// and/or Undecoded methods on the MetaData returned.
-//
-// This decoder will not handle cyclic types. If a cyclic type is passed,
-// `Decode` will not terminate.
-func Decode(data string, v interface{}) (MetaData, error) {
- p, err := parse(data)
- if err != nil {
- return MetaData{}, err
- }
- md := MetaData{
- p.mapping, p.types, p.ordered,
- make(map[string]bool, len(p.ordered)), nil,
- }
- return md, md.unify(p.mapping, rvalue(v))
-}
-
-// DecodeFile is just like Decode, except it will automatically read the
-// contents of the file at `fpath` and decode it for you.
-func DecodeFile(fpath string, v interface{}) (MetaData, error) {
- bs, err := ioutil.ReadFile(fpath)
- if err != nil {
- return MetaData{}, err
- }
- return Decode(string(bs), v)
-}
-
-// DecodeReader is just like Decode, except it will consume all bytes
-// from the reader and decode it for you.
-func DecodeReader(r io.Reader, v interface{}) (MetaData, error) {
- bs, err := ioutil.ReadAll(r)
- if err != nil {
- return MetaData{}, err
- }
- return Decode(string(bs), v)
-}
-
-// unify performs a sort of type unification based on the structure of `rv`,
-// which is the client representation.
-//
-// Any type mismatch produces an error. Finding a type that we don't know
-// how to handle produces an unsupported type error.
-func (md *MetaData) unify(data interface{}, rv reflect.Value) error {
-
- // Special case. Look for a `Primitive` value.
- if rv.Type() == reflect.TypeOf((*Primitive)(nil)).Elem() {
- // Save the undecoded data and the key context into the primitive
- // value.
- context := make(Key, len(md.context))
- copy(context, md.context)
- rv.Set(reflect.ValueOf(Primitive{
- undecoded: data,
- context: context,
- }))
- return nil
- }
-
- // Special case. Unmarshaler Interface support.
- if rv.CanAddr() {
- if v, ok := rv.Addr().Interface().(Unmarshaler); ok {
- return v.UnmarshalTOML(data)
- }
- }
-
- // Special case. Handle time.Time values specifically.
- // TODO: Remove this code when we decide to drop support for Go 1.1.
- // This isn't necessary in Go 1.2 because time.Time satisfies the encoding
- // interfaces.
- if rv.Type().AssignableTo(rvalue(time.Time{}).Type()) {
- return md.unifyDatetime(data, rv)
- }
-
- // Special case. Look for a value satisfying the TextUnmarshaler interface.
- if v, ok := rv.Interface().(TextUnmarshaler); ok {
- return md.unifyText(data, v)
- }
- // BUG(burntsushi)
- // The behavior here is incorrect whenever a Go type satisfies the
- // encoding.TextUnmarshaler interface but also corresponds to a TOML
- // hash or array. In particular, the unmarshaler should only be applied
- // to primitive TOML values. But at this point, it will be applied to
- // all kinds of values and produce an incorrect error whenever those values
- // are hashes or arrays (including arrays of tables).
-
- k := rv.Kind()
-
- // laziness
- if k >= reflect.Int && k <= reflect.Uint64 {
- return md.unifyInt(data, rv)
- }
- switch k {
- case reflect.Ptr:
- elem := reflect.New(rv.Type().Elem())
- err := md.unify(data, reflect.Indirect(elem))
- if err != nil {
- return err
- }
- rv.Set(elem)
- return nil
- case reflect.Struct:
- return md.unifyStruct(data, rv)
- case reflect.Map:
- return md.unifyMap(data, rv)
- case reflect.Array:
- return md.unifyArray(data, rv)
- case reflect.Slice:
- return md.unifySlice(data, rv)
- case reflect.String:
- return md.unifyString(data, rv)
- case reflect.Bool:
- return md.unifyBool(data, rv)
- case reflect.Interface:
- // we only support empty interfaces.
- if rv.NumMethod() > 0 {
- return e("Unsupported type '%s'.", rv.Kind())
- }
- return md.unifyAnything(data, rv)
- case reflect.Float32:
- fallthrough
- case reflect.Float64:
- return md.unifyFloat64(data, rv)
- }
- return e("Unsupported type '%s'.", rv.Kind())
-}
-
-func (md *MetaData) unifyStruct(mapping interface{}, rv reflect.Value) error {
- tmap, ok := mapping.(map[string]interface{})
- if !ok {
- return mismatch(rv, "map", mapping)
- }
-
- for key, datum := range tmap {
- var f *field
- fields := cachedTypeFields(rv.Type())
- for i := range fields {
- ff := &fields[i]
- if ff.name == key {
- f = ff
- break
- }
- if f == nil && strings.EqualFold(ff.name, key) {
- f = ff
- }
- }
- if f != nil {
- subv := rv
- for _, i := range f.index {
- subv = indirect(subv.Field(i))
- }
- if isUnifiable(subv) {
- md.decoded[md.context.add(key).String()] = true
- md.context = append(md.context, key)
- if err := md.unify(datum, subv); err != nil {
- return e("Type mismatch for '%s.%s': %s",
- rv.Type().String(), f.name, err)
- }
- md.context = md.context[0 : len(md.context)-1]
- } else if f.name != "" {
- // Bad user! No soup for you!
- return e("Field '%s.%s' is unexported, and therefore cannot "+
- "be loaded with reflection.", rv.Type().String(), f.name)
- }
- }
- }
- return nil
-}
-
-func (md *MetaData) unifyMap(mapping interface{}, rv reflect.Value) error {
- tmap, ok := mapping.(map[string]interface{})
- if !ok {
- return badtype("map", mapping)
- }
- if rv.IsNil() {
- rv.Set(reflect.MakeMap(rv.Type()))
- }
- for k, v := range tmap {
- md.decoded[md.context.add(k).String()] = true
- md.context = append(md.context, k)
-
- rvkey := indirect(reflect.New(rv.Type().Key()))
- rvval := reflect.Indirect(reflect.New(rv.Type().Elem()))
- if err := md.unify(v, rvval); err != nil {
- return err
- }
- md.context = md.context[0 : len(md.context)-1]
-
- rvkey.SetString(k)
- rv.SetMapIndex(rvkey, rvval)
- }
- return nil
-}
-
-func (md *MetaData) unifyArray(data interface{}, rv reflect.Value) error {
- datav := reflect.ValueOf(data)
- if datav.Kind() != reflect.Slice {
- return badtype("slice", data)
- }
- sliceLen := datav.Len()
- if sliceLen != rv.Len() {
- return e("expected array length %d; got TOML array of length %d",
- rv.Len(), sliceLen)
- }
- return md.unifySliceArray(datav, rv)
-}
-
-func (md *MetaData) unifySlice(data interface{}, rv reflect.Value) error {
- datav := reflect.ValueOf(data)
- if datav.Kind() != reflect.Slice {
- return badtype("slice", data)
- }
- sliceLen := datav.Len()
- if rv.IsNil() {
- rv.Set(reflect.MakeSlice(rv.Type(), sliceLen, sliceLen))
- }
- return md.unifySliceArray(datav, rv)
-}
-
-func (md *MetaData) unifySliceArray(data, rv reflect.Value) error {
- sliceLen := data.Len()
- for i := 0; i < sliceLen; i++ {
- v := data.Index(i).Interface()
- sliceval := indirect(rv.Index(i))
- if err := md.unify(v, sliceval); err != nil {
- return err
- }
- }
- return nil
-}
-
-func (md *MetaData) unifyDatetime(data interface{}, rv reflect.Value) error {
- if _, ok := data.(time.Time); ok {
- rv.Set(reflect.ValueOf(data))
- return nil
- }
- return badtype("time.Time", data)
-}
-
-func (md *MetaData) unifyString(data interface{}, rv reflect.Value) error {
- if s, ok := data.(string); ok {
- rv.SetString(s)
- return nil
- }
- return badtype("string", data)
-}
-
-func (md *MetaData) unifyFloat64(data interface{}, rv reflect.Value) error {
- if num, ok := data.(float64); ok {
- switch rv.Kind() {
- case reflect.Float32:
- fallthrough
- case reflect.Float64:
- rv.SetFloat(num)
- default:
- panic("bug")
- }
- return nil
- }
- return badtype("float", data)
-}
-
-func (md *MetaData) unifyInt(data interface{}, rv reflect.Value) error {
- if num, ok := data.(int64); ok {
- if rv.Kind() >= reflect.Int && rv.Kind() <= reflect.Int64 {
- switch rv.Kind() {
- case reflect.Int, reflect.Int64:
- // No bounds checking necessary.
- case reflect.Int8:
- if num < math.MinInt8 || num > math.MaxInt8 {
- return e("Value '%d' is out of range for int8.", num)
- }
- case reflect.Int16:
- if num < math.MinInt16 || num > math.MaxInt16 {
- return e("Value '%d' is out of range for int16.", num)
- }
- case reflect.Int32:
- if num < math.MinInt32 || num > math.MaxInt32 {
- return e("Value '%d' is out of range for int32.", num)
- }
- }
- rv.SetInt(num)
- } else if rv.Kind() >= reflect.Uint && rv.Kind() <= reflect.Uint64 {
- unum := uint64(num)
- switch rv.Kind() {
- case reflect.Uint, reflect.Uint64:
- // No bounds checking necessary.
- case reflect.Uint8:
- if num < 0 || unum > math.MaxUint8 {
- return e("Value '%d' is out of range for uint8.", num)
- }
- case reflect.Uint16:
- if num < 0 || unum > math.MaxUint16 {
- return e("Value '%d' is out of range for uint16.", num)
- }
- case reflect.Uint32:
- if num < 0 || unum > math.MaxUint32 {
- return e("Value '%d' is out of range for uint32.", num)
- }
- }
- rv.SetUint(unum)
- } else {
- panic("unreachable")
- }
- return nil
- }
- return badtype("integer", data)
-}
-
-func (md *MetaData) unifyBool(data interface{}, rv reflect.Value) error {
- if b, ok := data.(bool); ok {
- rv.SetBool(b)
- return nil
- }
- return badtype("boolean", data)
-}
-
-func (md *MetaData) unifyAnything(data interface{}, rv reflect.Value) error {
- rv.Set(reflect.ValueOf(data))
- return nil
-}
-
-func (md *MetaData) unifyText(data interface{}, v TextUnmarshaler) error {
- var s string
- switch sdata := data.(type) {
- case TextMarshaler:
- text, err := sdata.MarshalText()
- if err != nil {
- return err
- }
- s = string(text)
- case fmt.Stringer:
- s = sdata.String()
- case string:
- s = sdata
- case bool:
- s = fmt.Sprintf("%v", sdata)
- case int64:
- s = fmt.Sprintf("%d", sdata)
- case float64:
- s = fmt.Sprintf("%f", sdata)
- default:
- return badtype("primitive (string-like)", data)
- }
- if err := v.UnmarshalText([]byte(s)); err != nil {
- return err
- }
- return nil
-}
-
-// rvalue returns a reflect.Value of `v`. All pointers are resolved.
-func rvalue(v interface{}) reflect.Value {
- return indirect(reflect.ValueOf(v))
-}
-
-// indirect returns the value pointed to by a pointer.
-// Pointers are followed until the value is not a pointer.
-// New values are allocated for each nil pointer.
-//
-// An exception to this rule is if the value satisfies an interface of
-// interest to us (like encoding.TextUnmarshaler).
-func indirect(v reflect.Value) reflect.Value {
- if v.Kind() != reflect.Ptr {
- if v.CanAddr() {
- pv := v.Addr()
- if _, ok := pv.Interface().(TextUnmarshaler); ok {
- return pv
- }
- }
- return v
- }
- if v.IsNil() {
- v.Set(reflect.New(v.Type().Elem()))
- }
- return indirect(reflect.Indirect(v))
-}
-
-func isUnifiable(rv reflect.Value) bool {
- if rv.CanSet() {
- return true
- }
- if _, ok := rv.Interface().(TextUnmarshaler); ok {
- return true
- }
- return false
-}
-
-func badtype(expected string, data interface{}) error {
- return e("Expected %s but found '%T'.", expected, data)
-}
-
-func mismatch(user reflect.Value, expected string, data interface{}) error {
- return e("Type mismatch for %s. Expected %s but found '%T'.",
- user.Type().String(), expected, data)
-}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/e95057f4/Godeps/_workspace/src/github.com/BurntSushi/toml/decode_meta.go
----------------------------------------------------------------------
diff --git a/Godeps/_workspace/src/github.com/BurntSushi/toml/decode_meta.go b/Godeps/_workspace/src/github.com/BurntSushi/toml/decode_meta.go
deleted file mode 100644
index ef6f545..0000000
--- a/Godeps/_workspace/src/github.com/BurntSushi/toml/decode_meta.go
+++ /dev/null
@@ -1,122 +0,0 @@
-package toml
-
-import "strings"
-
-// MetaData allows access to meta information about TOML data that may not
-// be inferrable via reflection. In particular, whether a key has been defined
-// and the TOML type of a key.
-type MetaData struct {
- mapping map[string]interface{}
- types map[string]tomlType
- keys []Key
- decoded map[string]bool
- context Key // Used only during decoding.
-}
-
-// IsDefined returns true if the key given exists in the TOML data. The key
-// should be specified hierarchially. e.g.,
-//
-// // access the TOML key 'a.b.c'
-// IsDefined("a", "b", "c")
-//
-// IsDefined will return false if an empty key given. Keys are case sensitive.
-func (md *MetaData) IsDefined(key ...string) bool {
- if len(key) == 0 {
- return false
- }
-
- var hash map[string]interface{}
- var ok bool
- var hashOrVal interface{} = md.mapping
- for _, k := range key {
- if hash, ok = hashOrVal.(map[string]interface{}); !ok {
- return false
- }
- if hashOrVal, ok = hash[k]; !ok {
- return false
- }
- }
- return true
-}
-
-// Type returns a string representation of the type of the key specified.
-//
-// Type will return the empty string if given an empty key or a key that
-// does not exist. Keys are case sensitive.
-func (md *MetaData) Type(key ...string) string {
- fullkey := strings.Join(key, ".")
- if typ, ok := md.types[fullkey]; ok {
- return typ.typeString()
- }
- return ""
-}
-
-// Key is the type of any TOML key, including key groups. Use (MetaData).Keys
-// to get values of this type.
-type Key []string
-
-func (k Key) String() string {
- return strings.Join(k, ".")
-}
-
-func (k Key) maybeQuotedAll() string {
- var ss []string
- for i := range k {
- ss = append(ss, k.maybeQuoted(i))
- }
- return strings.Join(ss, ".")
-}
-
-func (k Key) maybeQuoted(i int) string {
- quote := false
- for _, c := range k[i] {
- if !isBareKeyChar(c) {
- quote = true
- break
- }
- }
- if quote {
- return "\"" + strings.Replace(k[i], "\"", "\\\"", -1) + "\""
- } else {
- return k[i]
- }
-}
-
-func (k Key) add(piece string) Key {
- newKey := make(Key, len(k)+1)
- copy(newKey, k)
- newKey[len(k)] = piece
- return newKey
-}
-
-// Keys returns a slice of every key in the TOML data, including key groups.
-// Each key is itself a slice, where the first element is the top of the
-// hierarchy and the last is the most specific.
-//
-// The list will have the same order as the keys appeared in the TOML data.
-//
-// All keys returned are non-empty.
-func (md *MetaData) Keys() []Key {
- return md.keys
-}
-
-// Undecoded returns all keys that have not been decoded in the order in which
-// they appear in the original TOML document.
-//
-// This includes keys that haven't been decoded because of a Primitive value.
-// Once the Primitive value is decoded, the keys will be considered decoded.
-//
-// Also note that decoding into an empty interface will result in no decoding,
-// and so no keys will be considered decoded.
-//
-// In this sense, the Undecoded keys correspond to keys in the TOML document
-// that do not have a concrete type in your representation.
-func (md *MetaData) Undecoded() []Key {
- undecoded := make([]Key, 0, len(md.keys))
- for _, key := range md.keys {
- if !md.decoded[key.String()] {
- undecoded = append(undecoded, key)
- }
- }
- return undecoded
-}