diff --git a/vendor/github.com/b3log/wide/Dockerfile b/vendor/github.com/b3log/wide/Dockerfile
deleted file mode 100644
index 7487fa8..0000000
--- a/vendor/github.com/b3log/wide/Dockerfile
+++ /dev/null
@@ -1,23 +0,0 @@
-FROM golang:latest
-MAINTAINER Liang Ding
-
-ENV GOROOT /usr/local/go
-
-RUN apt-get update && apt-get install bzip2 zip unzip && cp -r /usr/local/go /usr/local/gobt
-ENV GOROOT_BOOTSTRAP=/usr/local/gobt
-
-ADD . /wide/gogogo/src/github.com/b3log/wide
-
-RUN useradd wide && useradd runner
-
-ENV GOPATH /wide/gogogo
-
-RUN go build github.com/go-fsnotify/fsnotify\
- && go build github.com/gorilla/sessions\
- && go build github.com/gorilla/websocket\
- && go install github.com/visualfc/gotools github.com/nsf/gocode github.com/bradfitz/goimports
-
-WORKDIR /wide/gogogo/src/github.com/b3log/wide
-RUN go build -v
-
-EXPOSE 7070
diff --git a/vendor/github.com/b3log/wide/LICENSE b/vendor/github.com/b3log/wide/LICENSE
deleted file mode 100644
index b447376..0000000
--- a/vendor/github.com/b3log/wide/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
-
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
- 1. Definitions.
-
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
-
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
-
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
-
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
-
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
-
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
-
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
-
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
-
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
-
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
-
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
-
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
-
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
-
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
-
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
-
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
-
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
-
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
-
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
-
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
-
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
-
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
-
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
-
- END OF TERMS AND CONDITIONS
-
- APPENDIX: How to apply the Apache License to your work.
-
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "[]"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
-
- Copyright [yyyy] [name of copyright owner]
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- https://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
diff --git a/vendor/github.com/b3log/wide/README.md b/vendor/github.com/b3log/wide/README.md
deleted file mode 100644
index fb2e572..0000000
--- a/vendor/github.com/b3log/wide/README.md
+++ /dev/null
@@ -1,180 +0,0 @@
-# [Wide](https://github.com/b3log/wide) [![Build Status](https://img.shields.io/travis/b3log/wide.svg?style=flat)](https://travis-ci.org/b3log/wide) [![Go Report Card](https://goreportcard.com/badge/github.com/b3log/wide)](https://goreportcard.com/report/github.com/b3log/wide) [![Coverage Status](https://img.shields.io/coveralls/b3log/wide.svg?style=flat)](https://coveralls.io/r/b3log/wide) [![Apache License](https://img.shields.io/badge/license-apache2-orange.svg?style=flat)](https://www.apache.org/licenses/LICENSE-2.0) [![API Documentation](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/b3log/wide) [![Download](https://img.shields.io/badge/download-~4.3K-red.svg?style=flat)](https://pan.baidu.com/s/1dD3XwOT)
-
-_Have a [try](https://wide.b3log.org/signup) first, then [download](https://pan.baidu.com/s/1dD3XwOT) and setup it on your local area network, enjoy yourself!_
-
-先试试我们搭建好的[在线服务](https://wide.b3log.org/signup),你可以在这里[下载](https://pan.baidu.com/s/1dD3XwOT)并在本地环境运行,然后邀请小伙伴们来玩吧!
-
-> * 关于 Wide 的产品定位,请看[这里](https://hacpai.com/article/1438407961481),并欢迎参与讨论~
-> * 加入[**黑客派**](https://hacpai.com/register),与其他程序员、设计师共同成长!
-
-## Introduction
-
-A W eb-based IDE for Teams using Go programming language/Golang.
-
-![Hello, 世界](https://cloud.githubusercontent.com/assets/873584/4606377/d0ca3c2a-521b-11e4-912c-d955ab05850b.png)
-
-## Authors
-
-[Daniel](https://github.com/88250) and [Vanessa](https://github.com/Vanessa219) are the main authors of Wide, [here](https://github.com/b3log/wide/graphs/contributors) are all contributors.
-
-Wide 的主要作者是 [Daniel](https://github.com/88250) 与 [Vanessa](https://github.com/Vanessa219),所有贡献者可以在[这里](https://github.com/b3log/wide/graphs/contributors)看到。
-
-## Motivation
-
-* **Team** IDE:
- * _Safe and reliable_: the project source code stored on the server in real time, the developer's machine crashes without losing any source code
- * _Unified environment_: server unified development environment configuration, the developer machine without any additional configuration
- * _Out of the box_: 5 minutes to setup a server then open browser to develop, debug
- * _Version Control_: each developer has its own source code repository, easy sync with the trunk
-* **Web-based** IDE:
- * Developer needs a browser only
- * Cross-platform, even on mobile devices
- * Easy to extend
- * Easy to integrate with other systems
- * For the geeks
-* A try for commercial-open source: versions customized for enterprises, close to their development work flows respectively
-* Currently more popular Go IDE has some defects or regrets:
- * Text editor (vim/emacs/sublime/Atom, etc.): For the Go newbie is too complex
- * Plug-in (goclipse, etc.): the need for the original IDE support, not professional
- * LiteIDE: no modern user interface :p
- * No team development experience
-* There are a few of GO IDEs, and no one developed by Go itself, this is a nice try
-
-## Features
-
-* [X] Code Highlight, Folding: Go/HTML/JavaScript/Markdown etc.
-* [X] Autocomplete: Go/HTML etc.
-* [X] Format: Go/HTML/JSON etc.
-* [X] Build & Run
-* [X] Multiplayer: a real team development experience
-* [X] Navigation, Jump to declaration, Find usages, File search etc.
-* [X] Shell: run command on the server
-* [X] Web development: HTML/JS/CSS editor with [Emmet](https://emmet.io) integrated
-* [X] Go tool: go get/install/fmt etc.
-* [X] File Import & Export
-* [X] Themes: editor and UI adjust, respectively
-* [X] Cross-Compilation
-* [ ] Debug
-* [ ] Git integration: git command on the web
-
-## Screenshots
-
-* **Overview**
-
- ![Overview](https://cloud.githubusercontent.com/assets/873584/5450620/1d51831e-8543-11e4-930b-670871902425.png)
-* **Goto File**
-
- ![Goto File](https://cloud.githubusercontent.com/assets/873584/5450616/1d495da6-8543-11e4-9285-f9d9c60779ac.png)
-* **Autocomplete**
-
- ![Autocomplete](https://cloud.githubusercontent.com/assets/873584/5450619/1d4d5712-8543-11e4-8fe4-35dbc8348a6e.png)
-* **Theme**
-
- ![4](https://cloud.githubusercontent.com/assets/873584/5450617/1d4c0826-8543-11e4-8b86-f79a4e41550a.png)
-* **Show Expression Info**
-
- ![Show Expression Info](https://cloud.githubusercontent.com/assets/873584/5450618/1d4cd9f4-8543-11e4-950f-121bd3ff4a39.png)
-* **Build Error Info**
-
- ![Build Error Info](https://cloud.githubusercontent.com/assets/873584/5450632/3e51cccc-8543-11e4-8ca8-8d2427aa16b8.png)
-* **Git Clone**
-
- ![Git Clone](https://cloud.githubusercontent.com/assets/873584/6545235/2284f230-c5b7-11e4-985e-7e04367921b1.png)
-* **Cross-Compilation**
-
- ![Cross-Compilation](https://cloud.githubusercontent.com/assets/873584/10130037/226d75fc-65f7-11e5-94e4-25ee579ca175.png)
-
-* **Playground**
- ![Playground](https://cloud.githubusercontent.com/assets/873584/21209772/449ecfd2-c2b1-11e6-9aa6-a83477d9f269.gif)
-
-## Architecture
-
-### Build & Run
-
-![Build & Run](https://cloud.githubusercontent.com/assets/873584/4389219/3642bc62-43f3-11e4-8d1f-06d7aaf22784.png)
-
- * A browser tab corresponds to a Wide session
- * Execution output push via WebSocket
-
-Flow:
- 1. Browser sends ````Build```` request
- 2. Server executes ````go build```` command via ````os/exec````
- 2.1. Generates a executable file
- 3. Browser sends ````Run```` request
- 4. Server executes the file via ````os/exec````
- 4.1. A running process
- 4.2. Execution output push via WebSocket channel
- 5. Browser renders with callback function ````ws.onmessage````
-
-### Code Assist
-
-![Code Assist](https://cloud.githubusercontent.com/assets/873584/4399135/3b80c21c-4463-11e4-8e94-7f7e8d12a4df.png)
-
- * Autocompletion
- * Find Usages/Jump To Declaration/etc.
-
-Flow:
- 1. Browser sends code assist request
- 2. Handler gets user workspace of the request with HTTP session
- 3. Server executes ````gocode````/````ide_stub(gotools)````
- 3.1 Sets environment variables (e.g. ${GOPATH})
- 3.2 ````gocode```` with ````lib-path```` parameter
-
-## Documents
-
-* [用户指南](https://www.gitbook.com/book/88250/wide-user-guide)
-* [开发指南](https://www.gitbook.com/book/88250/wide-dev-guide)
-
-## Setup
-
-### Download Binary
-
-We have provided OS-specific executable binary as follows:
-
-* linux-amd64/386
-* windows-amd64/386
-* darwin-amd64/386
-
-Download [HERE](https://pan.baidu.com/s/1dD3XwOT)!
-
-### Build Wide for yourself
-
-1. [Download](https://github.com/b3log/wide/archive/master.zip) source or by `git clone https://github.com/b3log/wide`
-2. Get dependencies with
- * `go get`
- * `go get github.com/visualfc/gotools github.com/nsf/gocode github.com/bradfitz/goimports`
-3. Compile wide with `go build`
-
-### Docker
-
-1. Get image: `sudo docker pull 88250/wide:latest`
-2. Run: `sudo docker run -p 127.0.0.1:7070:7070 88250/wide:latest ./wide -docker=true -channel=ws://127.0.0.1:7070`
-3. Open browser: http://127.0.0.1:7070
-
-## Known Issues
-
-* [Shell is not available on Windows](https://github.com/b3log/wide/issues/32)
-* [Rename directory](https://github.com/b3log/wide/issues/251)
-
-## Terms
-
-* This software is open sourced under the Apache License 2.0
-* You can not get rid of the "Powered by [B3log](https://b3log.org)" from any page, even which you made
-* If you want to use this software for commercial purpose, please mail to support@liuyun.io for a commercial license request
-* Copyright © b3log.org, all rights reserved
-
-## Credits
-
-Wide is made possible by the following open source projects.
-
-* [golang](https://golang.org)
-* [CodeMirror](https://github.com/marijnh/CodeMirror)
-* [zTree](https://github.com/zTree/zTree_v3)
-* [LiteIDE](https://github.com/visualfc/liteide)
-* [gocode](https://github.com/nsf/gocode)
-* [Gorilla](https://github.com/gorilla)
-* [Docker](https://docker.com)
-
-----
-
-
diff --git a/vendor/github.com/b3log/wide/TERMS.md b/vendor/github.com/b3log/wide/TERMS.md
deleted file mode 100644
index 0fdd02a..0000000
--- a/vendor/github.com/b3log/wide/TERMS.md
+++ /dev/null
@@ -1,4 +0,0 @@
-* This software is open sourced under the Apache License 2.0
-* You can not get rid of the "Powered by [B3log](https://b3log.org)" from any pages, even the pages are developed by you
-* If you want to use this software for commercial purpose, please mail to support@liuyun.io for request a commercial license
-* Copyright (c) b3log.org, all rights reserved
diff --git a/vendor/github.com/b3log/wide/coverage.sh b/vendor/github.com/b3log/wide/coverage.sh
deleted file mode 100644
index 378fe42..0000000
--- a/vendor/github.com/b3log/wide/coverage.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-# see https://gist.github.com/hailiang/0f22736320abe6be71ce for more details
-
-set -e
-
-# Run test coverage on each subdirectories and merge the coverage profile.
-
-echo "mode: count" > profile.cov
-
-# Standard go tooling behavior is to ignore dirs with leading underscors
-for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d);
-do
-if ls $dir/*.go &> /dev/null; then
- go test -covermode=count -coverprofile=$dir/profile.tmp $dir
- if [ -f $dir/profile.tmp ]
- then
- cat $dir/profile.tmp | tail -n +2 >> profile.cov
- rm $dir/profile.tmp
- fi
-fi
-done
-
-go tool cover -func profile.cov
-
diff --git a/vendor/github.com/b3log/wide/gulpfile.js b/vendor/github.com/b3log/wide/gulpfile.js
deleted file mode 100644
index 7902f7c..0000000
--- a/vendor/github.com/b3log/wide/gulpfile.js
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2014-2015, b3log.org
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * @file frontend tool.
- *
- * @author Liyuan Li
- * @version 0.1.0.0, Dec 15, 2015
- */
-var gulp = require("gulp");
-var concat = require('gulp-concat');
-var minifyCSS = require('gulp-minify-css');
-var uglify = require('gulp-uglify');
-var sourcemaps = require("gulp-sourcemaps");
-
-gulp.task('cc', function () {
- // css
- var cssLibs = ['./static/js/lib/jquery-layout/layout-default-latest.css',
- './static/js/lib/codemirror-5.1/codemirror.css',
- './static/js/lib/codemirror-5.1/addon/hint/show-hint.css',
- './static/js/lib/codemirror-5.1/addon/lint/lint.css',
- './static/js/lib/codemirror-5.1/addon/fold/foldgutter.css',
- './static/js/lib/codemirror-5.1/addon/dialog/dialog.css',
- './static/js/overwrite/codemirror/theme/*.css'];
- gulp.src(cssLibs)
- .pipe(minifyCSS())
- .pipe(concat('lib.min.css'))
- .pipe(gulp.dest('./static/css/'));
-
- gulp.src('./static/js/lib/ztree/zTreeStyle.css')
- .pipe(minifyCSS())
- .pipe(concat('zTreeStyle.min.css'))
- .pipe(gulp.dest('./static/js/lib/ztree/'));
-
- var cssWide = ['./static/css/dialog.css',
- './static/css/base.css',
- './static/css/wide.css',
- './static/css/side.css',
- './static/css/start.css',
- './static/css/about.css'
- ];
-
- gulp.src(cssWide)
- .pipe(minifyCSS())
- .pipe(concat('wide.min.css'))
- .pipe(gulp.dest('./static/css/'));
-
-
- // js
- var jsLibs = ['./static/js/lib/jquery-2.1.1.min.js',
- './static/js/lib/jquery-ui.min.js',
- './static/js/lib/jquery-layout/jquery.layout-latest.js',
- './static/js/lib/reconnecting-websocket.js',
- './static/js/lib/Autolinker.min.js',
- './static/js/lib/emmet.js',
- './static/js/lib/js-beautify-1.5.4/beautify.js',
- './static/js/lib/js-beautify-1.5.4/beautify-html.js',
- './static/js/lib/js-beautify-1.5.4/beautify-css.js',
- './static/js/lib/jquery-file-upload-9.8.0/vendor/jquery.ui.widget.js',
- './static/js/lib/jquery-file-upload-9.8.0/jquery.iframe-transport.js',
- './static/js/lib/jquery-file-upload-9.8.0/jquery.fileupload.js',
- './static/js/lib/codemirror-5.1/codemirror.min.js',
- './static/js/lib/codemirror-5.1/addon/lint/lint.js',
- './static/js/lib/codemirror-5.1/addon/lint/json-lint.js',
- './static/js/lib/codemirror-5.1/addon/selection/active-line.js',
- './static/js/lib/codemirror-5.1/addon/selection/active-line.js',
- './static/js/overwrite/codemirror/addon/hint/show-hint.js',
- './static/js/lib/codemirror-5.1/addon/hint/anyword-hint.js',
- './static/js/lib/codemirror-5.1/addon/display/rulers.js',
- './static/js/lib/codemirror-5.1/addon/edit/closebrackets.js',
- './static/js/lib/codemirror-5.1/addon/edit/matchbrackets.js',
- './static/js/lib/codemirror-5.1/addon/edit/closetag.js',
- './static/js/lib/codemirror-5.1/addon/search/searchcursor.js',
- './static/js/lib/codemirror-5.1/addon/search/search.js',
- './static/js/lib/codemirror-5.1/addon/dialog/dialog.js',
- './static/js/lib/codemirror-5.1/addon/search/match-highlighter.js',
- './static/js/lib/codemirror-5.1/addon/fold/foldcode.js',
- './static/js/lib/codemirror-5.1/addon/fold/foldgutter.js',
- './static/js/lib/codemirror-5.1/addon/fold/brace-fold.js',
- './static/js/lib/codemirror-5.1/addon/fold/xml-fold.js',
- './static/js/lib/codemirror-5.1/addon/fold/markdown-fold.js',
- './static/js/lib/codemirror-5.1/addon/fold/comment-fold.js',
- './static/js/lib/codemirror-5.1/addon/fold/mode/loadmode.js',
- './static/js/lib/codemirror-5.1/addon/fold/comment/comment.js',
- './static/js/lib/codemirror-5.1/mode/meta.js',
- './static/js/lib/codemirror-5.1/mode/go/go.js',
- './static/js/lib/codemirror-5.1/mode/clike/clike.js',
- './static/js/lib/codemirror-5.1/mode/xml/xml.js',
- './static/js/lib/codemirror-5.1/mode/htmlmixed/htmlmixed.js',
- './static/js/lib/codemirror-5.1/mode/javascript/javascript.js',
- './static/js/lib/codemirror-5.1/mode/markdown/markdown.js',
- './static/js/lib/codemirror-5.1/mode/css/css.js',
- './static/js/lib/codemirror-5.1/mode/shell/shell.js',
- './static/js/lib/codemirror-5.1/mode/sql/sql.js',
- './static/js/lib/codemirror-5.1/keymap/vim.js',
- './static/js/lib/lint/json-lint.js',
- './static/js/lib/lint/go-lint.js'];
- gulp.src(jsLibs)
- .pipe(uglify())
- .pipe(concat('lib.min.js'))
- .pipe(gulp.dest('./static/js/'));
-
- var jsWide = ['./static/js/tabs.js',
- './static/js/tabs.js',
- './static/js/dialog.js',
- './static/js/editors.js',
- './static/js/notification.js',
- './static/js/tree.js',
- './static/js/wide.js',
- './static/js/session.js',
- './static/js/menu.js',
- './static/js/windows.js',
- './static/js/hotkeys.js',
- './static/js/bottomGroup.js'
- ];
- gulp.src(jsWide)
- .pipe(sourcemaps.init())
- .pipe(uglify())
- .pipe(concat('wide.min.js'))
- .pipe(sourcemaps.write("."))
- .pipe(gulp.dest('./static/js/'));
-});
\ No newline at end of file
diff --git a/vendor/github.com/b3log/wide/header.exe b/vendor/github.com/b3log/wide/header.exe
deleted file mode 100644
index 3d725bb..0000000
Binary files a/vendor/github.com/b3log/wide/header.exe and /dev/null differ
diff --git a/vendor/github.com/b3log/wide/main.go b/vendor/github.com/b3log/wide/main.go
deleted file mode 100644
index 3030030..0000000
--- a/vendor/github.com/b3log/wide/main.go
+++ /dev/null
@@ -1,483 +0,0 @@
-// Copyright (c) 2014-2018, b3log.org & hacpai.com
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// https://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package main
-
-import (
- "compress/gzip"
- "flag"
- "html/template"
- "io"
- "mime"
- "net/http"
- _ "net/http/pprof"
- "os"
- "os/signal"
- "runtime"
- "strings"
- "syscall"
- "time"
-
- "github.com/b3log/wide/conf"
- "github.com/b3log/wide/editor"
- "github.com/b3log/wide/event"
- "github.com/b3log/wide/file"
- "github.com/b3log/wide/i18n"
- "github.com/b3log/wide/log"
- "github.com/b3log/wide/notification"
- "github.com/b3log/wide/output"
- "github.com/b3log/wide/playground"
- "github.com/b3log/wide/scm/git"
- "github.com/b3log/wide/session"
- "github.com/b3log/wide/util"
-)
-
-// Logger
-var logger *log.Logger
-
-// The only one init function in Wide.
-func init() {
- confPath := flag.String("conf", "conf/wide.json", "path of wide.json")
- confIP := flag.String("ip", "", "this will overwrite Wide.IP if specified")
- confPort := flag.String("port", "", "this will overwrite Wide.Port if specified")
- confServer := flag.String("server", "", "this will overwrite Wide.Server if specified")
- confLogLevel := flag.String("log_level", "", "this will overwrite Wide.LogLevel if specified")
- confStaticServer := flag.String("static_server", "", "this will overwrite Wide.StaticServer if specified")
- confContext := flag.String("context", "", "this will overwrite Wide.Context if specified")
- confChannel := flag.String("channel", "", "this will overwrite Wide.Channel if specified")
- confStat := flag.Bool("stat", false, "whether report statistics periodically")
- confDocker := flag.Bool("docker", false, "whether run in a docker container")
- confPlayground := flag.String("playground", "", "this will overwrite Wide.Playground if specified")
- confUsersWorkspaces := flag.String("users_workspaces", "", "this will overwrite Wide.UsersWorkspaces if specified")
-
- flag.Parse()
-
- log.SetLevel("warn")
- logger = log.NewLogger(os.Stdout)
-
- wd := util.OS.Pwd()
- if strings.HasPrefix(wd, os.TempDir()) {
- logger.Error("Don't run Wide in OS' temp directory or with `go run`")
-
- os.Exit(-1)
- }
-
- i18n.Load()
- event.Load()
- conf.Load(*confPath, *confIP, *confPort, *confServer, *confLogLevel, *confStaticServer, *confContext, *confChannel,
- *confPlayground, *confDocker, *confUsersWorkspaces)
-
- conf.FixedTimeCheckEnv()
- session.FixedTimeSave()
- session.FixedTimeRelease()
-
- if *confStat {
- session.FixedTimeReport()
- }
-
- logger.Debug("host ["+runtime.Version()+", "+runtime.GOOS+"_"+runtime.GOARCH+"], cross-compilation ",
- util.Go.GetCrossPlatforms())
-}
-
-// Main.
-func main() {
- runtime.GOMAXPROCS(conf.Wide.MaxProcs)
-
- initMime()
- handleSignal()
-
- // IDE
- http.HandleFunc(conf.Wide.Context+"/", handlerGzWrapper(indexHandler))
- http.HandleFunc(conf.Wide.Context+"/start", handlerWrapper(startHandler))
- http.HandleFunc(conf.Wide.Context+"/about", handlerWrapper(aboutHandler))
- http.HandleFunc(conf.Wide.Context+"/keyboard_shortcuts", handlerWrapper(keyboardShortcutsHandler))
-
- // static resources
- http.Handle(conf.Wide.Context+"/static/", http.StripPrefix(conf.Wide.Context+"/static/", http.FileServer(http.Dir("static"))))
- serveSingle("/favicon.ico", "./static/favicon.ico")
-
- // workspaces
- for _, user := range conf.Users {
- http.Handle(conf.Wide.Context+"/workspace/"+user.Name+"/",
- http.StripPrefix(conf.Wide.Context+"/workspace/"+user.Name+"/", http.FileServer(http.Dir(user.WorkspacePath()))))
- }
-
- // session
- http.HandleFunc(conf.Wide.Context+"/session/ws", handlerWrapper(session.WSHandler))
- http.HandleFunc(conf.Wide.Context+"/session/save", handlerWrapper(session.SaveContentHandler))
-
- // run
- http.HandleFunc(conf.Wide.Context+"/build", handlerWrapper(output.BuildHandler))
- http.HandleFunc(conf.Wide.Context+"/run", handlerWrapper(output.RunHandler))
- http.HandleFunc(conf.Wide.Context+"/stop", handlerWrapper(output.StopHandler))
- http.HandleFunc(conf.Wide.Context+"/go/test", handlerWrapper(output.GoTestHandler))
- http.HandleFunc(conf.Wide.Context+"/go/vet", handlerWrapper(output.GoVetHandler))
- http.HandleFunc(conf.Wide.Context+"/go/get", handlerWrapper(output.GoGetHandler))
- http.HandleFunc(conf.Wide.Context+"/go/install", handlerWrapper(output.GoInstallHandler))
- http.HandleFunc(conf.Wide.Context+"/output/ws", handlerWrapper(output.WSHandler))
-
- // cross-compilation
- http.HandleFunc(conf.Wide.Context+"/cross", handlerWrapper(output.CrossCompilationHandler))
-
- // file tree
- http.HandleFunc(conf.Wide.Context+"/files", handlerWrapper(file.GetFilesHandler))
- http.HandleFunc(conf.Wide.Context+"/file/refresh", handlerWrapper(file.RefreshDirectoryHandler))
- http.HandleFunc(conf.Wide.Context+"/file", handlerWrapper(file.GetFileHandler))
- http.HandleFunc(conf.Wide.Context+"/file/save", handlerWrapper(file.SaveFileHandler))
- http.HandleFunc(conf.Wide.Context+"/file/new", handlerWrapper(file.NewFileHandler))
- http.HandleFunc(conf.Wide.Context+"/file/remove", handlerWrapper(file.RemoveFileHandler))
- http.HandleFunc(conf.Wide.Context+"/file/rename", handlerWrapper(file.RenameFileHandler))
- http.HandleFunc(conf.Wide.Context+"/file/search/text", handlerWrapper(file.SearchTextHandler))
- http.HandleFunc(conf.Wide.Context+"/file/find/name", handlerWrapper(file.FindHandler))
-
- // outline
- http.HandleFunc(conf.Wide.Context+"/outline", handlerWrapper(file.GetOutlineHandler))
-
- // file export/import
- http.HandleFunc(conf.Wide.Context+"/file/zip/new", handlerWrapper(file.CreateZipHandler))
- http.HandleFunc(conf.Wide.Context+"/file/zip", handlerWrapper(file.GetZipHandler))
- http.HandleFunc(conf.Wide.Context+"/file/upload", handlerWrapper(file.UploadHandler))
- http.HandleFunc(conf.Wide.Context+"/file/decompress", handlerWrapper(file.DecompressHandler))
-
- // editor
- http.HandleFunc(conf.Wide.Context+"/editor/ws", handlerWrapper(editor.WSHandler))
- http.HandleFunc(conf.Wide.Context+"/go/fmt", handlerWrapper(editor.GoFmtHandler))
- http.HandleFunc(conf.Wide.Context+"/autocomplete", handlerWrapper(editor.AutocompleteHandler))
- http.HandleFunc(conf.Wide.Context+"/exprinfo", handlerWrapper(editor.GetExprInfoHandler))
- http.HandleFunc(conf.Wide.Context+"/find/decl", handlerWrapper(editor.FindDeclarationHandler))
- http.HandleFunc(conf.Wide.Context+"/find/usages", handlerWrapper(editor.FindUsagesHandler))
-
- // shell
- // http.HandleFunc(conf.Wide.Context+"/shell/ws", handlerWrapper(shell.WSHandler))
- // http.HandleFunc(conf.Wide.Context+"/shell", handlerWrapper(shell.IndexHandler))
-
- // notification
- http.HandleFunc(conf.Wide.Context+"/notification/ws", handlerWrapper(notification.WSHandler))
-
- // user
- http.HandleFunc(conf.Wide.Context+"/login", handlerWrapper(session.LoginHandler))
- http.HandleFunc(conf.Wide.Context+"/logout", handlerWrapper(session.LogoutHandler))
- http.HandleFunc(conf.Wide.Context+"/signup", handlerWrapper(session.SignUpUserHandler))
- http.HandleFunc(conf.Wide.Context+"/preference", handlerWrapper(session.PreferenceHandler))
-
- // playground
- http.HandleFunc(conf.Wide.Context+"/playground", handlerWrapper(playground.IndexHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/", handlerWrapper(playground.IndexHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/ws", handlerWrapper(playground.WSHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/save", handlerWrapper(playground.SaveHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/short-url", handlerWrapper(playground.ShortURLHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/build", handlerWrapper(playground.BuildHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/run", handlerWrapper(playground.RunHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/stop", handlerWrapper(playground.StopHandler))
- http.HandleFunc(conf.Wide.Context+"/playground/autocomplete", handlerWrapper(playground.AutocompleteHandler))
-
- // git
- http.HandleFunc(conf.Wide.Context+"/git/clone", handlerWrapper(git.CloneHandler))
-
- logger.Infof("Wide is running [%s]", conf.Wide.Server+conf.Wide.Context)
-
- err := http.ListenAndServe(conf.Wide.Server, nil)
- if err != nil {
- logger.Error(err)
- }
-}
-
-// indexHandler handles request of Wide index.
-func indexHandler(w http.ResponseWriter, r *http.Request) {
- if conf.Wide.Context+"/" != r.RequestURI {
- http.Redirect(w, r, conf.Wide.Context+"/", http.StatusFound)
-
- return
- }
-
- httpSession, _ := session.HTTPSession.Get(r, "wide-session")
- if httpSession.IsNew {
- http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound)
-
- return
- }
-
- username := httpSession.Values["username"].(string)
- if "playground" == username { // reserved user for Playground
- http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound)
-
- return
- }
-
- httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
- if "" != conf.Wide.Context {
- httpSession.Options.Path = conf.Wide.Context
- }
- httpSession.Save(r, w)
-
- user := conf.GetUser(username)
- if nil == user {
- logger.Warnf("Not found user [%s]", username)
-
- http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound)
-
- return
- }
-
- locale := user.Locale
-
- wideSessions := session.WideSessions.GetByUsername(username)
-
- model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale,
- "username": username, "sid": session.WideSessions.GenId(), "latestSessionContent": user.LatestSessionContent,
- "pathSeparator": conf.PathSeparator, "codeMirrorVer": conf.CodeMirrorVer,
- "user": user, "editorThemes": conf.GetEditorThemes(), "crossPlatforms": util.Go.GetCrossPlatforms()}
-
- logger.Debugf("User [%s] has [%d] sessions", username, len(wideSessions))
-
- t, err := template.ParseFiles("views/index.html")
- if nil != err {
- logger.Error(err)
- http.Error(w, err.Error(), 500)
-
- return
- }
-
- t.Execute(w, model)
-}
-
-// handleSignal handles system signal for graceful shutdown.
-func handleSignal() {
- go func() {
- c := make(chan os.Signal)
-
- signal.Notify(c, syscall.SIGINT, syscall.SIGQUIT, syscall.SIGTERM)
- s := <-c
- logger.Tracef("Got signal [%s]", s)
-
- session.SaveOnlineUsers()
- logger.Tracef("Saved all online user, exit")
-
- os.Exit(0)
- }()
-}
-
-// serveSingle registers the handler function for the given pattern and filename.
-func serveSingle(pattern string, filename string) {
- http.HandleFunc(pattern, func(w http.ResponseWriter, r *http.Request) {
- http.ServeFile(w, r, filename)
- })
-}
-
-// startHandler handles request of start page.
-func startHandler(w http.ResponseWriter, r *http.Request) {
- httpSession, _ := session.HTTPSession.Get(r, "wide-session")
- if httpSession.IsNew {
- http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound)
-
- return
- }
-
- httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
- if "" != conf.Wide.Context {
- httpSession.Options.Path = conf.Wide.Context
- }
- httpSession.Save(r, w)
-
- username := httpSession.Values["username"].(string)
- locale := conf.GetUser(username).Locale
- userWorkspace := conf.GetUserWorkspace(username)
-
- sid := r.URL.Query()["sid"][0]
- wSession := session.WideSessions.Get(sid)
- if nil == wSession {
- logger.Errorf("Session [%s] not found", sid)
- }
-
- model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale,
- "username": username, "workspace": userWorkspace, "ver": conf.WideVersion, "sid": sid}
-
- t, err := template.ParseFiles("views/start.html")
-
- if nil != err {
- logger.Error(err)
- http.Error(w, err.Error(), 500)
-
- return
- }
-
- t.Execute(w, model)
-}
-
-// keyboardShortcutsHandler handles request of keyboard shortcuts page.
-func keyboardShortcutsHandler(w http.ResponseWriter, r *http.Request) {
- httpSession, _ := session.HTTPSession.Get(r, "wide-session")
- if httpSession.IsNew {
- http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound)
-
- return
- }
-
- httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
- if "" != conf.Wide.Context {
- httpSession.Options.Path = conf.Wide.Context
- }
- httpSession.Save(r, w)
-
- username := httpSession.Values["username"].(string)
- locale := conf.GetUser(username).Locale
-
- model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale}
-
- t, err := template.ParseFiles("views/keyboard_shortcuts.html")
-
- if nil != err {
- logger.Error(err)
- http.Error(w, err.Error(), 500)
-
- return
- }
-
- t.Execute(w, model)
-}
-
-// aboutHandle handles request of about page.
-func aboutHandler(w http.ResponseWriter, r *http.Request) {
- httpSession, _ := session.HTTPSession.Get(r, "wide-session")
- if httpSession.IsNew {
- http.Redirect(w, r, conf.Wide.Context+"/login", http.StatusFound)
-
- return
- }
-
- httpSession.Options.MaxAge = conf.Wide.HTTPSessionMaxAge
- if "" != conf.Wide.Context {
- httpSession.Options.Path = conf.Wide.Context
- }
- httpSession.Save(r, w)
-
- username := httpSession.Values["username"].(string)
- locale := conf.GetUser(username).Locale
-
- model := map[string]interface{}{"conf": conf.Wide, "i18n": i18n.GetAll(locale), "locale": locale,
- "ver": conf.WideVersion, "goos": runtime.GOOS, "goarch": runtime.GOARCH, "gover": runtime.Version()}
-
- t, err := template.ParseFiles("views/about.html")
-
- if nil != err {
- logger.Error(err)
- http.Error(w, err.Error(), 500)
-
- return
- }
-
- t.Execute(w, model)
-}
-
-// handlerWrapper wraps the HTTP Handler for some common processes.
-//
-// 1. panic recover
-// 2. request stopwatch
-// 3. i18n
-func handlerWrapper(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
- handler := panicRecover(f)
- handler = stopwatch(handler)
- handler = i18nLoad(handler)
-
- return handler
-}
-
-// handlerGzWrapper wraps the HTTP Handler for some common processes.
-//
-// 1. panic recover
-// 2. gzip response
-// 3. request stopwatch
-// 4. i18n
-func handlerGzWrapper(f func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
- handler := panicRecover(f)
- handler = gzipWrapper(handler)
- handler = stopwatch(handler)
- handler = i18nLoad(handler)
-
- return handler
-}
-
-// gzipWrapper wraps the process with response gzip.
-func gzipWrapper(f func(http.ResponseWriter, *http.Request)) func(w http.ResponseWriter, r *http.Request) {
- return func(w http.ResponseWriter, r *http.Request) {
- if !strings.Contains(r.Header.Get("Accept-Encoding"), "gzip") {
- f(w, r)
-
- return
- }
-
- w.Header().Set("Content-Encoding", "gzip")
- gz := gzip.NewWriter(w)
- defer gz.Close()
- gzr := gzipResponseWriter{Writer: gz, ResponseWriter: w}
-
- f(gzr, r)
- }
-}
-
-// i18nLoad wraps the i18n process.
-func i18nLoad(handler func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
- return func(w http.ResponseWriter, r *http.Request) {
- i18n.Load()
-
- handler(w, r)
- }
-}
-
-// stopwatch wraps the request stopwatch process.
-func stopwatch(handler func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
- return func(w http.ResponseWriter, r *http.Request) {
- start := time.Now()
-
- defer func() {
- logger.Tracef("[%s, %s, %s]", r.Method, r.RequestURI, time.Since(start))
- }()
-
- handler(w, r)
- }
-}
-
-// panicRecover wraps the panic recover process.
-func panicRecover(handler func(w http.ResponseWriter, r *http.Request)) func(w http.ResponseWriter, r *http.Request) {
- return func(w http.ResponseWriter, r *http.Request) {
- defer util.Recover()
-
- handler(w, r)
- }
-}
-
-// initMime initializes mime types.
-//
-// We can't get the mime types on some OS (such as Windows XP) by default, so initializes them here.
-func initMime() {
- mime.AddExtensionType(".css", "text/css")
- mime.AddExtensionType(".js", "application/x-javascript")
- mime.AddExtensionType(".json", "application/json")
-}
-
-// gzipResponseWriter represents a gzip response writer.
-type gzipResponseWriter struct {
- io.Writer
- http.ResponseWriter
-}
-
-// Write writes response with appropriate 'Content-Type'.
-func (w gzipResponseWriter) Write(b []byte) (int, error) {
- if "" == w.Header().Get("Content-Type") {
- // If no content type, apply sniffing algorithm to un-gzipped body.
- w.Header().Set("Content-Type", http.DetectContentType(b))
- }
-
- return w.Writer.Write(b)
-}
diff --git a/vendor/github.com/b3log/wide/package.json b/vendor/github.com/b3log/wide/package.json
deleted file mode 100644
index ed66be8..0000000
--- a/vendor/github.com/b3log/wide/package.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "name": "wide",
- "version": "1.4.0",
- "description": "A Web-based IDE for Teams using Go programming language/Golang.",
- "homepage": "https://wide.b3log.org",
- "repository": {
- "type": "git",
- "url": "git://github.com/b3log/wide.git"
- },
- "bugs": {
- "url": "https://github.com/b3log/wide/issues"
- },
- "license": "Apache License",
- "private": true,
- "author": "Daniel (http://88250.b3log.org) & Vanessa (http://vanessa.b3log.org)",
- "maintainers": [
- {
- "name": "Daniel",
- "email": "d@b3log.org"
- },
- {
- "name": "Vanessa",
- "email": "v@b3log.org"
- }
- ],
- "devDependencies": {
- "gulp": "^3.9.1",
- "gulp-concat": "^2.6.1",
- "gulp-minify-css": "^1.2.4",
- "gulp-sourcemaps": "^2.6.0",
- "gulp-uglify": "^2.1.2"
- }
-}
diff --git a/vendor/github.com/b3log/wide/pkg.sh b/vendor/github.com/b3log/wide/pkg.sh
deleted file mode 100644
index 22a6e5e..0000000
--- a/vendor/github.com/b3log/wide/pkg.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/bash
-
-# Wide package tool.
-#
-# Command:
-# ./pkg.sh ${version} ${target}
-# Example:
-# ./pkg.sh 1.0.0 /home/daniel/1.0.0/
-
-ver=$1
-target=$2
-list="conf doc i18n static views README.md TERMS.md LICENSE"
-
-mkdir -p ${target}
-
-echo version=${ver}
-echo target=${target}
-
-## darwin
-os=darwin
-
-export GOOS=${os}
-export GOARCH=amd64
-echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
-go build
-go build github.com/visualfc/gotools
-go build github.com/nsf/gocode
-tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
-rm -f wide gotools gocode
-
-export GOOS=${os}
-export GOARCH=386
-echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
-go build
-go build github.com/visualfc/gotools
-go build github.com/nsf/gocode
-tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
-rm -f wide gotools gocode
-
-## linux
-os=linux
-
-export GOOS=${os}
-export GOARCH=amd64
-echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
-go build
-go build github.com/visualfc/gotools
-go build github.com/nsf/gocode
-tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
-rm -f wide gotools gocode
-
-export GOOS=${os}
-export GOARCH=386
-echo wide-${ver}-${GOOS}-${GOARCH}.tar.gz
-go build
-go build github.com/visualfc/gotools
-go build github.com/nsf/gocode
-tar zcf ${target}/wide-${ver}-${GOOS}-${GOARCH}.tar.gz ${list} gotools gocode wide --exclude-vcs --exclude='conf/*.go' --exclude='i18n/*.go'
-rm -f wide gotools gocode
-
-## windows
-os=windows
-
-export GOOS=${os}
-export GOARCH=amd64
-echo wide-${ver}-${GOOS}-${GOARCH}.zip
-go build
-go build github.com/visualfc/gotools
-go build github.com/nsf/gocode
-zip -r -q ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} gotools.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go
-rm -f wide.exe gotools.exe gocode.exe
-
-export GOOS=${os}
-export GOARCH=386
-echo wide-${ver}-${GOOS}-${GOARCH}.zip
-go build
-go build github.com/visualfc/gotools
-go build github.com/nsf/gocode
-zip -r -q ${target}/wide-${ver}-${GOOS}-${GOARCH}.zip ${list} gotools.exe gocode.exe wide.exe --exclude=conf/*.go --exclude=i18n/*.go
-rm -f wide.exe gotools.exe gocode.exe
diff --git a/vendor/github.com/b3log/wide/yarn.lock b/vendor/github.com/b3log/wide/yarn.lock
deleted file mode 100644
index 0ea15a7..0000000
--- a/vendor/github.com/b3log/wide/yarn.lock
+++ /dev/null
@@ -1,1341 +0,0 @@
-# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
-# yarn lockfile v1
-
-
-"@gulp-sourcemaps/identity-map@1.X":
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/@gulp-sourcemaps/identity-map/download/@gulp-sourcemaps/identity-map-1.0.1.tgz#cfa23bc5840f9104ce32a65e74db7e7a974bbee1"
- dependencies:
- acorn "^5.0.3"
- css "^2.2.1"
- normalize-path "^2.1.1"
- source-map "^0.5.6"
- through2 "^2.0.3"
-
-"@gulp-sourcemaps/map-sources@1.X":
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/@gulp-sourcemaps/map-sources/download/@gulp-sourcemaps/map-sources-1.0.0.tgz#890ae7c5d8c877f6d384860215ace9d7ec945bda"
- dependencies:
- normalize-path "^2.0.1"
- through2 "^2.0.3"
-
-acorn@4.X:
- version "4.0.11"
- resolved "http://registry.npm.taobao.org/acorn/download/acorn-4.0.11.tgz#edcda3bd937e7556410d42ed5860f67399c794c0"
-
-acorn@^5.0.3:
- version "5.0.3"
- resolved "http://registry.npm.taobao.org/acorn/download/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d"
-
-align-text@^0.1.1, align-text@^0.1.3:
- version "0.1.4"
- resolved "http://registry.npm.taobao.org/align-text/download/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
- dependencies:
- kind-of "^3.0.2"
- longest "^1.0.1"
- repeat-string "^1.5.2"
-
-amdefine@>=0.0.4:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/amdefine/download/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
-
-ansi-regex@^2.0.0:
- version "2.1.1"
- resolved "http://registry.npm.taobao.org/ansi-regex/download/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df"
-
-ansi-styles@^2.2.1:
- version "2.2.1"
- resolved "http://registry.npm.taobao.org/ansi-styles/download/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
-
-archy@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/archy/download/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40"
-
-arr-diff@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/arr-diff/download/arr-diff-2.0.0.tgz#8f3b827f955a8bd669697e4a4256ac3ceae356cf"
- dependencies:
- arr-flatten "^1.0.1"
-
-arr-flatten@^1.0.1:
- version "1.0.3"
- resolved "http://registry.npm.taobao.org/arr-flatten/download/arr-flatten-1.0.3.tgz#a274ed85ac08849b6bd7847c4580745dc51adfb1"
-
-array-differ@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/array-differ/download/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
-
-array-uniq@^1.0.2:
- version "1.0.3"
- resolved "http://registry.npm.taobao.org/array-uniq/download/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
-
-array-unique@^0.2.1:
- version "0.2.1"
- resolved "http://registry.npm.taobao.org/array-unique/download/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53"
-
-atob@~1.1.0:
- version "1.1.3"
- resolved "http://registry.npm.taobao.org/atob/download/atob-1.1.3.tgz#95f13629b12c3a51a5d215abdce2aa9f32f80773"
-
-balanced-match@^0.4.1:
- version "0.4.2"
- resolved "http://registry.npm.taobao.org/balanced-match/download/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
-
-beeper@^1.0.0:
- version "1.1.1"
- resolved "http://registry.npm.taobao.org/beeper/download/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
-
-brace-expansion@^1.0.0:
- version "1.1.7"
- resolved "http://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.7.tgz#3effc3c50e000531fb720eaff80f0ae8ef23cf59"
- dependencies:
- balanced-match "^0.4.1"
- concat-map "0.0.1"
-
-braces@^1.8.2:
- version "1.8.5"
- resolved "http://registry.npm.taobao.org/braces/download/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
- dependencies:
- expand-range "^1.8.1"
- preserve "^0.2.0"
- repeat-element "^1.1.2"
-
-buffer-shims@~1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/buffer-shims/download/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51"
-
-bufferstreams@1.0.1:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/bufferstreams/download/bufferstreams-1.0.1.tgz#cfb1ad9568d3ba3cfe935ba9abdd952de88aab2a"
- dependencies:
- readable-stream "^1.0.33"
-
-camelcase@^1.0.2:
- version "1.2.1"
- resolved "http://registry.npm.taobao.org/camelcase/download/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
-
-center-align@^0.1.1:
- version "0.1.3"
- resolved "http://registry.npm.taobao.org/center-align/download/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad"
- dependencies:
- align-text "^0.1.3"
- lazy-cache "^1.0.3"
-
-chalk@^1.0.0, chalk@^1.1.1:
- version "1.1.3"
- resolved "http://registry.npm.taobao.org/chalk/download/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
- dependencies:
- ansi-styles "^2.2.1"
- escape-string-regexp "^1.0.2"
- has-ansi "^2.0.0"
- strip-ansi "^3.0.0"
- supports-color "^2.0.0"
-
-clean-css@^3.3.3:
- version "3.4.25"
- resolved "http://registry.npm.taobao.org/clean-css/download/clean-css-3.4.25.tgz#9e9a52d5c1e6bc5123e1b2783fa65fe958946ede"
- dependencies:
- commander "2.8.x"
- source-map "0.4.x"
-
-cliui@^2.1.0:
- version "2.1.0"
- resolved "http://registry.npm.taobao.org/cliui/download/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
- dependencies:
- center-align "^0.1.1"
- right-align "^0.1.1"
- wordwrap "0.0.2"
-
-clone-buffer@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/clone-buffer/download/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
-
-clone-stats@^0.0.1:
- version "0.0.1"
- resolved "http://registry.npm.taobao.org/clone-stats/download/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
-
-clone-stats@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/clone-stats/download/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
-
-clone@^0.2.0:
- version "0.2.0"
- resolved "http://registry.npm.taobao.org/clone/download/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
-
-clone@^1.0.0, clone@^1.0.2:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/clone/download/clone-1.0.2.tgz#260b7a99ebb1edfe247538175f783243cb19d149"
-
-cloneable-readable@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/cloneable-readable/download/cloneable-readable-1.0.0.tgz#a6290d413f217a61232f95e458ff38418cfb0117"
- dependencies:
- inherits "^2.0.1"
- process-nextick-args "^1.0.6"
- through2 "^2.0.1"
-
-commander@2.8.x:
- version "2.8.1"
- resolved "http://registry.npm.taobao.org/commander/download/commander-2.8.1.tgz#06be367febfda0c330aa1e2a072d3dc9762425d4"
- dependencies:
- graceful-readlink ">= 1.0.0"
-
-concat-map@0.0.1:
- version "0.0.1"
- resolved "http://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
-
-concat-with-sourcemaps@^1.0.0:
- version "1.0.4"
- resolved "http://registry.npm.taobao.org/concat-with-sourcemaps/download/concat-with-sourcemaps-1.0.4.tgz#f55b3be2aeb47601b10a2d5259ccfb70fd2f1dd6"
- dependencies:
- source-map "^0.5.1"
-
-convert-source-map@1.X:
- version "1.5.0"
- resolved "http://registry.npm.taobao.org/convert-source-map/download/convert-source-map-1.5.0.tgz#9acd70851c6d5dfdd93d9282e5edf94a03ff46b5"
-
-core-util-is@~1.0.0:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
-
-css@2.X, css@^2.2.1:
- version "2.2.1"
- resolved "http://registry.npm.taobao.org/css/download/css-2.2.1.tgz#73a4c81de85db664d4ee674f7d47085e3b2d55dc"
- dependencies:
- inherits "^2.0.1"
- source-map "^0.1.38"
- source-map-resolve "^0.3.0"
- urix "^0.1.0"
-
-dateformat@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/dateformat/download/dateformat-2.0.0.tgz#2743e3abb5c3fc2462e527dca445e04e9f4dee17"
-
-debug-fabulous@0.1.X:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/debug-fabulous/download/debug-fabulous-0.1.0.tgz#ad0ea07a5d519324fb55842a8f34ee59c7f8ff6c"
- dependencies:
- debug "2.X"
- object-assign "4.1.0"
-
-debug@2.X:
- version "2.6.4"
- resolved "http://registry.npm.taobao.org/debug/download/debug-2.6.4.tgz#7586a9b3c39741c0282ae33445c4e8ac74734fe0"
- dependencies:
- ms "0.7.3"
-
-decamelize@^1.0.0:
- version "1.2.0"
- resolved "http://registry.npm.taobao.org/decamelize/download/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
-
-defaults@^1.0.0:
- version "1.0.3"
- resolved "http://registry.npm.taobao.org/defaults/download/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
- dependencies:
- clone "^1.0.2"
-
-deprecated@^0.0.1:
- version "0.0.1"
- resolved "http://registry.npm.taobao.org/deprecated/download/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19"
-
-detect-file@^0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/detect-file/download/detect-file-0.1.0.tgz#4935dedfd9488648e006b0129566e9386711ea63"
- dependencies:
- fs-exists-sync "^0.1.0"
-
-detect-newline@2.X:
- version "2.1.0"
- resolved "http://registry.npm.taobao.org/detect-newline/download/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
-
-duplexer2@0.0.2:
- version "0.0.2"
- resolved "http://registry.npm.taobao.org/duplexer2/download/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
- dependencies:
- readable-stream "~1.1.9"
-
-end-of-stream@~0.1.5:
- version "0.1.5"
- resolved "http://registry.npm.taobao.org/end-of-stream/download/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf"
- dependencies:
- once "~1.3.0"
-
-escape-string-regexp@^1.0.2:
- version "1.0.5"
- resolved "http://registry.npm.taobao.org/escape-string-regexp/download/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
-
-expand-brackets@^0.1.4:
- version "0.1.5"
- resolved "http://registry.npm.taobao.org/expand-brackets/download/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
- dependencies:
- is-posix-bracket "^0.1.0"
-
-expand-range@^1.8.1:
- version "1.8.2"
- resolved "http://registry.npm.taobao.org/expand-range/download/expand-range-1.8.2.tgz#a299effd335fe2721ebae8e257ec79644fc85337"
- dependencies:
- fill-range "^2.1.0"
-
-expand-tilde@^1.2.1, expand-tilde@^1.2.2:
- version "1.2.2"
- resolved "http://registry.npm.taobao.org/expand-tilde/download/expand-tilde-1.2.2.tgz#0b81eba897e5a3d31d1c3d102f8f01441e559449"
- dependencies:
- os-homedir "^1.0.1"
-
-extend@^3.0.0:
- version "3.0.0"
- resolved "http://registry.npm.taobao.org/extend/download/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4"
-
-extglob@^0.3.1:
- version "0.3.2"
- resolved "http://registry.npm.taobao.org/extglob/download/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
- dependencies:
- is-extglob "^1.0.0"
-
-fancy-log@^1.1.0:
- version "1.3.0"
- resolved "http://registry.npm.taobao.org/fancy-log/download/fancy-log-1.3.0.tgz#45be17d02bb9917d60ccffd4995c999e6c8c9948"
- dependencies:
- chalk "^1.1.1"
- time-stamp "^1.0.0"
-
-filename-regex@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/filename-regex/download/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775"
-
-fill-range@^2.1.0:
- version "2.2.3"
- resolved "http://registry.npm.taobao.org/fill-range/download/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
- dependencies:
- is-number "^2.1.0"
- isobject "^2.0.0"
- randomatic "^1.1.3"
- repeat-element "^1.1.2"
- repeat-string "^1.5.2"
-
-find-index@^0.1.1:
- version "0.1.1"
- resolved "http://registry.npm.taobao.org/find-index/download/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4"
-
-findup-sync@^0.4.2:
- version "0.4.3"
- resolved "http://registry.npm.taobao.org/findup-sync/download/findup-sync-0.4.3.tgz#40043929e7bc60adf0b7f4827c4c6e75a0deca12"
- dependencies:
- detect-file "^0.1.0"
- is-glob "^2.0.1"
- micromatch "^2.3.7"
- resolve-dir "^0.1.0"
-
-fined@^1.0.1:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/fined/download/fined-1.0.2.tgz#5b28424b760d7598960b7ef8480dff8ad3660e97"
- dependencies:
- expand-tilde "^1.2.1"
- lodash.assignwith "^4.0.7"
- lodash.isempty "^4.2.1"
- lodash.isplainobject "^4.0.4"
- lodash.isstring "^4.0.1"
- lodash.pick "^4.2.1"
- parse-filepath "^1.0.1"
-
-first-chunk-stream@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/first-chunk-stream/download/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
-
-flagged-respawn@^0.3.2:
- version "0.3.2"
- resolved "http://registry.npm.taobao.org/flagged-respawn/download/flagged-respawn-0.3.2.tgz#ff191eddcd7088a675b2610fffc976be9b8074b5"
-
-for-in@^1.0.1:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/for-in/download/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
-
-for-own@^0.1.4:
- version "0.1.5"
- resolved "http://registry.npm.taobao.org/for-own/download/for-own-0.1.5.tgz#5265c681a4f294dabbf17c9509b6763aa84510ce"
- dependencies:
- for-in "^1.0.1"
-
-fs-exists-sync@^0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/fs-exists-sync/download/fs-exists-sync-0.1.0.tgz#982d6893af918e72d08dec9e8673ff2b5a8d6add"
-
-gaze@^0.5.1:
- version "0.5.2"
- resolved "http://registry.npm.taobao.org/gaze/download/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f"
- dependencies:
- globule "~0.1.0"
-
-glob-base@^0.3.0:
- version "0.3.0"
- resolved "http://registry.npm.taobao.org/glob-base/download/glob-base-0.3.0.tgz#dbb164f6221b1c0b1ccf82aea328b497df0ea3c4"
- dependencies:
- glob-parent "^2.0.0"
- is-glob "^2.0.0"
-
-glob-parent@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/glob-parent/download/glob-parent-2.0.0.tgz#81383d72db054fcccf5336daa902f182f6edbb28"
- dependencies:
- is-glob "^2.0.0"
-
-glob-stream@^3.1.5:
- version "3.1.18"
- resolved "http://registry.npm.taobao.org/glob-stream/download/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b"
- dependencies:
- glob "^4.3.1"
- glob2base "^0.0.12"
- minimatch "^2.0.1"
- ordered-read-streams "^0.1.0"
- through2 "^0.6.1"
- unique-stream "^1.0.0"
-
-glob-watcher@^0.0.6:
- version "0.0.6"
- resolved "http://registry.npm.taobao.org/glob-watcher/download/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
- dependencies:
- gaze "^0.5.1"
-
-glob2base@^0.0.12:
- version "0.0.12"
- resolved "http://registry.npm.taobao.org/glob2base/download/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
- dependencies:
- find-index "^0.1.1"
-
-glob@^4.3.1:
- version "4.5.3"
- resolved "http://registry.npm.taobao.org/glob/download/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
- dependencies:
- inflight "^1.0.4"
- inherits "2"
- minimatch "^2.0.1"
- once "^1.3.0"
-
-glob@~3.1.21:
- version "3.1.21"
- resolved "http://registry.npm.taobao.org/glob/download/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd"
- dependencies:
- graceful-fs "~1.2.0"
- inherits "1"
- minimatch "~0.2.11"
-
-global-modules@^0.2.3:
- version "0.2.3"
- resolved "http://registry.npm.taobao.org/global-modules/download/global-modules-0.2.3.tgz#ea5a3bed42c6d6ce995a4f8a1269b5dae223828d"
- dependencies:
- global-prefix "^0.1.4"
- is-windows "^0.2.0"
-
-global-prefix@^0.1.4:
- version "0.1.5"
- resolved "http://registry.npm.taobao.org/global-prefix/download/global-prefix-0.1.5.tgz#8d3bc6b8da3ca8112a160d8d496ff0462bfef78f"
- dependencies:
- homedir-polyfill "^1.0.0"
- ini "^1.3.4"
- is-windows "^0.2.0"
- which "^1.2.12"
-
-globule@~0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/globule/download/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
- dependencies:
- glob "~3.1.21"
- lodash "~1.0.1"
- minimatch "~0.2.11"
-
-glogg@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/glogg/download/glogg-1.0.0.tgz#7fe0f199f57ac906cf512feead8f90ee4a284fc5"
- dependencies:
- sparkles "^1.0.0"
-
-graceful-fs@4.X:
- version "4.1.11"
- resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658"
-
-graceful-fs@^3.0.0:
- version "3.0.11"
- resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-3.0.11.tgz#7613c778a1afea62f25c630a086d7f3acbbdd818"
- dependencies:
- natives "^1.1.0"
-
-graceful-fs@~1.2.0:
- version "1.2.3"
- resolved "http://registry.npm.taobao.org/graceful-fs/download/graceful-fs-1.2.3.tgz#15a4806a57547cb2d2dbf27f42e89a8c3451b364"
-
-"graceful-readlink@>= 1.0.0":
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/graceful-readlink/download/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725"
-
-gulp-concat@^2.6.1:
- version "2.6.1"
- resolved "http://registry.npm.taobao.org/gulp-concat/download/gulp-concat-2.6.1.tgz#633d16c95d88504628ad02665663cee5a4793353"
- dependencies:
- concat-with-sourcemaps "^1.0.0"
- through2 "^2.0.0"
- vinyl "^2.0.0"
-
-gulp-minify-css@^1.2.4:
- version "1.2.4"
- resolved "http://registry.npm.taobao.org/gulp-minify-css/download/gulp-minify-css-1.2.4.tgz#b6164957602ea27f9e5ad88227695dd205778c06"
- dependencies:
- clean-css "^3.3.3"
- gulp-util "^3.0.5"
- object-assign "^4.0.1"
- readable-stream "^2.0.0"
- vinyl-bufferstream "^1.0.1"
- vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-sourcemaps@^2.6.0:
- version "2.6.0"
- resolved "http://registry.npm.taobao.org/gulp-sourcemaps/download/gulp-sourcemaps-2.6.0.tgz#7ccce899a8a3bfca1593a3348d0fbf41dd3f51e5"
- dependencies:
- "@gulp-sourcemaps/identity-map" "1.X"
- "@gulp-sourcemaps/map-sources" "1.X"
- acorn "4.X"
- convert-source-map "1.X"
- css "2.X"
- debug-fabulous "0.1.X"
- detect-newline "2.X"
- graceful-fs "4.X"
- source-map "0.X"
- strip-bom-string "1.X"
- through2 "2.X"
- vinyl "1.X"
-
-gulp-uglify@^2.1.2:
- version "2.1.2"
- resolved "http://registry.npm.taobao.org/gulp-uglify/download/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541"
- dependencies:
- gulplog "^1.0.0"
- has-gulplog "^0.1.0"
- lodash "^4.13.1"
- make-error-cause "^1.1.1"
- through2 "^2.0.0"
- uglify-js "~2.8.10"
- uglify-save-license "^0.4.1"
- vinyl-sourcemaps-apply "^0.2.0"
-
-gulp-util@^3.0.0, gulp-util@^3.0.5:
- version "3.0.8"
- resolved "http://registry.npm.taobao.org/gulp-util/download/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
- dependencies:
- array-differ "^1.0.0"
- array-uniq "^1.0.2"
- beeper "^1.0.0"
- chalk "^1.0.0"
- dateformat "^2.0.0"
- fancy-log "^1.1.0"
- gulplog "^1.0.0"
- has-gulplog "^0.1.0"
- lodash._reescape "^3.0.0"
- lodash._reevaluate "^3.0.0"
- lodash._reinterpolate "^3.0.0"
- lodash.template "^3.0.0"
- minimist "^1.1.0"
- multipipe "^0.1.2"
- object-assign "^3.0.0"
- replace-ext "0.0.1"
- through2 "^2.0.0"
- vinyl "^0.5.0"
-
-gulp@^3.9.1:
- version "3.9.1"
- resolved "http://registry.npm.taobao.org/gulp/download/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4"
- dependencies:
- archy "^1.0.0"
- chalk "^1.0.0"
- deprecated "^0.0.1"
- gulp-util "^3.0.0"
- interpret "^1.0.0"
- liftoff "^2.1.0"
- minimist "^1.1.0"
- orchestrator "^0.3.0"
- pretty-hrtime "^1.0.0"
- semver "^4.1.0"
- tildify "^1.0.0"
- v8flags "^2.0.2"
- vinyl-fs "^0.3.0"
-
-gulplog@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/gulplog/download/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
- dependencies:
- glogg "^1.0.0"
-
-has-ansi@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/has-ansi/download/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91"
- dependencies:
- ansi-regex "^2.0.0"
-
-has-gulplog@^0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/has-gulplog/download/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
- dependencies:
- sparkles "^1.0.0"
-
-homedir-polyfill@^1.0.0:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/homedir-polyfill/download/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc"
- dependencies:
- parse-passwd "^1.0.0"
-
-inflight@^1.0.4:
- version "1.0.6"
- resolved "http://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
- dependencies:
- once "^1.3.0"
- wrappy "1"
-
-inherits@1:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/inherits/download/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b"
-
-inherits@2, inherits@^2.0.1, inherits@~2.0.1:
- version "2.0.3"
- resolved "http://registry.npm.taobao.org/inherits/download/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
-
-ini@^1.3.4:
- version "1.3.4"
- resolved "http://registry.npm.taobao.org/ini/download/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
-
-interpret@^1.0.0:
- version "1.0.3"
- resolved "http://registry.npm.taobao.org/interpret/download/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
-
-is-absolute@^0.2.3:
- version "0.2.6"
- resolved "http://registry.npm.taobao.org/is-absolute/download/is-absolute-0.2.6.tgz#20de69f3db942ef2d87b9c2da36f172235b1b5eb"
- dependencies:
- is-relative "^0.2.1"
- is-windows "^0.2.0"
-
-is-buffer@^1.0.2:
- version "1.1.5"
- resolved "http://registry.npm.taobao.org/is-buffer/download/is-buffer-1.1.5.tgz#1f3b26ef613b214b88cbca23cc6c01d87961eecc"
-
-is-dotfile@^1.0.0:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/is-dotfile/download/is-dotfile-1.0.2.tgz#2c132383f39199f8edc268ca01b9b007d205cc4d"
-
-is-equal-shallow@^0.1.3:
- version "0.1.3"
- resolved "http://registry.npm.taobao.org/is-equal-shallow/download/is-equal-shallow-0.1.3.tgz#2238098fc221de0bcfa5d9eac4c45d638aa1c534"
- dependencies:
- is-primitive "^2.0.0"
-
-is-extendable@^0.1.1:
- version "0.1.1"
- resolved "http://registry.npm.taobao.org/is-extendable/download/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89"
-
-is-extglob@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/is-extglob/download/is-extglob-1.0.0.tgz#ac468177c4943405a092fc8f29760c6ffc6206c0"
-
-is-glob@^2.0.0, is-glob@^2.0.1:
- version "2.0.1"
- resolved "http://registry.npm.taobao.org/is-glob/download/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
- dependencies:
- is-extglob "^1.0.0"
-
-is-number@^2.0.2, is-number@^2.1.0:
- version "2.1.0"
- resolved "http://registry.npm.taobao.org/is-number/download/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
- dependencies:
- kind-of "^3.0.2"
-
-is-posix-bracket@^0.1.0:
- version "0.1.1"
- resolved "http://registry.npm.taobao.org/is-posix-bracket/download/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
-
-is-primitive@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
-
-is-relative@^0.2.1:
- version "0.2.1"
- resolved "http://registry.npm.taobao.org/is-relative/download/is-relative-0.2.1.tgz#d27f4c7d516d175fb610db84bbeef23c3bc97aa5"
- dependencies:
- is-unc-path "^0.1.1"
-
-is-stream@^1.1.0:
- version "1.1.0"
- resolved "http://registry.npm.taobao.org/is-stream/download/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
-
-is-unc-path@^0.1.1:
- version "0.1.2"
- resolved "http://registry.npm.taobao.org/is-unc-path/download/is-unc-path-0.1.2.tgz#6ab053a72573c10250ff416a3814c35178af39b9"
- dependencies:
- unc-path-regex "^0.1.0"
-
-is-utf8@^0.2.0:
- version "0.2.1"
- resolved "http://registry.npm.taobao.org/is-utf8/download/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72"
-
-is-windows@^0.2.0:
- version "0.2.0"
- resolved "http://registry.npm.taobao.org/is-windows/download/is-windows-0.2.0.tgz#de1aa6d63ea29dd248737b69f1ff8b8002d2108c"
-
-isarray@0.0.1:
- version "0.0.1"
- resolved "http://registry.npm.taobao.org/isarray/download/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
-
-isarray@1.0.0, isarray@~1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/isarray/download/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
-
-isexe@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/isexe/download/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
-
-isobject@^2.0.0:
- version "2.1.0"
- resolved "http://registry.npm.taobao.org/isobject/download/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89"
- dependencies:
- isarray "1.0.0"
-
-kind-of@^3.0.2:
- version "3.1.0"
- resolved "http://registry.npm.taobao.org/kind-of/download/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47"
- dependencies:
- is-buffer "^1.0.2"
-
-lazy-cache@^1.0.3:
- version "1.0.4"
- resolved "http://registry.npm.taobao.org/lazy-cache/download/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
-
-liftoff@^2.1.0:
- version "2.3.0"
- resolved "http://registry.npm.taobao.org/liftoff/download/liftoff-2.3.0.tgz#a98f2ff67183d8ba7cfaca10548bd7ff0550b385"
- dependencies:
- extend "^3.0.0"
- findup-sync "^0.4.2"
- fined "^1.0.1"
- flagged-respawn "^0.3.2"
- lodash.isplainobject "^4.0.4"
- lodash.isstring "^4.0.1"
- lodash.mapvalues "^4.4.0"
- rechoir "^0.6.2"
- resolve "^1.1.7"
-
-lodash._basecopy@^3.0.0:
- version "3.0.1"
- resolved "http://registry.npm.taobao.org/lodash._basecopy/download/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
-
-lodash._basetostring@^3.0.0:
- version "3.0.1"
- resolved "http://registry.npm.taobao.org/lodash._basetostring/download/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
-
-lodash._basevalues@^3.0.0:
- version "3.0.0"
- resolved "http://registry.npm.taobao.org/lodash._basevalues/download/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"
-
-lodash._getnative@^3.0.0:
- version "3.9.1"
- resolved "http://registry.npm.taobao.org/lodash._getnative/download/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
-
-lodash._isiterateecall@^3.0.0:
- version "3.0.9"
- resolved "http://registry.npm.taobao.org/lodash._isiterateecall/download/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
-
-lodash._reescape@^3.0.0:
- version "3.0.0"
- resolved "http://registry.npm.taobao.org/lodash._reescape/download/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a"
-
-lodash._reevaluate@^3.0.0:
- version "3.0.0"
- resolved "http://registry.npm.taobao.org/lodash._reevaluate/download/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed"
-
-lodash._reinterpolate@^3.0.0:
- version "3.0.0"
- resolved "http://registry.npm.taobao.org/lodash._reinterpolate/download/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
-
-lodash._root@^3.0.0:
- version "3.0.1"
- resolved "http://registry.npm.taobao.org/lodash._root/download/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
-
-lodash.assignwith@^4.0.7:
- version "4.2.0"
- resolved "http://registry.npm.taobao.org/lodash.assignwith/download/lodash.assignwith-4.2.0.tgz#127a97f02adc41751a954d24b0de17e100e038eb"
-
-lodash.escape@^3.0.0:
- version "3.2.0"
- resolved "http://registry.npm.taobao.org/lodash.escape/download/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
- dependencies:
- lodash._root "^3.0.0"
-
-lodash.isarguments@^3.0.0:
- version "3.1.0"
- resolved "http://registry.npm.taobao.org/lodash.isarguments/download/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
-
-lodash.isarray@^3.0.0:
- version "3.0.4"
- resolved "http://registry.npm.taobao.org/lodash.isarray/download/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
-
-lodash.isempty@^4.2.1:
- version "4.4.0"
- resolved "http://registry.npm.taobao.org/lodash.isempty/download/lodash.isempty-4.4.0.tgz#6f86cbedd8be4ec987be9aaf33c9684db1b31e7e"
-
-lodash.isplainobject@^4.0.4:
- version "4.0.6"
- resolved "http://registry.npm.taobao.org/lodash.isplainobject/download/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
-
-lodash.isstring@^4.0.1:
- version "4.0.1"
- resolved "http://registry.npm.taobao.org/lodash.isstring/download/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451"
-
-lodash.keys@^3.0.0:
- version "3.1.2"
- resolved "http://registry.npm.taobao.org/lodash.keys/download/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
- dependencies:
- lodash._getnative "^3.0.0"
- lodash.isarguments "^3.0.0"
- lodash.isarray "^3.0.0"
-
-lodash.mapvalues@^4.4.0:
- version "4.6.0"
- resolved "http://registry.npm.taobao.org/lodash.mapvalues/download/lodash.mapvalues-4.6.0.tgz#1bafa5005de9dd6f4f26668c30ca37230cc9689c"
-
-lodash.pick@^4.2.1:
- version "4.4.0"
- resolved "http://registry.npm.taobao.org/lodash.pick/download/lodash.pick-4.4.0.tgz#52f05610fff9ded422611441ed1fc123a03001b3"
-
-lodash.restparam@^3.0.0:
- version "3.6.1"
- resolved "http://registry.npm.taobao.org/lodash.restparam/download/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
-
-lodash.template@^3.0.0:
- version "3.6.2"
- resolved "http://registry.npm.taobao.org/lodash.template/download/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
- dependencies:
- lodash._basecopy "^3.0.0"
- lodash._basetostring "^3.0.0"
- lodash._basevalues "^3.0.0"
- lodash._isiterateecall "^3.0.0"
- lodash._reinterpolate "^3.0.0"
- lodash.escape "^3.0.0"
- lodash.keys "^3.0.0"
- lodash.restparam "^3.0.0"
- lodash.templatesettings "^3.0.0"
-
-lodash.templatesettings@^3.0.0:
- version "3.1.1"
- resolved "http://registry.npm.taobao.org/lodash.templatesettings/download/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5"
- dependencies:
- lodash._reinterpolate "^3.0.0"
- lodash.escape "^3.0.0"
-
-lodash@^4.13.1:
- version "4.17.4"
- resolved "http://registry.npm.taobao.org/lodash/download/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
-
-lodash@~1.0.1:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/lodash/download/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
-
-longest@^1.0.1:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/longest/download/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097"
-
-lru-cache@2:
- version "2.7.3"
- resolved "http://registry.npm.taobao.org/lru-cache/download/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
-
-make-error-cause@^1.1.1:
- version "1.2.2"
- resolved "http://registry.npm.taobao.org/make-error-cause/download/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d"
- dependencies:
- make-error "^1.2.0"
-
-make-error@^1.2.0:
- version "1.2.3"
- resolved "http://registry.npm.taobao.org/make-error/download/make-error-1.2.3.tgz#6c4402df732e0977ac6faf754a5074b3d2b1d19d"
-
-map-cache@^0.2.0:
- version "0.2.2"
- resolved "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
-
-micromatch@^2.3.7:
- version "2.3.11"
- resolved "http://registry.npm.taobao.org/micromatch/download/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
- dependencies:
- arr-diff "^2.0.0"
- array-unique "^0.2.1"
- braces "^1.8.2"
- expand-brackets "^0.1.4"
- extglob "^0.3.1"
- filename-regex "^2.0.0"
- is-extglob "^1.0.0"
- is-glob "^2.0.1"
- kind-of "^3.0.2"
- normalize-path "^2.0.1"
- object.omit "^2.0.0"
- parse-glob "^3.0.4"
- regex-cache "^0.4.2"
-
-minimatch@^2.0.1:
- version "2.0.10"
- resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
- dependencies:
- brace-expansion "^1.0.0"
-
-minimatch@~0.2.11:
- version "0.2.14"
- resolved "http://registry.npm.taobao.org/minimatch/download/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
- dependencies:
- lru-cache "2"
- sigmund "~1.0.0"
-
-minimist@0.0.8:
- version "0.0.8"
- resolved "http://registry.npm.taobao.org/minimist/download/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
-
-minimist@^1.1.0:
- version "1.2.0"
- resolved "http://registry.npm.taobao.org/minimist/download/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
-
-mkdirp@^0.5.0:
- version "0.5.1"
- resolved "http://registry.npm.taobao.org/mkdirp/download/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
- dependencies:
- minimist "0.0.8"
-
-ms@0.7.3:
- version "0.7.3"
- resolved "http://registry.npm.taobao.org/ms/download/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff"
-
-multipipe@^0.1.2:
- version "0.1.2"
- resolved "http://registry.npm.taobao.org/multipipe/download/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
- dependencies:
- duplexer2 "0.0.2"
-
-natives@^1.1.0:
- version "1.1.0"
- resolved "http://registry.npm.taobao.org/natives/download/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31"
-
-normalize-path@^2.0.1, normalize-path@^2.1.1:
- version "2.1.1"
- resolved "http://registry.npm.taobao.org/normalize-path/download/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
- dependencies:
- remove-trailing-separator "^1.0.1"
-
-object-assign@4.1.0:
- version "4.1.0"
- resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.0.tgz#7a3b3d0e98063d43f4c03f2e8ae6cd51a86883a0"
-
-object-assign@^3.0.0:
- version "3.0.0"
- resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
-
-object-assign@^4.0.1:
- version "4.1.1"
- resolved "http://registry.npm.taobao.org/object-assign/download/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
-
-object.omit@^2.0.0:
- version "2.0.1"
- resolved "http://registry.npm.taobao.org/object.omit/download/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
- dependencies:
- for-own "^0.1.4"
- is-extendable "^0.1.1"
-
-once@^1.3.0, once@~1.3.0:
- version "1.3.3"
- resolved "http://registry.npm.taobao.org/once/download/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
- dependencies:
- wrappy "1"
-
-orchestrator@^0.3.0:
- version "0.3.8"
- resolved "http://registry.npm.taobao.org/orchestrator/download/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"
- dependencies:
- end-of-stream "~0.1.5"
- sequencify "~0.0.7"
- stream-consume "~0.1.0"
-
-ordered-read-streams@^0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/ordered-read-streams/download/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
-
-os-homedir@^1.0.0, os-homedir@^1.0.1:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/os-homedir/download/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3"
-
-parse-filepath@^1.0.1:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/parse-filepath/download/parse-filepath-1.0.1.tgz#159d6155d43904d16c10ef698911da1e91969b73"
- dependencies:
- is-absolute "^0.2.3"
- map-cache "^0.2.0"
- path-root "^0.1.1"
-
-parse-glob@^3.0.4:
- version "3.0.4"
- resolved "http://registry.npm.taobao.org/parse-glob/download/parse-glob-3.0.4.tgz#b2c376cfb11f35513badd173ef0bb6e3a388391c"
- dependencies:
- glob-base "^0.3.0"
- is-dotfile "^1.0.0"
- is-extglob "^1.0.0"
- is-glob "^2.0.0"
-
-parse-passwd@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/parse-passwd/download/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
-
-path-parse@^1.0.5:
- version "1.0.5"
- resolved "http://registry.npm.taobao.org/path-parse/download/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
-
-path-root-regex@^0.1.0:
- version "0.1.2"
- resolved "http://registry.npm.taobao.org/path-root-regex/download/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
-
-path-root@^0.1.1:
- version "0.1.1"
- resolved "http://registry.npm.taobao.org/path-root/download/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
- dependencies:
- path-root-regex "^0.1.0"
-
-preserve@^0.2.0:
- version "0.2.0"
- resolved "http://registry.npm.taobao.org/preserve/download/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-
-pretty-hrtime@^1.0.0:
- version "1.0.3"
- resolved "http://registry.npm.taobao.org/pretty-hrtime/download/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
-
-process-nextick-args@^1.0.6, process-nextick-args@~1.0.6:
- version "1.0.7"
- resolved "http://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
-
-randomatic@^1.1.3:
- version "1.1.6"
- resolved "http://registry.npm.taobao.org/randomatic/download/randomatic-1.1.6.tgz#110dcabff397e9dcff7c0789ccc0a49adf1ec5bb"
- dependencies:
- is-number "^2.0.2"
- kind-of "^3.0.2"
-
-"readable-stream@>=1.0.33-1 <1.1.0-0":
- version "1.0.34"
- resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
- dependencies:
- core-util-is "~1.0.0"
- inherits "~2.0.1"
- isarray "0.0.1"
- string_decoder "~0.10.x"
-
-readable-stream@^1.0.33, readable-stream@~1.1.9:
- version "1.1.14"
- resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9"
- dependencies:
- core-util-is "~1.0.0"
- inherits "~2.0.1"
- isarray "0.0.1"
- string_decoder "~0.10.x"
-
-readable-stream@^2.0.0, readable-stream@^2.1.5:
- version "2.2.9"
- resolved "http://registry.npm.taobao.org/readable-stream/download/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8"
- dependencies:
- buffer-shims "~1.0.0"
- core-util-is "~1.0.0"
- inherits "~2.0.1"
- isarray "~1.0.0"
- process-nextick-args "~1.0.6"
- string_decoder "~1.0.0"
- util-deprecate "~1.0.1"
-
-rechoir@^0.6.2:
- version "0.6.2"
- resolved "http://registry.npm.taobao.org/rechoir/download/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
- dependencies:
- resolve "^1.1.6"
-
-regex-cache@^0.4.2:
- version "0.4.3"
- resolved "http://registry.npm.taobao.org/regex-cache/download/regex-cache-0.4.3.tgz#9b1a6c35d4d0dfcef5711ae651e8e9d3d7114145"
- dependencies:
- is-equal-shallow "^0.1.3"
- is-primitive "^2.0.0"
-
-remove-trailing-separator@^1.0.1:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/remove-trailing-separator/download/remove-trailing-separator-1.0.1.tgz#615ebb96af559552d4bf4057c8436d486ab63cc4"
-
-repeat-element@^1.1.2:
- version "1.1.2"
- resolved "http://registry.npm.taobao.org/repeat-element/download/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
-
-repeat-string@^1.5.2:
- version "1.6.1"
- resolved "http://registry.npm.taobao.org/repeat-string/download/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
-
-replace-ext@0.0.1:
- version "0.0.1"
- resolved "http://registry.npm.taobao.org/replace-ext/download/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
-
-replace-ext@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/replace-ext/download/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
-
-resolve-dir@^0.1.0:
- version "0.1.1"
- resolved "http://registry.npm.taobao.org/resolve-dir/download/resolve-dir-0.1.1.tgz#b219259a5602fac5c5c496ad894a6e8cc430261e"
- dependencies:
- expand-tilde "^1.2.2"
- global-modules "^0.2.3"
-
-resolve-url@~0.2.1:
- version "0.2.1"
- resolved "http://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
-
-resolve@^1.1.6, resolve@^1.1.7:
- version "1.3.3"
- resolved "http://registry.npm.taobao.org/resolve/download/resolve-1.3.3.tgz#655907c3469a8680dc2de3a275a8fdd69691f0e5"
- dependencies:
- path-parse "^1.0.5"
-
-right-align@^0.1.1:
- version "0.1.3"
- resolved "http://registry.npm.taobao.org/right-align/download/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
- dependencies:
- align-text "^0.1.1"
-
-semver@^4.1.0:
- version "4.3.6"
- resolved "http://registry.npm.taobao.org/semver/download/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
-
-sequencify@~0.0.7:
- version "0.0.7"
- resolved "http://registry.npm.taobao.org/sequencify/download/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c"
-
-sigmund@~1.0.0:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/sigmund/download/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
-
-source-map-resolve@^0.3.0:
- version "0.3.1"
- resolved "http://registry.npm.taobao.org/source-map-resolve/download/source-map-resolve-0.3.1.tgz#610f6122a445b8dd51535a2a71b783dfc1248761"
- dependencies:
- atob "~1.1.0"
- resolve-url "~0.2.1"
- source-map-url "~0.3.0"
- urix "~0.1.0"
-
-source-map-url@~0.3.0:
- version "0.3.0"
- resolved "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.3.0.tgz#7ecaf13b57bcd09da8a40c5d269db33799d4aaf9"
-
-source-map@0.4.x:
- version "0.4.4"
- resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b"
- dependencies:
- amdefine ">=0.0.4"
-
-source-map@0.X, source-map@^0.5.1, source-map@^0.5.6, source-map@~0.5.1:
- version "0.5.6"
- resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412"
-
-source-map@^0.1.38:
- version "0.1.43"
- resolved "http://registry.npm.taobao.org/source-map/download/source-map-0.1.43.tgz#c24bc146ca517c1471f5dacbe2571b2b7f9e3346"
- dependencies:
- amdefine ">=0.0.4"
-
-sparkles@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/sparkles/download/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
-
-stream-consume@~0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/stream-consume/download/stream-consume-0.1.0.tgz#a41ead1a6d6081ceb79f65b061901b6d8f3d1d0f"
-
-string_decoder@~0.10.x:
- version "0.10.31"
- resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
-
-string_decoder@~1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/string_decoder/download/string_decoder-1.0.0.tgz#f06f41157b664d86069f84bdbdc9b0d8ab281667"
- dependencies:
- buffer-shims "~1.0.0"
-
-strip-ansi@^3.0.0:
- version "3.0.1"
- resolved "http://registry.npm.taobao.org/strip-ansi/download/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf"
- dependencies:
- ansi-regex "^2.0.0"
-
-strip-bom-string@1.X:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/strip-bom-string/download/strip-bom-string-1.0.0.tgz#e5211e9224369fbb81d633a2f00044dc8cedad92"
-
-strip-bom@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/strip-bom/download/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794"
- dependencies:
- first-chunk-stream "^1.0.0"
- is-utf8 "^0.2.0"
-
-supports-color@^2.0.0:
- version "2.0.0"
- resolved "http://registry.npm.taobao.org/supports-color/download/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
-
-through2@2.X, through2@^2.0.0, through2@^2.0.1, through2@^2.0.3:
- version "2.0.3"
- resolved "http://registry.npm.taobao.org/through2/download/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
- dependencies:
- readable-stream "^2.1.5"
- xtend "~4.0.1"
-
-through2@^0.6.1:
- version "0.6.5"
- resolved "http://registry.npm.taobao.org/through2/download/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
- dependencies:
- readable-stream ">=1.0.33-1 <1.1.0-0"
- xtend ">=4.0.0 <4.1.0-0"
-
-tildify@^1.0.0:
- version "1.2.0"
- resolved "http://registry.npm.taobao.org/tildify/download/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
- dependencies:
- os-homedir "^1.0.0"
-
-time-stamp@^1.0.0:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/time-stamp/download/time-stamp-1.0.1.tgz#9f4bd23559c9365966f3302dbba2b07c6b99b151"
-
-uglify-js@~2.8.10:
- version "2.8.22"
- resolved "http://registry.npm.taobao.org/uglify-js/download/uglify-js-2.8.22.tgz#d54934778a8da14903fa29a326fb24c0ab51a1a0"
- dependencies:
- source-map "~0.5.1"
- yargs "~3.10.0"
- optionalDependencies:
- uglify-to-browserify "~1.0.0"
-
-uglify-save-license@^0.4.1:
- version "0.4.1"
- resolved "http://registry.npm.taobao.org/uglify-save-license/download/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1"
-
-uglify-to-browserify@~1.0.0:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/uglify-to-browserify/download/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7"
-
-unc-path-regex@^0.1.0:
- version "0.1.2"
- resolved "http://registry.npm.taobao.org/unc-path-regex/download/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
-
-unique-stream@^1.0.0:
- version "1.0.0"
- resolved "http://registry.npm.taobao.org/unique-stream/download/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
-
-urix@^0.1.0, urix@~0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/urix/download/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
-
-user-home@^1.1.1:
- version "1.1.1"
- resolved "http://registry.npm.taobao.org/user-home/download/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
-
-util-deprecate@~1.0.1:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
-
-v8flags@^2.0.2:
- version "2.1.1"
- resolved "http://registry.npm.taobao.org/v8flags/download/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
- dependencies:
- user-home "^1.1.1"
-
-vinyl-bufferstream@^1.0.1:
- version "1.0.1"
- resolved "http://registry.npm.taobao.org/vinyl-bufferstream/download/vinyl-bufferstream-1.0.1.tgz#0537869f580effa4ca45acb47579e4b9fe63081a"
- dependencies:
- bufferstreams "1.0.1"
-
-vinyl-fs@^0.3.0:
- version "0.3.14"
- resolved "http://registry.npm.taobao.org/vinyl-fs/download/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
- dependencies:
- defaults "^1.0.0"
- glob-stream "^3.1.5"
- glob-watcher "^0.0.6"
- graceful-fs "^3.0.0"
- mkdirp "^0.5.0"
- strip-bom "^1.0.0"
- through2 "^0.6.1"
- vinyl "^0.4.0"
-
-vinyl-sourcemaps-apply@^0.2.0:
- version "0.2.1"
- resolved "http://registry.npm.taobao.org/vinyl-sourcemaps-apply/download/vinyl-sourcemaps-apply-0.2.1.tgz#ab6549d61d172c2b1b87be5c508d239c8ef87705"
- dependencies:
- source-map "^0.5.1"
-
-vinyl@1.X:
- version "1.2.0"
- resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-1.2.0.tgz#5c88036cf565e5df05558bfc911f8656df218884"
- dependencies:
- clone "^1.0.0"
- clone-stats "^0.0.1"
- replace-ext "0.0.1"
-
-vinyl@^0.4.0:
- version "0.4.6"
- resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
- dependencies:
- clone "^0.2.0"
- clone-stats "^0.0.1"
-
-vinyl@^0.5.0:
- version "0.5.3"
- resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde"
- dependencies:
- clone "^1.0.0"
- clone-stats "^0.0.1"
- replace-ext "0.0.1"
-
-vinyl@^2.0.0:
- version "2.0.2"
- resolved "http://registry.npm.taobao.org/vinyl/download/vinyl-2.0.2.tgz#0a3713d8d4e9221c58f10ca16c0116c9e25eda7c"
- dependencies:
- clone "^1.0.0"
- clone-buffer "^1.0.0"
- clone-stats "^1.0.0"
- cloneable-readable "^1.0.0"
- is-stream "^1.1.0"
- remove-trailing-separator "^1.0.1"
- replace-ext "^1.0.0"
-
-which@^1.2.12:
- version "1.2.14"
- resolved "http://registry.npm.taobao.org/which/download/which-1.2.14.tgz#9a87c4378f03e827cecaf1acdf56c736c01c14e5"
- dependencies:
- isexe "^2.0.0"
-
-window-size@0.1.0:
- version "0.1.0"
- resolved "http://registry.npm.taobao.org/window-size/download/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
-
-wordwrap@0.0.2:
- version "0.0.2"
- resolved "http://registry.npm.taobao.org/wordwrap/download/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
-
-wrappy@1:
- version "1.0.2"
- resolved "http://registry.npm.taobao.org/wrappy/download/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
-
-"xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.1:
- version "4.0.1"
- resolved "http://registry.npm.taobao.org/xtend/download/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
-
-yargs@~3.10.0:
- version "3.10.0"
- resolved "http://registry.npm.taobao.org/yargs/download/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1"
- dependencies:
- camelcase "^1.0.2"
- cliui "^2.1.0"
- decamelize "^1.0.0"
- window-size "0.1.0"
diff --git a/vendor/github.com/bradfitz/goimports/LICENSE b/vendor/github.com/bradfitz/goimports/LICENSE
deleted file mode 100644
index 65d761b..0000000
--- a/vendor/github.com/bradfitz/goimports/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2013 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/bradfitz/goimports/README b/vendor/github.com/bradfitz/goimports/README
deleted file mode 100644
index b362bd2..0000000
--- a/vendor/github.com/bradfitz/goimports/README
+++ /dev/null
@@ -1,17 +0,0 @@
-This tool updates your Go import lines, adding missing ones and
-removing unreferenced ones.
-
- $ go get golang.org/x/tools/cmd/goimports
-
- Note the new location. This project has moved to the official
- go.tools repo. Pull requests here will no longer be accepted.
- Please use the Go process: http://golang.org/doc/contribute.html
-
-It acts the same as gofmt (same flags, etc) but in addition to code
-formatting, also fixes imports.
-
-See usage and editor integration notes, now moved elsewhere:
-
- http://godoc.org/golang.org/x/tools/cmd/goimports
-
-Happy hacking!
diff --git a/vendor/github.com/bradfitz/goimports/goimports.go b/vendor/github.com/bradfitz/goimports/goimports.go
deleted file mode 100644
index a008d82..0000000
--- a/vendor/github.com/bradfitz/goimports/goimports.go
+++ /dev/null
@@ -1,195 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
- "bytes"
- "flag"
- "fmt"
- "go/scanner"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "runtime"
- "strings"
-
- "golang.org/x/tools/imports"
-)
-
-var (
- // main operation modes
- list = flag.Bool("l", false, "list files whose formatting differs from goimport's")
- write = flag.Bool("w", false, "write result to (source) file instead of stdout")
- doDiff = flag.Bool("d", false, "display diffs instead of rewriting files")
-
- options = &imports.Options{
- TabWidth: 8,
- TabIndent: true,
- Comments: true,
- Fragment: true,
- }
- exitCode = 0
-)
-
-func init() {
- flag.BoolVar(&options.AllErrors, "e", false, "report all errors (not just the first 10 on different lines)")
-}
-
-func report(err error) {
- scanner.PrintError(os.Stderr, err)
- exitCode = 2
-}
-
-func usage() {
- fmt.Fprintf(os.Stderr, "usage: goimports [flags] [path ...]\n")
- flag.PrintDefaults()
- os.Exit(2)
-}
-
-func isGoFile(f os.FileInfo) bool {
- // ignore non-Go files
- name := f.Name()
- return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go")
-}
-
-func processFile(filename string, in io.Reader, out io.Writer, stdin bool) error {
- opt := options
- if stdin {
- nopt := *options
- nopt.Fragment = true
- opt = &nopt
- }
-
- if in == nil {
- f, err := os.Open(filename)
- if err != nil {
- return err
- }
- defer f.Close()
- in = f
- }
-
- src, err := ioutil.ReadAll(in)
- if err != nil {
- return err
- }
-
- res, err := imports.Process(filename, src, opt)
- if err != nil {
- return err
- }
-
- if !bytes.Equal(src, res) {
- // formatting has changed
- if *list {
- fmt.Fprintln(out, filename)
- }
- if *write {
- err = ioutil.WriteFile(filename, res, 0)
- if err != nil {
- return err
- }
- }
- if *doDiff {
- data, err := diff(src, res)
- if err != nil {
- return fmt.Errorf("computing diff: %s", err)
- }
- fmt.Printf("diff %s gofmt/%s\n", filename, filename)
- out.Write(data)
- }
- }
-
- if !*list && !*write && !*doDiff {
- _, err = out.Write(res)
- }
-
- return err
-}
-
-func visitFile(path string, f os.FileInfo, err error) error {
- if err == nil && isGoFile(f) {
- err = processFile(path, nil, os.Stdout, false)
- }
- if err != nil {
- report(err)
- }
- return nil
-}
-
-func walkDir(path string) {
- filepath.Walk(path, visitFile)
-}
-
-func main() {
- runtime.GOMAXPROCS(runtime.NumCPU())
-
- // call gofmtMain in a separate function
- // so that it can use defer and have them
- // run before the exit.
- gofmtMain()
- os.Exit(exitCode)
-}
-
-func gofmtMain() {
- flag.Usage = usage
- flag.Parse()
-
- if options.TabWidth < 0 {
- fmt.Fprintf(os.Stderr, "negative tabwidth %d\n", options.TabWidth)
- exitCode = 2
- return
- }
-
- if flag.NArg() == 0 {
- if err := processFile("", os.Stdin, os.Stdout, true); err != nil {
- report(err)
- }
- return
- }
-
- for i := 0; i < flag.NArg(); i++ {
- path := flag.Arg(i)
- switch dir, err := os.Stat(path); {
- case err != nil:
- report(err)
- case dir.IsDir():
- walkDir(path)
- default:
- if err := processFile(path, nil, os.Stdout, false); err != nil {
- report(err)
- }
- }
- }
-}
-
-func diff(b1, b2 []byte) (data []byte, err error) {
- f1, err := ioutil.TempFile("", "gofmt")
- if err != nil {
- return
- }
- defer os.Remove(f1.Name())
- defer f1.Close()
-
- f2, err := ioutil.TempFile("", "gofmt")
- if err != nil {
- return
- }
- defer os.Remove(f2.Name())
- defer f2.Close()
-
- f1.Write(b1)
- f2.Write(b2)
-
- data, err = exec.Command("diff", "-u", f1.Name(), f2.Name()).CombinedOutput()
- if len(data) > 0 {
- // diff exits with a non-zero status when the files don't match.
- // Ignore that failure as long as we get output.
- err = nil
- }
- return
-}
diff --git a/vendor/github.com/go-fsnotify/fsnotify/AUTHORS b/vendor/github.com/go-fsnotify/fsnotify/AUTHORS
deleted file mode 100644
index 0a5bf8f..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/AUTHORS
+++ /dev/null
@@ -1,46 +0,0 @@
-# Names should be added to this file as
-# Name or Organization
-# The email address is not required for organizations.
-
-# You can update this list using the following command:
-#
-# $ git shortlog -se | awk '{print $2 " " $3 " " $4}'
-
-# Please keep the list sorted.
-
-Adrien Bustany
-Amit Krishnan
-Bjørn Erik Pedersen
-Bruno Bigras
-Caleb Spare
-Case Nelson
-Chris Howey
-Christoffer Buchholz
-Daniel Wagner-Hall
-Dave Cheney
-Evan Phoenix
-Francisco Souza
-Hari haran
-John C Barstow
-Kelvin Fo
-Ken-ichirou MATSUZAWA
-Matt Layher
-Nathan Youngman
-Patrick
-Paul Hammond
-Pawel Knap
-Pieter Droogendijk
-Pursuit92
-Riku Voipio
-Rob Figueiredo
-Slawek Ligus
-Soge Zhang
-Tiffany Jernigan
-Tilak Sharma
-Travis Cline
-Tudor Golubenco
-Yukang
-bronze1man
-debrando
-henrikedwards
-铁哥
diff --git a/vendor/github.com/go-fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/go-fsnotify/fsnotify/CHANGELOG.md
deleted file mode 100644
index 8c732c1..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/CHANGELOG.md
+++ /dev/null
@@ -1,307 +0,0 @@
-# Changelog
-
-## v1.4.2 / 2016-10-10
-
-* Linux: use InotifyInit1 with IN_CLOEXEC to stop leaking a file descriptor to a child process when using fork/exec [#178](https://github.com/fsnotify/fsnotify/pull/178) (thanks @pattyshack)
-
-## v1.4.1 / 2016-10-04
-
-* Fix flaky inotify stress test on Linux [#177](https://github.com/fsnotify/fsnotify/pull/177) (thanks @pattyshack)
-
-## v1.4.0 / 2016-10-01
-
-* add a String() method to Event.Op [#165](https://github.com/fsnotify/fsnotify/pull/165) (thanks @oozie)
-
-## v1.3.1 / 2016-06-28
-
-* Windows: fix for double backslash when watching the root of a drive [#151](https://github.com/fsnotify/fsnotify/issues/151) (thanks @brunoqc)
-
-## v1.3.0 / 2016-04-19
-
-* Support linux/arm64 by [patching](https://go-review.googlesource.com/#/c/21971/) x/sys/unix and switching to to it from syscall (thanks @suihkulokki) [#135](https://github.com/fsnotify/fsnotify/pull/135)
-
-## v1.2.10 / 2016-03-02
-
-* Fix golint errors in windows.go [#121](https://github.com/fsnotify/fsnotify/pull/121) (thanks @tiffanyfj)
-
-## v1.2.9 / 2016-01-13
-
-kqueue: Fix logic for CREATE after REMOVE [#111](https://github.com/fsnotify/fsnotify/pull/111) (thanks @bep)
-
-## v1.2.8 / 2015-12-17
-
-* kqueue: fix race condition in Close [#105](https://github.com/fsnotify/fsnotify/pull/105) (thanks @djui for reporting the issue and @ppknap for writing a failing test)
-* inotify: fix race in test
-* enable race detection for continuous integration (Linux, Mac, Windows)
-
-## v1.2.5 / 2015-10-17
-
-* inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/fsnotify/fsnotify/pull/100) (thanks @suihkulokki)
-* inotify: fix path leaks [#73](https://github.com/fsnotify/fsnotify/pull/73) (thanks @chamaken)
-* kqueue: watch for rename events on subdirectories [#83](https://github.com/fsnotify/fsnotify/pull/83) (thanks @guotie)
-* kqueue: avoid infinite loops from symlinks cycles [#101](https://github.com/fsnotify/fsnotify/pull/101) (thanks @illicitonion)
-
-## v1.2.1 / 2015-10-14
-
-* kqueue: don't watch named pipes [#98](https://github.com/fsnotify/fsnotify/pull/98) (thanks @evanphx)
-
-## v1.2.0 / 2015-02-08
-
-* inotify: use epoll to wake up readEvents [#66](https://github.com/fsnotify/fsnotify/pull/66) (thanks @PieterD)
-* inotify: closing watcher should now always shut down goroutine [#63](https://github.com/fsnotify/fsnotify/pull/63) (thanks @PieterD)
-* kqueue: close kqueue after removing watches, fixes [#59](https://github.com/fsnotify/fsnotify/issues/59)
-
-## v1.1.1 / 2015-02-05
-
-* inotify: Retry read on EINTR [#61](https://github.com/fsnotify/fsnotify/issues/61) (thanks @PieterD)
-
-## v1.1.0 / 2014-12-12
-
-* kqueue: rework internals [#43](https://github.com/fsnotify/fsnotify/pull/43)
- * add low-level functions
- * only need to store flags on directories
- * less mutexes [#13](https://github.com/fsnotify/fsnotify/issues/13)
- * done can be an unbuffered channel
- * remove calls to os.NewSyscallError
-* More efficient string concatenation for Event.String() [#52](https://github.com/fsnotify/fsnotify/pull/52) (thanks @mdlayher)
-* kqueue: fix regression in rework causing subdirectories to be watched [#48](https://github.com/fsnotify/fsnotify/issues/48)
-* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
-
-## v1.0.4 / 2014-09-07
-
-* kqueue: add dragonfly to the build tags.
-* Rename source code files, rearrange code so exported APIs are at the top.
-* Add done channel to example code. [#37](https://github.com/fsnotify/fsnotify/pull/37) (thanks @chenyukang)
-
-## v1.0.3 / 2014-08-19
-
-* [Fix] Windows MOVED_TO now translates to Create like on BSD and Linux. [#36](https://github.com/fsnotify/fsnotify/issues/36)
-
-## v1.0.2 / 2014-08-17
-
-* [Fix] Missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
-* [Fix] Make ./path and path equivalent. (thanks @zhsso)
-
-## v1.0.0 / 2014-08-15
-
-* [API] Remove AddWatch on Windows, use Add.
-* Improve documentation for exported identifiers. [#30](https://github.com/fsnotify/fsnotify/issues/30)
-* Minor updates based on feedback from golint.
-
-## dev / 2014-07-09
-
-* Moved to [github.com/fsnotify/fsnotify](https://github.com/fsnotify/fsnotify).
-* Use os.NewSyscallError instead of returning errno (thanks @hariharan-uno)
-
-## dev / 2014-07-04
-
-* kqueue: fix incorrect mutex used in Close()
-* Update example to demonstrate usage of Op.
-
-## dev / 2014-06-28
-
-* [API] Don't set the Write Op for attribute notifications [#4](https://github.com/fsnotify/fsnotify/issues/4)
-* Fix for String() method on Event (thanks Alex Brainman)
-* Don't build on Plan 9 or Solaris (thanks @4ad)
-
-## dev / 2014-06-21
-
-* Events channel of type Event rather than *Event.
-* [internal] use syscall constants directly for inotify and kqueue.
-* [internal] kqueue: rename events to kevents and fileEvent to event.
-
-## dev / 2014-06-19
-
-* Go 1.3+ required on Windows (uses syscall.ERROR_MORE_DATA internally).
-* [internal] remove cookie from Event struct (unused).
-* [internal] Event struct has the same definition across every OS.
-* [internal] remove internal watch and removeWatch methods.
-
-## dev / 2014-06-12
-
-* [API] Renamed Watch() to Add() and RemoveWatch() to Remove().
-* [API] Pluralized channel names: Events and Errors.
-* [API] Renamed FileEvent struct to Event.
-* [API] Op constants replace methods like IsCreate().
-
-## dev / 2014-06-12
-
-* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98)
-
-## dev / 2014-05-23
-
-* [API] Remove current implementation of WatchFlags.
- * current implementation doesn't take advantage of OS for efficiency
- * provides little benefit over filtering events as they are received, but has extra bookkeeping and mutexes
- * no tests for the current implementation
- * not fully implemented on Windows [#93](https://github.com/howeyc/fsnotify/issues/93#issuecomment-39285195)
-
-## v0.9.3 / 2014-12-31
-
-* kqueue: cleanup internal watch before sending remove event [#51](https://github.com/fsnotify/fsnotify/issues/51)
-
-## v0.9.2 / 2014-08-17
-
-* [Backport] Fix missing create events on macOS. [#14](https://github.com/fsnotify/fsnotify/issues/14) (thanks @zhsso)
-
-## v0.9.1 / 2014-06-12
-
-* Fix data race on kevent buffer (thanks @tilaks) [#98](https://github.com/howeyc/fsnotify/pull/98)
-
-## v0.9.0 / 2014-01-17
-
-* IsAttrib() for events that only concern a file's metadata [#79][] (thanks @abustany)
-* [Fix] kqueue: fix deadlock [#77][] (thanks @cespare)
-* [NOTICE] Development has moved to `code.google.com/p/go.exp/fsnotify` in preparation for inclusion in the Go standard library.
-
-## v0.8.12 / 2013-11-13
-
-* [API] Remove FD_SET and friends from Linux adapter
-
-## v0.8.11 / 2013-11-02
-
-* [Doc] Add Changelog [#72][] (thanks @nathany)
-* [Doc] Spotlight and double modify events on macOS [#62][] (reported by @paulhammond)
-
-## v0.8.10 / 2013-10-19
-
-* [Fix] kqueue: remove file watches when parent directory is removed [#71][] (reported by @mdwhatcott)
-* [Fix] kqueue: race between Close and readEvents [#70][] (reported by @bernerdschaefer)
-* [Doc] specify OS-specific limits in README (thanks @debrando)
-
-## v0.8.9 / 2013-09-08
-
-* [Doc] Contributing (thanks @nathany)
-* [Doc] update package path in example code [#63][] (thanks @paulhammond)
-* [Doc] GoCI badge in README (Linux only) [#60][]
-* [Doc] Cross-platform testing with Vagrant [#59][] (thanks @nathany)
-
-## v0.8.8 / 2013-06-17
-
-* [Fix] Windows: handle `ERROR_MORE_DATA` on Windows [#49][] (thanks @jbowtie)
-
-## v0.8.7 / 2013-06-03
-
-* [API] Make syscall flags internal
-* [Fix] inotify: ignore event changes
-* [Fix] race in symlink test [#45][] (reported by @srid)
-* [Fix] tests on Windows
-* lower case error messages
-
-## v0.8.6 / 2013-05-23
-
-* kqueue: Use EVT_ONLY flag on Darwin
-* [Doc] Update README with full example
-
-## v0.8.5 / 2013-05-09
-
-* [Fix] inotify: allow monitoring of "broken" symlinks (thanks @tsg)
-
-## v0.8.4 / 2013-04-07
-
-* [Fix] kqueue: watch all file events [#40][] (thanks @ChrisBuchholz)
-
-## v0.8.3 / 2013-03-13
-
-* [Fix] inoitfy/kqueue memory leak [#36][] (reported by @nbkolchin)
-* [Fix] kqueue: use fsnFlags for watching a directory [#33][] (reported by @nbkolchin)
-
-## v0.8.2 / 2013-02-07
-
-* [Doc] add Authors
-* [Fix] fix data races for map access [#29][] (thanks @fsouza)
-
-## v0.8.1 / 2013-01-09
-
-* [Fix] Windows path separators
-* [Doc] BSD License
-
-## v0.8.0 / 2012-11-09
-
-* kqueue: directory watching improvements (thanks @vmirage)
-* inotify: add `IN_MOVED_TO` [#25][] (requested by @cpisto)
-* [Fix] kqueue: deleting watched directory [#24][] (reported by @jakerr)
-
-## v0.7.4 / 2012-10-09
-
-* [Fix] inotify: fixes from https://codereview.appspot.com/5418045/ (ugorji)
-* [Fix] kqueue: preserve watch flags when watching for delete [#21][] (reported by @robfig)
-* [Fix] kqueue: watch the directory even if it isn't a new watch (thanks @robfig)
-* [Fix] kqueue: modify after recreation of file
-
-## v0.7.3 / 2012-09-27
-
-* [Fix] kqueue: watch with an existing folder inside the watched folder (thanks @vmirage)
-* [Fix] kqueue: no longer get duplicate CREATE events
-
-## v0.7.2 / 2012-09-01
-
-* kqueue: events for created directories
-
-## v0.7.1 / 2012-07-14
-
-* [Fix] for renaming files
-
-## v0.7.0 / 2012-07-02
-
-* [Feature] FSNotify flags
-* [Fix] inotify: Added file name back to event path
-
-## v0.6.0 / 2012-06-06
-
-* kqueue: watch files after directory created (thanks @tmc)
-
-## v0.5.1 / 2012-05-22
-
-* [Fix] inotify: remove all watches before Close()
-
-## v0.5.0 / 2012-05-03
-
-* [API] kqueue: return errors during watch instead of sending over channel
-* kqueue: match symlink behavior on Linux
-* inotify: add `DELETE_SELF` (requested by @taralx)
-* [Fix] kqueue: handle EINTR (reported by @robfig)
-* [Doc] Godoc example [#1][] (thanks @davecheney)
-
-## v0.4.0 / 2012-03-30
-
-* Go 1 released: build with go tool
-* [Feature] Windows support using winfsnotify
-* Windows does not have attribute change notifications
-* Roll attribute notifications into IsModify
-
-## v0.3.0 / 2012-02-19
-
-* kqueue: add files when watch directory
-
-## v0.2.0 / 2011-12-30
-
-* update to latest Go weekly code
-
-## v0.1.0 / 2011-10-19
-
-* kqueue: add watch on file creation to match inotify
-* kqueue: create file event
-* inotify: ignore `IN_IGNORED` events
-* event String()
-* linux: common FileEvent functions
-* initial commit
-
-[#79]: https://github.com/howeyc/fsnotify/pull/79
-[#77]: https://github.com/howeyc/fsnotify/pull/77
-[#72]: https://github.com/howeyc/fsnotify/issues/72
-[#71]: https://github.com/howeyc/fsnotify/issues/71
-[#70]: https://github.com/howeyc/fsnotify/issues/70
-[#63]: https://github.com/howeyc/fsnotify/issues/63
-[#62]: https://github.com/howeyc/fsnotify/issues/62
-[#60]: https://github.com/howeyc/fsnotify/issues/60
-[#59]: https://github.com/howeyc/fsnotify/issues/59
-[#49]: https://github.com/howeyc/fsnotify/issues/49
-[#45]: https://github.com/howeyc/fsnotify/issues/45
-[#40]: https://github.com/howeyc/fsnotify/issues/40
-[#36]: https://github.com/howeyc/fsnotify/issues/36
-[#33]: https://github.com/howeyc/fsnotify/issues/33
-[#29]: https://github.com/howeyc/fsnotify/issues/29
-[#25]: https://github.com/howeyc/fsnotify/issues/25
-[#24]: https://github.com/howeyc/fsnotify/issues/24
-[#21]: https://github.com/howeyc/fsnotify/issues/21
diff --git a/vendor/github.com/go-fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/go-fsnotify/fsnotify/CONTRIBUTING.md
deleted file mode 100644
index 828a60b..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/CONTRIBUTING.md
+++ /dev/null
@@ -1,77 +0,0 @@
-# Contributing
-
-## Issues
-
-* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues).
-* Please indicate the platform you are using fsnotify on.
-* A code example to reproduce the problem is appreciated.
-
-## Pull Requests
-
-### Contributor License Agreement
-
-fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual).
-
-Please indicate that you have signed the CLA in your pull request.
-
-### How fsnotify is Developed
-
-* Development is done on feature branches.
-* Tests are run on BSD, Linux, macOS and Windows.
-* Pull requests are reviewed and [applied to master][am] using [hub][].
- * Maintainers may modify or squash commits rather than asking contributors to.
-* To issue a new release, the maintainers will:
- * Update the CHANGELOG
- * Tag a version, which will become available through gopkg.in.
-
-### How to Fork
-
-For smooth sailing, always use the original import path. Installing with `go get` makes this easy.
-
-1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`)
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Ensure everything works and the tests pass (see below)
-4. Commit your changes (`git commit -am 'Add some feature'`)
-
-Contribute upstream:
-
-1. Fork fsnotify on GitHub
-2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`)
-3. Push to the branch (`git push fork my-new-feature`)
-4. Create a new Pull Request on GitHub
-
-This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/).
-
-### Testing
-
-fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Windows.
-
-Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on.
-
-To aid in cross-platform testing there is a Vagrantfile for Linux and BSD.
-
-* Install [Vagrant](http://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
-* Setup [Vagrant Gopher](https://github.com/nathany/vagrant-gopher) in your `src` folder.
-* Run `vagrant up` from the project folder. You can also setup just one box with `vagrant up linux` or `vagrant up bsd` (note: the BSD box doesn't support Windows hosts at this time, and NFS may prompt for your host OS password)
-* Once setup, you can run the test suite on a given OS with a single command `vagrant ssh linux -c 'cd fsnotify/fsnotify; go test'`.
-* When you're done, you will want to halt or destroy the Vagrant boxes.
-
-Notice: fsnotify file system events won't trigger in shared folders. The tests get around this limitation by using the /tmp directory.
-
-Right now there is no equivalent solution for Windows and macOS, but there are Windows VMs [freely available from Microsoft](http://www.modern.ie/en-us/virtualization-tools#downloads).
-
-### Maintainers
-
-Help maintaining fsnotify is welcome. To be a maintainer:
-
-* Submit a pull request and sign the CLA as above.
-* You must be able to run the test suite on Mac, Windows, Linux and BSD.
-
-To keep master clean, the fsnotify project uses the "apply mail" workflow outlined in Nathaniel Talbott's post ["Merge pull request" Considered Harmful][am]. This requires installing [hub][].
-
-All code changes should be internal pull requests.
-
-Releases are tagged using [Semantic Versioning](http://semver.org/).
-
-[hub]: https://github.com/github/hub
-[am]: http://blog.spreedly.com/2014/06/24/merge-pull-request-considered-harmful/#.VGa5yZPF_Zs
diff --git a/vendor/github.com/go-fsnotify/fsnotify/LICENSE b/vendor/github.com/go-fsnotify/fsnotify/LICENSE
deleted file mode 100644
index f21e540..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-Copyright (c) 2012 fsnotify Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/go-fsnotify/fsnotify/README.md b/vendor/github.com/go-fsnotify/fsnotify/README.md
deleted file mode 100644
index 3993207..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/README.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# File system notifications for Go
-
-[![GoDoc](https://godoc.org/github.com/fsnotify/fsnotify?status.svg)](https://godoc.org/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify)
-
-fsnotify utilizes [golang.org/x/sys](https://godoc.org/golang.org/x/sys) rather than `syscall` from the standard library. Ensure you have the latest version installed by running:
-
-```console
-go get -u golang.org/x/sys/...
-```
-
-Cross platform: Windows, Linux, BSD and macOS.
-
-|Adapter |OS |Status |
-|----------|----------|----------|
-|inotify |Linux 2.6.27 or later, Android\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|
-|kqueue |BSD, macOS, iOS\*|Supported [![Build Status](https://travis-ci.org/fsnotify/fsnotify.svg?branch=master)](https://travis-ci.org/fsnotify/fsnotify)|
-|ReadDirectoryChangesW|Windows|Supported [![Build status](https://ci.appveyor.com/api/projects/status/ivwjubaih4r0udeh/branch/master?svg=true)](https://ci.appveyor.com/project/NathanYoungman/fsnotify/branch/master)|
-|FSEvents |macOS |[Planned](https://github.com/fsnotify/fsnotify/issues/11)|
-|FEN |Solaris 11 |[In Progress](https://github.com/fsnotify/fsnotify/issues/12)|
-|fanotify |Linux 2.6.37+ | |
-|USN Journals |Windows |[Maybe](https://github.com/fsnotify/fsnotify/issues/53)|
-|Polling |*All* |[Maybe](https://github.com/fsnotify/fsnotify/issues/9)|
-
-\* Android and iOS are untested.
-
-Please see [the documentation](https://godoc.org/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
-
-## API stability
-
-fsnotify is a fork of [howeyc/fsnotify](https://godoc.org/github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-
-All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/). Further API changes are [planned](https://github.com/fsnotify/fsnotify/milestones), and will be tagged with a new major revision number.
-
-Go 1.6 supports dependencies located in the `vendor/` folder. Unless you are creating a library, it is recommended that you copy fsnotify into `vendor/github.com/fsnotify/fsnotify` within your project, and likewise for `golang.org/x/sys`.
-
-## Contributing
-
-Please refer to [CONTRIBUTING][] before opening an issue or pull request.
-
-## Example
-
-See [example_test.go](https://github.com/fsnotify/fsnotify/blob/master/example_test.go).
-
-## FAQ
-
-**When a file is moved to another directory is it still being watched?**
-
-No (it shouldn't be, unless you are watching where it was moved to).
-
-**When I watch a directory, are all subdirectories watched as well?**
-
-No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]).
-
-**Do I have to watch the Error and Event channels in a separate goroutine?**
-
-As of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7])
-
-**Why am I receiving multiple events for the same file on OS X?**
-
-Spotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]).
-
-**How many files can be watched at once?**
-
-There are OS-specific limits as to how many watches can be created:
-* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
-* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.
-
-[#62]: https://github.com/howeyc/fsnotify/issues/62
-[#18]: https://github.com/fsnotify/fsnotify/issues/18
-[#11]: https://github.com/fsnotify/fsnotify/issues/11
-[#7]: https://github.com/howeyc/fsnotify/issues/7
-
-[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md
-
-## Related Projects
-
-* [notify](https://github.com/rjeczalik/notify)
-* [fsevents](https://github.com/fsnotify/fsevents)
-
diff --git a/vendor/github.com/go-fsnotify/fsnotify/fen.go b/vendor/github.com/go-fsnotify/fsnotify/fen.go
deleted file mode 100644
index ced39cb..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/fen.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build solaris
-
-package fsnotify
-
-import (
- "errors"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- return nil
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- return nil
-}
diff --git a/vendor/github.com/go-fsnotify/fsnotify/fsnotify.go b/vendor/github.com/go-fsnotify/fsnotify/fsnotify.go
deleted file mode 100644
index 190bf0d..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/fsnotify.go
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !plan9
-
-// Package fsnotify provides a platform-independent interface for file system notifications.
-package fsnotify
-
-import (
- "bytes"
- "errors"
- "fmt"
-)
-
-// Event represents a single file system notification.
-type Event struct {
- Name string // Relative path to the file or directory.
- Op Op // File operation that triggered the event.
-}
-
-// Op describes a set of file operations.
-type Op uint32
-
-// These are the generalized file operations that can trigger a notification.
-const (
- Create Op = 1 << iota
- Write
- Remove
- Rename
- Chmod
-)
-
-func (op Op) String() string {
- // Use a buffer for efficient string concatenation
- var buffer bytes.Buffer
-
- if op&Create == Create {
- buffer.WriteString("|CREATE")
- }
- if op&Remove == Remove {
- buffer.WriteString("|REMOVE")
- }
- if op&Write == Write {
- buffer.WriteString("|WRITE")
- }
- if op&Rename == Rename {
- buffer.WriteString("|RENAME")
- }
- if op&Chmod == Chmod {
- buffer.WriteString("|CHMOD")
- }
- if buffer.Len() == 0 {
- return ""
- }
- return buffer.String()[1:] // Strip leading pipe
-}
-
-// String returns a string representation of the event in the form
-// "file: REMOVE|WRITE|..."
-func (e Event) String() string {
- return fmt.Sprintf("%q: %s", e.Name, e.Op.String())
-}
-
-// Common errors that can be reported by a watcher
-var ErrEventOverflow = errors.New("fsnotify queue overflow")
diff --git a/vendor/github.com/go-fsnotify/fsnotify/inotify.go b/vendor/github.com/go-fsnotify/fsnotify/inotify.go
deleted file mode 100644
index d9fd1b8..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/inotify.go
+++ /dev/null
@@ -1,337 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "sync"
- "unsafe"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- mu sync.Mutex // Map access
- fd int
- poller *fdPoller
- watches map[string]*watch // Map of inotify watches (key: path)
- paths map[int]string // Map of watched paths (key: watch descriptor)
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
- doneResp chan struct{} // Channel to respond to Close
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- // Create inotify fd
- fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC)
- if fd == -1 {
- return nil, errno
- }
- // Create epoll
- poller, err := newFdPoller(fd)
- if err != nil {
- unix.Close(fd)
- return nil, err
- }
- w := &Watcher{
- fd: fd,
- poller: poller,
- watches: make(map[string]*watch),
- paths: make(map[int]string),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan struct{}),
- doneResp: make(chan struct{}),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-func (w *Watcher) isClosed() bool {
- select {
- case <-w.done:
- return true
- default:
- return false
- }
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed() {
- return nil
- }
-
- // Send 'close' signal to goroutine, and set the Watcher to closed.
- close(w.done)
-
- // Wake up goroutine
- w.poller.wake()
-
- // Wait for goroutine to close
- <-w.doneResp
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- name = filepath.Clean(name)
- if w.isClosed() {
- return errors.New("inotify instance already closed")
- }
-
- const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM |
- unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY |
- unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF
-
- var flags uint32 = agnosticEvents
-
- w.mu.Lock()
- defer w.mu.Unlock()
- watchEntry := w.watches[name]
- if watchEntry != nil {
- flags |= watchEntry.flags | unix.IN_MASK_ADD
- }
- wd, errno := unix.InotifyAddWatch(w.fd, name, flags)
- if wd == -1 {
- return errno
- }
-
- if watchEntry == nil {
- w.watches[name] = &watch{wd: uint32(wd), flags: flags}
- w.paths[wd] = name
- } else {
- watchEntry.wd = uint32(wd)
- watchEntry.flags = flags
- }
-
- return nil
-}
-
-// Remove stops watching the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
-
- // Fetch the watch.
- w.mu.Lock()
- defer w.mu.Unlock()
- watch, ok := w.watches[name]
-
- // Remove it from inotify.
- if !ok {
- return fmt.Errorf("can't remove non-existent inotify watch for: %s", name)
- }
-
- // We successfully removed the watch if InotifyRmWatch doesn't return an
- // error, we need to clean up our internal state to ensure it matches
- // inotify's kernel state.
- delete(w.paths, int(watch.wd))
- delete(w.watches, name)
-
- // inotify_rm_watch will return EINVAL if the file has been deleted;
- // the inotify will already have been removed.
- // watches and pathes are deleted in ignoreLinux() implicitly and asynchronously
- // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE
- // so that EINVAL means that the wd is being rm_watch()ed or its file removed
- // by another thread and we have not received IN_IGNORE event.
- success, errno := unix.InotifyRmWatch(w.fd, watch.wd)
- if success == -1 {
- // TODO: Perhaps it's not helpful to return an error here in every case.
- // the only two possible errors are:
- // EBADF, which happens when w.fd is not a valid file descriptor of any kind.
- // EINVAL, which is when fd is not an inotify descriptor or wd is not a valid watch descriptor.
- // Watch descriptors are invalidated when they are removed explicitly or implicitly;
- // explicitly by inotify_rm_watch, implicitly when the file they are watching is deleted.
- return errno
- }
-
- return nil
-}
-
-type watch struct {
- wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)
- flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)
-}
-
-// readEvents reads from the inotify file descriptor, converts the
-// received events into Event objects and sends them via the Events channel
-func (w *Watcher) readEvents() {
- var (
- buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events
- n int // Number of bytes read with read()
- errno error // Syscall errno
- ok bool // For poller.wait
- )
-
- defer close(w.doneResp)
- defer close(w.Errors)
- defer close(w.Events)
- defer unix.Close(w.fd)
- defer w.poller.close()
-
- for {
- // See if we have been closed.
- if w.isClosed() {
- return
- }
-
- ok, errno = w.poller.wait()
- if errno != nil {
- select {
- case w.Errors <- errno:
- case <-w.done:
- return
- }
- continue
- }
-
- if !ok {
- continue
- }
-
- n, errno = unix.Read(w.fd, buf[:])
- // If a signal interrupted execution, see if we've been asked to close, and try again.
- // http://man7.org/linux/man-pages/man7/signal.7.html :
- // "Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable"
- if errno == unix.EINTR {
- continue
- }
-
- // unix.Read might have been woken up by Close. If so, we're done.
- if w.isClosed() {
- return
- }
-
- if n < unix.SizeofInotifyEvent {
- var err error
- if n == 0 {
- // If EOF is received. This should really never happen.
- err = io.EOF
- } else if n < 0 {
- // If an error occurred while reading.
- err = errno
- } else {
- // Read was too short.
- err = errors.New("notify: short read in readEvents()")
- }
- select {
- case w.Errors <- err:
- case <-w.done:
- return
- }
- continue
- }
-
- var offset uint32
- // We don't know how many events we just read into the buffer
- // While the offset points to at least one whole event...
- for offset <= uint32(n-unix.SizeofInotifyEvent) {
- // Point "raw" to the event in the buffer
- raw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))
-
- mask := uint32(raw.Mask)
- nameLen := uint32(raw.Len)
-
- if mask&unix.IN_Q_OVERFLOW != 0 {
- select {
- case w.Errors <- ErrEventOverflow:
- case <-w.done:
- return
- }
- }
-
- // If the event happened to the watched directory or the watched file, the kernel
- // doesn't append the filename to the event, but we would like to always fill the
- // the "Name" field with a valid filename. We retrieve the path of the watch from
- // the "paths" map.
- w.mu.Lock()
- name, ok := w.paths[int(raw.Wd)]
- // IN_DELETE_SELF occurs when the file/directory being watched is removed.
- // This is a sign to clean up the maps, otherwise we are no longer in sync
- // with the inotify kernel state which has already deleted the watch
- // automatically.
- if ok && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF {
- delete(w.paths, int(raw.Wd))
- delete(w.watches, name)
- }
- w.mu.Unlock()
-
- if nameLen > 0 {
- // Point "bytes" at the first byte of the filename
- bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))
- // The filename is padded with NULL bytes. TrimRight() gets rid of those.
- name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000")
- }
-
- event := newEvent(name, mask)
-
- // Send the events that are not ignored on the events channel
- if !event.ignoreLinux(mask) {
- select {
- case w.Events <- event:
- case <-w.done:
- return
- }
- }
-
- // Move to the next event in the buffer
- offset += unix.SizeofInotifyEvent + nameLen
- }
- }
-}
-
-// Certain types of events can be "ignored" and not sent over the Events
-// channel. Such as events marked ignore by the kernel, or MODIFY events
-// against files that do not exist.
-func (e *Event) ignoreLinux(mask uint32) bool {
- // Ignore anything the inotify API says to ignore
- if mask&unix.IN_IGNORED == unix.IN_IGNORED {
- return true
- }
-
- // If the event is not a DELETE or RENAME, the file must exist.
- // Otherwise the event is ignored.
- // *Note*: this was put in place because it was seen that a MODIFY
- // event was sent after the DELETE. This ignores that MODIFY and
- // assumes a DELETE will come or has come if the file doesn't exist.
- if !(e.Op&Remove == Remove || e.Op&Rename == Rename) {
- _, statErr := os.Lstat(e.Name)
- return os.IsNotExist(statErr)
- }
- return false
-}
-
-// newEvent returns an platform-independent Event based on an inotify mask.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO {
- e.Op |= Create
- }
- if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE {
- e.Op |= Remove
- }
- if mask&unix.IN_MODIFY == unix.IN_MODIFY {
- e.Op |= Write
- }
- if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM {
- e.Op |= Rename
- }
- if mask&unix.IN_ATTRIB == unix.IN_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
diff --git a/vendor/github.com/go-fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/go-fsnotify/fsnotify/inotify_poller.go
deleted file mode 100644
index cc7db4b..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/inotify_poller.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
-
- "golang.org/x/sys/unix"
-)
-
-type fdPoller struct {
- fd int // File descriptor (as returned by the inotify_init() syscall)
- epfd int // Epoll file descriptor
- pipe [2]int // Pipe for waking up
-}
-
-func emptyPoller(fd int) *fdPoller {
- poller := new(fdPoller)
- poller.fd = fd
- poller.epfd = -1
- poller.pipe[0] = -1
- poller.pipe[1] = -1
- return poller
-}
-
-// Create a new inotify poller.
-// This creates an inotify handler, and an epoll handler.
-func newFdPoller(fd int) (*fdPoller, error) {
- var errno error
- poller := emptyPoller(fd)
- defer func() {
- if errno != nil {
- poller.close()
- }
- }()
- poller.fd = fd
-
- // Create epoll fd
- poller.epfd, errno = unix.EpollCreate1(0)
- if poller.epfd == -1 {
- return nil, errno
- }
- // Create pipe; pipe[0] is the read end, pipe[1] the write end.
- errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK)
- if errno != nil {
- return nil, errno
- }
-
- // Register inotify fd with epoll
- event := unix.EpollEvent{
- Fd: int32(poller.fd),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.fd, &event)
- if errno != nil {
- return nil, errno
- }
-
- // Register pipe fd with epoll
- event = unix.EpollEvent{
- Fd: int32(poller.pipe[0]),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.pipe[0], &event)
- if errno != nil {
- return nil, errno
- }
-
- return poller, nil
-}
-
-// Wait using epoll.
-// Returns true if something is ready to be read,
-// false if there is not.
-func (poller *fdPoller) wait() (bool, error) {
- // 3 possible events per fd, and 2 fds, makes a maximum of 6 events.
- // I don't know whether epoll_wait returns the number of events returned,
- // or the total number of events ready.
- // I decided to catch both by making the buffer one larger than the maximum.
- events := make([]unix.EpollEvent, 7)
- for {
- n, errno := unix.EpollWait(poller.epfd, events, -1)
- if n == -1 {
- if errno == unix.EINTR {
- continue
- }
- return false, errno
- }
- if n == 0 {
- // If there are no events, try again.
- continue
- }
- if n > 6 {
- // This should never happen. More events were returned than should be possible.
- return false, errors.New("epoll_wait returned more events than I know what to do with")
- }
- ready := events[:n]
- epollhup := false
- epollerr := false
- epollin := false
- for _, event := range ready {
- if event.Fd == int32(poller.fd) {
- if event.Events&unix.EPOLLHUP != 0 {
- // This should not happen, but if it does, treat it as a wakeup.
- epollhup = true
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the file descriptor, we should pretend
- // something is ready to read, and let unix.Read pick up the error.
- epollerr = true
- }
- if event.Events&unix.EPOLLIN != 0 {
- // There is data to read.
- epollin = true
- }
- }
- if event.Fd == int32(poller.pipe[0]) {
- if event.Events&unix.EPOLLHUP != 0 {
- // Write pipe descriptor was closed, by us. This means we're closing down the
- // watcher, and we should wake up.
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the pipe file descriptor.
- // This is an absolute mystery, and should never ever happen.
- return false, errors.New("Error on the pipe descriptor.")
- }
- if event.Events&unix.EPOLLIN != 0 {
- // This is a regular wakeup, so we have to clear the buffer.
- err := poller.clearWake()
- if err != nil {
- return false, err
- }
- }
- }
- }
-
- if epollhup || epollerr || epollin {
- return true, nil
- }
- return false, nil
- }
-}
-
-// Close the write end of the poller.
-func (poller *fdPoller) wake() error {
- buf := make([]byte, 1)
- n, errno := unix.Write(poller.pipe[1], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is full, poller will wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-func (poller *fdPoller) clearWake() error {
- // You have to be woken up a LOT in order to get to 100!
- buf := make([]byte, 100)
- n, errno := unix.Read(poller.pipe[0], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is empty, someone else cleared our wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-// Close all poller file descriptors, but not the one passed to it.
-func (poller *fdPoller) close() {
- if poller.pipe[1] != -1 {
- unix.Close(poller.pipe[1])
- }
- if poller.pipe[0] != -1 {
- unix.Close(poller.pipe[0])
- }
- if poller.epfd != -1 {
- unix.Close(poller.epfd)
- }
-}
diff --git a/vendor/github.com/go-fsnotify/fsnotify/kqueue.go b/vendor/github.com/go-fsnotify/fsnotify/kqueue.go
deleted file mode 100644
index c2b4acb..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/kqueue.go
+++ /dev/null
@@ -1,503 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd openbsd netbsd dragonfly darwin
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "sync"
- "time"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- done chan bool // Channel for sending a "quit message" to the reader goroutine
-
- kq int // File descriptor (as returned by the kqueue() syscall).
-
- mu sync.Mutex // Protects access to watcher data
- watches map[string]int // Map of watched file descriptors (key: path).
- externalWatches map[string]bool // Map of watches added by user of the library.
- dirFlags map[string]uint32 // Map of watched directories to fflags used in kqueue.
- paths map[int]pathInfo // Map file descriptors to path names for processing kqueue events.
- fileExists map[string]bool // Keep track of if we know this file exists (to stop duplicate create events).
- isClosed bool // Set to true when Close() is first called
-}
-
-type pathInfo struct {
- name string
- isDir bool
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- kq, err := kqueue()
- if err != nil {
- return nil, err
- }
-
- w := &Watcher{
- kq: kq,
- watches: make(map[string]int),
- dirFlags: make(map[string]uint32),
- paths: make(map[int]pathInfo),
- fileExists: make(map[string]bool),
- externalWatches: make(map[string]bool),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan bool),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return nil
- }
- w.isClosed = true
- w.mu.Unlock()
-
- // copy paths to remove while locked
- w.mu.Lock()
- var pathsToRemove = make([]string, 0, len(w.watches))
- for name := range w.watches {
- pathsToRemove = append(pathsToRemove, name)
- }
- w.mu.Unlock()
- // unlock before calling Remove, which also locks
-
- var err error
- for _, name := range pathsToRemove {
- if e := w.Remove(name); e != nil && err == nil {
- err = e
- }
- }
-
- // Send "quit" message to the reader goroutine:
- w.done <- true
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- w.mu.Lock()
- w.externalWatches[name] = true
- w.mu.Unlock()
- _, err := w.addWatch(name, noteAllEvents)
- return err
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
- w.mu.Lock()
- watchfd, ok := w.watches[name]
- w.mu.Unlock()
- if !ok {
- return fmt.Errorf("can't remove non-existent kevent watch for: %s", name)
- }
-
- const registerRemove = unix.EV_DELETE
- if err := register(w.kq, []int{watchfd}, registerRemove, 0); err != nil {
- return err
- }
-
- unix.Close(watchfd)
-
- w.mu.Lock()
- isDir := w.paths[watchfd].isDir
- delete(w.watches, name)
- delete(w.paths, watchfd)
- delete(w.dirFlags, name)
- w.mu.Unlock()
-
- // Find all watched paths that are in this directory that are not external.
- if isDir {
- var pathsToRemove []string
- w.mu.Lock()
- for _, path := range w.paths {
- wdir, _ := filepath.Split(path.name)
- if filepath.Clean(wdir) == name {
- if !w.externalWatches[path.name] {
- pathsToRemove = append(pathsToRemove, path.name)
- }
- }
- }
- w.mu.Unlock()
- for _, name := range pathsToRemove {
- // Since these are internal, not much sense in propagating error
- // to the user, as that will just confuse them with an error about
- // a path they did not explicitly watch themselves.
- w.Remove(name)
- }
- }
-
- return nil
-}
-
-// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE)
-const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME
-
-// keventWaitTime to block on each read from kevent
-var keventWaitTime = durationToTimespec(100 * time.Millisecond)
-
-// addWatch adds name to the watched file set.
-// The flags are interpreted as described in kevent(2).
-// Returns the real path to the file which was added, if any, which may be different from the one passed in the case of symlinks.
-func (w *Watcher) addWatch(name string, flags uint32) (string, error) {
- var isDir bool
- // Make ./name and name equivalent
- name = filepath.Clean(name)
-
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return "", errors.New("kevent instance already closed")
- }
- watchfd, alreadyWatching := w.watches[name]
- // We already have a watch, but we can still override flags.
- if alreadyWatching {
- isDir = w.paths[watchfd].isDir
- }
- w.mu.Unlock()
-
- if !alreadyWatching {
- fi, err := os.Lstat(name)
- if err != nil {
- return "", err
- }
-
- // Don't watch sockets.
- if fi.Mode()&os.ModeSocket == os.ModeSocket {
- return "", nil
- }
-
- // Don't watch named pipes.
- if fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe {
- return "", nil
- }
-
- // Follow Symlinks
- // Unfortunately, Linux can add bogus symlinks to watch list without
- // issue, and Windows can't do symlinks period (AFAIK). To maintain
- // consistency, we will act like everything is fine. There will simply
- // be no file events for broken symlinks.
- // Hence the returns of nil on errors.
- if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
- name, err = filepath.EvalSymlinks(name)
- if err != nil {
- return "", nil
- }
-
- w.mu.Lock()
- _, alreadyWatching = w.watches[name]
- w.mu.Unlock()
-
- if alreadyWatching {
- return name, nil
- }
-
- fi, err = os.Lstat(name)
- if err != nil {
- return "", nil
- }
- }
-
- watchfd, err = unix.Open(name, openMode, 0700)
- if watchfd == -1 {
- return "", err
- }
-
- isDir = fi.IsDir()
- }
-
- const registerAdd = unix.EV_ADD | unix.EV_CLEAR | unix.EV_ENABLE
- if err := register(w.kq, []int{watchfd}, registerAdd, flags); err != nil {
- unix.Close(watchfd)
- return "", err
- }
-
- if !alreadyWatching {
- w.mu.Lock()
- w.watches[name] = watchfd
- w.paths[watchfd] = pathInfo{name: name, isDir: isDir}
- w.mu.Unlock()
- }
-
- if isDir {
- // Watch the directory if it has not been watched before,
- // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles)
- w.mu.Lock()
-
- watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE &&
- (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE)
- // Store flags so this watch can be updated later
- w.dirFlags[name] = flags
- w.mu.Unlock()
-
- if watchDir {
- if err := w.watchDirectoryFiles(name); err != nil {
- return "", err
- }
- }
- }
- return name, nil
-}
-
-// readEvents reads from kqueue and converts the received kevents into
-// Event values that it sends down the Events channel.
-func (w *Watcher) readEvents() {
- eventBuffer := make([]unix.Kevent_t, 10)
-
- for {
- // See if there is a message on the "done" channel
- select {
- case <-w.done:
- err := unix.Close(w.kq)
- if err != nil {
- w.Errors <- err
- }
- close(w.Events)
- close(w.Errors)
- return
- default:
- }
-
- // Get new events
- kevents, err := read(w.kq, eventBuffer, &keventWaitTime)
- // EINTR is okay, the syscall was interrupted before timeout expired.
- if err != nil && err != unix.EINTR {
- w.Errors <- err
- continue
- }
-
- // Flush the events we received to the Events channel
- for len(kevents) > 0 {
- kevent := &kevents[0]
- watchfd := int(kevent.Ident)
- mask := uint32(kevent.Fflags)
- w.mu.Lock()
- path := w.paths[watchfd]
- w.mu.Unlock()
- event := newEvent(path.name, mask)
-
- if path.isDir && !(event.Op&Remove == Remove) {
- // Double check to make sure the directory exists. This can happen when
- // we do a rm -fr on a recursively watched folders and we receive a
- // modification event first but the folder has been deleted and later
- // receive the delete event
- if _, err := os.Lstat(event.Name); os.IsNotExist(err) {
- // mark is as delete event
- event.Op |= Remove
- }
- }
-
- if event.Op&Rename == Rename || event.Op&Remove == Remove {
- w.Remove(event.Name)
- w.mu.Lock()
- delete(w.fileExists, event.Name)
- w.mu.Unlock()
- }
-
- if path.isDir && event.Op&Write == Write && !(event.Op&Remove == Remove) {
- w.sendDirectoryChangeEvents(event.Name)
- } else {
- // Send the event on the Events channel
- w.Events <- event
- }
-
- if event.Op&Remove == Remove {
- // Look for a file that may have overwritten this.
- // For example, mv f1 f2 will delete f2, then create f2.
- if path.isDir {
- fileDir := filepath.Clean(event.Name)
- w.mu.Lock()
- _, found := w.watches[fileDir]
- w.mu.Unlock()
- if found {
- // make sure the directory exists before we watch for changes. When we
- // do a recursive watch and perform rm -fr, the parent directory might
- // have gone missing, ignore the missing directory and let the
- // upcoming delete event remove the watch from the parent directory.
- if _, err := os.Lstat(fileDir); err == nil {
- w.sendDirectoryChangeEvents(fileDir)
- }
- }
- } else {
- filePath := filepath.Clean(event.Name)
- if fileInfo, err := os.Lstat(filePath); err == nil {
- w.sendFileCreatedEventIfNew(filePath, fileInfo)
- }
- }
- }
-
- // Move to next event
- kevents = kevents[1:]
- }
- }
-}
-
-// newEvent returns an platform-independent Event based on kqueue Fflags.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.NOTE_DELETE == unix.NOTE_DELETE {
- e.Op |= Remove
- }
- if mask&unix.NOTE_WRITE == unix.NOTE_WRITE {
- e.Op |= Write
- }
- if mask&unix.NOTE_RENAME == unix.NOTE_RENAME {
- e.Op |= Rename
- }
- if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-func newCreateEvent(name string) Event {
- return Event{Name: name, Op: Create}
-}
-
-// watchDirectoryFiles to mimic inotify when adding a watch on a directory
-func (w *Watcher) watchDirectoryFiles(dirPath string) error {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- return err
- }
-
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
- }
-
- return nil
-}
-
-// sendDirectoryEvents searches the directory for newly created files
-// and sends them over the event channel. This functionality is to have
-// the BSD version of fsnotify match Linux inotify which provides a
-// create event for files created in a watched directory.
-func (w *Watcher) sendDirectoryChangeEvents(dirPath string) {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- w.Errors <- err
- }
-
- // Search for new files
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- err := w.sendFileCreatedEventIfNew(filePath, fileInfo)
-
- if err != nil {
- return
- }
- }
-}
-
-// sendFileCreatedEvent sends a create event if the file isn't already being tracked.
-func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo os.FileInfo) (err error) {
- w.mu.Lock()
- _, doesExist := w.fileExists[filePath]
- w.mu.Unlock()
- if !doesExist {
- // Send create event
- w.Events <- newCreateEvent(filePath)
- }
-
- // like watchDirectoryFiles (but without doing another ReadDir)
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
-
- return nil
-}
-
-func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, error) {
- if fileInfo.IsDir() {
- // mimic Linux providing delete events for subdirectories
- // but preserve the flags used if currently watching subdirectory
- w.mu.Lock()
- flags := w.dirFlags[name]
- w.mu.Unlock()
-
- flags |= unix.NOTE_DELETE | unix.NOTE_RENAME
- return w.addWatch(name, flags)
- }
-
- // watch file to mimic Linux inotify
- return w.addWatch(name, noteAllEvents)
-}
-
-// kqueue creates a new kernel event queue and returns a descriptor.
-func kqueue() (kq int, err error) {
- kq, err = unix.Kqueue()
- if kq == -1 {
- return kq, err
- }
- return kq, nil
-}
-
-// register events with the queue
-func register(kq int, fds []int, flags int, fflags uint32) error {
- changes := make([]unix.Kevent_t, len(fds))
-
- for i, fd := range fds {
- // SetKevent converts int to the platform-specific types:
- unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags)
- changes[i].Fflags = fflags
- }
-
- // register the events
- success, err := unix.Kevent(kq, changes, nil, nil)
- if success == -1 {
- return err
- }
- return nil
-}
-
-// read retrieves pending events, or waits until an event occurs.
-// A timeout of nil blocks indefinitely, while 0 polls the queue.
-func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) {
- n, err := unix.Kevent(kq, nil, events, timeout)
- if err != nil {
- return nil, err
- }
- return events[0:n], nil
-}
-
-// durationToTimespec prepares a timeout value
-func durationToTimespec(d time.Duration) unix.Timespec {
- return unix.NsecToTimespec(d.Nanoseconds())
-}
diff --git a/vendor/github.com/go-fsnotify/fsnotify/open_mode_bsd.go b/vendor/github.com/go-fsnotify/fsnotify/open_mode_bsd.go
deleted file mode 100644
index 7d8de14..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/open_mode_bsd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build freebsd openbsd netbsd dragonfly
-
-package fsnotify
-
-import "golang.org/x/sys/unix"
-
-const openMode = unix.O_NONBLOCK | unix.O_RDONLY
diff --git a/vendor/github.com/go-fsnotify/fsnotify/open_mode_darwin.go b/vendor/github.com/go-fsnotify/fsnotify/open_mode_darwin.go
deleted file mode 100644
index 9139e17..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/open_mode_darwin.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin
-
-package fsnotify
-
-import "golang.org/x/sys/unix"
-
-// note: this constant is not defined on BSD
-const openMode = unix.O_EVTONLY
diff --git a/vendor/github.com/go-fsnotify/fsnotify/windows.go b/vendor/github.com/go-fsnotify/fsnotify/windows.go
deleted file mode 100644
index 09436f3..0000000
--- a/vendor/github.com/go-fsnotify/fsnotify/windows.go
+++ /dev/null
@@ -1,561 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build windows
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "os"
- "path/filepath"
- "runtime"
- "sync"
- "syscall"
- "unsafe"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- isClosed bool // Set to true when Close() is first called
- mu sync.Mutex // Map access
- port syscall.Handle // Handle to completion port
- watches watchMap // Map of watches (key: i-number)
- input chan *input // Inputs to the reader are sent on this channel
- quit chan chan<- error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- port, e := syscall.CreateIoCompletionPort(syscall.InvalidHandle, 0, 0, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateIoCompletionPort", e)
- }
- w := &Watcher{
- port: port,
- watches: make(watchMap),
- input: make(chan *input, 1),
- Events: make(chan Event, 50),
- Errors: make(chan error),
- quit: make(chan chan<- error, 1),
- }
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed {
- return nil
- }
- w.isClosed = true
-
- // Send "quit" message to the reader goroutine
- ch := make(chan error)
- w.quit <- ch
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-ch
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- if w.isClosed {
- return errors.New("watcher already closed")
- }
- in := &input{
- op: opAddWatch,
- path: filepath.Clean(name),
- flags: sysFSALLEVENTS,
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- in := &input{
- op: opRemoveWatch,
- path: filepath.Clean(name),
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-const (
- // Options for AddWatch
- sysFSONESHOT = 0x80000000
- sysFSONLYDIR = 0x1000000
-
- // Events
- sysFSACCESS = 0x1
- sysFSALLEVENTS = 0xfff
- sysFSATTRIB = 0x4
- sysFSCLOSE = 0x18
- sysFSCREATE = 0x100
- sysFSDELETE = 0x200
- sysFSDELETESELF = 0x400
- sysFSMODIFY = 0x2
- sysFSMOVE = 0xc0
- sysFSMOVEDFROM = 0x40
- sysFSMOVEDTO = 0x80
- sysFSMOVESELF = 0x800
-
- // Special events
- sysFSIGNORED = 0x8000
- sysFSQOVERFLOW = 0x4000
-)
-
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO {
- e.Op |= Create
- }
- if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF {
- e.Op |= Remove
- }
- if mask&sysFSMODIFY == sysFSMODIFY {
- e.Op |= Write
- }
- if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM {
- e.Op |= Rename
- }
- if mask&sysFSATTRIB == sysFSATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-const (
- opAddWatch = iota
- opRemoveWatch
-)
-
-const (
- provisional uint64 = 1 << (32 + iota)
-)
-
-type input struct {
- op int
- path string
- flags uint32
- reply chan error
-}
-
-type inode struct {
- handle syscall.Handle
- volume uint32
- index uint64
-}
-
-type watch struct {
- ov syscall.Overlapped
- ino *inode // i-number
- path string // Directory path
- mask uint64 // Directory itself is being watched with these notify flags
- names map[string]uint64 // Map of names being watched and their notify flags
- rename string // Remembers the old name while renaming a file
- buf [4096]byte
-}
-
-type indexMap map[uint64]*watch
-type watchMap map[uint32]indexMap
-
-func (w *Watcher) wakeupReader() error {
- e := syscall.PostQueuedCompletionStatus(w.port, 0, 0, nil)
- if e != nil {
- return os.NewSyscallError("PostQueuedCompletionStatus", e)
- }
- return nil
-}
-
-func getDir(pathname string) (dir string, err error) {
- attr, e := syscall.GetFileAttributes(syscall.StringToUTF16Ptr(pathname))
- if e != nil {
- return "", os.NewSyscallError("GetFileAttributes", e)
- }
- if attr&syscall.FILE_ATTRIBUTE_DIRECTORY != 0 {
- dir = pathname
- } else {
- dir, _ = filepath.Split(pathname)
- dir = filepath.Clean(dir)
- }
- return
-}
-
-func getIno(path string) (ino *inode, err error) {
- h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(path),
- syscall.FILE_LIST_DIRECTORY,
- syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- nil, syscall.OPEN_EXISTING,
- syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OVERLAPPED, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateFile", e)
- }
- var fi syscall.ByHandleFileInformation
- if e = syscall.GetFileInformationByHandle(h, &fi); e != nil {
- syscall.CloseHandle(h)
- return nil, os.NewSyscallError("GetFileInformationByHandle", e)
- }
- ino = &inode{
- handle: h,
- volume: fi.VolumeSerialNumber,
- index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow),
- }
- return ino, nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) get(ino *inode) *watch {
- if i := m[ino.volume]; i != nil {
- return i[ino.index]
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) set(ino *inode, watch *watch) {
- i := m[ino.volume]
- if i == nil {
- i = make(indexMap)
- m[ino.volume] = i
- }
- i[ino.index] = watch
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) addWatch(pathname string, flags uint64) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- if flags&sysFSONLYDIR != 0 && pathname != dir {
- return nil
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watchEntry := w.watches.get(ino)
- w.mu.Unlock()
- if watchEntry == nil {
- if _, e := syscall.CreateIoCompletionPort(ino.handle, w.port, 0, 0); e != nil {
- syscall.CloseHandle(ino.handle)
- return os.NewSyscallError("CreateIoCompletionPort", e)
- }
- watchEntry = &watch{
- ino: ino,
- path: dir,
- names: make(map[string]uint64),
- }
- w.mu.Lock()
- w.watches.set(ino, watchEntry)
- w.mu.Unlock()
- flags |= provisional
- } else {
- syscall.CloseHandle(ino.handle)
- }
- if pathname == dir {
- watchEntry.mask |= flags
- } else {
- watchEntry.names[filepath.Base(pathname)] |= flags
- }
- if err = w.startRead(watchEntry); err != nil {
- return err
- }
- if pathname == dir {
- watchEntry.mask &= ^provisional
- } else {
- watchEntry.names[filepath.Base(pathname)] &= ^provisional
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) remWatch(pathname string) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watch := w.watches.get(ino)
- w.mu.Unlock()
- if watch == nil {
- return fmt.Errorf("can't remove non-existent watch for: %s", pathname)
- }
- if pathname == dir {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- watch.mask = 0
- } else {
- name := filepath.Base(pathname)
- w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- return w.startRead(watch)
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) deleteWatch(watch *watch) {
- for name, mask := range watch.names {
- if mask&provisional == 0 {
- w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED)
- }
- delete(watch.names, name)
- }
- if watch.mask != 0 {
- if watch.mask&provisional == 0 {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- }
- watch.mask = 0
- }
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) startRead(watch *watch) error {
- if e := syscall.CancelIo(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CancelIo", e)
- w.deleteWatch(watch)
- }
- mask := toWindowsFlags(watch.mask)
- for _, m := range watch.names {
- mask |= toWindowsFlags(m)
- }
- if mask == 0 {
- if e := syscall.CloseHandle(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CloseHandle", e)
- }
- w.mu.Lock()
- delete(w.watches[watch.ino.volume], watch.ino.index)
- w.mu.Unlock()
- return nil
- }
- e := syscall.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0],
- uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0)
- if e != nil {
- err := os.NewSyscallError("ReadDirectoryChanges", e)
- if e == syscall.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 {
- // Watched directory was probably removed
- if w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- err = nil
- }
- w.deleteWatch(watch)
- w.startRead(watch)
- return err
- }
- return nil
-}
-
-// readEvents reads from the I/O completion port, converts the
-// received events into Event objects and sends them via the Events channel.
-// Entry point to the I/O thread.
-func (w *Watcher) readEvents() {
- var (
- n, key uint32
- ov *syscall.Overlapped
- )
- runtime.LockOSThread()
-
- for {
- e := syscall.GetQueuedCompletionStatus(w.port, &n, &key, &ov, syscall.INFINITE)
- watch := (*watch)(unsafe.Pointer(ov))
-
- if watch == nil {
- select {
- case ch := <-w.quit:
- w.mu.Lock()
- var indexes []indexMap
- for _, index := range w.watches {
- indexes = append(indexes, index)
- }
- w.mu.Unlock()
- for _, index := range indexes {
- for _, watch := range index {
- w.deleteWatch(watch)
- w.startRead(watch)
- }
- }
- var err error
- if e := syscall.CloseHandle(w.port); e != nil {
- err = os.NewSyscallError("CloseHandle", e)
- }
- close(w.Events)
- close(w.Errors)
- ch <- err
- return
- case in := <-w.input:
- switch in.op {
- case opAddWatch:
- in.reply <- w.addWatch(in.path, uint64(in.flags))
- case opRemoveWatch:
- in.reply <- w.remWatch(in.path)
- }
- default:
- }
- continue
- }
-
- switch e {
- case syscall.ERROR_MORE_DATA:
- if watch == nil {
- w.Errors <- errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer")
- } else {
- // The i/o succeeded but the buffer is full.
- // In theory we should be building up a full packet.
- // In practice we can get away with just carrying on.
- n = uint32(unsafe.Sizeof(watch.buf))
- }
- case syscall.ERROR_ACCESS_DENIED:
- // Watched directory was probably removed
- w.sendEvent(watch.path, watch.mask&sysFSDELETESELF)
- w.deleteWatch(watch)
- w.startRead(watch)
- continue
- case syscall.ERROR_OPERATION_ABORTED:
- // CancelIo was called on this handle
- continue
- default:
- w.Errors <- os.NewSyscallError("GetQueuedCompletionPort", e)
- continue
- case nil:
- }
-
- var offset uint32
- for {
- if n == 0 {
- w.Events <- newEvent("", sysFSQOVERFLOW)
- w.Errors <- errors.New("short read in readEvents()")
- break
- }
-
- // Point "raw" to the event in the buffer
- raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
- buf := (*[syscall.MAX_PATH]uint16)(unsafe.Pointer(&raw.FileName))
- name := syscall.UTF16ToString(buf[:raw.FileNameLength/2])
- fullname := filepath.Join(watch.path, name)
-
- var mask uint64
- switch raw.Action {
- case syscall.FILE_ACTION_REMOVED:
- mask = sysFSDELETESELF
- case syscall.FILE_ACTION_MODIFIED:
- mask = sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- watch.rename = name
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- if watch.names[watch.rename] != 0 {
- watch.names[name] |= watch.names[watch.rename]
- delete(watch.names, watch.rename)
- mask = sysFSMOVESELF
- }
- }
-
- sendNameEvent := func() {
- if w.sendEvent(fullname, watch.names[name]&mask) {
- if watch.names[name]&sysFSONESHOT != 0 {
- delete(watch.names, name)
- }
- }
- }
- if raw.Action != syscall.FILE_ACTION_RENAMED_NEW_NAME {
- sendNameEvent()
- }
- if raw.Action == syscall.FILE_ACTION_REMOVED {
- w.sendEvent(fullname, watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- if w.sendEvent(fullname, watch.mask&toFSnotifyFlags(raw.Action)) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- if raw.Action == syscall.FILE_ACTION_RENAMED_NEW_NAME {
- fullname = filepath.Join(watch.path, watch.rename)
- sendNameEvent()
- }
-
- // Move to the next event in the buffer
- if raw.NextEntryOffset == 0 {
- break
- }
- offset += raw.NextEntryOffset
-
- // Error!
- if offset >= n {
- w.Errors <- errors.New("Windows system assumed buffer larger than it is, events have likely been missed.")
- break
- }
- }
-
- if err := w.startRead(watch); err != nil {
- w.Errors <- err
- }
- }
-}
-
-func (w *Watcher) sendEvent(name string, mask uint64) bool {
- if mask == 0 {
- return false
- }
- event := newEvent(name, uint32(mask))
- select {
- case ch := <-w.quit:
- w.quit <- ch
- case w.Events <- event:
- }
- return true
-}
-
-func toWindowsFlags(mask uint64) uint32 {
- var m uint32
- if mask&sysFSACCESS != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS
- }
- if mask&sysFSMODIFY != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_WRITE
- }
- if mask&sysFSATTRIB != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES
- }
- if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_FILE_NAME | syscall.FILE_NOTIFY_CHANGE_DIR_NAME
- }
- return m
-}
-
-func toFSnotifyFlags(action uint32) uint64 {
- switch action {
- case syscall.FILE_ACTION_ADDED:
- return sysFSCREATE
- case syscall.FILE_ACTION_REMOVED:
- return sysFSDELETE
- case syscall.FILE_ACTION_MODIFIED:
- return sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- return sysFSMOVEDFROM
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- return sysFSMOVEDTO
- }
- return 0
-}
diff --git a/vendor/github.com/gorilla/context/LICENSE b/vendor/github.com/gorilla/context/LICENSE
deleted file mode 100644
index 0e5fb87..0000000
--- a/vendor/github.com/gorilla/context/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/gorilla/context/README.md b/vendor/github.com/gorilla/context/README.md
deleted file mode 100644
index 08f8669..0000000
--- a/vendor/github.com/gorilla/context/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-context
-=======
-[![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context)
-
-gorilla/context is a general purpose registry for global request variables.
-
-> Note: gorilla/context, having been born well before `context.Context` existed, does not play well
-> with the shallow copying of the request that [`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext) (added to net/http Go 1.7 onwards) performs. You should either use *just* gorilla/context, or moving forward, the new `http.Request.Context()`.
-
-Read the full documentation here: http://www.gorillatoolkit.org/pkg/context
diff --git a/vendor/github.com/gorilla/context/context.go b/vendor/github.com/gorilla/context/context.go
deleted file mode 100644
index 81cb128..0000000
--- a/vendor/github.com/gorilla/context/context.go
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package context
-
-import (
- "net/http"
- "sync"
- "time"
-)
-
-var (
- mutex sync.RWMutex
- data = make(map[*http.Request]map[interface{}]interface{})
- datat = make(map[*http.Request]int64)
-)
-
-// Set stores a value for a given key in a given request.
-func Set(r *http.Request, key, val interface{}) {
- mutex.Lock()
- if data[r] == nil {
- data[r] = make(map[interface{}]interface{})
- datat[r] = time.Now().Unix()
- }
- data[r][key] = val
- mutex.Unlock()
-}
-
-// Get returns a value stored for a given key in a given request.
-func Get(r *http.Request, key interface{}) interface{} {
- mutex.RLock()
- if ctx := data[r]; ctx != nil {
- value := ctx[key]
- mutex.RUnlock()
- return value
- }
- mutex.RUnlock()
- return nil
-}
-
-// GetOk returns stored value and presence state like multi-value return of map access.
-func GetOk(r *http.Request, key interface{}) (interface{}, bool) {
- mutex.RLock()
- if _, ok := data[r]; ok {
- value, ok := data[r][key]
- mutex.RUnlock()
- return value, ok
- }
- mutex.RUnlock()
- return nil, false
-}
-
-// GetAll returns all stored values for the request as a map. Nil is returned for invalid requests.
-func GetAll(r *http.Request) map[interface{}]interface{} {
- mutex.RLock()
- if context, ok := data[r]; ok {
- result := make(map[interface{}]interface{}, len(context))
- for k, v := range context {
- result[k] = v
- }
- mutex.RUnlock()
- return result
- }
- mutex.RUnlock()
- return nil
-}
-
-// GetAllOk returns all stored values for the request as a map and a boolean value that indicates if
-// the request was registered.
-func GetAllOk(r *http.Request) (map[interface{}]interface{}, bool) {
- mutex.RLock()
- context, ok := data[r]
- result := make(map[interface{}]interface{}, len(context))
- for k, v := range context {
- result[k] = v
- }
- mutex.RUnlock()
- return result, ok
-}
-
-// Delete removes a value stored for a given key in a given request.
-func Delete(r *http.Request, key interface{}) {
- mutex.Lock()
- if data[r] != nil {
- delete(data[r], key)
- }
- mutex.Unlock()
-}
-
-// Clear removes all values stored for a given request.
-//
-// This is usually called by a handler wrapper to clean up request
-// variables at the end of a request lifetime. See ClearHandler().
-func Clear(r *http.Request) {
- mutex.Lock()
- clear(r)
- mutex.Unlock()
-}
-
-// clear is Clear without the lock.
-func clear(r *http.Request) {
- delete(data, r)
- delete(datat, r)
-}
-
-// Purge removes request data stored for longer than maxAge, in seconds.
-// It returns the amount of requests removed.
-//
-// If maxAge <= 0, all request data is removed.
-//
-// This is only used for sanity check: in case context cleaning was not
-// properly set some request data can be kept forever, consuming an increasing
-// amount of memory. In case this is detected, Purge() must be called
-// periodically until the problem is fixed.
-func Purge(maxAge int) int {
- mutex.Lock()
- count := 0
- if maxAge <= 0 {
- count = len(data)
- data = make(map[*http.Request]map[interface{}]interface{})
- datat = make(map[*http.Request]int64)
- } else {
- min := time.Now().Unix() - int64(maxAge)
- for r := range data {
- if datat[r] < min {
- clear(r)
- count++
- }
- }
- }
- mutex.Unlock()
- return count
-}
-
-// ClearHandler wraps an http.Handler and clears request values at the end
-// of a request lifetime.
-func ClearHandler(h http.Handler) http.Handler {
- return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- defer Clear(r)
- h.ServeHTTP(w, r)
- })
-}
diff --git a/vendor/github.com/gorilla/context/doc.go b/vendor/github.com/gorilla/context/doc.go
deleted file mode 100644
index 448d1bf..0000000
--- a/vendor/github.com/gorilla/context/doc.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Package context stores values shared during a request lifetime.
-
-Note: gorilla/context, having been born well before `context.Context` existed,
-does not play well > with the shallow copying of the request that
-[`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext)
-(added to net/http Go 1.7 onwards) performs. You should either use *just*
-gorilla/context, or moving forward, the new `http.Request.Context()`.
-
-For example, a router can set variables extracted from the URL and later
-application handlers can access those values, or it can be used to store
-sessions values to be saved at the end of a request. There are several
-others common uses.
-
-The idea was posted by Brad Fitzpatrick to the go-nuts mailing list:
-
- http://groups.google.com/group/golang-nuts/msg/e2d679d303aa5d53
-
-Here's the basic usage: first define the keys that you will need. The key
-type is interface{} so a key can be of any type that supports equality.
-Here we define a key using a custom int type to avoid name collisions:
-
- package foo
-
- import (
- "github.com/gorilla/context"
- )
-
- type key int
-
- const MyKey key = 0
-
-Then set a variable. Variables are bound to an http.Request object, so you
-need a request instance to set a value:
-
- context.Set(r, MyKey, "bar")
-
-The application can later access the variable using the same key you provided:
-
- func MyHandler(w http.ResponseWriter, r *http.Request) {
- // val is "bar".
- val := context.Get(r, foo.MyKey)
-
- // returns ("bar", true)
- val, ok := context.GetOk(r, foo.MyKey)
- // ...
- }
-
-And that's all about the basic usage. We discuss some other ideas below.
-
-Any type can be stored in the context. To enforce a given type, make the key
-private and wrap Get() and Set() to accept and return values of a specific
-type:
-
- type key int
-
- const mykey key = 0
-
- // GetMyKey returns a value for this package from the request values.
- func GetMyKey(r *http.Request) SomeType {
- if rv := context.Get(r, mykey); rv != nil {
- return rv.(SomeType)
- }
- return nil
- }
-
- // SetMyKey sets a value for this package in the request values.
- func SetMyKey(r *http.Request, val SomeType) {
- context.Set(r, mykey, val)
- }
-
-Variables must be cleared at the end of a request, to remove all values
-that were stored. This can be done in an http.Handler, after a request was
-served. Just call Clear() passing the request:
-
- context.Clear(r)
-
-...or use ClearHandler(), which conveniently wraps an http.Handler to clear
-variables at the end of a request lifetime.
-
-The Routers from the packages gorilla/mux and gorilla/pat call Clear()
-so if you are using either of them you don't need to clear the context manually.
-*/
-package context
diff --git a/vendor/github.com/gorilla/securecookie/LICENSE b/vendor/github.com/gorilla/securecookie/LICENSE
deleted file mode 100644
index 0e5fb87..0000000
--- a/vendor/github.com/gorilla/securecookie/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/gorilla/securecookie/README.md b/vendor/github.com/gorilla/securecookie/README.md
deleted file mode 100644
index aa7bd1a..0000000
--- a/vendor/github.com/gorilla/securecookie/README.md
+++ /dev/null
@@ -1,80 +0,0 @@
-securecookie
-============
-[![GoDoc](https://godoc.org/github.com/gorilla/securecookie?status.svg)](https://godoc.org/github.com/gorilla/securecookie) [![Build Status](https://travis-ci.org/gorilla/securecookie.png?branch=master)](https://travis-ci.org/gorilla/securecookie)
-[![Sourcegraph](https://sourcegraph.com/github.com/gorilla/securecookie/-/badge.svg)](https://sourcegraph.com/github.com/gorilla/securecookie?badge)
-
-
-securecookie encodes and decodes authenticated and optionally encrypted
-cookie values.
-
-Secure cookies can't be forged, because their values are validated using HMAC.
-When encrypted, the content is also inaccessible to malicious eyes. It is still
-recommended that sensitive data not be stored in cookies, and that HTTPS be used
-to prevent cookie [replay attacks](https://en.wikipedia.org/wiki/Replay_attack).
-
-## Examples
-
-To use it, first create a new SecureCookie instance:
-
-```go
-// Hash keys should be at least 32 bytes long
-var hashKey = []byte("very-secret")
-// Block keys should be 16 bytes (AES-128) or 32 bytes (AES-256) long.
-// Shorter keys may weaken the encryption used.
-var blockKey = []byte("a-lot-secret")
-var s = securecookie.New(hashKey, blockKey)
-```
-
-The hashKey is required, used to authenticate the cookie value using HMAC.
-It is recommended to use a key with 32 or 64 bytes.
-
-The blockKey is optional, used to encrypt the cookie value -- set it to nil
-to not use encryption. If set, the length must correspond to the block size
-of the encryption algorithm. For AES, used by default, valid lengths are
-16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
-
-Strong keys can be created using the convenience function GenerateRandomKey().
-
-Once a SecureCookie instance is set, use it to encode a cookie value:
-
-```go
-func SetCookieHandler(w http.ResponseWriter, r *http.Request) {
- value := map[string]string{
- "foo": "bar",
- }
- if encoded, err := s.Encode("cookie-name", value); err == nil {
- cookie := &http.Cookie{
- Name: "cookie-name",
- Value: encoded,
- Path: "/",
- Secure: true,
- HttpOnly: true,
- }
- http.SetCookie(w, cookie)
- }
-}
-```
-
-Later, use the same SecureCookie instance to decode and validate a cookie
-value:
-
-```go
-func ReadCookieHandler(w http.ResponseWriter, r *http.Request) {
- if cookie, err := r.Cookie("cookie-name"); err == nil {
- value := make(map[string]string)
- if err = s2.Decode("cookie-name", cookie.Value, &value); err == nil {
- fmt.Fprintf(w, "The value of foo is %q", value["foo"])
- }
- }
-}
-```
-
-We stored a map[string]string, but secure cookies can hold any value that
-can be encoded using `encoding/gob`. To store custom types, they must be
-registered first using gob.Register(). For basic types this is not needed;
-it works out of the box. An optional JSON encoder that uses `encoding/json` is
-available for types compatible with JSON.
-
-## License
-
-BSD licensed. See the LICENSE file for details.
diff --git a/vendor/github.com/gorilla/securecookie/doc.go b/vendor/github.com/gorilla/securecookie/doc.go
deleted file mode 100644
index ae89408..0000000
--- a/vendor/github.com/gorilla/securecookie/doc.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Package securecookie encodes and decodes authenticated and optionally
-encrypted cookie values.
-
-Secure cookies can't be forged, because their values are validated using HMAC.
-When encrypted, the content is also inaccessible to malicious eyes.
-
-To use it, first create a new SecureCookie instance:
-
- var hashKey = []byte("very-secret")
- var blockKey = []byte("a-lot-secret")
- var s = securecookie.New(hashKey, blockKey)
-
-The hashKey is required, used to authenticate the cookie value using HMAC.
-It is recommended to use a key with 32 or 64 bytes.
-
-The blockKey is optional, used to encrypt the cookie value -- set it to nil
-to not use encryption. If set, the length must correspond to the block size
-of the encryption algorithm. For AES, used by default, valid lengths are
-16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
-
-Strong keys can be created using the convenience function GenerateRandomKey().
-
-Once a SecureCookie instance is set, use it to encode a cookie value:
-
- func SetCookieHandler(w http.ResponseWriter, r *http.Request) {
- value := map[string]string{
- "foo": "bar",
- }
- if encoded, err := s.Encode("cookie-name", value); err == nil {
- cookie := &http.Cookie{
- Name: "cookie-name",
- Value: encoded,
- Path: "/",
- }
- http.SetCookie(w, cookie)
- }
- }
-
-Later, use the same SecureCookie instance to decode and validate a cookie
-value:
-
- func ReadCookieHandler(w http.ResponseWriter, r *http.Request) {
- if cookie, err := r.Cookie("cookie-name"); err == nil {
- value := make(map[string]string)
- if err = s2.Decode("cookie-name", cookie.Value, &value); err == nil {
- fmt.Fprintf(w, "The value of foo is %q", value["foo"])
- }
- }
- }
-
-We stored a map[string]string, but secure cookies can hold any value that
-can be encoded using encoding/gob. To store custom types, they must be
-registered first using gob.Register(). For basic types this is not needed;
-it works out of the box.
-*/
-package securecookie
diff --git a/vendor/github.com/gorilla/securecookie/fuzz.go b/vendor/github.com/gorilla/securecookie/fuzz.go
deleted file mode 100644
index e4d0534..0000000
--- a/vendor/github.com/gorilla/securecookie/fuzz.go
+++ /dev/null
@@ -1,25 +0,0 @@
-// +build gofuzz
-
-package securecookie
-
-var hashKey = []byte("very-secret12345")
-var blockKey = []byte("a-lot-secret1234")
-var s = New(hashKey, blockKey)
-
-type Cookie struct {
- B bool
- I int
- S string
-}
-
-func Fuzz(data []byte) int {
- datas := string(data)
- var c Cookie
- if err := s.Decode("fuzz", datas, &c); err != nil {
- return 0
- }
- if _, err := s.Encode("fuzz", c); err != nil {
- panic(err)
- }
- return 1
-}
diff --git a/vendor/github.com/gorilla/securecookie/securecookie.go b/vendor/github.com/gorilla/securecookie/securecookie.go
deleted file mode 100644
index cd4e097..0000000
--- a/vendor/github.com/gorilla/securecookie/securecookie.go
+++ /dev/null
@@ -1,646 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package securecookie
-
-import (
- "bytes"
- "crypto/aes"
- "crypto/cipher"
- "crypto/hmac"
- "crypto/rand"
- "crypto/sha256"
- "crypto/subtle"
- "encoding/base64"
- "encoding/gob"
- "encoding/json"
- "fmt"
- "hash"
- "io"
- "strconv"
- "strings"
- "time"
-)
-
-// Error is the interface of all errors returned by functions in this library.
-type Error interface {
- error
-
- // IsUsage returns true for errors indicating the client code probably
- // uses this library incorrectly. For example, the client may have
- // failed to provide a valid hash key, or may have failed to configure
- // the Serializer adequately for encoding value.
- IsUsage() bool
-
- // IsDecode returns true for errors indicating that a cookie could not
- // be decoded and validated. Since cookies are usually untrusted
- // user-provided input, errors of this type should be expected.
- // Usually, the proper action is simply to reject the request.
- IsDecode() bool
-
- // IsInternal returns true for unexpected errors occurring in the
- // securecookie implementation.
- IsInternal() bool
-
- // Cause, if it returns a non-nil value, indicates that this error was
- // propagated from some underlying library. If this method returns nil,
- // this error was raised directly by this library.
- //
- // Cause is provided principally for debugging/logging purposes; it is
- // rare that application logic should perform meaningfully different
- // logic based on Cause. See, for example, the caveats described on
- // (MultiError).Cause().
- Cause() error
-}
-
-// errorType is a bitmask giving the error type(s) of an cookieError value.
-type errorType int
-
-const (
- usageError = errorType(1 << iota)
- decodeError
- internalError
-)
-
-type cookieError struct {
- typ errorType
- msg string
- cause error
-}
-
-func (e cookieError) IsUsage() bool { return (e.typ & usageError) != 0 }
-func (e cookieError) IsDecode() bool { return (e.typ & decodeError) != 0 }
-func (e cookieError) IsInternal() bool { return (e.typ & internalError) != 0 }
-
-func (e cookieError) Cause() error { return e.cause }
-
-func (e cookieError) Error() string {
- parts := []string{"securecookie: "}
- if e.msg == "" {
- parts = append(parts, "error")
- } else {
- parts = append(parts, e.msg)
- }
- if c := e.Cause(); c != nil {
- parts = append(parts, " - caused by: ", c.Error())
- }
- return strings.Join(parts, "")
-}
-
-var (
- errGeneratingIV = cookieError{typ: internalError, msg: "failed to generate random iv"}
-
- errNoCodecs = cookieError{typ: usageError, msg: "no codecs provided"}
- errHashKeyNotSet = cookieError{typ: usageError, msg: "hash key is not set"}
- errBlockKeyNotSet = cookieError{typ: usageError, msg: "block key is not set"}
- errEncodedValueTooLong = cookieError{typ: usageError, msg: "the value is too long"}
-
- errValueToDecodeTooLong = cookieError{typ: decodeError, msg: "the value is too long"}
- errTimestampInvalid = cookieError{typ: decodeError, msg: "invalid timestamp"}
- errTimestampTooNew = cookieError{typ: decodeError, msg: "timestamp is too new"}
- errTimestampExpired = cookieError{typ: decodeError, msg: "expired timestamp"}
- errDecryptionFailed = cookieError{typ: decodeError, msg: "the value could not be decrypted"}
- errValueNotByte = cookieError{typ: decodeError, msg: "value not a []byte."}
- errValueNotBytePtr = cookieError{typ: decodeError, msg: "value not a pointer to []byte."}
-
- // ErrMacInvalid indicates that cookie decoding failed because the HMAC
- // could not be extracted and verified. Direct use of this error
- // variable is deprecated; it is public only for legacy compatibility,
- // and may be privatized in the future, as it is rarely useful to
- // distinguish between this error and other Error implementations.
- ErrMacInvalid = cookieError{typ: decodeError, msg: "the value is not valid"}
-)
-
-// Codec defines an interface to encode and decode cookie values.
-type Codec interface {
- Encode(name string, value interface{}) (string, error)
- Decode(name, value string, dst interface{}) error
-}
-
-// New returns a new SecureCookie.
-//
-// hashKey is required, used to authenticate values using HMAC. Create it using
-// GenerateRandomKey(). It is recommended to use a key with 32 or 64 bytes.
-//
-// blockKey is optional, used to encrypt values. Create it using
-// GenerateRandomKey(). The key length must correspond to the block size
-// of the encryption algorithm. For AES, used by default, valid lengths are
-// 16, 24, or 32 bytes to select AES-128, AES-192, or AES-256.
-// The default encoder used for cookie serialization is encoding/gob.
-//
-// Note that keys created using GenerateRandomKey() are not automatically
-// persisted. New keys will be created when the application is restarted, and
-// previously issued cookies will not be able to be decoded.
-func New(hashKey, blockKey []byte) *SecureCookie {
- s := &SecureCookie{
- hashKey: hashKey,
- blockKey: blockKey,
- hashFunc: sha256.New,
- maxAge: 86400 * 30,
- maxLength: 4096,
- sz: GobEncoder{},
- }
- if hashKey == nil {
- s.err = errHashKeyNotSet
- }
- if blockKey != nil {
- s.BlockFunc(aes.NewCipher)
- }
- return s
-}
-
-// SecureCookie encodes and decodes authenticated and optionally encrypted
-// cookie values.
-type SecureCookie struct {
- hashKey []byte
- hashFunc func() hash.Hash
- blockKey []byte
- block cipher.Block
- maxLength int
- maxAge int64
- minAge int64
- err error
- sz Serializer
- // For testing purposes, the function that returns the current timestamp.
- // If not set, it will use time.Now().UTC().Unix().
- timeFunc func() int64
-}
-
-// Serializer provides an interface for providing custom serializers for cookie
-// values.
-type Serializer interface {
- Serialize(src interface{}) ([]byte, error)
- Deserialize(src []byte, dst interface{}) error
-}
-
-// GobEncoder encodes cookie values using encoding/gob. This is the simplest
-// encoder and can handle complex types via gob.Register.
-type GobEncoder struct{}
-
-// JSONEncoder encodes cookie values using encoding/json. Users who wish to
-// encode complex types need to satisfy the json.Marshaller and
-// json.Unmarshaller interfaces.
-type JSONEncoder struct{}
-
-// NopEncoder does not encode cookie values, and instead simply accepts a []byte
-// (as an interface{}) and returns a []byte. This is particularly useful when
-// you encoding an object upstream and do not wish to re-encode it.
-type NopEncoder struct{}
-
-// MaxLength restricts the maximum length, in bytes, for the cookie value.
-//
-// Default is 4096, which is the maximum value accepted by Internet Explorer.
-func (s *SecureCookie) MaxLength(value int) *SecureCookie {
- s.maxLength = value
- return s
-}
-
-// MaxAge restricts the maximum age, in seconds, for the cookie value.
-//
-// Default is 86400 * 30. Set it to 0 for no restriction.
-func (s *SecureCookie) MaxAge(value int) *SecureCookie {
- s.maxAge = int64(value)
- return s
-}
-
-// MinAge restricts the minimum age, in seconds, for the cookie value.
-//
-// Default is 0 (no restriction).
-func (s *SecureCookie) MinAge(value int) *SecureCookie {
- s.minAge = int64(value)
- return s
-}
-
-// HashFunc sets the hash function used to create HMAC.
-//
-// Default is crypto/sha256.New.
-func (s *SecureCookie) HashFunc(f func() hash.Hash) *SecureCookie {
- s.hashFunc = f
- return s
-}
-
-// BlockFunc sets the encryption function used to create a cipher.Block.
-//
-// Default is crypto/aes.New.
-func (s *SecureCookie) BlockFunc(f func([]byte) (cipher.Block, error)) *SecureCookie {
- if s.blockKey == nil {
- s.err = errBlockKeyNotSet
- } else if block, err := f(s.blockKey); err == nil {
- s.block = block
- } else {
- s.err = cookieError{cause: err, typ: usageError}
- }
- return s
-}
-
-// Encoding sets the encoding/serialization method for cookies.
-//
-// Default is encoding/gob. To encode special structures using encoding/gob,
-// they must be registered first using gob.Register().
-func (s *SecureCookie) SetSerializer(sz Serializer) *SecureCookie {
- s.sz = sz
-
- return s
-}
-
-// Encode encodes a cookie value.
-//
-// It serializes, optionally encrypts, signs with a message authentication code,
-// and finally encodes the value.
-//
-// The name argument is the cookie name. It is stored with the encoded value.
-// The value argument is the value to be encoded. It can be any value that can
-// be encoded using the currently selected serializer; see SetSerializer().
-//
-// It is the client's responsibility to ensure that value, when encoded using
-// the current serialization/encryption settings on s and then base64-encoded,
-// is shorter than the maximum permissible length.
-func (s *SecureCookie) Encode(name string, value interface{}) (string, error) {
- if s.err != nil {
- return "", s.err
- }
- if s.hashKey == nil {
- s.err = errHashKeyNotSet
- return "", s.err
- }
- var err error
- var b []byte
- // 1. Serialize.
- if b, err = s.sz.Serialize(value); err != nil {
- return "", cookieError{cause: err, typ: usageError}
- }
- // 2. Encrypt (optional).
- if s.block != nil {
- if b, err = encrypt(s.block, b); err != nil {
- return "", cookieError{cause: err, typ: usageError}
- }
- }
- b = encode(b)
- // 3. Create MAC for "name|date|value". Extra pipe to be used later.
- b = []byte(fmt.Sprintf("%s|%d|%s|", name, s.timestamp(), b))
- mac := createMac(hmac.New(s.hashFunc, s.hashKey), b[:len(b)-1])
- // Append mac, remove name.
- b = append(b, mac...)[len(name)+1:]
- // 4. Encode to base64.
- b = encode(b)
- // 5. Check length.
- if s.maxLength != 0 && len(b) > s.maxLength {
- return "", errEncodedValueTooLong
- }
- // Done.
- return string(b), nil
-}
-
-// Decode decodes a cookie value.
-//
-// It decodes, verifies a message authentication code, optionally decrypts and
-// finally deserializes the value.
-//
-// The name argument is the cookie name. It must be the same name used when
-// it was stored. The value argument is the encoded cookie value. The dst
-// argument is where the cookie will be decoded. It must be a pointer.
-func (s *SecureCookie) Decode(name, value string, dst interface{}) error {
- if s.err != nil {
- return s.err
- }
- if s.hashKey == nil {
- s.err = errHashKeyNotSet
- return s.err
- }
- // 1. Check length.
- if s.maxLength != 0 && len(value) > s.maxLength {
- return errValueToDecodeTooLong
- }
- // 2. Decode from base64.
- b, err := decode([]byte(value))
- if err != nil {
- return err
- }
- // 3. Verify MAC. Value is "date|value|mac".
- parts := bytes.SplitN(b, []byte("|"), 3)
- if len(parts) != 3 {
- return ErrMacInvalid
- }
- h := hmac.New(s.hashFunc, s.hashKey)
- b = append([]byte(name+"|"), b[:len(b)-len(parts[2])-1]...)
- if err = verifyMac(h, b, parts[2]); err != nil {
- return err
- }
- // 4. Verify date ranges.
- var t1 int64
- if t1, err = strconv.ParseInt(string(parts[0]), 10, 64); err != nil {
- return errTimestampInvalid
- }
- t2 := s.timestamp()
- if s.minAge != 0 && t1 > t2-s.minAge {
- return errTimestampTooNew
- }
- if s.maxAge != 0 && t1 < t2-s.maxAge {
- return errTimestampExpired
- }
- // 5. Decrypt (optional).
- b, err = decode(parts[1])
- if err != nil {
- return err
- }
- if s.block != nil {
- if b, err = decrypt(s.block, b); err != nil {
- return err
- }
- }
- // 6. Deserialize.
- if err = s.sz.Deserialize(b, dst); err != nil {
- return cookieError{cause: err, typ: decodeError}
- }
- // Done.
- return nil
-}
-
-// timestamp returns the current timestamp, in seconds.
-//
-// For testing purposes, the function that generates the timestamp can be
-// overridden. If not set, it will return time.Now().UTC().Unix().
-func (s *SecureCookie) timestamp() int64 {
- if s.timeFunc == nil {
- return time.Now().UTC().Unix()
- }
- return s.timeFunc()
-}
-
-// Authentication -------------------------------------------------------------
-
-// createMac creates a message authentication code (MAC).
-func createMac(h hash.Hash, value []byte) []byte {
- h.Write(value)
- return h.Sum(nil)
-}
-
-// verifyMac verifies that a message authentication code (MAC) is valid.
-func verifyMac(h hash.Hash, value []byte, mac []byte) error {
- mac2 := createMac(h, value)
- // Check that both MACs are of equal length, as subtle.ConstantTimeCompare
- // does not do this prior to Go 1.4.
- if len(mac) == len(mac2) && subtle.ConstantTimeCompare(mac, mac2) == 1 {
- return nil
- }
- return ErrMacInvalid
-}
-
-// Encryption -----------------------------------------------------------------
-
-// encrypt encrypts a value using the given block in counter mode.
-//
-// A random initialization vector (http://goo.gl/zF67k) with the length of the
-// block size is prepended to the resulting ciphertext.
-func encrypt(block cipher.Block, value []byte) ([]byte, error) {
- iv := GenerateRandomKey(block.BlockSize())
- if iv == nil {
- return nil, errGeneratingIV
- }
- // Encrypt it.
- stream := cipher.NewCTR(block, iv)
- stream.XORKeyStream(value, value)
- // Return iv + ciphertext.
- return append(iv, value...), nil
-}
-
-// decrypt decrypts a value using the given block in counter mode.
-//
-// The value to be decrypted must be prepended by a initialization vector
-// (http://goo.gl/zF67k) with the length of the block size.
-func decrypt(block cipher.Block, value []byte) ([]byte, error) {
- size := block.BlockSize()
- if len(value) > size {
- // Extract iv.
- iv := value[:size]
- // Extract ciphertext.
- value = value[size:]
- // Decrypt it.
- stream := cipher.NewCTR(block, iv)
- stream.XORKeyStream(value, value)
- return value, nil
- }
- return nil, errDecryptionFailed
-}
-
-// Serialization --------------------------------------------------------------
-
-// Serialize encodes a value using gob.
-func (e GobEncoder) Serialize(src interface{}) ([]byte, error) {
- buf := new(bytes.Buffer)
- enc := gob.NewEncoder(buf)
- if err := enc.Encode(src); err != nil {
- return nil, cookieError{cause: err, typ: usageError}
- }
- return buf.Bytes(), nil
-}
-
-// Deserialize decodes a value using gob.
-func (e GobEncoder) Deserialize(src []byte, dst interface{}) error {
- dec := gob.NewDecoder(bytes.NewBuffer(src))
- if err := dec.Decode(dst); err != nil {
- return cookieError{cause: err, typ: decodeError}
- }
- return nil
-}
-
-// Serialize encodes a value using encoding/json.
-func (e JSONEncoder) Serialize(src interface{}) ([]byte, error) {
- buf := new(bytes.Buffer)
- enc := json.NewEncoder(buf)
- if err := enc.Encode(src); err != nil {
- return nil, cookieError{cause: err, typ: usageError}
- }
- return buf.Bytes(), nil
-}
-
-// Deserialize decodes a value using encoding/json.
-func (e JSONEncoder) Deserialize(src []byte, dst interface{}) error {
- dec := json.NewDecoder(bytes.NewReader(src))
- if err := dec.Decode(dst); err != nil {
- return cookieError{cause: err, typ: decodeError}
- }
- return nil
-}
-
-// Serialize passes a []byte through as-is.
-func (e NopEncoder) Serialize(src interface{}) ([]byte, error) {
- if b, ok := src.([]byte); ok {
- return b, nil
- }
-
- return nil, errValueNotByte
-}
-
-// Deserialize passes a []byte through as-is.
-func (e NopEncoder) Deserialize(src []byte, dst interface{}) error {
- if dat, ok := dst.(*[]byte); ok {
- *dat = src
- return nil
- }
- return errValueNotBytePtr
-}
-
-// Encoding -------------------------------------------------------------------
-
-// encode encodes a value using base64.
-func encode(value []byte) []byte {
- encoded := make([]byte, base64.URLEncoding.EncodedLen(len(value)))
- base64.URLEncoding.Encode(encoded, value)
- return encoded
-}
-
-// decode decodes a cookie using base64.
-func decode(value []byte) ([]byte, error) {
- decoded := make([]byte, base64.URLEncoding.DecodedLen(len(value)))
- b, err := base64.URLEncoding.Decode(decoded, value)
- if err != nil {
- return nil, cookieError{cause: err, typ: decodeError, msg: "base64 decode failed"}
- }
- return decoded[:b], nil
-}
-
-// Helpers --------------------------------------------------------------------
-
-// GenerateRandomKey creates a random key with the given length in bytes.
-// On failure, returns nil.
-//
-// Callers should explicitly check for the possibility of a nil return, treat
-// it as a failure of the system random number generator, and not continue.
-func GenerateRandomKey(length int) []byte {
- k := make([]byte, length)
- if _, err := io.ReadFull(rand.Reader, k); err != nil {
- return nil
- }
- return k
-}
-
-// CodecsFromPairs returns a slice of SecureCookie instances.
-//
-// It is a convenience function to create a list of codecs for key rotation. Note
-// that the generated Codecs will have the default options applied: callers
-// should iterate over each Codec and type-assert the underlying *SecureCookie to
-// change these.
-//
-// Example:
-//
-// codecs := securecookie.CodecsFromPairs(
-// []byte("new-hash-key"),
-// []byte("new-block-key"),
-// []byte("old-hash-key"),
-// []byte("old-block-key"),
-// )
-//
-// // Modify each instance.
-// for _, s := range codecs {
-// if cookie, ok := s.(*securecookie.SecureCookie); ok {
-// cookie.MaxAge(86400 * 7)
-// cookie.SetSerializer(securecookie.JSONEncoder{})
-// cookie.HashFunc(sha512.New512_256)
-// }
-// }
-//
-func CodecsFromPairs(keyPairs ...[]byte) []Codec {
- codecs := make([]Codec, len(keyPairs)/2+len(keyPairs)%2)
- for i := 0; i < len(keyPairs); i += 2 {
- var blockKey []byte
- if i+1 < len(keyPairs) {
- blockKey = keyPairs[i+1]
- }
- codecs[i/2] = New(keyPairs[i], blockKey)
- }
- return codecs
-}
-
-// EncodeMulti encodes a cookie value using a group of codecs.
-//
-// The codecs are tried in order. Multiple codecs are accepted to allow
-// key rotation.
-//
-// On error, may return a MultiError.
-func EncodeMulti(name string, value interface{}, codecs ...Codec) (string, error) {
- if len(codecs) == 0 {
- return "", errNoCodecs
- }
-
- var errors MultiError
- for _, codec := range codecs {
- encoded, err := codec.Encode(name, value)
- if err == nil {
- return encoded, nil
- }
- errors = append(errors, err)
- }
- return "", errors
-}
-
-// DecodeMulti decodes a cookie value using a group of codecs.
-//
-// The codecs are tried in order. Multiple codecs are accepted to allow
-// key rotation.
-//
-// On error, may return a MultiError.
-func DecodeMulti(name string, value string, dst interface{}, codecs ...Codec) error {
- if len(codecs) == 0 {
- return errNoCodecs
- }
-
- var errors MultiError
- for _, codec := range codecs {
- err := codec.Decode(name, value, dst)
- if err == nil {
- return nil
- }
- errors = append(errors, err)
- }
- return errors
-}
-
-// MultiError groups multiple errors.
-type MultiError []error
-
-func (m MultiError) IsUsage() bool { return m.any(func(e Error) bool { return e.IsUsage() }) }
-func (m MultiError) IsDecode() bool { return m.any(func(e Error) bool { return e.IsDecode() }) }
-func (m MultiError) IsInternal() bool { return m.any(func(e Error) bool { return e.IsInternal() }) }
-
-// Cause returns nil for MultiError; there is no unique underlying cause in the
-// general case.
-//
-// Note: we could conceivably return a non-nil Cause only when there is exactly
-// one child error with a Cause. However, it would be brittle for client code
-// to rely on the arity of causes inside a MultiError, so we have opted not to
-// provide this functionality. Clients which really wish to access the Causes
-// of the underlying errors are free to iterate through the errors themselves.
-func (m MultiError) Cause() error { return nil }
-
-func (m MultiError) Error() string {
- s, n := "", 0
- for _, e := range m {
- if e != nil {
- if n == 0 {
- s = e.Error()
- }
- n++
- }
- }
- switch n {
- case 0:
- return "(0 errors)"
- case 1:
- return s
- case 2:
- return s + " (and 1 other error)"
- }
- return fmt.Sprintf("%s (and %d other errors)", s, n-1)
-}
-
-// any returns true if any element of m is an Error for which pred returns true.
-func (m MultiError) any(pred func(Error) bool) bool {
- for _, e := range m {
- if ourErr, ok := e.(Error); ok && pred(ourErr) {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/gorilla/sessions/LICENSE b/vendor/github.com/gorilla/sessions/LICENSE
deleted file mode 100644
index 0e5fb87..0000000
--- a/vendor/github.com/gorilla/sessions/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/gorilla/sessions/README.md b/vendor/github.com/gorilla/sessions/README.md
deleted file mode 100644
index ebc60d0..0000000
--- a/vendor/github.com/gorilla/sessions/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-sessions
-========
-[![GoDoc](https://godoc.org/github.com/gorilla/sessions?status.svg)](https://godoc.org/github.com/gorilla/sessions) [![Build Status](https://travis-ci.org/gorilla/sessions.png?branch=master)](https://travis-ci.org/gorilla/sessions)
-[![Sourcegraph](https://sourcegraph.com/github.com/gorilla/sessions/-/badge.svg)](https://sourcegraph.com/github.com/gorilla/sessions?badge)
-
-
-gorilla/sessions provides cookie and filesystem sessions and infrastructure for
-custom session backends.
-
-The key features are:
-
-* Simple API: use it as an easy way to set signed (and optionally
- encrypted) cookies.
-* Built-in backends to store sessions in cookies or the filesystem.
-* Flash messages: session values that last until read.
-* Convenient way to switch session persistency (aka "remember me") and set
- other attributes.
-* Mechanism to rotate authentication and encryption keys.
-* Multiple sessions per request, even using different backends.
-* Interfaces and infrastructure for custom session backends: sessions from
- different stores can be retrieved and batch-saved using a common API.
-
-Let's start with an example that shows the sessions API in a nutshell:
-
-```go
- import (
- "net/http"
- "github.com/gorilla/sessions"
- )
-
- var store = sessions.NewCookieStore([]byte("something-very-secret"))
-
- func MyHandler(w http.ResponseWriter, r *http.Request) {
- // Get a session. We're ignoring the error resulted from decoding an
- // existing session: Get() always returns a session, even if empty.
- session, _ := store.Get(r, "session-name")
- // Set some session values.
- session.Values["foo"] = "bar"
- session.Values[42] = 43
- // Save it before we write to the response/return from the handler.
- session.Save(r, w)
- }
-```
-
-First we initialize a session store calling `NewCookieStore()` and passing a
-secret key used to authenticate the session. Inside the handler, we call
-`store.Get()` to retrieve an existing session or a new one. Then we set some
-session values in session.Values, which is a `map[interface{}]interface{}`.
-And finally we call `session.Save()` to save the session in the response.
-
-Important Note: If you aren't using gorilla/mux, you need to wrap your handlers
-with
-[`context.ClearHandler`](http://www.gorillatoolkit.org/pkg/context#ClearHandler)
-as or else you will leak memory! An easy way to do this is to wrap the top-level
-mux when calling http.ListenAndServe:
-
-```go
- http.ListenAndServe(":8080", context.ClearHandler(http.DefaultServeMux))
-```
-
-The ClearHandler function is provided by the gorilla/context package.
-
-More examples are available [on the Gorilla
-website](http://www.gorillatoolkit.org/pkg/sessions).
-
-## Store Implementations
-
-Other implementations of the `sessions.Store` interface:
-
-* [github.com/starJammer/gorilla-sessions-arangodb](https://github.com/starJammer/gorilla-sessions-arangodb) - ArangoDB
-* [github.com/yosssi/boltstore](https://github.com/yosssi/boltstore) - Bolt
-* [github.com/srinathgs/couchbasestore](https://github.com/srinathgs/couchbasestore) - Couchbase
-* [github.com/denizeren/dynamostore](https://github.com/denizeren/dynamostore) - Dynamodb on AWS
-* [github.com/savaki/dynastore](https://github.com/savaki/dynastore) - DynamoDB on AWS (Official AWS library)
-* [github.com/bradleypeabody/gorilla-sessions-memcache](https://github.com/bradleypeabody/gorilla-sessions-memcache) - Memcache
-* [github.com/dsoprea/go-appengine-sessioncascade](https://github.com/dsoprea/go-appengine-sessioncascade) - Memcache/Datastore/Context in AppEngine
-* [github.com/kidstuff/mongostore](https://github.com/kidstuff/mongostore) - MongoDB
-* [github.com/srinathgs/mysqlstore](https://github.com/srinathgs/mysqlstore) - MySQL
-* [github.com/EnumApps/clustersqlstore](https://github.com/EnumApps/clustersqlstore) - MySQL Cluster
-* [github.com/antonlindstrom/pgstore](https://github.com/antonlindstrom/pgstore) - PostgreSQL
-* [github.com/boj/redistore](https://github.com/boj/redistore) - Redis
-* [github.com/boj/rethinkstore](https://github.com/boj/rethinkstore) - RethinkDB
-* [github.com/boj/riakstore](https://github.com/boj/riakstore) - Riak
-* [github.com/michaeljs1990/sqlitestore](https://github.com/michaeljs1990/sqlitestore) - SQLite
-* [github.com/wader/gormstore](https://github.com/wader/gormstore) - GORM (MySQL, PostgreSQL, SQLite)
-* [github.com/gernest/qlstore](https://github.com/gernest/qlstore) - ql
-
-## License
-
-BSD licensed. See the LICENSE file for details.
diff --git a/vendor/github.com/gorilla/sessions/doc.go b/vendor/github.com/gorilla/sessions/doc.go
deleted file mode 100644
index 591d932..0000000
--- a/vendor/github.com/gorilla/sessions/doc.go
+++ /dev/null
@@ -1,198 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-Package sessions provides cookie and filesystem sessions and
-infrastructure for custom session backends.
-
-The key features are:
-
- * Simple API: use it as an easy way to set signed (and optionally
- encrypted) cookies.
- * Built-in backends to store sessions in cookies or the filesystem.
- * Flash messages: session values that last until read.
- * Convenient way to switch session persistency (aka "remember me") and set
- other attributes.
- * Mechanism to rotate authentication and encryption keys.
- * Multiple sessions per request, even using different backends.
- * Interfaces and infrastructure for custom session backends: sessions from
- different stores can be retrieved and batch-saved using a common API.
-
-Let's start with an example that shows the sessions API in a nutshell:
-
- import (
- "net/http"
- "github.com/gorilla/sessions"
- )
-
- var store = sessions.NewCookieStore([]byte("something-very-secret"))
-
- func MyHandler(w http.ResponseWriter, r *http.Request) {
- // Get a session. Get() always returns a session, even if empty.
- session, err := store.Get(r, "session-name")
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- // Set some session values.
- session.Values["foo"] = "bar"
- session.Values[42] = 43
- // Save it before we write to the response/return from the handler.
- session.Save(r, w)
- }
-
-First we initialize a session store calling NewCookieStore() and passing a
-secret key used to authenticate the session. Inside the handler, we call
-store.Get() to retrieve an existing session or a new one. Then we set some
-session values in session.Values, which is a map[interface{}]interface{}.
-And finally we call session.Save() to save the session in the response.
-
-Note that in production code, we should check for errors when calling
-session.Save(r, w), and either display an error message or otherwise handle it.
-
-Save must be called before writing to the response, otherwise the session
-cookie will not be sent to the client.
-
-Important Note: If you aren't using gorilla/mux, you need to wrap your handlers
-with context.ClearHandler as or else you will leak memory! An easy way to do this
-is to wrap the top-level mux when calling http.ListenAndServe:
-
- http.ListenAndServe(":8080", context.ClearHandler(http.DefaultServeMux))
-
-The ClearHandler function is provided by the gorilla/context package.
-
-That's all you need to know for the basic usage. Let's take a look at other
-options, starting with flash messages.
-
-Flash messages are session values that last until read. The term appeared with
-Ruby On Rails a few years back. When we request a flash message, it is removed
-from the session. To add a flash, call session.AddFlash(), and to get all
-flashes, call session.Flashes(). Here is an example:
-
- func MyHandler(w http.ResponseWriter, r *http.Request) {
- // Get a session.
- session, err := store.Get(r, "session-name")
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- // Get the previously flashes, if any.
- if flashes := session.Flashes(); len(flashes) > 0 {
- // Use the flash values.
- } else {
- // Set a new flash.
- session.AddFlash("Hello, flash messages world!")
- }
- session.Save(r, w)
- }
-
-Flash messages are useful to set information to be read after a redirection,
-like after form submissions.
-
-There may also be cases where you want to store a complex datatype within a
-session, such as a struct. Sessions are serialised using the encoding/gob package,
-so it is easy to register new datatypes for storage in sessions:
-
- import(
- "encoding/gob"
- "github.com/gorilla/sessions"
- )
-
- type Person struct {
- FirstName string
- LastName string
- Email string
- Age int
- }
-
- type M map[string]interface{}
-
- func init() {
-
- gob.Register(&Person{})
- gob.Register(&M{})
- }
-
-As it's not possible to pass a raw type as a parameter to a function, gob.Register()
-relies on us passing it a value of the desired type. In the example above we've passed
-it a pointer to a struct and a pointer to a custom type representing a
-map[string]interface. (We could have passed non-pointer values if we wished.) This will
-then allow us to serialise/deserialise values of those types to and from our sessions.
-
-Note that because session values are stored in a map[string]interface{}, there's
-a need to type-assert data when retrieving it. We'll use the Person struct we registered above:
-
- func MyHandler(w http.ResponseWriter, r *http.Request) {
- session, err := store.Get(r, "session-name")
- if err != nil {
- http.Error(w, err.Error(), http.StatusInternalServerError)
- return
- }
-
- // Retrieve our struct and type-assert it
- val := session.Values["person"]
- var person = &Person{}
- if person, ok := val.(*Person); !ok {
- // Handle the case that it's not an expected type
- }
-
- // Now we can use our person object
- }
-
-By default, session cookies last for a month. This is probably too long for
-some cases, but it is easy to change this and other attributes during
-runtime. Sessions can be configured individually or the store can be
-configured and then all sessions saved using it will use that configuration.
-We access session.Options or store.Options to set a new configuration. The
-fields are basically a subset of http.Cookie fields. Let's change the
-maximum age of a session to one week:
-
- session.Options = &sessions.Options{
- Path: "/",
- MaxAge: 86400 * 7,
- HttpOnly: true,
- }
-
-Sometimes we may want to change authentication and/or encryption keys without
-breaking existing sessions. The CookieStore supports key rotation, and to use
-it you just need to set multiple authentication and encryption keys, in pairs,
-to be tested in order:
-
- var store = sessions.NewCookieStore(
- []byte("new-authentication-key"),
- []byte("new-encryption-key"),
- []byte("old-authentication-key"),
- []byte("old-encryption-key"),
- )
-
-New sessions will be saved using the first pair. Old sessions can still be
-read because the first pair will fail, and the second will be tested. This
-makes it easy to "rotate" secret keys and still be able to validate existing
-sessions. Note: for all pairs the encryption key is optional; set it to nil
-or omit it and and encryption won't be used.
-
-Multiple sessions can be used in the same request, even with different
-session backends. When this happens, calling Save() on each session
-individually would be cumbersome, so we have a way to save all sessions
-at once: it's sessions.Save(). Here's an example:
-
- var store = sessions.NewCookieStore([]byte("something-very-secret"))
-
- func MyHandler(w http.ResponseWriter, r *http.Request) {
- // Get a session and set a value.
- session1, _ := store.Get(r, "session-one")
- session1.Values["foo"] = "bar"
- // Get another session and set another value.
- session2, _ := store.Get(r, "session-two")
- session2.Values[42] = 43
- // Save all sessions.
- sessions.Save(r, w)
- }
-
-This is possible because when we call Get() from a session store, it adds the
-session to a common registry. Save() uses it to save all registered sessions.
-*/
-package sessions
diff --git a/vendor/github.com/gorilla/sessions/lex.go b/vendor/github.com/gorilla/sessions/lex.go
deleted file mode 100644
index 4bbbe10..0000000
--- a/vendor/github.com/gorilla/sessions/lex.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// This file contains code adapted from the Go standard library
-// https://github.com/golang/go/blob/39ad0fd0789872f9469167be7fe9578625ff246e/src/net/http/lex.go
-
-package sessions
-
-import "strings"
-
-var isTokenTable = [127]bool{
- '!': true,
- '#': true,
- '$': true,
- '%': true,
- '&': true,
- '\'': true,
- '*': true,
- '+': true,
- '-': true,
- '.': true,
- '0': true,
- '1': true,
- '2': true,
- '3': true,
- '4': true,
- '5': true,
- '6': true,
- '7': true,
- '8': true,
- '9': true,
- 'A': true,
- 'B': true,
- 'C': true,
- 'D': true,
- 'E': true,
- 'F': true,
- 'G': true,
- 'H': true,
- 'I': true,
- 'J': true,
- 'K': true,
- 'L': true,
- 'M': true,
- 'N': true,
- 'O': true,
- 'P': true,
- 'Q': true,
- 'R': true,
- 'S': true,
- 'T': true,
- 'U': true,
- 'W': true,
- 'V': true,
- 'X': true,
- 'Y': true,
- 'Z': true,
- '^': true,
- '_': true,
- '`': true,
- 'a': true,
- 'b': true,
- 'c': true,
- 'd': true,
- 'e': true,
- 'f': true,
- 'g': true,
- 'h': true,
- 'i': true,
- 'j': true,
- 'k': true,
- 'l': true,
- 'm': true,
- 'n': true,
- 'o': true,
- 'p': true,
- 'q': true,
- 'r': true,
- 's': true,
- 't': true,
- 'u': true,
- 'v': true,
- 'w': true,
- 'x': true,
- 'y': true,
- 'z': true,
- '|': true,
- '~': true,
-}
-
-func isToken(r rune) bool {
- i := int(r)
- return i < len(isTokenTable) && isTokenTable[i]
-}
-
-func isNotToken(r rune) bool {
- return !isToken(r)
-}
-
-func isCookieNameValid(raw string) bool {
- if raw == "" {
- return false
- }
- return strings.IndexFunc(raw, isNotToken) < 0
-}
diff --git a/vendor/github.com/gorilla/sessions/sessions.go b/vendor/github.com/gorilla/sessions/sessions.go
deleted file mode 100644
index fe0d2bc..0000000
--- a/vendor/github.com/gorilla/sessions/sessions.go
+++ /dev/null
@@ -1,241 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package sessions
-
-import (
- "encoding/gob"
- "fmt"
- "net/http"
- "time"
-
- "github.com/gorilla/context"
-)
-
-// Default flashes key.
-const flashesKey = "_flash"
-
-// Options --------------------------------------------------------------------
-
-// Options stores configuration for a session or session store.
-//
-// Fields are a subset of http.Cookie fields.
-type Options struct {
- Path string
- Domain string
- // MaxAge=0 means no 'Max-Age' attribute specified.
- // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'.
- // MaxAge>0 means Max-Age attribute present and given in seconds.
- MaxAge int
- Secure bool
- HttpOnly bool
-}
-
-// Session --------------------------------------------------------------------
-
-// NewSession is called by session stores to create a new session instance.
-func NewSession(store Store, name string) *Session {
- return &Session{
- Values: make(map[interface{}]interface{}),
- store: store,
- name: name,
- }
-}
-
-// Session stores the values and optional configuration for a session.
-type Session struct {
- // The ID of the session, generated by stores. It should not be used for
- // user data.
- ID string
- // Values contains the user-data for the session.
- Values map[interface{}]interface{}
- Options *Options
- IsNew bool
- store Store
- name string
-}
-
-// Flashes returns a slice of flash messages from the session.
-//
-// A single variadic argument is accepted, and it is optional: it defines
-// the flash key. If not defined "_flash" is used by default.
-func (s *Session) Flashes(vars ...string) []interface{} {
- var flashes []interface{}
- key := flashesKey
- if len(vars) > 0 {
- key = vars[0]
- }
- if v, ok := s.Values[key]; ok {
- // Drop the flashes and return it.
- delete(s.Values, key)
- flashes = v.([]interface{})
- }
- return flashes
-}
-
-// AddFlash adds a flash message to the session.
-//
-// A single variadic argument is accepted, and it is optional: it defines
-// the flash key. If not defined "_flash" is used by default.
-func (s *Session) AddFlash(value interface{}, vars ...string) {
- key := flashesKey
- if len(vars) > 0 {
- key = vars[0]
- }
- var flashes []interface{}
- if v, ok := s.Values[key]; ok {
- flashes = v.([]interface{})
- }
- s.Values[key] = append(flashes, value)
-}
-
-// Save is a convenience method to save this session. It is the same as calling
-// store.Save(request, response, session). You should call Save before writing to
-// the response or returning from the handler.
-func (s *Session) Save(r *http.Request, w http.ResponseWriter) error {
- return s.store.Save(r, w, s)
-}
-
-// Name returns the name used to register the session.
-func (s *Session) Name() string {
- return s.name
-}
-
-// Store returns the session store used to register the session.
-func (s *Session) Store() Store {
- return s.store
-}
-
-// Registry -------------------------------------------------------------------
-
-// sessionInfo stores a session tracked by the registry.
-type sessionInfo struct {
- s *Session
- e error
-}
-
-// contextKey is the type used to store the registry in the context.
-type contextKey int
-
-// registryKey is the key used to store the registry in the context.
-const registryKey contextKey = 0
-
-// GetRegistry returns a registry instance for the current request.
-func GetRegistry(r *http.Request) *Registry {
- registry := context.Get(r, registryKey)
- if registry != nil {
- return registry.(*Registry)
- }
- newRegistry := &Registry{
- request: r,
- sessions: make(map[string]sessionInfo),
- }
- context.Set(r, registryKey, newRegistry)
- return newRegistry
-}
-
-// Registry stores sessions used during a request.
-type Registry struct {
- request *http.Request
- sessions map[string]sessionInfo
-}
-
-// Get registers and returns a session for the given name and session store.
-//
-// It returns a new session if there are no sessions registered for the name.
-func (s *Registry) Get(store Store, name string) (session *Session, err error) {
- if !isCookieNameValid(name) {
- return nil, fmt.Errorf("sessions: invalid character in cookie name: %s", name)
- }
- if info, ok := s.sessions[name]; ok {
- session, err = info.s, info.e
- } else {
- session, err = store.New(s.request, name)
- session.name = name
- s.sessions[name] = sessionInfo{s: session, e: err}
- }
- session.store = store
- return
-}
-
-// Save saves all sessions registered for the current request.
-func (s *Registry) Save(w http.ResponseWriter) error {
- var errMulti MultiError
- for name, info := range s.sessions {
- session := info.s
- if session.store == nil {
- errMulti = append(errMulti, fmt.Errorf(
- "sessions: missing store for session %q", name))
- } else if err := session.store.Save(s.request, w, session); err != nil {
- errMulti = append(errMulti, fmt.Errorf(
- "sessions: error saving session %q -- %v", name, err))
- }
- }
- if errMulti != nil {
- return errMulti
- }
- return nil
-}
-
-// Helpers --------------------------------------------------------------------
-
-func init() {
- gob.Register([]interface{}{})
-}
-
-// Save saves all sessions used during the current request.
-func Save(r *http.Request, w http.ResponseWriter) error {
- return GetRegistry(r).Save(w)
-}
-
-// NewCookie returns an http.Cookie with the options set. It also sets
-// the Expires field calculated based on the MaxAge value, for Internet
-// Explorer compatibility.
-func NewCookie(name, value string, options *Options) *http.Cookie {
- cookie := &http.Cookie{
- Name: name,
- Value: value,
- Path: options.Path,
- Domain: options.Domain,
- MaxAge: options.MaxAge,
- Secure: options.Secure,
- HttpOnly: options.HttpOnly,
- }
- if options.MaxAge > 0 {
- d := time.Duration(options.MaxAge) * time.Second
- cookie.Expires = time.Now().Add(d)
- } else if options.MaxAge < 0 {
- // Set it to the past to expire now.
- cookie.Expires = time.Unix(1, 0)
- }
- return cookie
-}
-
-// Error ----------------------------------------------------------------------
-
-// MultiError stores multiple errors.
-//
-// Borrowed from the App Engine SDK.
-type MultiError []error
-
-func (m MultiError) Error() string {
- s, n := "", 0
- for _, e := range m {
- if e != nil {
- if n == 0 {
- s = e.Error()
- }
- n++
- }
- }
- switch n {
- case 0:
- return "(0 errors)"
- case 1:
- return s
- case 2:
- return s + " (and 1 other error)"
- }
- return fmt.Sprintf("%s (and %d other errors)", s, n-1)
-}
diff --git a/vendor/github.com/gorilla/sessions/store.go b/vendor/github.com/gorilla/sessions/store.go
deleted file mode 100644
index 4ff6b6c..0000000
--- a/vendor/github.com/gorilla/sessions/store.go
+++ /dev/null
@@ -1,295 +0,0 @@
-// Copyright 2012 The Gorilla Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package sessions
-
-import (
- "encoding/base32"
- "io/ioutil"
- "net/http"
- "os"
- "path/filepath"
- "strings"
- "sync"
-
- "github.com/gorilla/securecookie"
-)
-
-// Store is an interface for custom session stores.
-//
-// See CookieStore and FilesystemStore for examples.
-type Store interface {
- // Get should return a cached session.
- Get(r *http.Request, name string) (*Session, error)
-
- // New should create and return a new session.
- //
- // Note that New should never return a nil session, even in the case of
- // an error if using the Registry infrastructure to cache the session.
- New(r *http.Request, name string) (*Session, error)
-
- // Save should persist session to the underlying store implementation.
- Save(r *http.Request, w http.ResponseWriter, s *Session) error
-}
-
-// CookieStore ----------------------------------------------------------------
-
-// NewCookieStore returns a new CookieStore.
-//
-// Keys are defined in pairs to allow key rotation, but the common case is
-// to set a single authentication key and optionally an encryption key.
-//
-// The first key in a pair is used for authentication and the second for
-// encryption. The encryption key can be set to nil or omitted in the last
-// pair, but the authentication key is required in all pairs.
-//
-// It is recommended to use an authentication key with 32 or 64 bytes.
-// The encryption key, if set, must be either 16, 24, or 32 bytes to select
-// AES-128, AES-192, or AES-256 modes.
-//
-// Use the convenience function securecookie.GenerateRandomKey() to create
-// strong keys.
-func NewCookieStore(keyPairs ...[]byte) *CookieStore {
- cs := &CookieStore{
- Codecs: securecookie.CodecsFromPairs(keyPairs...),
- Options: &Options{
- Path: "/",
- MaxAge: 86400 * 30,
- },
- }
-
- cs.MaxAge(cs.Options.MaxAge)
- return cs
-}
-
-// CookieStore stores sessions using secure cookies.
-type CookieStore struct {
- Codecs []securecookie.Codec
- Options *Options // default configuration
-}
-
-// Get returns a session for the given name after adding it to the registry.
-//
-// It returns a new session if the sessions doesn't exist. Access IsNew on
-// the session to check if it is an existing session or a new one.
-//
-// It returns a new session and an error if the session exists but could
-// not be decoded.
-func (s *CookieStore) Get(r *http.Request, name string) (*Session, error) {
- return GetRegistry(r).Get(s, name)
-}
-
-// New returns a session for the given name without adding it to the registry.
-//
-// The difference between New() and Get() is that calling New() twice will
-// decode the session data twice, while Get() registers and reuses the same
-// decoded session after the first call.
-func (s *CookieStore) New(r *http.Request, name string) (*Session, error) {
- session := NewSession(s, name)
- opts := *s.Options
- session.Options = &opts
- session.IsNew = true
- var err error
- if c, errCookie := r.Cookie(name); errCookie == nil {
- err = securecookie.DecodeMulti(name, c.Value, &session.Values,
- s.Codecs...)
- if err == nil {
- session.IsNew = false
- }
- }
- return session, err
-}
-
-// Save adds a single session to the response.
-func (s *CookieStore) Save(r *http.Request, w http.ResponseWriter,
- session *Session) error {
- encoded, err := securecookie.EncodeMulti(session.Name(), session.Values,
- s.Codecs...)
- if err != nil {
- return err
- }
- http.SetCookie(w, NewCookie(session.Name(), encoded, session.Options))
- return nil
-}
-
-// MaxAge sets the maximum age for the store and the underlying cookie
-// implementation. Individual sessions can be deleted by setting Options.MaxAge
-// = -1 for that session.
-func (s *CookieStore) MaxAge(age int) {
- s.Options.MaxAge = age
-
- // Set the maxAge for each securecookie instance.
- for _, codec := range s.Codecs {
- if sc, ok := codec.(*securecookie.SecureCookie); ok {
- sc.MaxAge(age)
- }
- }
-}
-
-// FilesystemStore ------------------------------------------------------------
-
-var fileMutex sync.RWMutex
-
-// NewFilesystemStore returns a new FilesystemStore.
-//
-// The path argument is the directory where sessions will be saved. If empty
-// it will use os.TempDir().
-//
-// See NewCookieStore() for a description of the other parameters.
-func NewFilesystemStore(path string, keyPairs ...[]byte) *FilesystemStore {
- if path == "" {
- path = os.TempDir()
- }
- fs := &FilesystemStore{
- Codecs: securecookie.CodecsFromPairs(keyPairs...),
- Options: &Options{
- Path: "/",
- MaxAge: 86400 * 30,
- },
- path: path,
- }
-
- fs.MaxAge(fs.Options.MaxAge)
- return fs
-}
-
-// FilesystemStore stores sessions in the filesystem.
-//
-// It also serves as a reference for custom stores.
-//
-// This store is still experimental and not well tested. Feedback is welcome.
-type FilesystemStore struct {
- Codecs []securecookie.Codec
- Options *Options // default configuration
- path string
-}
-
-// MaxLength restricts the maximum length of new sessions to l.
-// If l is 0 there is no limit to the size of a session, use with caution.
-// The default for a new FilesystemStore is 4096.
-func (s *FilesystemStore) MaxLength(l int) {
- for _, c := range s.Codecs {
- if codec, ok := c.(*securecookie.SecureCookie); ok {
- codec.MaxLength(l)
- }
- }
-}
-
-// Get returns a session for the given name after adding it to the registry.
-//
-// See CookieStore.Get().
-func (s *FilesystemStore) Get(r *http.Request, name string) (*Session, error) {
- return GetRegistry(r).Get(s, name)
-}
-
-// New returns a session for the given name without adding it to the registry.
-//
-// See CookieStore.New().
-func (s *FilesystemStore) New(r *http.Request, name string) (*Session, error) {
- session := NewSession(s, name)
- opts := *s.Options
- session.Options = &opts
- session.IsNew = true
- var err error
- if c, errCookie := r.Cookie(name); errCookie == nil {
- err = securecookie.DecodeMulti(name, c.Value, &session.ID, s.Codecs...)
- if err == nil {
- err = s.load(session)
- if err == nil {
- session.IsNew = false
- }
- }
- }
- return session, err
-}
-
-// Save adds a single session to the response.
-//
-// If the Options.MaxAge of the session is <= 0 then the session file will be
-// deleted from the store path. With this process it enforces the properly
-// session cookie handling so no need to trust in the cookie management in the
-// web browser.
-func (s *FilesystemStore) Save(r *http.Request, w http.ResponseWriter,
- session *Session) error {
- // Delete if max-age is <= 0
- if session.Options.MaxAge <= 0 {
- if err := s.erase(session); err != nil {
- return err
- }
- http.SetCookie(w, NewCookie(session.Name(), "", session.Options))
- return nil
- }
-
- if session.ID == "" {
- // Because the ID is used in the filename, encode it to
- // use alphanumeric characters only.
- session.ID = strings.TrimRight(
- base32.StdEncoding.EncodeToString(
- securecookie.GenerateRandomKey(32)), "=")
- }
- if err := s.save(session); err != nil {
- return err
- }
- encoded, err := securecookie.EncodeMulti(session.Name(), session.ID,
- s.Codecs...)
- if err != nil {
- return err
- }
- http.SetCookie(w, NewCookie(session.Name(), encoded, session.Options))
- return nil
-}
-
-// MaxAge sets the maximum age for the store and the underlying cookie
-// implementation. Individual sessions can be deleted by setting Options.MaxAge
-// = -1 for that session.
-func (s *FilesystemStore) MaxAge(age int) {
- s.Options.MaxAge = age
-
- // Set the maxAge for each securecookie instance.
- for _, codec := range s.Codecs {
- if sc, ok := codec.(*securecookie.SecureCookie); ok {
- sc.MaxAge(age)
- }
- }
-}
-
-// save writes encoded session.Values to a file.
-func (s *FilesystemStore) save(session *Session) error {
- encoded, err := securecookie.EncodeMulti(session.Name(), session.Values,
- s.Codecs...)
- if err != nil {
- return err
- }
- filename := filepath.Join(s.path, "session_"+session.ID)
- fileMutex.Lock()
- defer fileMutex.Unlock()
- return ioutil.WriteFile(filename, []byte(encoded), 0600)
-}
-
-// load reads a file and decodes its content into session.Values.
-func (s *FilesystemStore) load(session *Session) error {
- filename := filepath.Join(s.path, "session_"+session.ID)
- fileMutex.RLock()
- defer fileMutex.RUnlock()
- fdata, err := ioutil.ReadFile(filename)
- if err != nil {
- return err
- }
- if err = securecookie.DecodeMulti(session.Name(), string(fdata),
- &session.Values, s.Codecs...); err != nil {
- return err
- }
- return nil
-}
-
-// delete session file
-func (s *FilesystemStore) erase(session *Session) error {
- filename := filepath.Join(s.path, "session_"+session.ID)
-
- fileMutex.RLock()
- defer fileMutex.RUnlock()
-
- err := os.Remove(filename)
- return err
-}
diff --git a/vendor/github.com/gorilla/websocket/AUTHORS b/vendor/github.com/gorilla/websocket/AUTHORS
deleted file mode 100644
index b003eca..0000000
--- a/vendor/github.com/gorilla/websocket/AUTHORS
+++ /dev/null
@@ -1,8 +0,0 @@
-# This is the official list of Gorilla WebSocket authors for copyright
-# purposes.
-#
-# Please keep the list sorted.
-
-Gary Burd
-Joachim Bauch
-
diff --git a/vendor/github.com/gorilla/websocket/LICENSE b/vendor/github.com/gorilla/websocket/LICENSE
deleted file mode 100644
index 9171c97..0000000
--- a/vendor/github.com/gorilla/websocket/LICENSE
+++ /dev/null
@@ -1,22 +0,0 @@
-Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/gorilla/websocket/README.md b/vendor/github.com/gorilla/websocket/README.md
deleted file mode 100644
index 33c3d2b..0000000
--- a/vendor/github.com/gorilla/websocket/README.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Gorilla WebSocket
-
-Gorilla WebSocket is a [Go](http://golang.org/) implementation of the
-[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol.
-
-[![Build Status](https://travis-ci.org/gorilla/websocket.svg?branch=master)](https://travis-ci.org/gorilla/websocket)
-[![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket)
-
-### Documentation
-
-* [API Reference](http://godoc.org/github.com/gorilla/websocket)
-* [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat)
-* [Command example](https://github.com/gorilla/websocket/tree/master/examples/command)
-* [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo)
-* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch)
-
-### Status
-
-The Gorilla WebSocket package provides a complete and tested implementation of
-the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. The
-package API is stable.
-
-### Installation
-
- go get github.com/gorilla/websocket
-
-### Protocol Compliance
-
-The Gorilla WebSocket package passes the server tests in the [Autobahn Test
-Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn
-subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn).
-
-### Gorilla WebSocket compared with other packages
-
-
-
-Notes:
-
-1. Large messages are fragmented in [Chrome's new WebSocket implementation](http://www.ietf.org/mail-archive/web/hybi/current/msg10503.html).
-2. The application can get the type of a received data message by implementing
- a [Codec marshal](http://godoc.org/golang.org/x/net/websocket#Codec.Marshal)
- function.
-3. The go.net io.Reader and io.Writer operate across WebSocket frame boundaries.
- Read returns when the input buffer is full or a frame boundary is
- encountered. Each call to Write sends a single frame message. The Gorilla
- io.Reader and io.WriteCloser operate on a single WebSocket message.
-
diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go
deleted file mode 100644
index 43a87c7..0000000
--- a/vendor/github.com/gorilla/websocket/client.go
+++ /dev/null
@@ -1,392 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bufio"
- "bytes"
- "crypto/tls"
- "encoding/base64"
- "errors"
- "io"
- "io/ioutil"
- "net"
- "net/http"
- "net/url"
- "strings"
- "time"
-)
-
-// ErrBadHandshake is returned when the server response to opening handshake is
-// invalid.
-var ErrBadHandshake = errors.New("websocket: bad handshake")
-
-var errInvalidCompression = errors.New("websocket: invalid compression negotiation")
-
-// NewClient creates a new client connection using the given net connection.
-// The URL u specifies the host and request URI. Use requestHeader to specify
-// the origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies
-// (Cookie). Use the response.Header to get the selected subprotocol
-// (Sec-WebSocket-Protocol) and cookies (Set-Cookie).
-//
-// If the WebSocket handshake fails, ErrBadHandshake is returned along with a
-// non-nil *http.Response so that callers can handle redirects, authentication,
-// etc.
-//
-// Deprecated: Use Dialer instead.
-func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufSize, writeBufSize int) (c *Conn, response *http.Response, err error) {
- d := Dialer{
- ReadBufferSize: readBufSize,
- WriteBufferSize: writeBufSize,
- NetDial: func(net, addr string) (net.Conn, error) {
- return netConn, nil
- },
- }
- return d.Dial(u.String(), requestHeader)
-}
-
-// A Dialer contains options for connecting to WebSocket server.
-type Dialer struct {
- // NetDial specifies the dial function for creating TCP connections. If
- // NetDial is nil, net.Dial is used.
- NetDial func(network, addr string) (net.Conn, error)
-
- // Proxy specifies a function to return a proxy for a given
- // Request. If the function returns a non-nil error, the
- // request is aborted with the provided error.
- // If Proxy is nil or returns a nil *URL, no proxy is used.
- Proxy func(*http.Request) (*url.URL, error)
-
- // TLSClientConfig specifies the TLS configuration to use with tls.Client.
- // If nil, the default configuration is used.
- TLSClientConfig *tls.Config
-
- // HandshakeTimeout specifies the duration for the handshake to complete.
- HandshakeTimeout time.Duration
-
- // ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer
- // size is zero, then a useful default size is used. The I/O buffer sizes
- // do not limit the size of the messages that can be sent or received.
- ReadBufferSize, WriteBufferSize int
-
- // Subprotocols specifies the client's requested subprotocols.
- Subprotocols []string
-
- // EnableCompression specifies if the client should attempt to negotiate
- // per message compression (RFC 7692). Setting this value to true does not
- // guarantee that compression will be supported. Currently only "no context
- // takeover" modes are supported.
- EnableCompression bool
-
- // Jar specifies the cookie jar.
- // If Jar is nil, cookies are not sent in requests and ignored
- // in responses.
- Jar http.CookieJar
-}
-
-var errMalformedURL = errors.New("malformed ws or wss URL")
-
-// parseURL parses the URL.
-//
-// This function is a replacement for the standard library url.Parse function.
-// In Go 1.4 and earlier, url.Parse loses information from the path.
-func parseURL(s string) (*url.URL, error) {
- // From the RFC:
- //
- // ws-URI = "ws:" "//" host [ ":" port ] path [ "?" query ]
- // wss-URI = "wss:" "//" host [ ":" port ] path [ "?" query ]
- var u url.URL
- switch {
- case strings.HasPrefix(s, "ws://"):
- u.Scheme = "ws"
- s = s[len("ws://"):]
- case strings.HasPrefix(s, "wss://"):
- u.Scheme = "wss"
- s = s[len("wss://"):]
- default:
- return nil, errMalformedURL
- }
-
- if i := strings.Index(s, "?"); i >= 0 {
- u.RawQuery = s[i+1:]
- s = s[:i]
- }
-
- if i := strings.Index(s, "/"); i >= 0 {
- u.Opaque = s[i:]
- s = s[:i]
- } else {
- u.Opaque = "/"
- }
-
- u.Host = s
-
- if strings.Contains(u.Host, "@") {
- // Don't bother parsing user information because user information is
- // not allowed in websocket URIs.
- return nil, errMalformedURL
- }
-
- return &u, nil
-}
-
-func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) {
- hostPort = u.Host
- hostNoPort = u.Host
- if i := strings.LastIndex(u.Host, ":"); i > strings.LastIndex(u.Host, "]") {
- hostNoPort = hostNoPort[:i]
- } else {
- switch u.Scheme {
- case "wss":
- hostPort += ":443"
- case "https":
- hostPort += ":443"
- default:
- hostPort += ":80"
- }
- }
- return hostPort, hostNoPort
-}
-
-// DefaultDialer is a dialer with all fields set to the default zero values.
-var DefaultDialer = &Dialer{
- Proxy: http.ProxyFromEnvironment,
-}
-
-// Dial creates a new client connection. Use requestHeader to specify the
-// origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie).
-// Use the response.Header to get the selected subprotocol
-// (Sec-WebSocket-Protocol) and cookies (Set-Cookie).
-//
-// If the WebSocket handshake fails, ErrBadHandshake is returned along with a
-// non-nil *http.Response so that callers can handle redirects, authentication,
-// etcetera. The response body may not contain the entire response and does not
-// need to be closed by the application.
-func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) {
-
- if d == nil {
- d = &Dialer{
- Proxy: http.ProxyFromEnvironment,
- }
- }
-
- challengeKey, err := generateChallengeKey()
- if err != nil {
- return nil, nil, err
- }
-
- u, err := parseURL(urlStr)
- if err != nil {
- return nil, nil, err
- }
-
- switch u.Scheme {
- case "ws":
- u.Scheme = "http"
- case "wss":
- u.Scheme = "https"
- default:
- return nil, nil, errMalformedURL
- }
-
- if u.User != nil {
- // User name and password are not allowed in websocket URIs.
- return nil, nil, errMalformedURL
- }
-
- req := &http.Request{
- Method: "GET",
- URL: u,
- Proto: "HTTP/1.1",
- ProtoMajor: 1,
- ProtoMinor: 1,
- Header: make(http.Header),
- Host: u.Host,
- }
-
- // Set the cookies present in the cookie jar of the dialer
- if d.Jar != nil {
- for _, cookie := range d.Jar.Cookies(u) {
- req.AddCookie(cookie)
- }
- }
-
- // Set the request headers using the capitalization for names and values in
- // RFC examples. Although the capitalization shouldn't matter, there are
- // servers that depend on it. The Header.Set method is not used because the
- // method canonicalizes the header names.
- req.Header["Upgrade"] = []string{"websocket"}
- req.Header["Connection"] = []string{"Upgrade"}
- req.Header["Sec-WebSocket-Key"] = []string{challengeKey}
- req.Header["Sec-WebSocket-Version"] = []string{"13"}
- if len(d.Subprotocols) > 0 {
- req.Header["Sec-WebSocket-Protocol"] = []string{strings.Join(d.Subprotocols, ", ")}
- }
- for k, vs := range requestHeader {
- switch {
- case k == "Host":
- if len(vs) > 0 {
- req.Host = vs[0]
- }
- case k == "Upgrade" ||
- k == "Connection" ||
- k == "Sec-Websocket-Key" ||
- k == "Sec-Websocket-Version" ||
- k == "Sec-Websocket-Extensions" ||
- (k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0):
- return nil, nil, errors.New("websocket: duplicate header not allowed: " + k)
- default:
- req.Header[k] = vs
- }
- }
-
- if d.EnableCompression {
- req.Header.Set("Sec-Websocket-Extensions", "permessage-deflate; server_no_context_takeover; client_no_context_takeover")
- }
-
- hostPort, hostNoPort := hostPortNoPort(u)
-
- var proxyURL *url.URL
- // Check wether the proxy method has been configured
- if d.Proxy != nil {
- proxyURL, err = d.Proxy(req)
- }
- if err != nil {
- return nil, nil, err
- }
-
- var targetHostPort string
- if proxyURL != nil {
- targetHostPort, _ = hostPortNoPort(proxyURL)
- } else {
- targetHostPort = hostPort
- }
-
- var deadline time.Time
- if d.HandshakeTimeout != 0 {
- deadline = time.Now().Add(d.HandshakeTimeout)
- }
-
- netDial := d.NetDial
- if netDial == nil {
- netDialer := &net.Dialer{Deadline: deadline}
- netDial = netDialer.Dial
- }
-
- netConn, err := netDial("tcp", targetHostPort)
- if err != nil {
- return nil, nil, err
- }
-
- defer func() {
- if netConn != nil {
- netConn.Close()
- }
- }()
-
- if err := netConn.SetDeadline(deadline); err != nil {
- return nil, nil, err
- }
-
- if proxyURL != nil {
- connectHeader := make(http.Header)
- if user := proxyURL.User; user != nil {
- proxyUser := user.Username()
- if proxyPassword, passwordSet := user.Password(); passwordSet {
- credential := base64.StdEncoding.EncodeToString([]byte(proxyUser + ":" + proxyPassword))
- connectHeader.Set("Proxy-Authorization", "Basic "+credential)
- }
- }
- connectReq := &http.Request{
- Method: "CONNECT",
- URL: &url.URL{Opaque: hostPort},
- Host: hostPort,
- Header: connectHeader,
- }
-
- connectReq.Write(netConn)
-
- // Read response.
- // Okay to use and discard buffered reader here, because
- // TLS server will not speak until spoken to.
- br := bufio.NewReader(netConn)
- resp, err := http.ReadResponse(br, connectReq)
- if err != nil {
- return nil, nil, err
- }
- if resp.StatusCode != 200 {
- f := strings.SplitN(resp.Status, " ", 2)
- return nil, nil, errors.New(f[1])
- }
- }
-
- if u.Scheme == "https" {
- cfg := cloneTLSConfig(d.TLSClientConfig)
- if cfg.ServerName == "" {
- cfg.ServerName = hostNoPort
- }
- tlsConn := tls.Client(netConn, cfg)
- netConn = tlsConn
- if err := tlsConn.Handshake(); err != nil {
- return nil, nil, err
- }
- if !cfg.InsecureSkipVerify {
- if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil {
- return nil, nil, err
- }
- }
- }
-
- conn := newConn(netConn, false, d.ReadBufferSize, d.WriteBufferSize)
-
- if err := req.Write(netConn); err != nil {
- return nil, nil, err
- }
-
- resp, err := http.ReadResponse(conn.br, req)
- if err != nil {
- return nil, nil, err
- }
-
- if d.Jar != nil {
- if rc := resp.Cookies(); len(rc) > 0 {
- d.Jar.SetCookies(u, rc)
- }
- }
-
- if resp.StatusCode != 101 ||
- !strings.EqualFold(resp.Header.Get("Upgrade"), "websocket") ||
- !strings.EqualFold(resp.Header.Get("Connection"), "upgrade") ||
- resp.Header.Get("Sec-Websocket-Accept") != computeAcceptKey(challengeKey) {
- // Before closing the network connection on return from this
- // function, slurp up some of the response to aid application
- // debugging.
- buf := make([]byte, 1024)
- n, _ := io.ReadFull(resp.Body, buf)
- resp.Body = ioutil.NopCloser(bytes.NewReader(buf[:n]))
- return nil, resp, ErrBadHandshake
- }
-
- for _, ext := range parseExtensions(resp.Header) {
- if ext[""] != "permessage-deflate" {
- continue
- }
- _, snct := ext["server_no_context_takeover"]
- _, cnct := ext["client_no_context_takeover"]
- if !snct || !cnct {
- return nil, resp, errInvalidCompression
- }
- conn.newCompressionWriter = compressNoContextTakeover
- conn.newDecompressionReader = decompressNoContextTakeover
- break
- }
-
- resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{}))
- conn.subprotocol = resp.Header.Get("Sec-Websocket-Protocol")
-
- netConn.SetDeadline(time.Time{})
- netConn = nil // to avoid close in defer.
- return conn, resp, nil
-}
diff --git a/vendor/github.com/gorilla/websocket/client_clone.go b/vendor/github.com/gorilla/websocket/client_clone.go
deleted file mode 100644
index 4f0d943..0000000
--- a/vendor/github.com/gorilla/websocket/client_clone.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.8
-
-package websocket
-
-import "crypto/tls"
-
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- if cfg == nil {
- return &tls.Config{}
- }
- return cfg.Clone()
-}
diff --git a/vendor/github.com/gorilla/websocket/client_clone_legacy.go b/vendor/github.com/gorilla/websocket/client_clone_legacy.go
deleted file mode 100644
index babb007..0000000
--- a/vendor/github.com/gorilla/websocket/client_clone_legacy.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !go1.8
-
-package websocket
-
-import "crypto/tls"
-
-// cloneTLSConfig clones all public fields except the fields
-// SessionTicketsDisabled and SessionTicketKey. This avoids copying the
-// sync.Mutex in the sync.Once and makes it safe to call cloneTLSConfig on a
-// config in active use.
-func cloneTLSConfig(cfg *tls.Config) *tls.Config {
- if cfg == nil {
- return &tls.Config{}
- }
- return &tls.Config{
- Rand: cfg.Rand,
- Time: cfg.Time,
- Certificates: cfg.Certificates,
- NameToCertificate: cfg.NameToCertificate,
- GetCertificate: cfg.GetCertificate,
- RootCAs: cfg.RootCAs,
- NextProtos: cfg.NextProtos,
- ServerName: cfg.ServerName,
- ClientAuth: cfg.ClientAuth,
- ClientCAs: cfg.ClientCAs,
- InsecureSkipVerify: cfg.InsecureSkipVerify,
- CipherSuites: cfg.CipherSuites,
- PreferServerCipherSuites: cfg.PreferServerCipherSuites,
- ClientSessionCache: cfg.ClientSessionCache,
- MinVersion: cfg.MinVersion,
- MaxVersion: cfg.MaxVersion,
- CurvePreferences: cfg.CurvePreferences,
- }
-}
diff --git a/vendor/github.com/gorilla/websocket/compression.go b/vendor/github.com/gorilla/websocket/compression.go
deleted file mode 100644
index 813ffb1..0000000
--- a/vendor/github.com/gorilla/websocket/compression.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Copyright 2017 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "compress/flate"
- "errors"
- "io"
- "strings"
- "sync"
-)
-
-const (
- minCompressionLevel = -2 // flate.HuffmanOnly not defined in Go < 1.6
- maxCompressionLevel = flate.BestCompression
- defaultCompressionLevel = 1
-)
-
-var (
- flateWriterPools [maxCompressionLevel - minCompressionLevel + 1]sync.Pool
- flateReaderPool = sync.Pool{New: func() interface{} {
- return flate.NewReader(nil)
- }}
-)
-
-func decompressNoContextTakeover(r io.Reader) io.ReadCloser {
- const tail =
- // Add four bytes as specified in RFC
- "\x00\x00\xff\xff" +
- // Add final block to squelch unexpected EOF error from flate reader.
- "\x01\x00\x00\xff\xff"
-
- fr, _ := flateReaderPool.Get().(io.ReadCloser)
- fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil)
- return &flateReadWrapper{fr}
-}
-
-func isValidCompressionLevel(level int) bool {
- return minCompressionLevel <= level && level <= maxCompressionLevel
-}
-
-func compressNoContextTakeover(w io.WriteCloser, level int) io.WriteCloser {
- p := &flateWriterPools[level-minCompressionLevel]
- tw := &truncWriter{w: w}
- fw, _ := p.Get().(*flate.Writer)
- if fw == nil {
- fw, _ = flate.NewWriter(tw, level)
- } else {
- fw.Reset(tw)
- }
- return &flateWriteWrapper{fw: fw, tw: tw, p: p}
-}
-
-// truncWriter is an io.Writer that writes all but the last four bytes of the
-// stream to another io.Writer.
-type truncWriter struct {
- w io.WriteCloser
- n int
- p [4]byte
-}
-
-func (w *truncWriter) Write(p []byte) (int, error) {
- n := 0
-
- // fill buffer first for simplicity.
- if w.n < len(w.p) {
- n = copy(w.p[w.n:], p)
- p = p[n:]
- w.n += n
- if len(p) == 0 {
- return n, nil
- }
- }
-
- m := len(p)
- if m > len(w.p) {
- m = len(w.p)
- }
-
- if nn, err := w.w.Write(w.p[:m]); err != nil {
- return n + nn, err
- }
-
- copy(w.p[:], w.p[m:])
- copy(w.p[len(w.p)-m:], p[len(p)-m:])
- nn, err := w.w.Write(p[:len(p)-m])
- return n + nn, err
-}
-
-type flateWriteWrapper struct {
- fw *flate.Writer
- tw *truncWriter
- p *sync.Pool
-}
-
-func (w *flateWriteWrapper) Write(p []byte) (int, error) {
- if w.fw == nil {
- return 0, errWriteClosed
- }
- return w.fw.Write(p)
-}
-
-func (w *flateWriteWrapper) Close() error {
- if w.fw == nil {
- return errWriteClosed
- }
- err1 := w.fw.Flush()
- w.p.Put(w.fw)
- w.fw = nil
- if w.tw.p != [4]byte{0, 0, 0xff, 0xff} {
- return errors.New("websocket: internal error, unexpected bytes at end of flate stream")
- }
- err2 := w.tw.w.Close()
- if err1 != nil {
- return err1
- }
- return err2
-}
-
-type flateReadWrapper struct {
- fr io.ReadCloser
-}
-
-func (r *flateReadWrapper) Read(p []byte) (int, error) {
- if r.fr == nil {
- return 0, io.ErrClosedPipe
- }
- n, err := r.fr.Read(p)
- if err == io.EOF {
- // Preemptively place the reader back in the pool. This helps with
- // scenarios where the application does not call NextReader() soon after
- // this final read.
- r.Close()
- }
- return n, err
-}
-
-func (r *flateReadWrapper) Close() error {
- if r.fr == nil {
- return io.ErrClosedPipe
- }
- err := r.fr.Close()
- flateReaderPool.Put(r.fr)
- r.fr = nil
- return err
-}
diff --git a/vendor/github.com/gorilla/websocket/conn.go b/vendor/github.com/gorilla/websocket/conn.go
deleted file mode 100644
index 97e1dba..0000000
--- a/vendor/github.com/gorilla/websocket/conn.go
+++ /dev/null
@@ -1,1149 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bufio"
- "encoding/binary"
- "errors"
- "io"
- "io/ioutil"
- "math/rand"
- "net"
- "strconv"
- "sync"
- "time"
- "unicode/utf8"
-)
-
-const (
- // Frame header byte 0 bits from Section 5.2 of RFC 6455
- finalBit = 1 << 7
- rsv1Bit = 1 << 6
- rsv2Bit = 1 << 5
- rsv3Bit = 1 << 4
-
- // Frame header byte 1 bits from Section 5.2 of RFC 6455
- maskBit = 1 << 7
-
- maxFrameHeaderSize = 2 + 8 + 4 // Fixed header + length + mask
- maxControlFramePayloadSize = 125
-
- writeWait = time.Second
-
- defaultReadBufferSize = 4096
- defaultWriteBufferSize = 4096
-
- continuationFrame = 0
- noFrame = -1
-)
-
-// Close codes defined in RFC 6455, section 11.7.
-const (
- CloseNormalClosure = 1000
- CloseGoingAway = 1001
- CloseProtocolError = 1002
- CloseUnsupportedData = 1003
- CloseNoStatusReceived = 1005
- CloseAbnormalClosure = 1006
- CloseInvalidFramePayloadData = 1007
- ClosePolicyViolation = 1008
- CloseMessageTooBig = 1009
- CloseMandatoryExtension = 1010
- CloseInternalServerErr = 1011
- CloseServiceRestart = 1012
- CloseTryAgainLater = 1013
- CloseTLSHandshake = 1015
-)
-
-// The message types are defined in RFC 6455, section 11.8.
-const (
- // TextMessage denotes a text data message. The text message payload is
- // interpreted as UTF-8 encoded text data.
- TextMessage = 1
-
- // BinaryMessage denotes a binary data message.
- BinaryMessage = 2
-
- // CloseMessage denotes a close control message. The optional message
- // payload contains a numeric code and text. Use the FormatCloseMessage
- // function to format a close message payload.
- CloseMessage = 8
-
- // PingMessage denotes a ping control message. The optional message payload
- // is UTF-8 encoded text.
- PingMessage = 9
-
- // PongMessage denotes a ping control message. The optional message payload
- // is UTF-8 encoded text.
- PongMessage = 10
-)
-
-// ErrCloseSent is returned when the application writes a message to the
-// connection after sending a close message.
-var ErrCloseSent = errors.New("websocket: close sent")
-
-// ErrReadLimit is returned when reading a message that is larger than the
-// read limit set for the connection.
-var ErrReadLimit = errors.New("websocket: read limit exceeded")
-
-// netError satisfies the net Error interface.
-type netError struct {
- msg string
- temporary bool
- timeout bool
-}
-
-func (e *netError) Error() string { return e.msg }
-func (e *netError) Temporary() bool { return e.temporary }
-func (e *netError) Timeout() bool { return e.timeout }
-
-// CloseError represents close frame.
-type CloseError struct {
-
- // Code is defined in RFC 6455, section 11.7.
- Code int
-
- // Text is the optional text payload.
- Text string
-}
-
-func (e *CloseError) Error() string {
- s := []byte("websocket: close ")
- s = strconv.AppendInt(s, int64(e.Code), 10)
- switch e.Code {
- case CloseNormalClosure:
- s = append(s, " (normal)"...)
- case CloseGoingAway:
- s = append(s, " (going away)"...)
- case CloseProtocolError:
- s = append(s, " (protocol error)"...)
- case CloseUnsupportedData:
- s = append(s, " (unsupported data)"...)
- case CloseNoStatusReceived:
- s = append(s, " (no status)"...)
- case CloseAbnormalClosure:
- s = append(s, " (abnormal closure)"...)
- case CloseInvalidFramePayloadData:
- s = append(s, " (invalid payload data)"...)
- case ClosePolicyViolation:
- s = append(s, " (policy violation)"...)
- case CloseMessageTooBig:
- s = append(s, " (message too big)"...)
- case CloseMandatoryExtension:
- s = append(s, " (mandatory extension missing)"...)
- case CloseInternalServerErr:
- s = append(s, " (internal server error)"...)
- case CloseTLSHandshake:
- s = append(s, " (TLS handshake error)"...)
- }
- if e.Text != "" {
- s = append(s, ": "...)
- s = append(s, e.Text...)
- }
- return string(s)
-}
-
-// IsCloseError returns boolean indicating whether the error is a *CloseError
-// with one of the specified codes.
-func IsCloseError(err error, codes ...int) bool {
- if e, ok := err.(*CloseError); ok {
- for _, code := range codes {
- if e.Code == code {
- return true
- }
- }
- }
- return false
-}
-
-// IsUnexpectedCloseError returns boolean indicating whether the error is a
-// *CloseError with a code not in the list of expected codes.
-func IsUnexpectedCloseError(err error, expectedCodes ...int) bool {
- if e, ok := err.(*CloseError); ok {
- for _, code := range expectedCodes {
- if e.Code == code {
- return false
- }
- }
- return true
- }
- return false
-}
-
-var (
- errWriteTimeout = &netError{msg: "websocket: write timeout", timeout: true, temporary: true}
- errUnexpectedEOF = &CloseError{Code: CloseAbnormalClosure, Text: io.ErrUnexpectedEOF.Error()}
- errBadWriteOpCode = errors.New("websocket: bad write message type")
- errWriteClosed = errors.New("websocket: write closed")
- errInvalidControlFrame = errors.New("websocket: invalid control frame")
-)
-
-func newMaskKey() [4]byte {
- n := rand.Uint32()
- return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)}
-}
-
-func hideTempErr(err error) error {
- if e, ok := err.(net.Error); ok && e.Temporary() {
- err = &netError{msg: e.Error(), timeout: e.Timeout()}
- }
- return err
-}
-
-func isControl(frameType int) bool {
- return frameType == CloseMessage || frameType == PingMessage || frameType == PongMessage
-}
-
-func isData(frameType int) bool {
- return frameType == TextMessage || frameType == BinaryMessage
-}
-
-var validReceivedCloseCodes = map[int]bool{
- // see http://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number
-
- CloseNormalClosure: true,
- CloseGoingAway: true,
- CloseProtocolError: true,
- CloseUnsupportedData: true,
- CloseNoStatusReceived: false,
- CloseAbnormalClosure: false,
- CloseInvalidFramePayloadData: true,
- ClosePolicyViolation: true,
- CloseMessageTooBig: true,
- CloseMandatoryExtension: true,
- CloseInternalServerErr: true,
- CloseServiceRestart: true,
- CloseTryAgainLater: true,
- CloseTLSHandshake: false,
-}
-
-func isValidReceivedCloseCode(code int) bool {
- return validReceivedCloseCodes[code] || (code >= 3000 && code <= 4999)
-}
-
-// The Conn type represents a WebSocket connection.
-type Conn struct {
- conn net.Conn
- isServer bool
- subprotocol string
-
- // Write fields
- mu chan bool // used as mutex to protect write to conn
- writeBuf []byte // frame is constructed in this buffer.
- writeDeadline time.Time
- writer io.WriteCloser // the current writer returned to the application
- isWriting bool // for best-effort concurrent write detection
-
- writeErrMu sync.Mutex
- writeErr error
-
- enableWriteCompression bool
- compressionLevel int
- newCompressionWriter func(io.WriteCloser, int) io.WriteCloser
-
- // Read fields
- reader io.ReadCloser // the current reader returned to the application
- readErr error
- br *bufio.Reader
- readRemaining int64 // bytes remaining in current frame.
- readFinal bool // true the current message has more frames.
- readLength int64 // Message size.
- readLimit int64 // Maximum message size.
- readMaskPos int
- readMaskKey [4]byte
- handlePong func(string) error
- handlePing func(string) error
- handleClose func(int, string) error
- readErrCount int
- messageReader *messageReader // the current low-level reader
-
- readDecompress bool // whether last read frame had RSV1 set
- newDecompressionReader func(io.Reader) io.ReadCloser
-}
-
-func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int) *Conn {
- return newConnBRW(conn, isServer, readBufferSize, writeBufferSize, nil)
-}
-
-type writeHook struct {
- p []byte
-}
-
-func (wh *writeHook) Write(p []byte) (int, error) {
- wh.p = p
- return len(p), nil
-}
-
-func newConnBRW(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int, brw *bufio.ReadWriter) *Conn {
- mu := make(chan bool, 1)
- mu <- true
-
- var br *bufio.Reader
- if readBufferSize == 0 && brw != nil && brw.Reader != nil {
- // Reuse the supplied bufio.Reader if the buffer has a useful size.
- // This code assumes that peek on a reader returns
- // bufio.Reader.buf[:0].
- brw.Reader.Reset(conn)
- if p, err := brw.Reader.Peek(0); err == nil && cap(p) >= 256 {
- br = brw.Reader
- }
- }
- if br == nil {
- if readBufferSize == 0 {
- readBufferSize = defaultReadBufferSize
- }
- if readBufferSize < maxControlFramePayloadSize {
- readBufferSize = maxControlFramePayloadSize
- }
- br = bufio.NewReaderSize(conn, readBufferSize)
- }
-
- var writeBuf []byte
- if writeBufferSize == 0 && brw != nil && brw.Writer != nil {
- // Use the bufio.Writer's buffer if the buffer has a useful size. This
- // code assumes that bufio.Writer.buf[:1] is passed to the
- // bufio.Writer's underlying writer.
- var wh writeHook
- brw.Writer.Reset(&wh)
- brw.Writer.WriteByte(0)
- brw.Flush()
- if cap(wh.p) >= maxFrameHeaderSize+256 {
- writeBuf = wh.p[:cap(wh.p)]
- }
- }
-
- if writeBuf == nil {
- if writeBufferSize == 0 {
- writeBufferSize = defaultWriteBufferSize
- }
- writeBuf = make([]byte, writeBufferSize+maxFrameHeaderSize)
- }
-
- c := &Conn{
- isServer: isServer,
- br: br,
- conn: conn,
- mu: mu,
- readFinal: true,
- writeBuf: writeBuf,
- enableWriteCompression: true,
- compressionLevel: defaultCompressionLevel,
- }
- c.SetCloseHandler(nil)
- c.SetPingHandler(nil)
- c.SetPongHandler(nil)
- return c
-}
-
-// Subprotocol returns the negotiated protocol for the connection.
-func (c *Conn) Subprotocol() string {
- return c.subprotocol
-}
-
-// Close closes the underlying network connection without sending or waiting for a close frame.
-func (c *Conn) Close() error {
- return c.conn.Close()
-}
-
-// LocalAddr returns the local network address.
-func (c *Conn) LocalAddr() net.Addr {
- return c.conn.LocalAddr()
-}
-
-// RemoteAddr returns the remote network address.
-func (c *Conn) RemoteAddr() net.Addr {
- return c.conn.RemoteAddr()
-}
-
-// Write methods
-
-func (c *Conn) writeFatal(err error) error {
- err = hideTempErr(err)
- c.writeErrMu.Lock()
- if c.writeErr == nil {
- c.writeErr = err
- }
- c.writeErrMu.Unlock()
- return err
-}
-
-func (c *Conn) write(frameType int, deadline time.Time, bufs ...[]byte) error {
- <-c.mu
- defer func() { c.mu <- true }()
-
- c.writeErrMu.Lock()
- err := c.writeErr
- c.writeErrMu.Unlock()
- if err != nil {
- return err
- }
-
- c.conn.SetWriteDeadline(deadline)
- for _, buf := range bufs {
- if len(buf) > 0 {
- _, err := c.conn.Write(buf)
- if err != nil {
- return c.writeFatal(err)
- }
- }
- }
-
- if frameType == CloseMessage {
- c.writeFatal(ErrCloseSent)
- }
- return nil
-}
-
-// WriteControl writes a control message with the given deadline. The allowed
-// message types are CloseMessage, PingMessage and PongMessage.
-func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) error {
- if !isControl(messageType) {
- return errBadWriteOpCode
- }
- if len(data) > maxControlFramePayloadSize {
- return errInvalidControlFrame
- }
-
- b0 := byte(messageType) | finalBit
- b1 := byte(len(data))
- if !c.isServer {
- b1 |= maskBit
- }
-
- buf := make([]byte, 0, maxFrameHeaderSize+maxControlFramePayloadSize)
- buf = append(buf, b0, b1)
-
- if c.isServer {
- buf = append(buf, data...)
- } else {
- key := newMaskKey()
- buf = append(buf, key[:]...)
- buf = append(buf, data...)
- maskBytes(key, 0, buf[6:])
- }
-
- d := time.Hour * 1000
- if !deadline.IsZero() {
- d = deadline.Sub(time.Now())
- if d < 0 {
- return errWriteTimeout
- }
- }
-
- timer := time.NewTimer(d)
- select {
- case <-c.mu:
- timer.Stop()
- case <-timer.C:
- return errWriteTimeout
- }
- defer func() { c.mu <- true }()
-
- c.writeErrMu.Lock()
- err := c.writeErr
- c.writeErrMu.Unlock()
- if err != nil {
- return err
- }
-
- c.conn.SetWriteDeadline(deadline)
- _, err = c.conn.Write(buf)
- if err != nil {
- return c.writeFatal(err)
- }
- if messageType == CloseMessage {
- c.writeFatal(ErrCloseSent)
- }
- return err
-}
-
-func (c *Conn) prepWrite(messageType int) error {
- // Close previous writer if not already closed by the application. It's
- // probably better to return an error in this situation, but we cannot
- // change this without breaking existing applications.
- if c.writer != nil {
- c.writer.Close()
- c.writer = nil
- }
-
- if !isControl(messageType) && !isData(messageType) {
- return errBadWriteOpCode
- }
-
- c.writeErrMu.Lock()
- err := c.writeErr
- c.writeErrMu.Unlock()
- return err
-}
-
-// NextWriter returns a writer for the next message to send. The writer's Close
-// method flushes the complete message to the network.
-//
-// There can be at most one open writer on a connection. NextWriter closes the
-// previous writer if the application has not already done so.
-func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) {
- if err := c.prepWrite(messageType); err != nil {
- return nil, err
- }
-
- mw := &messageWriter{
- c: c,
- frameType: messageType,
- pos: maxFrameHeaderSize,
- }
- c.writer = mw
- if c.newCompressionWriter != nil && c.enableWriteCompression && isData(messageType) {
- w := c.newCompressionWriter(c.writer, c.compressionLevel)
- mw.compress = true
- c.writer = w
- }
- return c.writer, nil
-}
-
-type messageWriter struct {
- c *Conn
- compress bool // whether next call to flushFrame should set RSV1
- pos int // end of data in writeBuf.
- frameType int // type of the current frame.
- err error
-}
-
-func (w *messageWriter) fatal(err error) error {
- if w.err != nil {
- w.err = err
- w.c.writer = nil
- }
- return err
-}
-
-// flushFrame writes buffered data and extra as a frame to the network. The
-// final argument indicates that this is the last frame in the message.
-func (w *messageWriter) flushFrame(final bool, extra []byte) error {
- c := w.c
- length := w.pos - maxFrameHeaderSize + len(extra)
-
- // Check for invalid control frames.
- if isControl(w.frameType) &&
- (!final || length > maxControlFramePayloadSize) {
- return w.fatal(errInvalidControlFrame)
- }
-
- b0 := byte(w.frameType)
- if final {
- b0 |= finalBit
- }
- if w.compress {
- b0 |= rsv1Bit
- }
- w.compress = false
-
- b1 := byte(0)
- if !c.isServer {
- b1 |= maskBit
- }
-
- // Assume that the frame starts at beginning of c.writeBuf.
- framePos := 0
- if c.isServer {
- // Adjust up if mask not included in the header.
- framePos = 4
- }
-
- switch {
- case length >= 65536:
- c.writeBuf[framePos] = b0
- c.writeBuf[framePos+1] = b1 | 127
- binary.BigEndian.PutUint64(c.writeBuf[framePos+2:], uint64(length))
- case length > 125:
- framePos += 6
- c.writeBuf[framePos] = b0
- c.writeBuf[framePos+1] = b1 | 126
- binary.BigEndian.PutUint16(c.writeBuf[framePos+2:], uint16(length))
- default:
- framePos += 8
- c.writeBuf[framePos] = b0
- c.writeBuf[framePos+1] = b1 | byte(length)
- }
-
- if !c.isServer {
- key := newMaskKey()
- copy(c.writeBuf[maxFrameHeaderSize-4:], key[:])
- maskBytes(key, 0, c.writeBuf[maxFrameHeaderSize:w.pos])
- if len(extra) > 0 {
- return c.writeFatal(errors.New("websocket: internal error, extra used in client mode"))
- }
- }
-
- // Write the buffers to the connection with best-effort detection of
- // concurrent writes. See the concurrency section in the package
- // documentation for more info.
-
- if c.isWriting {
- panic("concurrent write to websocket connection")
- }
- c.isWriting = true
-
- err := c.write(w.frameType, c.writeDeadline, c.writeBuf[framePos:w.pos], extra)
-
- if !c.isWriting {
- panic("concurrent write to websocket connection")
- }
- c.isWriting = false
-
- if err != nil {
- return w.fatal(err)
- }
-
- if final {
- c.writer = nil
- return nil
- }
-
- // Setup for next frame.
- w.pos = maxFrameHeaderSize
- w.frameType = continuationFrame
- return nil
-}
-
-func (w *messageWriter) ncopy(max int) (int, error) {
- n := len(w.c.writeBuf) - w.pos
- if n <= 0 {
- if err := w.flushFrame(false, nil); err != nil {
- return 0, err
- }
- n = len(w.c.writeBuf) - w.pos
- }
- if n > max {
- n = max
- }
- return n, nil
-}
-
-func (w *messageWriter) Write(p []byte) (int, error) {
- if w.err != nil {
- return 0, w.err
- }
-
- if len(p) > 2*len(w.c.writeBuf) && w.c.isServer {
- // Don't buffer large messages.
- err := w.flushFrame(false, p)
- if err != nil {
- return 0, err
- }
- return len(p), nil
- }
-
- nn := len(p)
- for len(p) > 0 {
- n, err := w.ncopy(len(p))
- if err != nil {
- return 0, err
- }
- copy(w.c.writeBuf[w.pos:], p[:n])
- w.pos += n
- p = p[n:]
- }
- return nn, nil
-}
-
-func (w *messageWriter) WriteString(p string) (int, error) {
- if w.err != nil {
- return 0, w.err
- }
-
- nn := len(p)
- for len(p) > 0 {
- n, err := w.ncopy(len(p))
- if err != nil {
- return 0, err
- }
- copy(w.c.writeBuf[w.pos:], p[:n])
- w.pos += n
- p = p[n:]
- }
- return nn, nil
-}
-
-func (w *messageWriter) ReadFrom(r io.Reader) (nn int64, err error) {
- if w.err != nil {
- return 0, w.err
- }
- for {
- if w.pos == len(w.c.writeBuf) {
- err = w.flushFrame(false, nil)
- if err != nil {
- break
- }
- }
- var n int
- n, err = r.Read(w.c.writeBuf[w.pos:])
- w.pos += n
- nn += int64(n)
- if err != nil {
- if err == io.EOF {
- err = nil
- }
- break
- }
- }
- return nn, err
-}
-
-func (w *messageWriter) Close() error {
- if w.err != nil {
- return w.err
- }
- if err := w.flushFrame(true, nil); err != nil {
- return err
- }
- w.err = errWriteClosed
- return nil
-}
-
-// WritePreparedMessage writes prepared message into connection.
-func (c *Conn) WritePreparedMessage(pm *PreparedMessage) error {
- frameType, frameData, err := pm.frame(prepareKey{
- isServer: c.isServer,
- compress: c.newCompressionWriter != nil && c.enableWriteCompression && isData(pm.messageType),
- compressionLevel: c.compressionLevel,
- })
- if err != nil {
- return err
- }
- if c.isWriting {
- panic("concurrent write to websocket connection")
- }
- c.isWriting = true
- err = c.write(frameType, c.writeDeadline, frameData, nil)
- if !c.isWriting {
- panic("concurrent write to websocket connection")
- }
- c.isWriting = false
- return err
-}
-
-// WriteMessage is a helper method for getting a writer using NextWriter,
-// writing the message and closing the writer.
-func (c *Conn) WriteMessage(messageType int, data []byte) error {
-
- if c.isServer && (c.newCompressionWriter == nil || !c.enableWriteCompression) {
- // Fast path with no allocations and single frame.
-
- if err := c.prepWrite(messageType); err != nil {
- return err
- }
- mw := messageWriter{c: c, frameType: messageType, pos: maxFrameHeaderSize}
- n := copy(c.writeBuf[mw.pos:], data)
- mw.pos += n
- data = data[n:]
- return mw.flushFrame(true, data)
- }
-
- w, err := c.NextWriter(messageType)
- if err != nil {
- return err
- }
- if _, err = w.Write(data); err != nil {
- return err
- }
- return w.Close()
-}
-
-// SetWriteDeadline sets the write deadline on the underlying network
-// connection. After a write has timed out, the websocket state is corrupt and
-// all future writes will return an error. A zero value for t means writes will
-// not time out.
-func (c *Conn) SetWriteDeadline(t time.Time) error {
- c.writeDeadline = t
- return nil
-}
-
-// Read methods
-
-func (c *Conn) advanceFrame() (int, error) {
-
- // 1. Skip remainder of previous frame.
-
- if c.readRemaining > 0 {
- if _, err := io.CopyN(ioutil.Discard, c.br, c.readRemaining); err != nil {
- return noFrame, err
- }
- }
-
- // 2. Read and parse first two bytes of frame header.
-
- p, err := c.read(2)
- if err != nil {
- return noFrame, err
- }
-
- final := p[0]&finalBit != 0
- frameType := int(p[0] & 0xf)
- mask := p[1]&maskBit != 0
- c.readRemaining = int64(p[1] & 0x7f)
-
- c.readDecompress = false
- if c.newDecompressionReader != nil && (p[0]&rsv1Bit) != 0 {
- c.readDecompress = true
- p[0] &^= rsv1Bit
- }
-
- if rsv := p[0] & (rsv1Bit | rsv2Bit | rsv3Bit); rsv != 0 {
- return noFrame, c.handleProtocolError("unexpected reserved bits 0x" + strconv.FormatInt(int64(rsv), 16))
- }
-
- switch frameType {
- case CloseMessage, PingMessage, PongMessage:
- if c.readRemaining > maxControlFramePayloadSize {
- return noFrame, c.handleProtocolError("control frame length > 125")
- }
- if !final {
- return noFrame, c.handleProtocolError("control frame not final")
- }
- case TextMessage, BinaryMessage:
- if !c.readFinal {
- return noFrame, c.handleProtocolError("message start before final message frame")
- }
- c.readFinal = final
- case continuationFrame:
- if c.readFinal {
- return noFrame, c.handleProtocolError("continuation after final message frame")
- }
- c.readFinal = final
- default:
- return noFrame, c.handleProtocolError("unknown opcode " + strconv.Itoa(frameType))
- }
-
- // 3. Read and parse frame length.
-
- switch c.readRemaining {
- case 126:
- p, err := c.read(2)
- if err != nil {
- return noFrame, err
- }
- c.readRemaining = int64(binary.BigEndian.Uint16(p))
- case 127:
- p, err := c.read(8)
- if err != nil {
- return noFrame, err
- }
- c.readRemaining = int64(binary.BigEndian.Uint64(p))
- }
-
- // 4. Handle frame masking.
-
- if mask != c.isServer {
- return noFrame, c.handleProtocolError("incorrect mask flag")
- }
-
- if mask {
- c.readMaskPos = 0
- p, err := c.read(len(c.readMaskKey))
- if err != nil {
- return noFrame, err
- }
- copy(c.readMaskKey[:], p)
- }
-
- // 5. For text and binary messages, enforce read limit and return.
-
- if frameType == continuationFrame || frameType == TextMessage || frameType == BinaryMessage {
-
- c.readLength += c.readRemaining
- if c.readLimit > 0 && c.readLength > c.readLimit {
- c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait))
- return noFrame, ErrReadLimit
- }
-
- return frameType, nil
- }
-
- // 6. Read control frame payload.
-
- var payload []byte
- if c.readRemaining > 0 {
- payload, err = c.read(int(c.readRemaining))
- c.readRemaining = 0
- if err != nil {
- return noFrame, err
- }
- if c.isServer {
- maskBytes(c.readMaskKey, 0, payload)
- }
- }
-
- // 7. Process control frame payload.
-
- switch frameType {
- case PongMessage:
- if err := c.handlePong(string(payload)); err != nil {
- return noFrame, err
- }
- case PingMessage:
- if err := c.handlePing(string(payload)); err != nil {
- return noFrame, err
- }
- case CloseMessage:
- closeCode := CloseNoStatusReceived
- closeText := ""
- if len(payload) >= 2 {
- closeCode = int(binary.BigEndian.Uint16(payload))
- if !isValidReceivedCloseCode(closeCode) {
- return noFrame, c.handleProtocolError("invalid close code")
- }
- closeText = string(payload[2:])
- if !utf8.ValidString(closeText) {
- return noFrame, c.handleProtocolError("invalid utf8 payload in close frame")
- }
- }
- if err := c.handleClose(closeCode, closeText); err != nil {
- return noFrame, err
- }
- return noFrame, &CloseError{Code: closeCode, Text: closeText}
- }
-
- return frameType, nil
-}
-
-func (c *Conn) handleProtocolError(message string) error {
- c.WriteControl(CloseMessage, FormatCloseMessage(CloseProtocolError, message), time.Now().Add(writeWait))
- return errors.New("websocket: " + message)
-}
-
-// NextReader returns the next data message received from the peer. The
-// returned messageType is either TextMessage or BinaryMessage.
-//
-// There can be at most one open reader on a connection. NextReader discards
-// the previous message if the application has not already consumed it.
-//
-// Applications must break out of the application's read loop when this method
-// returns a non-nil error value. Errors returned from this method are
-// permanent. Once this method returns a non-nil error, all subsequent calls to
-// this method return the same error.
-func (c *Conn) NextReader() (messageType int, r io.Reader, err error) {
- // Close previous reader, only relevant for decompression.
- if c.reader != nil {
- c.reader.Close()
- c.reader = nil
- }
-
- c.messageReader = nil
- c.readLength = 0
-
- for c.readErr == nil {
- frameType, err := c.advanceFrame()
- if err != nil {
- c.readErr = hideTempErr(err)
- break
- }
- if frameType == TextMessage || frameType == BinaryMessage {
- c.messageReader = &messageReader{c}
- c.reader = c.messageReader
- if c.readDecompress {
- c.reader = c.newDecompressionReader(c.reader)
- }
- return frameType, c.reader, nil
- }
- }
-
- // Applications that do handle the error returned from this method spin in
- // tight loop on connection failure. To help application developers detect
- // this error, panic on repeated reads to the failed connection.
- c.readErrCount++
- if c.readErrCount >= 1000 {
- panic("repeated read on failed websocket connection")
- }
-
- return noFrame, nil, c.readErr
-}
-
-type messageReader struct{ c *Conn }
-
-func (r *messageReader) Read(b []byte) (int, error) {
- c := r.c
- if c.messageReader != r {
- return 0, io.EOF
- }
-
- for c.readErr == nil {
-
- if c.readRemaining > 0 {
- if int64(len(b)) > c.readRemaining {
- b = b[:c.readRemaining]
- }
- n, err := c.br.Read(b)
- c.readErr = hideTempErr(err)
- if c.isServer {
- c.readMaskPos = maskBytes(c.readMaskKey, c.readMaskPos, b[:n])
- }
- c.readRemaining -= int64(n)
- if c.readRemaining > 0 && c.readErr == io.EOF {
- c.readErr = errUnexpectedEOF
- }
- return n, c.readErr
- }
-
- if c.readFinal {
- c.messageReader = nil
- return 0, io.EOF
- }
-
- frameType, err := c.advanceFrame()
- switch {
- case err != nil:
- c.readErr = hideTempErr(err)
- case frameType == TextMessage || frameType == BinaryMessage:
- c.readErr = errors.New("websocket: internal error, unexpected text or binary in Reader")
- }
- }
-
- err := c.readErr
- if err == io.EOF && c.messageReader == r {
- err = errUnexpectedEOF
- }
- return 0, err
-}
-
-func (r *messageReader) Close() error {
- return nil
-}
-
-// ReadMessage is a helper method for getting a reader using NextReader and
-// reading from that reader to a buffer.
-func (c *Conn) ReadMessage() (messageType int, p []byte, err error) {
- var r io.Reader
- messageType, r, err = c.NextReader()
- if err != nil {
- return messageType, nil, err
- }
- p, err = ioutil.ReadAll(r)
- return messageType, p, err
-}
-
-// SetReadDeadline sets the read deadline on the underlying network connection.
-// After a read has timed out, the websocket connection state is corrupt and
-// all future reads will return an error. A zero value for t means reads will
-// not time out.
-func (c *Conn) SetReadDeadline(t time.Time) error {
- return c.conn.SetReadDeadline(t)
-}
-
-// SetReadLimit sets the maximum size for a message read from the peer. If a
-// message exceeds the limit, the connection sends a close frame to the peer
-// and returns ErrReadLimit to the application.
-func (c *Conn) SetReadLimit(limit int64) {
- c.readLimit = limit
-}
-
-// CloseHandler returns the current close handler
-func (c *Conn) CloseHandler() func(code int, text string) error {
- return c.handleClose
-}
-
-// SetCloseHandler sets the handler for close messages received from the peer.
-// The code argument to h is the received close code or CloseNoStatusReceived
-// if the close message is empty. The default close handler sends a close frame
-// back to the peer.
-//
-// The application must read the connection to process close messages as
-// described in the section on Control Frames above.
-//
-// The connection read methods return a CloseError when a close frame is
-// received. Most applications should handle close messages as part of their
-// normal error handling. Applications should only set a close handler when the
-// application must perform some action before sending a close frame back to
-// the peer.
-func (c *Conn) SetCloseHandler(h func(code int, text string) error) {
- if h == nil {
- h = func(code int, text string) error {
- message := []byte{}
- if code != CloseNoStatusReceived {
- message = FormatCloseMessage(code, "")
- }
- c.WriteControl(CloseMessage, message, time.Now().Add(writeWait))
- return nil
- }
- }
- c.handleClose = h
-}
-
-// PingHandler returns the current ping handler
-func (c *Conn) PingHandler() func(appData string) error {
- return c.handlePing
-}
-
-// SetPingHandler sets the handler for ping messages received from the peer.
-// The appData argument to h is the PING frame application data. The default
-// ping handler sends a pong to the peer.
-//
-// The application must read the connection to process ping messages as
-// described in the section on Control Frames above.
-func (c *Conn) SetPingHandler(h func(appData string) error) {
- if h == nil {
- h = func(message string) error {
- err := c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait))
- if err == ErrCloseSent {
- return nil
- } else if e, ok := err.(net.Error); ok && e.Temporary() {
- return nil
- }
- return err
- }
- }
- c.handlePing = h
-}
-
-// PongHandler returns the current pong handler
-func (c *Conn) PongHandler() func(appData string) error {
- return c.handlePong
-}
-
-// SetPongHandler sets the handler for pong messages received from the peer.
-// The appData argument to h is the PONG frame application data. The default
-// pong handler does nothing.
-//
-// The application must read the connection to process ping messages as
-// described in the section on Control Frames above.
-func (c *Conn) SetPongHandler(h func(appData string) error) {
- if h == nil {
- h = func(string) error { return nil }
- }
- c.handlePong = h
-}
-
-// UnderlyingConn returns the internal net.Conn. This can be used to further
-// modifications to connection specific flags.
-func (c *Conn) UnderlyingConn() net.Conn {
- return c.conn
-}
-
-// EnableWriteCompression enables and disables write compression of
-// subsequent text and binary messages. This function is a noop if
-// compression was not negotiated with the peer.
-func (c *Conn) EnableWriteCompression(enable bool) {
- c.enableWriteCompression = enable
-}
-
-// SetCompressionLevel sets the flate compression level for subsequent text and
-// binary messages. This function is a noop if compression was not negotiated
-// with the peer. See the compress/flate package for a description of
-// compression levels.
-func (c *Conn) SetCompressionLevel(level int) error {
- if !isValidCompressionLevel(level) {
- return errors.New("websocket: invalid compression level")
- }
- c.compressionLevel = level
- return nil
-}
-
-// FormatCloseMessage formats closeCode and text as a WebSocket close message.
-func FormatCloseMessage(closeCode int, text string) []byte {
- buf := make([]byte, 2+len(text))
- binary.BigEndian.PutUint16(buf, uint16(closeCode))
- copy(buf[2:], text)
- return buf
-}
diff --git a/vendor/github.com/gorilla/websocket/conn_read.go b/vendor/github.com/gorilla/websocket/conn_read.go
deleted file mode 100644
index 1ea1505..0000000
--- a/vendor/github.com/gorilla/websocket/conn_read.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.5
-
-package websocket
-
-import "io"
-
-func (c *Conn) read(n int) ([]byte, error) {
- p, err := c.br.Peek(n)
- if err == io.EOF {
- err = errUnexpectedEOF
- }
- c.br.Discard(len(p))
- return p, err
-}
diff --git a/vendor/github.com/gorilla/websocket/conn_read_legacy.go b/vendor/github.com/gorilla/websocket/conn_read_legacy.go
deleted file mode 100644
index 018541c..0000000
--- a/vendor/github.com/gorilla/websocket/conn_read_legacy.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !go1.5
-
-package websocket
-
-import "io"
-
-func (c *Conn) read(n int) ([]byte, error) {
- p, err := c.br.Peek(n)
- if err == io.EOF {
- err = errUnexpectedEOF
- }
- if len(p) > 0 {
- // advance over the bytes just read
- io.ReadFull(c.br, p)
- }
- return p, err
-}
diff --git a/vendor/github.com/gorilla/websocket/doc.go b/vendor/github.com/gorilla/websocket/doc.go
deleted file mode 100644
index e291a95..0000000
--- a/vendor/github.com/gorilla/websocket/doc.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package websocket implements the WebSocket protocol defined in RFC 6455.
-//
-// Overview
-//
-// The Conn type represents a WebSocket connection. A server application uses
-// the Upgrade function from an Upgrader object with a HTTP request handler
-// to get a pointer to a Conn:
-//
-// var upgrader = websocket.Upgrader{
-// ReadBufferSize: 1024,
-// WriteBufferSize: 1024,
-// }
-//
-// func handler(w http.ResponseWriter, r *http.Request) {
-// conn, err := upgrader.Upgrade(w, r, nil)
-// if err != nil {
-// log.Println(err)
-// return
-// }
-// ... Use conn to send and receive messages.
-// }
-//
-// Call the connection's WriteMessage and ReadMessage methods to send and
-// receive messages as a slice of bytes. This snippet of code shows how to echo
-// messages using these methods:
-//
-// for {
-// messageType, p, err := conn.ReadMessage()
-// if err != nil {
-// return
-// }
-// if err = conn.WriteMessage(messageType, p); err != nil {
-// return err
-// }
-// }
-//
-// In above snippet of code, p is a []byte and messageType is an int with value
-// websocket.BinaryMessage or websocket.TextMessage.
-//
-// An application can also send and receive messages using the io.WriteCloser
-// and io.Reader interfaces. To send a message, call the connection NextWriter
-// method to get an io.WriteCloser, write the message to the writer and close
-// the writer when done. To receive a message, call the connection NextReader
-// method to get an io.Reader and read until io.EOF is returned. This snippet
-// shows how to echo messages using the NextWriter and NextReader methods:
-//
-// for {
-// messageType, r, err := conn.NextReader()
-// if err != nil {
-// return
-// }
-// w, err := conn.NextWriter(messageType)
-// if err != nil {
-// return err
-// }
-// if _, err := io.Copy(w, r); err != nil {
-// return err
-// }
-// if err := w.Close(); err != nil {
-// return err
-// }
-// }
-//
-// Data Messages
-//
-// The WebSocket protocol distinguishes between text and binary data messages.
-// Text messages are interpreted as UTF-8 encoded text. The interpretation of
-// binary messages is left to the application.
-//
-// This package uses the TextMessage and BinaryMessage integer constants to
-// identify the two data message types. The ReadMessage and NextReader methods
-// return the type of the received message. The messageType argument to the
-// WriteMessage and NextWriter methods specifies the type of a sent message.
-//
-// It is the application's responsibility to ensure that text messages are
-// valid UTF-8 encoded text.
-//
-// Control Messages
-//
-// The WebSocket protocol defines three types of control messages: close, ping
-// and pong. Call the connection WriteControl, WriteMessage or NextWriter
-// methods to send a control message to the peer.
-//
-// Connections handle received close messages by sending a close message to the
-// peer and returning a *CloseError from the the NextReader, ReadMessage or the
-// message Read method.
-//
-// Connections handle received ping and pong messages by invoking callback
-// functions set with SetPingHandler and SetPongHandler methods. The callback
-// functions are called from the NextReader, ReadMessage and the message Read
-// methods.
-//
-// The default ping handler sends a pong to the peer. The application's reading
-// goroutine can block for a short time while the handler writes the pong data
-// to the connection.
-//
-// The application must read the connection to process ping, pong and close
-// messages sent from the peer. If the application is not otherwise interested
-// in messages from the peer, then the application should start a goroutine to
-// read and discard messages from the peer. A simple example is:
-//
-// func readLoop(c *websocket.Conn) {
-// for {
-// if _, _, err := c.NextReader(); err != nil {
-// c.Close()
-// break
-// }
-// }
-// }
-//
-// Concurrency
-//
-// Connections support one concurrent reader and one concurrent writer.
-//
-// Applications are responsible for ensuring that no more than one goroutine
-// calls the write methods (NextWriter, SetWriteDeadline, WriteMessage,
-// WriteJSON, EnableWriteCompression, SetCompressionLevel) concurrently and
-// that no more than one goroutine calls the read methods (NextReader,
-// SetReadDeadline, ReadMessage, ReadJSON, SetPongHandler, SetPingHandler)
-// concurrently.
-//
-// The Close and WriteControl methods can be called concurrently with all other
-// methods.
-//
-// Origin Considerations
-//
-// Web browsers allow Javascript applications to open a WebSocket connection to
-// any host. It's up to the server to enforce an origin policy using the Origin
-// request header sent by the browser.
-//
-// The Upgrader calls the function specified in the CheckOrigin field to check
-// the origin. If the CheckOrigin function returns false, then the Upgrade
-// method fails the WebSocket handshake with HTTP status 403.
-//
-// If the CheckOrigin field is nil, then the Upgrader uses a safe default: fail
-// the handshake if the Origin request header is present and not equal to the
-// Host request header.
-//
-// An application can allow connections from any origin by specifying a
-// function that always returns true:
-//
-// var upgrader = websocket.Upgrader{
-// CheckOrigin: func(r *http.Request) bool { return true },
-// }
-//
-// The deprecated Upgrade function does not enforce an origin policy. It's the
-// application's responsibility to check the Origin header before calling
-// Upgrade.
-//
-// Compression EXPERIMENTAL
-//
-// Per message compression extensions (RFC 7692) are experimentally supported
-// by this package in a limited capacity. Setting the EnableCompression option
-// to true in Dialer or Upgrader will attempt to negotiate per message deflate
-// support.
-//
-// var upgrader = websocket.Upgrader{
-// EnableCompression: true,
-// }
-//
-// If compression was successfully negotiated with the connection's peer, any
-// message received in compressed form will be automatically decompressed.
-// All Read methods will return uncompressed bytes.
-//
-// Per message compression of messages written to a connection can be enabled
-// or disabled by calling the corresponding Conn method:
-//
-// conn.EnableWriteCompression(false)
-//
-// Currently this package does not support compression with "context takeover".
-// This means that messages must be compressed and decompressed in isolation,
-// without retaining sliding window or dictionary state across messages. For
-// more details refer to RFC 7692.
-//
-// Use of compression is experimental and may result in decreased performance.
-package websocket
diff --git a/vendor/github.com/gorilla/websocket/json.go b/vendor/github.com/gorilla/websocket/json.go
deleted file mode 100644
index 4f0e368..0000000
--- a/vendor/github.com/gorilla/websocket/json.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "encoding/json"
- "io"
-)
-
-// WriteJSON is deprecated, use c.WriteJSON instead.
-func WriteJSON(c *Conn, v interface{}) error {
- return c.WriteJSON(v)
-}
-
-// WriteJSON writes the JSON encoding of v to the connection.
-//
-// See the documentation for encoding/json Marshal for details about the
-// conversion of Go values to JSON.
-func (c *Conn) WriteJSON(v interface{}) error {
- w, err := c.NextWriter(TextMessage)
- if err != nil {
- return err
- }
- err1 := json.NewEncoder(w).Encode(v)
- err2 := w.Close()
- if err1 != nil {
- return err1
- }
- return err2
-}
-
-// ReadJSON is deprecated, use c.ReadJSON instead.
-func ReadJSON(c *Conn, v interface{}) error {
- return c.ReadJSON(v)
-}
-
-// ReadJSON reads the next JSON-encoded message from the connection and stores
-// it in the value pointed to by v.
-//
-// See the documentation for the encoding/json Unmarshal function for details
-// about the conversion of JSON to a Go value.
-func (c *Conn) ReadJSON(v interface{}) error {
- _, r, err := c.NextReader()
- if err != nil {
- return err
- }
- err = json.NewDecoder(r).Decode(v)
- if err == io.EOF {
- // One value is expected in the message.
- err = io.ErrUnexpectedEOF
- }
- return err
-}
diff --git a/vendor/github.com/gorilla/websocket/mask.go b/vendor/github.com/gorilla/websocket/mask.go
deleted file mode 100644
index 6a88bbc..0000000
--- a/vendor/github.com/gorilla/websocket/mask.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of
-// this source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-// +build !appengine
-
-package websocket
-
-import "unsafe"
-
-const wordSize = int(unsafe.Sizeof(uintptr(0)))
-
-func maskBytes(key [4]byte, pos int, b []byte) int {
-
- // Mask one byte at a time for small buffers.
- if len(b) < 2*wordSize {
- for i := range b {
- b[i] ^= key[pos&3]
- pos++
- }
- return pos & 3
- }
-
- // Mask one byte at a time to word boundary.
- if n := int(uintptr(unsafe.Pointer(&b[0]))) % wordSize; n != 0 {
- n = wordSize - n
- for i := range b[:n] {
- b[i] ^= key[pos&3]
- pos++
- }
- b = b[n:]
- }
-
- // Create aligned word size key.
- var k [wordSize]byte
- for i := range k {
- k[i] = key[(pos+i)&3]
- }
- kw := *(*uintptr)(unsafe.Pointer(&k))
-
- // Mask one word at a time.
- n := (len(b) / wordSize) * wordSize
- for i := 0; i < n; i += wordSize {
- *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&b[0])) + uintptr(i))) ^= kw
- }
-
- // Mask one byte at a time for remaining bytes.
- b = b[n:]
- for i := range b {
- b[i] ^= key[pos&3]
- pos++
- }
-
- return pos & 3
-}
diff --git a/vendor/github.com/gorilla/websocket/mask_safe.go b/vendor/github.com/gorilla/websocket/mask_safe.go
deleted file mode 100644
index 2aac060..0000000
--- a/vendor/github.com/gorilla/websocket/mask_safe.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. Use of
-// this source code is governed by a BSD-style license that can be found in the
-// LICENSE file.
-
-// +build appengine
-
-package websocket
-
-func maskBytes(key [4]byte, pos int, b []byte) int {
- for i := range b {
- b[i] ^= key[pos&3]
- pos++
- }
- return pos & 3
-}
diff --git a/vendor/github.com/gorilla/websocket/prepared.go b/vendor/github.com/gorilla/websocket/prepared.go
deleted file mode 100644
index 1efffbd..0000000
--- a/vendor/github.com/gorilla/websocket/prepared.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Copyright 2017 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bytes"
- "net"
- "sync"
- "time"
-)
-
-// PreparedMessage caches on the wire representations of a message payload.
-// Use PreparedMessage to efficiently send a message payload to multiple
-// connections. PreparedMessage is especially useful when compression is used
-// because the CPU and memory expensive compression operation can be executed
-// once for a given set of compression options.
-type PreparedMessage struct {
- messageType int
- data []byte
- err error
- mu sync.Mutex
- frames map[prepareKey]*preparedFrame
-}
-
-// prepareKey defines a unique set of options to cache prepared frames in PreparedMessage.
-type prepareKey struct {
- isServer bool
- compress bool
- compressionLevel int
-}
-
-// preparedFrame contains data in wire representation.
-type preparedFrame struct {
- once sync.Once
- data []byte
-}
-
-// NewPreparedMessage returns an initialized PreparedMessage. You can then send
-// it to connection using WritePreparedMessage method. Valid wire
-// representation will be calculated lazily only once for a set of current
-// connection options.
-func NewPreparedMessage(messageType int, data []byte) (*PreparedMessage, error) {
- pm := &PreparedMessage{
- messageType: messageType,
- frames: make(map[prepareKey]*preparedFrame),
- data: data,
- }
-
- // Prepare a plain server frame.
- _, frameData, err := pm.frame(prepareKey{isServer: true, compress: false})
- if err != nil {
- return nil, err
- }
-
- // To protect against caller modifying the data argument, remember the data
- // copied to the plain server frame.
- pm.data = frameData[len(frameData)-len(data):]
- return pm, nil
-}
-
-func (pm *PreparedMessage) frame(key prepareKey) (int, []byte, error) {
- pm.mu.Lock()
- frame, ok := pm.frames[key]
- if !ok {
- frame = &preparedFrame{}
- pm.frames[key] = frame
- }
- pm.mu.Unlock()
-
- var err error
- frame.once.Do(func() {
- // Prepare a frame using a 'fake' connection.
- // TODO: Refactor code in conn.go to allow more direct construction of
- // the frame.
- mu := make(chan bool, 1)
- mu <- true
- var nc prepareConn
- c := &Conn{
- conn: &nc,
- mu: mu,
- isServer: key.isServer,
- compressionLevel: key.compressionLevel,
- enableWriteCompression: true,
- writeBuf: make([]byte, defaultWriteBufferSize+maxFrameHeaderSize),
- }
- if key.compress {
- c.newCompressionWriter = compressNoContextTakeover
- }
- err = c.WriteMessage(pm.messageType, pm.data)
- frame.data = nc.buf.Bytes()
- })
- return pm.messageType, frame.data, err
-}
-
-type prepareConn struct {
- buf bytes.Buffer
- net.Conn
-}
-
-func (pc *prepareConn) Write(p []byte) (int, error) { return pc.buf.Write(p) }
-func (pc *prepareConn) SetWriteDeadline(t time.Time) error { return nil }
diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go
deleted file mode 100644
index 3495e0f..0000000
--- a/vendor/github.com/gorilla/websocket/server.go
+++ /dev/null
@@ -1,291 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "bufio"
- "errors"
- "net"
- "net/http"
- "net/url"
- "strings"
- "time"
-)
-
-// HandshakeError describes an error with the handshake from the peer.
-type HandshakeError struct {
- message string
-}
-
-func (e HandshakeError) Error() string { return e.message }
-
-// Upgrader specifies parameters for upgrading an HTTP connection to a
-// WebSocket connection.
-type Upgrader struct {
- // HandshakeTimeout specifies the duration for the handshake to complete.
- HandshakeTimeout time.Duration
-
- // ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer
- // size is zero, then buffers allocated by the HTTP server are used. The
- // I/O buffer sizes do not limit the size of the messages that can be sent
- // or received.
- ReadBufferSize, WriteBufferSize int
-
- // Subprotocols specifies the server's supported protocols in order of
- // preference. If this field is set, then the Upgrade method negotiates a
- // subprotocol by selecting the first match in this list with a protocol
- // requested by the client.
- Subprotocols []string
-
- // Error specifies the function for generating HTTP error responses. If Error
- // is nil, then http.Error is used to generate the HTTP response.
- Error func(w http.ResponseWriter, r *http.Request, status int, reason error)
-
- // CheckOrigin returns true if the request Origin header is acceptable. If
- // CheckOrigin is nil, the host in the Origin header must not be set or
- // must match the host of the request.
- CheckOrigin func(r *http.Request) bool
-
- // EnableCompression specify if the server should attempt to negotiate per
- // message compression (RFC 7692). Setting this value to true does not
- // guarantee that compression will be supported. Currently only "no context
- // takeover" modes are supported.
- EnableCompression bool
-}
-
-func (u *Upgrader) returnError(w http.ResponseWriter, r *http.Request, status int, reason string) (*Conn, error) {
- err := HandshakeError{reason}
- if u.Error != nil {
- u.Error(w, r, status, err)
- } else {
- w.Header().Set("Sec-Websocket-Version", "13")
- http.Error(w, http.StatusText(status), status)
- }
- return nil, err
-}
-
-// checkSameOrigin returns true if the origin is not set or is equal to the request host.
-func checkSameOrigin(r *http.Request) bool {
- origin := r.Header["Origin"]
- if len(origin) == 0 {
- return true
- }
- u, err := url.Parse(origin[0])
- if err != nil {
- return false
- }
- return u.Host == r.Host
-}
-
-func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header) string {
- if u.Subprotocols != nil {
- clientProtocols := Subprotocols(r)
- for _, serverProtocol := range u.Subprotocols {
- for _, clientProtocol := range clientProtocols {
- if clientProtocol == serverProtocol {
- return clientProtocol
- }
- }
- }
- } else if responseHeader != nil {
- return responseHeader.Get("Sec-Websocket-Protocol")
- }
- return ""
-}
-
-// Upgrade upgrades the HTTP server connection to the WebSocket protocol.
-//
-// The responseHeader is included in the response to the client's upgrade
-// request. Use the responseHeader to specify cookies (Set-Cookie) and the
-// application negotiated subprotocol (Sec-Websocket-Protocol).
-//
-// If the upgrade fails, then Upgrade replies to the client with an HTTP error
-// response.
-func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*Conn, error) {
- if r.Method != "GET" {
- return u.returnError(w, r, http.StatusMethodNotAllowed, "websocket: not a websocket handshake: request method is not GET")
- }
-
- if _, ok := responseHeader["Sec-Websocket-Extensions"]; ok {
- return u.returnError(w, r, http.StatusInternalServerError, "websocket: application specific 'Sec-Websocket-Extensions' headers are unsupported")
- }
-
- if !tokenListContainsValue(r.Header, "Connection", "upgrade") {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'upgrade' token not found in 'Connection' header")
- }
-
- if !tokenListContainsValue(r.Header, "Upgrade", "websocket") {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'websocket' token not found in 'Upgrade' header")
- }
-
- if !tokenListContainsValue(r.Header, "Sec-Websocket-Version", "13") {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: unsupported version: 13 not found in 'Sec-Websocket-Version' header")
- }
-
- checkOrigin := u.CheckOrigin
- if checkOrigin == nil {
- checkOrigin = checkSameOrigin
- }
- if !checkOrigin(r) {
- return u.returnError(w, r, http.StatusForbidden, "websocket: 'Origin' header value not allowed")
- }
-
- challengeKey := r.Header.Get("Sec-Websocket-Key")
- if challengeKey == "" {
- return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: `Sec-Websocket-Key' header is missing or blank")
- }
-
- subprotocol := u.selectSubprotocol(r, responseHeader)
-
- // Negotiate PMCE
- var compress bool
- if u.EnableCompression {
- for _, ext := range parseExtensions(r.Header) {
- if ext[""] != "permessage-deflate" {
- continue
- }
- compress = true
- break
- }
- }
-
- var (
- netConn net.Conn
- err error
- )
-
- h, ok := w.(http.Hijacker)
- if !ok {
- return u.returnError(w, r, http.StatusInternalServerError, "websocket: response does not implement http.Hijacker")
- }
- var brw *bufio.ReadWriter
- netConn, brw, err = h.Hijack()
- if err != nil {
- return u.returnError(w, r, http.StatusInternalServerError, err.Error())
- }
-
- if brw.Reader.Buffered() > 0 {
- netConn.Close()
- return nil, errors.New("websocket: client sent data before handshake is complete")
- }
-
- c := newConnBRW(netConn, true, u.ReadBufferSize, u.WriteBufferSize, brw)
- c.subprotocol = subprotocol
-
- if compress {
- c.newCompressionWriter = compressNoContextTakeover
- c.newDecompressionReader = decompressNoContextTakeover
- }
-
- p := c.writeBuf[:0]
- p = append(p, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "...)
- p = append(p, computeAcceptKey(challengeKey)...)
- p = append(p, "\r\n"...)
- if c.subprotocol != "" {
- p = append(p, "Sec-Websocket-Protocol: "...)
- p = append(p, c.subprotocol...)
- p = append(p, "\r\n"...)
- }
- if compress {
- p = append(p, "Sec-Websocket-Extensions: permessage-deflate; server_no_context_takeover; client_no_context_takeover\r\n"...)
- }
- for k, vs := range responseHeader {
- if k == "Sec-Websocket-Protocol" {
- continue
- }
- for _, v := range vs {
- p = append(p, k...)
- p = append(p, ": "...)
- for i := 0; i < len(v); i++ {
- b := v[i]
- if b <= 31 {
- // prevent response splitting.
- b = ' '
- }
- p = append(p, b)
- }
- p = append(p, "\r\n"...)
- }
- }
- p = append(p, "\r\n"...)
-
- // Clear deadlines set by HTTP server.
- netConn.SetDeadline(time.Time{})
-
- if u.HandshakeTimeout > 0 {
- netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout))
- }
- if _, err = netConn.Write(p); err != nil {
- netConn.Close()
- return nil, err
- }
- if u.HandshakeTimeout > 0 {
- netConn.SetWriteDeadline(time.Time{})
- }
-
- return c, nil
-}
-
-// Upgrade upgrades the HTTP server connection to the WebSocket protocol.
-//
-// This function is deprecated, use websocket.Upgrader instead.
-//
-// The application is responsible for checking the request origin before
-// calling Upgrade. An example implementation of the same origin policy is:
-//
-// if req.Header.Get("Origin") != "http://"+req.Host {
-// http.Error(w, "Origin not allowed", 403)
-// return
-// }
-//
-// If the endpoint supports subprotocols, then the application is responsible
-// for negotiating the protocol used on the connection. Use the Subprotocols()
-// function to get the subprotocols requested by the client. Use the
-// Sec-Websocket-Protocol response header to specify the subprotocol selected
-// by the application.
-//
-// The responseHeader is included in the response to the client's upgrade
-// request. Use the responseHeader to specify cookies (Set-Cookie) and the
-// negotiated subprotocol (Sec-Websocket-Protocol).
-//
-// The connection buffers IO to the underlying network connection. The
-// readBufSize and writeBufSize parameters specify the size of the buffers to
-// use. Messages can be larger than the buffers.
-//
-// If the request is not a valid WebSocket handshake, then Upgrade returns an
-// error of type HandshakeError. Applications should handle this error by
-// replying to the client with an HTTP error response.
-func Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header, readBufSize, writeBufSize int) (*Conn, error) {
- u := Upgrader{ReadBufferSize: readBufSize, WriteBufferSize: writeBufSize}
- u.Error = func(w http.ResponseWriter, r *http.Request, status int, reason error) {
- // don't return errors to maintain backwards compatibility
- }
- u.CheckOrigin = func(r *http.Request) bool {
- // allow all connections by default
- return true
- }
- return u.Upgrade(w, r, responseHeader)
-}
-
-// Subprotocols returns the subprotocols requested by the client in the
-// Sec-Websocket-Protocol header.
-func Subprotocols(r *http.Request) []string {
- h := strings.TrimSpace(r.Header.Get("Sec-Websocket-Protocol"))
- if h == "" {
- return nil
- }
- protocols := strings.Split(h, ",")
- for i := range protocols {
- protocols[i] = strings.TrimSpace(protocols[i])
- }
- return protocols
-}
-
-// IsWebSocketUpgrade returns true if the client requested upgrade to the
-// WebSocket protocol.
-func IsWebSocketUpgrade(r *http.Request) bool {
- return tokenListContainsValue(r.Header, "Connection", "upgrade") &&
- tokenListContainsValue(r.Header, "Upgrade", "websocket")
-}
diff --git a/vendor/github.com/gorilla/websocket/util.go b/vendor/github.com/gorilla/websocket/util.go
deleted file mode 100644
index 9a4908d..0000000
--- a/vendor/github.com/gorilla/websocket/util.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package websocket
-
-import (
- "crypto/rand"
- "crypto/sha1"
- "encoding/base64"
- "io"
- "net/http"
- "strings"
-)
-
-var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11")
-
-func computeAcceptKey(challengeKey string) string {
- h := sha1.New()
- h.Write([]byte(challengeKey))
- h.Write(keyGUID)
- return base64.StdEncoding.EncodeToString(h.Sum(nil))
-}
-
-func generateChallengeKey() (string, error) {
- p := make([]byte, 16)
- if _, err := io.ReadFull(rand.Reader, p); err != nil {
- return "", err
- }
- return base64.StdEncoding.EncodeToString(p), nil
-}
-
-// Octet types from RFC 2616.
-var octetTypes [256]byte
-
-const (
- isTokenOctet = 1 << iota
- isSpaceOctet
-)
-
-func init() {
- // From RFC 2616
- //
- // OCTET =
- // CHAR =
- // CTL =
- // CR =
- // LF =
- // SP =
- // HT =
- // <"> =
- // CRLF = CR LF
- // LWS = [CRLF] 1*( SP | HT )
- // TEXT =
- // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <">
- // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT
- // token = 1*
- // qdtext = >
-
- for c := 0; c < 256; c++ {
- var t byte
- isCtl := c <= 31 || c == 127
- isChar := 0 <= c && c <= 127
- isSeparator := strings.IndexRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) >= 0
- if strings.IndexRune(" \t\r\n", rune(c)) >= 0 {
- t |= isSpaceOctet
- }
- if isChar && !isCtl && !isSeparator {
- t |= isTokenOctet
- }
- octetTypes[c] = t
- }
-}
-
-func skipSpace(s string) (rest string) {
- i := 0
- for ; i < len(s); i++ {
- if octetTypes[s[i]]&isSpaceOctet == 0 {
- break
- }
- }
- return s[i:]
-}
-
-func nextToken(s string) (token, rest string) {
- i := 0
- for ; i < len(s); i++ {
- if octetTypes[s[i]]&isTokenOctet == 0 {
- break
- }
- }
- return s[:i], s[i:]
-}
-
-func nextTokenOrQuoted(s string) (value string, rest string) {
- if !strings.HasPrefix(s, "\"") {
- return nextToken(s)
- }
- s = s[1:]
- for i := 0; i < len(s); i++ {
- switch s[i] {
- case '"':
- return s[:i], s[i+1:]
- case '\\':
- p := make([]byte, len(s)-1)
- j := copy(p, s[:i])
- escape := true
- for i = i + 1; i < len(s); i++ {
- b := s[i]
- switch {
- case escape:
- escape = false
- p[j] = b
- j += 1
- case b == '\\':
- escape = true
- case b == '"':
- return string(p[:j]), s[i+1:]
- default:
- p[j] = b
- j += 1
- }
- }
- return "", ""
- }
- }
- return "", ""
-}
-
-// tokenListContainsValue returns true if the 1#token header with the given
-// name contains token.
-func tokenListContainsValue(header http.Header, name string, value string) bool {
-headers:
- for _, s := range header[name] {
- for {
- var t string
- t, s = nextToken(skipSpace(s))
- if t == "" {
- continue headers
- }
- s = skipSpace(s)
- if s != "" && s[0] != ',' {
- continue headers
- }
- if strings.EqualFold(t, value) {
- return true
- }
- if s == "" {
- continue headers
- }
- s = s[1:]
- }
- }
- return false
-}
-
-// parseExtensiosn parses WebSocket extensions from a header.
-func parseExtensions(header http.Header) []map[string]string {
-
- // From RFC 6455:
- //
- // Sec-WebSocket-Extensions = extension-list
- // extension-list = 1#extension
- // extension = extension-token *( ";" extension-param )
- // extension-token = registered-token
- // registered-token = token
- // extension-param = token [ "=" (token | quoted-string) ]
- // ;When using the quoted-string syntax variant, the value
- // ;after quoted-string unescaping MUST conform to the
- // ;'token' ABNF.
-
- var result []map[string]string
-headers:
- for _, s := range header["Sec-Websocket-Extensions"] {
- for {
- var t string
- t, s = nextToken(skipSpace(s))
- if t == "" {
- continue headers
- }
- ext := map[string]string{"": t}
- for {
- s = skipSpace(s)
- if !strings.HasPrefix(s, ";") {
- break
- }
- var k string
- k, s = nextToken(skipSpace(s[1:]))
- if k == "" {
- continue headers
- }
- s = skipSpace(s)
- var v string
- if strings.HasPrefix(s, "=") {
- v, s = nextTokenOrQuoted(skipSpace(s[1:]))
- s = skipSpace(s)
- }
- if s != "" && s[0] != ',' && s[0] != ';' {
- continue headers
- }
- ext[k] = v
- }
- if s != "" && s[0] != ',' {
- continue headers
- }
- result = append(result, ext)
- if s == "" {
- continue headers
- }
- s = s[1:]
- }
- }
- return result
-}
diff --git a/vendor/github.com/nsf/gocode/LICENSE b/vendor/github.com/nsf/gocode/LICENSE
deleted file mode 100644
index 5ce0cee..0000000
--- a/vendor/github.com/nsf/gocode/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (C) 2010 nsf
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/github.com/nsf/gocode/README.md b/vendor/github.com/nsf/gocode/README.md
deleted file mode 100644
index 11148c8..0000000
--- a/vendor/github.com/nsf/gocode/README.md
+++ /dev/null
@@ -1,195 +0,0 @@
-## An autocompletion daemon for the Go programming language
-
-Gocode is a helper tool which is intended to be integrated with your source code editor, like vim, neovim and emacs. It provides several advanced capabilities, which currently includes:
-
- - Context-sensitive autocompletion
-
-It is called *daemon*, because it uses client/server architecture for caching purposes. In particular, it makes autocompletions very fast. Typical autocompletion time with warm cache is 30ms, which is barely noticeable.
-
-Also watch the [demo screencast](http://nosmileface.ru/images/gocode-demo.swf).
-
-![Gocode in vim](http://nosmileface.ru/images/gocode-screenshot.png)
-
-![Gocode in emacs](http://nosmileface.ru/images/emacs-gocode.png)
-
-### Setup
-
- 1. You should have a correctly installed Go compiler environment and your personal workspace ($GOPATH). If you have no idea what **$GOPATH** is, take a look [here](http://golang.org/doc/code.html). Please make sure that your **$GOPATH/bin** is available in your **$PATH**. This is important, because most editors assume that **gocode** binary is available in one of the directories, specified by your **$PATH** environment variable. Otherwise manually copy the **gocode** binary from **$GOPATH/bin** to a location which is part of your **$PATH** after getting it in step 2.
-
- Do these steps only if you understand why you need to do them:
-
- `export GOPATH=$HOME/goprojects`
-
- `export PATH=$PATH:$GOPATH/bin`
-
- 2. Then you need to get the appropriate version of the gocode, for 6g/8g/5g compiler you can do this:
-
- `go get -u github.com/nsf/gocode` (-u flag for "update")
-
- Windows users should consider doing this instead:
-
- `go get -u -ldflags -H=windowsgui github.com/nsf/gocode`
-
- That way on the Windows OS gocode will be built as a GUI application and doing so solves hanging window issues with some of the editors.
-
- 3. Next steps are editor specific. See below.
-
-### Vim setup
-
-#### Vim manual installation
-
-Note: As of go 1.5 there is no $GOROOT/misc/vim script. Suggested installation is via [vim-go plugin](https://github.com/fatih/vim-go).
-
-In order to install vim scripts, you need to fulfill the following steps:
-
- 1. Install official Go vim scripts from **$GOROOT/misc/vim**. If you did that already, proceed to the step 2.
-
- 2. Install gocode vim scripts. Usually it's enough to do the following:
-
- 2.1. `vim/update.sh`
-
- **update.sh** script does the following:
-
- #!/bin/sh
- mkdir -p "$HOME/.vim/autoload"
- mkdir -p "$HOME/.vim/ftplugin/go"
- cp "${0%/*}/autoload/gocomplete.vim" "$HOME/.vim/autoload"
- cp "${0%/*}/ftplugin/go/gocomplete.vim" "$HOME/.vim/ftplugin/go"
-
- 2.2. Alternatively, you can create symlinks using symlink.sh script in order to avoid running update.sh after every gocode update.
-
- **symlink.sh** script does the following:
-
- #!/bin/sh
- cd "${0%/*}"
- ROOTDIR=`pwd`
- mkdir -p "$HOME/.vim/autoload"
- mkdir -p "$HOME/.vim/ftplugin/go"
- ln -s "$ROOTDIR/autoload/gocomplete.vim" "$HOME/.vim/autoload/"
- ln -s "$ROOTDIR/ftplugin/go/gocomplete.vim" "$HOME/.vim/ftplugin/go/"
-
- 3. Make sure vim has filetype plugin enabled. Simply add that to your **.vimrc**:
-
- `filetype plugin on`
-
- 4. Autocompletion should work now. Use `` for autocompletion (omnifunc autocompletion).
-
-#### Using Vundle in Vim
-
-Add the following line to your **.vimrc**:
-
-`Plugin 'nsf/gocode', {'rtp': 'vim/'}`
-
-And then update your packages by running `:PluginInstall`.
-
-#### Using vim-plug in Vim
-
-Add the following line to your **.vimrc**:
-
-`Plug 'nsf/gocode', { 'rtp': 'vim', 'do': '~/.vim/plugged/gocode/vim/symlink.sh' }`
-
-And then update your packages by running `:PlugInstall`.
-
-#### Other
-
-Alternatively take a look at the vundle/pathogen friendly repo: https://github.com/Blackrush/vim-gocode.
-
-### Neovim setup
-#### Neovim manual installation
-
- Neovim users should also follow `Vim manual installation`, except that you should goto `gocode/nvim` in step 2, and remember that, the Neovim configuration file is `~/.config/nvim/init.vim`.
-
-#### Using Vundle in Neovim
-
-Add the following line to your **init.vim**:
-
-`Plugin 'nsf/gocode', {'rtp': 'nvim/'}`
-
-And then update your packages by running `:PluginInstall`.
-
-#### Using vim-plug in Neovim
-
-Add the following line to your **init.vim**:
-
-`Plug 'nsf/gocode', { 'rtp': 'nvim', 'do': '~/.config/nvim/plugged/gocode/nvim/symlink.sh' }`
-
-And then update your packages by running `:PlugInstall`.
-
-### Emacs setup
-
-In order to install emacs script, you need to fulfill the following steps:
-
- 1. Install [auto-complete-mode](http://www.emacswiki.org/emacs/AutoComplete)
-
- 2. Copy **emacs/go-autocomplete.el** file from the gocode source distribution to a directory which is in your 'load-path' in emacs.
-
- 3. Add these lines to your **.emacs**:
-
- (require 'go-autocomplete)
- (require 'auto-complete-config)
- (ac-config-default)
-
-Also, there is an alternative plugin for emacs using company-mode. See `emacs-company/README` for installation instructions.
-
-If you're a MacOSX user, you may find that script useful: https://github.com/purcell/exec-path-from-shell. It helps you with setting up the right environment variables as Go and gocode require it. By default it pulls the PATH, but don't forget to add the GOPATH as well, e.g.:
-
-```
-(when (memq window-system '(mac ns))
- (exec-path-from-shell-initialize)
- (exec-path-from-shell-copy-env "GOPATH"))
-```
-
-### Options
-
-You can change all available options using `gocode set` command. The config file uses json format and is usually stored somewhere in **~/.config/gocode** directory. On windows it's stored in the appropriate AppData folder. It's suggested to avoid modifying config file manually, do that using the `gocode set` command.
-
-`gocode set` lists all options and their values.
-
-`gocode set ` shows the value of that *option*.
-
-`gocode set ` sets the new *value* for that *option*.
-
- - *propose-builtins*
-
- A boolean option. If **true**, gocode will add built-in types, functions and constants to an autocompletion proposals. Default: **false**.
-
- - *lib-path*
-
- A string option. Allows you to add search paths for packages. By default, gocode only searches **$GOPATH/pkg/$GOOS_$GOARCH** and **$GOROOT/pkg/$GOOS_$GOARCH** in terms of previously existed environment variables. Also you can specify multiple paths using ':' (colon) as a separator (on Windows use semicolon ';'). The paths specified by *lib-path* are prepended to the default ones.
-
- - *autobuild*
-
- A boolean option. If **true**, gocode will try to automatically build out-of-date packages when their source files are modified, in order to obtain the freshest autocomplete results for them. This feature is experimental. Default: **false**.
-
- - *force-debug-output*
-
- A string option. If is not empty, gocode will forcefully redirect the logging into that file. Also forces enabling of the debug mode on the server side. Default: "" (empty).
-
- - *package-lookup-mode*
-
- A string option. If **go**, use standard Go package lookup rules. If **gb**, use gb-specific lookup rules. See https://github.com/constabulary/gb for details. Default: **go**.
-
- - *close-timeout*
-
- An integer option. If there have been no completion requests after this number of seconds, the gocode process will terminate. Defaults to 1800 (30 minutes).
-
-### Debugging
-
-If something went wrong, the first thing you may want to do is manually start the gocode daemon with a debug mode enabled and in a separate terminal window. It will show you all the stack traces, panics if any and additional info about autocompletion requests. Shutdown the daemon if it was already started and run a new one explicitly with a debug mode enabled:
-
-`gocode close`
-
-`gocode -s -debug`
-
-Please, report bugs, feature suggestions and other rants to the [github issue tracker](http://github.com/nsf/gocode/issues) of this project.
-
-### Developing
-
-There is [Guide for IDE/editor plugin developers](docs/IDE_integration.md).
-
-If you have troubles, please, contact me and I will try to do my best answering your questions. You can contact me via email . Or for short question find me on IRC: #go-nuts @ freenode.
-
-### Misc
-
- - It's a good idea to use the latest git version always. I'm trying to keep it in a working state.
- - Use `go install` (not `go build`) for building a local source tree. The objects in `pkg/` are needed for Gocode to work.
diff --git a/vendor/github.com/nsf/gocode/autocompletecontext.go b/vendor/github.com/nsf/gocode/autocompletecontext.go
deleted file mode 100644
index 473cbd3..0000000
--- a/vendor/github.com/nsf/gocode/autocompletecontext.go
+++ /dev/null
@@ -1,689 +0,0 @@
-package main
-
-import (
- "bytes"
- "fmt"
- "go/ast"
- "go/parser"
- "go/token"
- "os"
- "path/filepath"
- "runtime"
- "sort"
- "strings"
- "time"
-)
-
-//-------------------------------------------------------------------------
-// out_buffers
-//
-// Temporary structure for writing autocomplete response.
-//-------------------------------------------------------------------------
-
-// fields must be exported for RPC
-type candidate struct {
- Name string
- Type string
- Class decl_class
-}
-
-type out_buffers struct {
- tmpbuf *bytes.Buffer
- candidates []candidate
- ctx *auto_complete_context
- tmpns map[string]bool
- ignorecase bool
-}
-
-func new_out_buffers(ctx *auto_complete_context) *out_buffers {
- b := new(out_buffers)
- b.tmpbuf = bytes.NewBuffer(make([]byte, 0, 1024))
- b.candidates = make([]candidate, 0, 64)
- b.ctx = ctx
- return b
-}
-
-func (b *out_buffers) Len() int {
- return len(b.candidates)
-}
-
-func (b *out_buffers) Less(i, j int) bool {
- x := b.candidates[i]
- y := b.candidates[j]
- if x.Class == y.Class {
- return x.Name < y.Name
- }
- return x.Class < y.Class
-}
-
-func (b *out_buffers) Swap(i, j int) {
- b.candidates[i], b.candidates[j] = b.candidates[j], b.candidates[i]
-}
-
-func (b *out_buffers) append_decl(p, name string, decl *decl, class decl_class) {
- c1 := !g_config.ProposeBuiltins && decl.scope == g_universe_scope && decl.name != "Error"
- c2 := class != decl_invalid && decl.class != class
- c3 := class == decl_invalid && !has_prefix(name, p, b.ignorecase)
- c4 := !decl.matches()
- c5 := !check_type_expr(decl.typ)
-
- if c1 || c2 || c3 || c4 || c5 {
- return
- }
-
- decl.pretty_print_type(b.tmpbuf)
- b.candidates = append(b.candidates, candidate{
- Name: name,
- Type: b.tmpbuf.String(),
- Class: decl.class,
- })
- b.tmpbuf.Reset()
-}
-
-func (b *out_buffers) append_embedded(p string, decl *decl, class decl_class) {
- if decl.embedded == nil {
- return
- }
-
- first_level := false
- if b.tmpns == nil {
- // first level, create tmp namespace
- b.tmpns = make(map[string]bool)
- first_level = true
-
- // add all children of the current decl to the namespace
- for _, c := range decl.children {
- b.tmpns[c.name] = true
- }
- }
-
- for _, emb := range decl.embedded {
- typedecl := type_to_decl(emb, decl.scope)
- if typedecl == nil {
- continue
- }
-
- // prevent infinite recursion here
- if typedecl.flags&decl_visited != 0 {
- continue
- }
- typedecl.flags |= decl_visited
- defer typedecl.clear_visited()
-
- for _, c := range typedecl.children {
- if _, has := b.tmpns[c.name]; has {
- continue
- }
- b.append_decl(p, c.name, c, class)
- b.tmpns[c.name] = true
- }
- b.append_embedded(p, typedecl, class)
- }
-
- if first_level {
- // remove tmp namespace
- b.tmpns = nil
- }
-}
-
-//-------------------------------------------------------------------------
-// auto_complete_context
-//
-// Context that holds cache structures for autocompletion needs. It
-// includes cache for packages and for main package files.
-//-------------------------------------------------------------------------
-
-type auto_complete_context struct {
- current *auto_complete_file // currently edited file
- others []*decl_file_cache // other files of the current package
- pkg *scope
-
- pcache package_cache // packages cache
- declcache *decl_cache // top-level declarations cache
-}
-
-func new_auto_complete_context(pcache package_cache, declcache *decl_cache) *auto_complete_context {
- c := new(auto_complete_context)
- c.current = new_auto_complete_file("", declcache.context)
- c.pcache = pcache
- c.declcache = declcache
- return c
-}
-
-func (c *auto_complete_context) update_caches() {
- // temporary map for packages that we need to check for a cache expiration
- // map is used as a set of unique items to prevent double checks
- ps := make(map[string]*package_file_cache)
-
- // collect import information from all of the files
- c.pcache.append_packages(ps, c.current.packages)
- c.others = get_other_package_files(c.current.name, c.current.package_name, c.declcache)
- for _, other := range c.others {
- c.pcache.append_packages(ps, other.packages)
- }
-
- update_packages(ps)
-
- // fix imports for all files
- fixup_packages(c.current.filescope, c.current.packages, c.pcache)
- for _, f := range c.others {
- fixup_packages(f.filescope, f.packages, c.pcache)
- }
-
- // At this point we have collected all top level declarations, now we need to
- // merge them in the common package block.
- c.merge_decls()
-}
-
-func (c *auto_complete_context) merge_decls() {
- c.pkg = new_scope(g_universe_scope)
- merge_decls(c.current.filescope, c.pkg, c.current.decls)
- merge_decls_from_packages(c.pkg, c.current.packages, c.pcache)
- for _, f := range c.others {
- merge_decls(f.filescope, c.pkg, f.decls)
- merge_decls_from_packages(c.pkg, f.packages, c.pcache)
- }
-}
-
-func (c *auto_complete_context) make_decl_set(scope *scope) map[string]*decl {
- set := make(map[string]*decl, len(c.pkg.entities)*2)
- make_decl_set_recursive(set, scope)
- return set
-}
-
-func (c *auto_complete_context) get_candidates_from_set(set map[string]*decl, partial string, class decl_class, b *out_buffers) {
- for key, value := range set {
- if value == nil {
- continue
- }
- value.infer_type()
- b.append_decl(partial, key, value, class)
- }
-}
-
-func (c *auto_complete_context) get_candidates_from_decl(cc cursor_context, class decl_class, b *out_buffers) {
- // propose all children of a subject declaration and
- for _, decl := range cc.decl.children {
- if cc.decl.class == decl_package && !ast.IsExported(decl.name) {
- continue
- }
- if cc.struct_field {
- // if we're autocompleting struct field init, skip all methods
- if _, ok := decl.typ.(*ast.FuncType); ok {
- continue
- }
- }
- b.append_decl(cc.partial, decl.name, decl, class)
- }
- // propose all children of an underlying struct/interface type
- adecl := advance_to_struct_or_interface(cc.decl)
- if adecl != nil && adecl != cc.decl {
- for _, decl := range adecl.children {
- if decl.class == decl_var {
- b.append_decl(cc.partial, decl.name, decl, class)
- }
- }
- }
- // propose all children of its embedded types
- b.append_embedded(cc.partial, cc.decl, class)
-}
-
-func (c *auto_complete_context) get_import_candidates(partial string, b *out_buffers) {
- pkgdirs := g_daemon.context.pkg_dirs()
- resultSet := map[string]struct{}{}
- for _, pkgdir := range pkgdirs {
- // convert srcpath to pkgpath and get candidates
- get_import_candidates_dir(pkgdir, filepath.FromSlash(partial), b.ignorecase, resultSet)
- }
- for k := range resultSet {
- b.candidates = append(b.candidates, candidate{Name: k, Class: decl_import})
- }
-}
-
-func get_import_candidates_dir(root, partial string, ignorecase bool, r map[string]struct{}) {
- var fpath string
- var match bool
- if strings.HasSuffix(partial, "/") {
- fpath = filepath.Join(root, partial)
- } else {
- fpath = filepath.Join(root, filepath.Dir(partial))
- match = true
- }
- fi := readdir(fpath)
- for i := range fi {
- name := fi[i].Name()
- rel, err := filepath.Rel(root, filepath.Join(fpath, name))
- if err != nil {
- panic(err)
- }
- if match && !has_prefix(rel, partial, ignorecase) {
- continue
- } else if fi[i].IsDir() {
- get_import_candidates_dir(root, rel+string(filepath.Separator), ignorecase, r)
- } else {
- ext := filepath.Ext(name)
- if ext != ".a" {
- continue
- } else {
- rel = rel[0 : len(rel)-2]
- }
- r[vendorlessImportPath(filepath.ToSlash(rel))] = struct{}{}
- }
- }
-}
-
-// returns three slices of the same length containing:
-// 1. apropos names
-// 2. apropos types (pretty-printed)
-// 3. apropos classes
-// and length of the part that should be replaced (if any)
-func (c *auto_complete_context) apropos(file []byte, filename string, cursor int) ([]candidate, int) {
- c.current.cursor = cursor
- c.current.name = filename
-
- // Update caches and parse the current file.
- // This process is quite complicated, because I was trying to design it in a
- // concurrent fashion. Apparently I'm not really good at that. Hopefully
- // will be better in future.
-
- // Ugly hack, but it actually may help in some cases. Insert a
- // semicolon right at the cursor location.
- filesemi := make([]byte, len(file)+1)
- copy(filesemi, file[:cursor])
- filesemi[cursor] = ';'
- copy(filesemi[cursor+1:], file[cursor:])
-
- // Does full processing of the currently edited file (top-level declarations plus
- // active function).
- c.current.process_data(filesemi)
-
- // Updates cache of other files and packages. See the function for details of
- // the process. At the end merges all the top-level declarations into the package
- // block.
- c.update_caches()
-
- // And we're ready to Go. ;)
-
- b := new_out_buffers(c)
-
- partial := 0
- cc, ok := c.deduce_cursor_context(file, cursor)
- if !ok {
- var d *decl
- if ident, ok := cc.expr.(*ast.Ident); ok && g_config.UnimportedPackages {
- d = resolveKnownPackageIdent(ident.Name, c.current.name, c.current.context)
- }
- if d == nil {
- return nil, 0
- }
- cc.decl = d
- }
-
- class := decl_invalid
- switch cc.partial {
- case "const":
- class = decl_const
- case "var":
- class = decl_var
- case "type":
- class = decl_type
- case "func":
- class = decl_func
- case "package":
- class = decl_package
- }
-
- if cc.decl_import {
- c.get_import_candidates(cc.partial, b)
- if cc.partial != "" && len(b.candidates) == 0 {
- // as a fallback, try case insensitive approach
- b.ignorecase = true
- c.get_import_candidates(cc.partial, b)
- }
- } else if cc.decl == nil {
- // In case if no declaraion is a subject of completion, propose all:
- set := c.make_decl_set(c.current.scope)
- c.get_candidates_from_set(set, cc.partial, class, b)
- if cc.partial != "" && len(b.candidates) == 0 {
- // as a fallback, try case insensitive approach
- b.ignorecase = true
- c.get_candidates_from_set(set, cc.partial, class, b)
- }
- } else {
- c.get_candidates_from_decl(cc, class, b)
- if cc.partial != "" && len(b.candidates) == 0 {
- // as a fallback, try case insensitive approach
- b.ignorecase = true
- c.get_candidates_from_decl(cc, class, b)
- }
- }
- partial = len(cc.partial)
-
- if len(b.candidates) == 0 {
- return nil, 0
- }
-
- sort.Sort(b)
- return b.candidates, partial
-}
-
-func update_packages(ps map[string]*package_file_cache) {
- // initiate package cache update
- done := make(chan bool)
- for _, p := range ps {
- go func(p *package_file_cache) {
- defer func() {
- if err := recover(); err != nil {
- print_backtrace(err)
- done <- false
- }
- }()
- p.update_cache()
- done <- true
- }(p)
- }
-
- // wait for its completion
- for _ = range ps {
- if !<-done {
- panic("One of the package cache updaters panicked")
- }
- }
-}
-
-func merge_decls(filescope *scope, pkg *scope, decls map[string]*decl) {
- for _, d := range decls {
- pkg.merge_decl(d)
- }
- filescope.parent = pkg
-}
-
-func merge_decls_from_packages(pkgscope *scope, pkgs []package_import, pcache package_cache) {
- for _, p := range pkgs {
- path, alias := p.path, p.alias
- if alias != "." {
- continue
- }
- p := pcache[path].main
- if p == nil {
- continue
- }
- for _, d := range p.children {
- if ast.IsExported(d.name) {
- pkgscope.merge_decl(d)
- }
- }
- }
-}
-
-func fixup_packages(filescope *scope, pkgs []package_import, pcache package_cache) {
- for _, p := range pkgs {
- path, alias := p.path, p.alias
- if alias == "" {
- alias = pcache[path].defalias
- }
- // skip packages that will be merged to the package scope
- if alias == "." {
- continue
- }
- filescope.replace_decl(alias, pcache[path].main)
- }
-}
-
-func get_other_package_files(filename, packageName string, declcache *decl_cache) []*decl_file_cache {
- others := find_other_package_files(filename, packageName)
-
- ret := make([]*decl_file_cache, len(others))
- done := make(chan *decl_file_cache)
-
- for _, nm := range others {
- go func(name string) {
- defer func() {
- if err := recover(); err != nil {
- print_backtrace(err)
- done <- nil
- }
- }()
- done <- declcache.get_and_update(name)
- }(nm)
- }
-
- for i := range others {
- ret[i] = <-done
- if ret[i] == nil {
- panic("One of the decl cache updaters panicked")
- }
- }
-
- return ret
-}
-
-func find_other_package_files(filename, package_name string) []string {
- if filename == "" {
- return nil
- }
-
- dir, file := filepath.Split(filename)
- files_in_dir, err := readdir_lstat(dir)
- if err != nil {
- panic(err)
- }
-
- count := 0
- for _, stat := range files_in_dir {
- ok, _ := filepath.Match("*.go", stat.Name())
- if !ok || stat.Name() == file {
- continue
- }
- count++
- }
-
- out := make([]string, 0, count)
- for _, stat := range files_in_dir {
- const non_regular = os.ModeDir | os.ModeSymlink |
- os.ModeDevice | os.ModeNamedPipe | os.ModeSocket
-
- ok, _ := filepath.Match("*.go", stat.Name())
- if !ok || stat.Name() == file || stat.Mode()&non_regular != 0 {
- continue
- }
-
- abspath := filepath.Join(dir, stat.Name())
- if file_package_name(abspath) == package_name {
- n := len(out)
- out = out[:n+1]
- out[n] = abspath
- }
- }
-
- return out
-}
-
-func file_package_name(filename string) string {
- file, _ := parser.ParseFile(token.NewFileSet(), filename, nil, parser.PackageClauseOnly)
- return file.Name.Name
-}
-
-func make_decl_set_recursive(set map[string]*decl, scope *scope) {
- for name, ent := range scope.entities {
- if _, ok := set[name]; !ok {
- set[name] = ent
- }
- }
- if scope.parent != nil {
- make_decl_set_recursive(set, scope.parent)
- }
-}
-
-func check_func_field_list(f *ast.FieldList) bool {
- if f == nil {
- return true
- }
-
- for _, field := range f.List {
- if !check_type_expr(field.Type) {
- return false
- }
- }
- return true
-}
-
-// checks for a type expression correctness, it the type expression has
-// ast.BadExpr somewhere, returns false, otherwise true
-func check_type_expr(e ast.Expr) bool {
- switch t := e.(type) {
- case *ast.StarExpr:
- return check_type_expr(t.X)
- case *ast.ArrayType:
- return check_type_expr(t.Elt)
- case *ast.SelectorExpr:
- return check_type_expr(t.X)
- case *ast.FuncType:
- a := check_func_field_list(t.Params)
- b := check_func_field_list(t.Results)
- return a && b
- case *ast.MapType:
- a := check_type_expr(t.Key)
- b := check_type_expr(t.Value)
- return a && b
- case *ast.Ellipsis:
- return check_type_expr(t.Elt)
- case *ast.ChanType:
- return check_type_expr(t.Value)
- case *ast.BadExpr:
- return false
- default:
- return true
- }
- return true
-}
-
-//-------------------------------------------------------------------------
-// Status output
-//-------------------------------------------------------------------------
-
-type decl_slice []*decl
-
-func (s decl_slice) Less(i, j int) bool {
- if s[i].class != s[j].class {
- return s[i].name < s[j].name
- }
- return s[i].class < s[j].class
-}
-func (s decl_slice) Len() int { return len(s) }
-func (s decl_slice) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
-
-const (
- color_red = "\033[0;31m"
- color_red_bold = "\033[1;31m"
- color_green = "\033[0;32m"
- color_green_bold = "\033[1;32m"
- color_yellow = "\033[0;33m"
- color_yellow_bold = "\033[1;33m"
- color_blue = "\033[0;34m"
- color_blue_bold = "\033[1;34m"
- color_magenta = "\033[0;35m"
- color_magenta_bold = "\033[1;35m"
- color_cyan = "\033[0;36m"
- color_cyan_bold = "\033[1;36m"
- color_white = "\033[0;37m"
- color_white_bold = "\033[1;37m"
- color_none = "\033[0m"
-)
-
-var g_decl_class_to_color = [...]string{
- decl_const: color_white_bold,
- decl_var: color_magenta,
- decl_type: color_cyan,
- decl_func: color_green,
- decl_package: color_red,
- decl_methods_stub: color_red,
-}
-
-var g_decl_class_to_string_status = [...]string{
- decl_const: " const",
- decl_var: " var",
- decl_type: " type",
- decl_func: " func",
- decl_package: "package",
- decl_methods_stub: " stub",
-}
-
-func (c *auto_complete_context) status() string {
-
- buf := bytes.NewBuffer(make([]byte, 0, 4096))
- fmt.Fprintf(buf, "Server's GOMAXPROCS == %d\n", runtime.GOMAXPROCS(0))
- fmt.Fprintf(buf, "\nPackage cache contains %d entries\n", len(c.pcache))
- fmt.Fprintf(buf, "\nListing these entries:\n")
- for _, mod := range c.pcache {
- fmt.Fprintf(buf, "\tname: %s (default alias: %s)\n", mod.name, mod.defalias)
- fmt.Fprintf(buf, "\timports %d declarations and %d packages\n", len(mod.main.children), len(mod.others))
- if mod.mtime == -1 {
- fmt.Fprintf(buf, "\tthis package stays in cache forever (built-in package)\n")
- } else {
- mtime := time.Unix(0, mod.mtime)
- fmt.Fprintf(buf, "\tlast modification time: %s\n", mtime)
- }
- fmt.Fprintf(buf, "\n")
- }
- if c.current.name != "" {
- fmt.Fprintf(buf, "Last edited file: %s (package: %s)\n", c.current.name, c.current.package_name)
- if len(c.others) > 0 {
- fmt.Fprintf(buf, "\nOther files from the current package:\n")
- }
- for _, f := range c.others {
- fmt.Fprintf(buf, "\t%s\n", f.name)
- }
- fmt.Fprintf(buf, "\nListing declarations from files:\n")
-
- const status_decls = "\t%s%s" + color_none + " " + color_yellow + "%s" + color_none + "\n"
- const status_decls_children = "\t%s%s" + color_none + " " + color_yellow + "%s" + color_none + " (%d)\n"
-
- fmt.Fprintf(buf, "\n%s:\n", c.current.name)
- ds := make(decl_slice, len(c.current.decls))
- i := 0
- for _, d := range c.current.decls {
- ds[i] = d
- i++
- }
- sort.Sort(ds)
- for _, d := range ds {
- if len(d.children) > 0 {
- fmt.Fprintf(buf, status_decls_children,
- g_decl_class_to_color[d.class],
- g_decl_class_to_string_status[d.class],
- d.name, len(d.children))
- } else {
- fmt.Fprintf(buf, status_decls,
- g_decl_class_to_color[d.class],
- g_decl_class_to_string_status[d.class],
- d.name)
- }
- }
-
- for _, f := range c.others {
- fmt.Fprintf(buf, "\n%s:\n", f.name)
- ds = make(decl_slice, len(f.decls))
- i = 0
- for _, d := range f.decls {
- ds[i] = d
- i++
- }
- sort.Sort(ds)
- for _, d := range ds {
- if len(d.children) > 0 {
- fmt.Fprintf(buf, status_decls_children,
- g_decl_class_to_color[d.class],
- g_decl_class_to_string_status[d.class],
- d.name, len(d.children))
- } else {
- fmt.Fprintf(buf, status_decls,
- g_decl_class_to_color[d.class],
- g_decl_class_to_string_status[d.class],
- d.name)
- }
- }
- }
- }
- return buf.String()
-}
diff --git a/vendor/github.com/nsf/gocode/autocompletefile.go b/vendor/github.com/nsf/gocode/autocompletefile.go
deleted file mode 100644
index ca6d2ca..0000000
--- a/vendor/github.com/nsf/gocode/autocompletefile.go
+++ /dev/null
@@ -1,418 +0,0 @@
-package main
-
-import (
- "bytes"
- "go/ast"
- "go/parser"
- "go/scanner"
- "go/token"
- "log"
-)
-
-func parse_decl_list(fset *token.FileSet, data []byte) ([]ast.Decl, error) {
- var buf bytes.Buffer
- buf.WriteString("package p;")
- buf.Write(data)
- file, err := parser.ParseFile(fset, "", buf.Bytes(), parser.AllErrors)
- if err != nil {
- return file.Decls, err
- }
- return file.Decls, nil
-}
-
-func log_parse_error(intro string, err error) {
- if el, ok := err.(scanner.ErrorList); ok {
- log.Printf("%s:", intro)
- for _, er := range el {
- log.Printf(" %s", er)
- }
- } else {
- log.Printf("%s: %s", intro, err)
- }
-}
-
-//-------------------------------------------------------------------------
-// auto_complete_file
-//-------------------------------------------------------------------------
-
-type auto_complete_file struct {
- name string
- package_name string
-
- decls map[string]*decl
- packages []package_import
- filescope *scope
- scope *scope
-
- cursor int // for current file buffer only
- fset *token.FileSet
- context *package_lookup_context
-}
-
-func new_auto_complete_file(name string, context *package_lookup_context) *auto_complete_file {
- p := new(auto_complete_file)
- p.name = name
- p.cursor = -1
- p.fset = token.NewFileSet()
- p.context = context
- return p
-}
-
-func (f *auto_complete_file) offset(p token.Pos) int {
- const fixlen = len("package p;")
- return f.fset.Position(p).Offset - fixlen
-}
-
-// this one is used for current file buffer exclusively
-func (f *auto_complete_file) process_data(data []byte) {
- cur, filedata, block := rip_off_decl(data, f.cursor)
- file, err := parser.ParseFile(f.fset, "", filedata, parser.AllErrors)
- if err != nil && *g_debug {
- log_parse_error("Error parsing input file (outer block)", err)
- }
- f.package_name = package_name(file)
-
- f.decls = make(map[string]*decl)
- f.packages = collect_package_imports(f.name, file.Decls, f.context)
- f.filescope = new_scope(nil)
- f.scope = f.filescope
-
- for _, d := range file.Decls {
- anonymify_ast(d, 0, f.filescope)
- }
-
- // process all top-level declarations
- for _, decl := range file.Decls {
- append_to_top_decls(f.decls, decl, f.scope)
- }
- if block != nil {
- // process local function as top-level declaration
- decls, err := parse_decl_list(f.fset, block)
- if err != nil && *g_debug {
- log_parse_error("Error parsing input file (inner block)", err)
- }
-
- for _, d := range decls {
- anonymify_ast(d, 0, f.filescope)
- }
-
- for _, decl := range decls {
- append_to_top_decls(f.decls, decl, f.scope)
- }
-
- // process function internals
- f.cursor = cur
- for _, decl := range decls {
- f.process_decl_locals(decl)
- }
- }
-
-}
-
-func (f *auto_complete_file) process_decl_locals(decl ast.Decl) {
- switch t := decl.(type) {
- case *ast.FuncDecl:
- if f.cursor_in(t.Body) {
- s := f.scope
- f.scope = new_scope(f.scope)
-
- f.process_field_list(t.Recv, s)
- f.process_field_list(t.Type.Params, s)
- f.process_field_list(t.Type.Results, s)
- f.process_block_stmt(t.Body)
- }
- default:
- v := new(func_lit_visitor)
- v.ctx = f
- ast.Walk(v, decl)
- }
-}
-
-func (f *auto_complete_file) process_decl(decl ast.Decl) {
- if t, ok := decl.(*ast.GenDecl); ok && f.offset(t.TokPos) > f.cursor {
- return
- }
- prevscope := f.scope
- foreach_decl(decl, func(data *foreach_decl_struct) {
- class := ast_decl_class(data.decl)
- if class != decl_type {
- f.scope, prevscope = advance_scope(f.scope)
- }
- for i, name := range data.names {
- typ, v, vi := data.type_value_index(i)
-
- d := new_decl_full(name.Name, class, 0, typ, v, vi, prevscope)
- if d == nil {
- return
- }
-
- f.scope.add_named_decl(d)
- }
- })
-}
-
-func (f *auto_complete_file) process_block_stmt(block *ast.BlockStmt) {
- if block != nil && f.cursor_in(block) {
- f.scope, _ = advance_scope(f.scope)
-
- for _, stmt := range block.List {
- f.process_stmt(stmt)
- }
-
- // hack to process all func literals
- v := new(func_lit_visitor)
- v.ctx = f
- ast.Walk(v, block)
- }
-}
-
-type func_lit_visitor struct {
- ctx *auto_complete_file
-}
-
-func (v *func_lit_visitor) Visit(node ast.Node) ast.Visitor {
- if t, ok := node.(*ast.FuncLit); ok && v.ctx.cursor_in(t.Body) {
- s := v.ctx.scope
- v.ctx.scope = new_scope(v.ctx.scope)
-
- v.ctx.process_field_list(t.Type.Params, s)
- v.ctx.process_field_list(t.Type.Results, s)
- v.ctx.process_block_stmt(t.Body)
-
- return nil
- }
- return v
-}
-
-func (f *auto_complete_file) process_stmt(stmt ast.Stmt) {
- switch t := stmt.(type) {
- case *ast.DeclStmt:
- f.process_decl(t.Decl)
- case *ast.AssignStmt:
- f.process_assign_stmt(t)
- case *ast.IfStmt:
- if f.cursor_in_if_head(t) {
- f.process_stmt(t.Init)
- } else if f.cursor_in_if_stmt(t) {
- f.scope, _ = advance_scope(f.scope)
- f.process_stmt(t.Init)
- f.process_block_stmt(t.Body)
- f.process_stmt(t.Else)
- }
- case *ast.BlockStmt:
- f.process_block_stmt(t)
- case *ast.RangeStmt:
- f.process_range_stmt(t)
- case *ast.ForStmt:
- if f.cursor_in_for_head(t) {
- f.process_stmt(t.Init)
- } else if f.cursor_in(t.Body) {
- f.scope, _ = advance_scope(f.scope)
-
- f.process_stmt(t.Init)
- f.process_block_stmt(t.Body)
- }
- case *ast.SwitchStmt:
- f.process_switch_stmt(t)
- case *ast.TypeSwitchStmt:
- f.process_type_switch_stmt(t)
- case *ast.SelectStmt:
- f.process_select_stmt(t)
- case *ast.LabeledStmt:
- f.process_stmt(t.Stmt)
- }
-}
-
-func (f *auto_complete_file) process_select_stmt(a *ast.SelectStmt) {
- if !f.cursor_in(a.Body) {
- return
- }
- var prevscope *scope
- f.scope, prevscope = advance_scope(f.scope)
-
- var last_cursor_after *ast.CommClause
- for _, s := range a.Body.List {
- if cc := s.(*ast.CommClause); f.cursor > f.offset(cc.Colon) {
- last_cursor_after = cc
- }
- }
-
- if last_cursor_after != nil {
- if last_cursor_after.Comm != nil {
- //if lastCursorAfter.Lhs != nil && lastCursorAfter.Tok == token.DEFINE {
- if astmt, ok := last_cursor_after.Comm.(*ast.AssignStmt); ok && astmt.Tok == token.DEFINE {
- vname := astmt.Lhs[0].(*ast.Ident).Name
- v := new_decl_var(vname, nil, astmt.Rhs[0], -1, prevscope)
- f.scope.add_named_decl(v)
- }
- }
- for _, s := range last_cursor_after.Body {
- f.process_stmt(s)
- }
- }
-}
-
-func (f *auto_complete_file) process_type_switch_stmt(a *ast.TypeSwitchStmt) {
- if !f.cursor_in(a.Body) {
- return
- }
- var prevscope *scope
- f.scope, prevscope = advance_scope(f.scope)
-
- f.process_stmt(a.Init)
- // type var
- var tv *decl
- if a, ok := a.Assign.(*ast.AssignStmt); ok {
- lhs := a.Lhs
- rhs := a.Rhs
- if lhs != nil && len(lhs) == 1 {
- tvname := lhs[0].(*ast.Ident).Name
- tv = new_decl_var(tvname, nil, rhs[0], -1, prevscope)
- }
- }
-
- var last_cursor_after *ast.CaseClause
- for _, s := range a.Body.List {
- if cc := s.(*ast.CaseClause); f.cursor > f.offset(cc.Colon) {
- last_cursor_after = cc
- }
- }
-
- if last_cursor_after != nil {
- if tv != nil {
- if last_cursor_after.List != nil && len(last_cursor_after.List) == 1 {
- tv.typ = last_cursor_after.List[0]
- tv.value = nil
- }
- f.scope.add_named_decl(tv)
- }
- for _, s := range last_cursor_after.Body {
- f.process_stmt(s)
- }
- }
-}
-
-func (f *auto_complete_file) process_switch_stmt(a *ast.SwitchStmt) {
- if !f.cursor_in(a.Body) {
- return
- }
- f.scope, _ = advance_scope(f.scope)
-
- f.process_stmt(a.Init)
- var last_cursor_after *ast.CaseClause
- for _, s := range a.Body.List {
- if cc := s.(*ast.CaseClause); f.cursor > f.offset(cc.Colon) {
- last_cursor_after = cc
- }
- }
- if last_cursor_after != nil {
- for _, s := range last_cursor_after.Body {
- f.process_stmt(s)
- }
- }
-}
-
-func (f *auto_complete_file) process_range_stmt(a *ast.RangeStmt) {
- if !f.cursor_in(a.Body) {
- return
- }
- var prevscope *scope
- f.scope, prevscope = advance_scope(f.scope)
-
- if a.Tok == token.DEFINE {
- if t, ok := a.Key.(*ast.Ident); ok {
- d := new_decl_var(t.Name, nil, a.X, 0, prevscope)
- if d != nil {
- d.flags |= decl_rangevar
- f.scope.add_named_decl(d)
- }
- }
-
- if a.Value != nil {
- if t, ok := a.Value.(*ast.Ident); ok {
- d := new_decl_var(t.Name, nil, a.X, 1, prevscope)
- if d != nil {
- d.flags |= decl_rangevar
- f.scope.add_named_decl(d)
- }
- }
- }
- }
-
- f.process_block_stmt(a.Body)
-}
-
-func (f *auto_complete_file) process_assign_stmt(a *ast.AssignStmt) {
- if a.Tok != token.DEFINE || f.offset(a.TokPos) > f.cursor {
- return
- }
-
- names := make([]*ast.Ident, len(a.Lhs))
- for i, name := range a.Lhs {
- id, ok := name.(*ast.Ident)
- if !ok {
- // something is wrong, just ignore the whole stmt
- return
- }
- names[i] = id
- }
-
- var prevscope *scope
- f.scope, prevscope = advance_scope(f.scope)
-
- pack := decl_pack{names, nil, a.Rhs}
- for i, name := range pack.names {
- typ, v, vi := pack.type_value_index(i)
- d := new_decl_var(name.Name, typ, v, vi, prevscope)
- if d == nil {
- continue
- }
-
- f.scope.add_named_decl(d)
- }
-}
-
-func (f *auto_complete_file) process_field_list(field_list *ast.FieldList, s *scope) {
- if field_list != nil {
- decls := ast_field_list_to_decls(field_list, decl_var, 0, s, false)
- for _, d := range decls {
- f.scope.add_named_decl(d)
- }
- }
-}
-
-func (f *auto_complete_file) cursor_in_if_head(s *ast.IfStmt) bool {
- if f.cursor > f.offset(s.If) && f.cursor <= f.offset(s.Body.Lbrace) {
- return true
- }
- return false
-}
-
-func (f *auto_complete_file) cursor_in_if_stmt(s *ast.IfStmt) bool {
- if f.cursor > f.offset(s.If) {
- // magic -10 comes from auto_complete_file.offset method, see
- // len() expr in there
- if f.offset(s.End()) == -10 || f.cursor < f.offset(s.End()) {
- return true
- }
- }
- return false
-}
-
-func (f *auto_complete_file) cursor_in_for_head(s *ast.ForStmt) bool {
- if f.cursor > f.offset(s.For) && f.cursor <= f.offset(s.Body.Lbrace) {
- return true
- }
- return false
-}
-
-func (f *auto_complete_file) cursor_in(block *ast.BlockStmt) bool {
- if f.cursor == -1 || block == nil {
- return false
- }
-
- if f.cursor > f.offset(block.Lbrace) && f.cursor <= f.offset(block.Rbrace) {
- return true
- }
- return false
-}
diff --git a/vendor/github.com/nsf/gocode/client.go b/vendor/github.com/nsf/gocode/client.go
deleted file mode 100644
index b16f82c..0000000
--- a/vendor/github.com/nsf/gocode/client.go
+++ /dev/null
@@ -1,182 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "go/build"
- "io/ioutil"
- "net/rpc"
- "os"
- "path/filepath"
- "strconv"
- "time"
-)
-
-func do_client() int {
- addr := *g_addr
- if *g_sock == "unix" {
- addr = get_socket_filename()
- }
-
- // client
- client, err := rpc.Dial(*g_sock, addr)
- if err != nil {
- if *g_sock == "unix" && file_exists(addr) {
- os.Remove(addr)
- }
-
- err = try_run_server()
- if err != nil {
- fmt.Printf("%s\n", err.Error())
- return 1
- }
- client, err = try_to_connect(*g_sock, addr)
- if err != nil {
- fmt.Printf("%s\n", err.Error())
- return 1
- }
- }
- defer client.Close()
-
- if flag.NArg() > 0 {
- switch flag.Arg(0) {
- case "autocomplete":
- cmd_auto_complete(client)
- case "close":
- cmd_close(client)
- case "status":
- cmd_status(client)
- case "drop-cache":
- cmd_drop_cache(client)
- case "set":
- cmd_set(client)
- default:
- fmt.Printf("unknown argument: %q, try running \"gocode -h\"\n", flag.Arg(0))
- return 1
- }
- }
- return 0
-}
-
-func try_run_server() error {
- path := get_executable_filename()
- args := []string{os.Args[0], "-s", "-sock", *g_sock, "-addr", *g_addr}
- cwd, _ := os.Getwd()
-
- var err error
- stdin, err := os.Open(os.DevNull)
- if err != nil {
- return err
- }
- stdout, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
- if err != nil {
- return err
- }
- stderr, err := os.OpenFile(os.DevNull, os.O_WRONLY, 0)
- if err != nil {
- return err
- }
-
- procattr := os.ProcAttr{Dir: cwd, Env: os.Environ(), Files: []*os.File{stdin, stdout, stderr}}
- p, err := os.StartProcess(path, args, &procattr)
- if err != nil {
- return err
- }
-
- return p.Release()
-}
-
-func try_to_connect(network, address string) (client *rpc.Client, err error) {
- t := 0
- for {
- client, err = rpc.Dial(network, address)
- if err != nil && t < 1000 {
- time.Sleep(10 * time.Millisecond)
- t += 10
- continue
- }
- break
- }
-
- return
-}
-
-func prepare_file_filename_cursor() ([]byte, string, int) {
- var file []byte
- var err error
-
- if *g_input != "" {
- file, err = ioutil.ReadFile(*g_input)
- } else {
- file, err = ioutil.ReadAll(os.Stdin)
- }
-
- if err != nil {
- panic(err.Error())
- }
-
- var skipped int
- file, skipped = filter_out_shebang(file)
-
- filename := *g_input
- cursor := -1
-
- offset := ""
- switch flag.NArg() {
- case 2:
- offset = flag.Arg(1)
- case 3:
- filename = flag.Arg(1) // Override default filename
- offset = flag.Arg(2)
- }
-
- if offset != "" {
- if offset[0] == 'c' || offset[0] == 'C' {
- cursor, _ = strconv.Atoi(offset[1:])
- cursor = char_to_byte_offset(file, cursor)
- } else {
- cursor, _ = strconv.Atoi(offset)
- }
- }
-
- cursor -= skipped
- if filename != "" && !filepath.IsAbs(filename) {
- cwd, _ := os.Getwd()
- filename = filepath.Join(cwd, filename)
- }
- return file, filename, cursor
-}
-
-//-------------------------------------------------------------------------
-// commands
-//-------------------------------------------------------------------------
-
-func cmd_status(c *rpc.Client) {
- fmt.Printf("%s\n", client_status(c, 0))
-}
-
-func cmd_auto_complete(c *rpc.Client) {
- context := pack_build_context(&build.Default)
- file, filename, cursor := prepare_file_filename_cursor()
- f := get_formatter(*g_format)
- f.write_candidates(client_auto_complete(c, file, filename, cursor, context))
-}
-
-func cmd_close(c *rpc.Client) {
- client_close(c, 0)
-}
-
-func cmd_drop_cache(c *rpc.Client) {
- client_drop_cache(c, 0)
-}
-
-func cmd_set(c *rpc.Client) {
- switch flag.NArg() {
- case 1:
- fmt.Print(client_set(c, "\x00", "\x00"))
- case 2:
- fmt.Print(client_set(c, flag.Arg(1), "\x00"))
- case 3:
- fmt.Print(client_set(c, flag.Arg(1), flag.Arg(2)))
- }
-}
diff --git a/vendor/github.com/nsf/gocode/config.go b/vendor/github.com/nsf/gocode/config.go
deleted file mode 100644
index 01b198f..0000000
--- a/vendor/github.com/nsf/gocode/config.go
+++ /dev/null
@@ -1,177 +0,0 @@
-package main
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "reflect"
- "strconv"
-)
-
-//-------------------------------------------------------------------------
-// config
-//
-// Structure represents persistent config storage of the gocode daemon. Usually
-// the config is located somewhere in ~/.config/gocode directory.
-//-------------------------------------------------------------------------
-
-type config struct {
- ProposeBuiltins bool `json:"propose-builtins"`
- LibPath string `json:"lib-path"`
- CustomPkgPrefix string `json:"custom-pkg-prefix"`
- CustomVendorDir string `json:"custom-vendor-dir"`
- Autobuild bool `json:"autobuild"`
- ForceDebugOutput string `json:"force-debug-output"`
- PackageLookupMode string `json:"package-lookup-mode"`
- CloseTimeout int `json:"close-timeout"`
- UnimportedPackages bool `json:"unimported-packages"`
-}
-
-var g_config = config{
- ProposeBuiltins: false,
- LibPath: "",
- CustomPkgPrefix: "",
- Autobuild: false,
- ForceDebugOutput: "",
- PackageLookupMode: "go",
- CloseTimeout: 1800,
- UnimportedPackages: false,
-}
-
-var g_string_to_bool = map[string]bool{
- "t": true,
- "true": true,
- "y": true,
- "yes": true,
- "on": true,
- "1": true,
- "f": false,
- "false": false,
- "n": false,
- "no": false,
- "off": false,
- "0": false,
-}
-
-func set_value(v reflect.Value, value string) {
- switch t := v; t.Kind() {
- case reflect.Bool:
- v, ok := g_string_to_bool[value]
- if ok {
- t.SetBool(v)
- }
- case reflect.String:
- t.SetString(value)
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- v, err := strconv.ParseInt(value, 10, 64)
- if err == nil {
- t.SetInt(v)
- }
- case reflect.Float32, reflect.Float64:
- v, err := strconv.ParseFloat(value, 64)
- if err == nil {
- t.SetFloat(v)
- }
- }
-}
-
-func list_value(v reflect.Value, name string, w io.Writer) {
- switch t := v; t.Kind() {
- case reflect.Bool:
- fmt.Fprintf(w, "%s %v\n", name, t.Bool())
- case reflect.String:
- fmt.Fprintf(w, "%s \"%v\"\n", name, t.String())
- case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
- fmt.Fprintf(w, "%s %v\n", name, t.Int())
- case reflect.Float32, reflect.Float64:
- fmt.Fprintf(w, "%s %v\n", name, t.Float())
- }
-}
-
-func (this *config) list() string {
- str, typ := this.value_and_type()
- buf := bytes.NewBuffer(make([]byte, 0, 256))
- for i := 0; i < str.NumField(); i++ {
- v := str.Field(i)
- name := typ.Field(i).Tag.Get("json")
- list_value(v, name, buf)
- }
- return buf.String()
-}
-
-func (this *config) list_option(name string) string {
- str, typ := this.value_and_type()
- buf := bytes.NewBuffer(make([]byte, 0, 256))
- for i := 0; i < str.NumField(); i++ {
- v := str.Field(i)
- nm := typ.Field(i).Tag.Get("json")
- if nm == name {
- list_value(v, name, buf)
- }
- }
- return buf.String()
-}
-
-func (this *config) set_option(name, value string) string {
- str, typ := this.value_and_type()
- buf := bytes.NewBuffer(make([]byte, 0, 256))
- for i := 0; i < str.NumField(); i++ {
- v := str.Field(i)
- nm := typ.Field(i).Tag.Get("json")
- if nm == name {
- set_value(v, value)
- list_value(v, name, buf)
- }
- }
- this.write()
- return buf.String()
-
-}
-
-func (this *config) value_and_type() (reflect.Value, reflect.Type) {
- v := reflect.ValueOf(this).Elem()
- return v, v.Type()
-}
-
-func (this *config) write() error {
- data, err := json.Marshal(this)
- if err != nil {
- return err
- }
-
- // make sure config dir exists
- dir := config_dir()
- if !file_exists(dir) {
- os.MkdirAll(dir, 0755)
- }
-
- f, err := os.Create(config_file())
- if err != nil {
- return err
- }
- defer f.Close()
-
- _, err = f.Write(data)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (this *config) read() error {
- data, err := ioutil.ReadFile(config_file())
- if err != nil {
- return err
- }
-
- err = json.Unmarshal(data, this)
- if err != nil {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/nsf/gocode/cursorcontext.go b/vendor/github.com/nsf/gocode/cursorcontext.go
deleted file mode 100644
index ae8fb38..0000000
--- a/vendor/github.com/nsf/gocode/cursorcontext.go
+++ /dev/null
@@ -1,557 +0,0 @@
-package main
-
-import (
- "bytes"
- "go/ast"
- "go/parser"
- "go/scanner"
- "go/token"
- "log"
-)
-
-type cursor_context struct {
- decl *decl
- partial string
- struct_field bool
- decl_import bool
-
- // store expression that was supposed to be deduced to "decl", however
- // if decl is nil, then deduction failed, we could try to resolve it to
- // unimported package instead
- expr ast.Expr
-}
-
-type token_iterator struct {
- tokens []token_item
- token_index int
-}
-
-type token_item struct {
- off int
- tok token.Token
- lit string
-}
-
-func (i token_item) literal() string {
- if i.tok.IsLiteral() {
- return i.lit
- } else {
- return i.tok.String()
- }
- return ""
-}
-
-func new_token_iterator(src []byte, cursor int) token_iterator {
- tokens := make([]token_item, 0, 1000)
- var s scanner.Scanner
- fset := token.NewFileSet()
- file := fset.AddFile("", fset.Base(), len(src))
- s.Init(file, src, nil, 0)
- for {
- pos, tok, lit := s.Scan()
- off := fset.Position(pos).Offset
- if tok == token.EOF || cursor <= off {
- break
- }
- tokens = append(tokens, token_item{
- off: off,
- tok: tok,
- lit: lit,
- })
- }
- return token_iterator{
- tokens: tokens,
- token_index: len(tokens) - 1,
- }
-}
-
-func (this *token_iterator) token() token_item {
- return this.tokens[this.token_index]
-}
-
-func (this *token_iterator) go_back() bool {
- if this.token_index <= 0 {
- return false
- }
- this.token_index--
- return true
-}
-
-var bracket_pairs_map = map[token.Token]token.Token{
- token.RPAREN: token.LPAREN,
- token.RBRACK: token.LBRACK,
- token.RBRACE: token.LBRACE,
-}
-
-func (ti *token_iterator) skip_to_left(left, right token.Token) bool {
- if ti.token().tok == left {
- return true
- }
- balance := 1
- for balance != 0 {
- if !ti.go_back() {
- return false
- }
- switch ti.token().tok {
- case right:
- balance++
- case left:
- balance--
- }
- }
- return true
-}
-
-// when the cursor is at the ')' or ']' or '}', move the cursor to an opposite
-// bracket pair, this functions takes nested bracket pairs into account
-func (this *token_iterator) skip_to_balanced_pair() bool {
- right := this.token().tok
- left := bracket_pairs_map[right]
- return this.skip_to_left(left, right)
-}
-
-// Move the cursor to the open brace of the current block, taking nested blocks
-// into account.
-func (this *token_iterator) skip_to_left_curly() bool {
- return this.skip_to_left(token.LBRACE, token.RBRACE)
-}
-
-// Extract the type expression right before the enclosing curly bracket block.
-// Examples (# - the cursor):
-// &lib.Struct{Whatever: 1, Hel#} // returns "lib.Struct"
-// X{#} // returns X
-// The idea is that we check if this type expression is a type and it is, we
-// can apply special filtering for autocompletion results.
-// Sadly, this doesn't cover anonymous structs.
-func (ti *token_iterator) extract_struct_type() string {
- if !ti.skip_to_left_curly() {
- return ""
- }
- if !ti.go_back() {
- return ""
- }
- if ti.token().tok != token.IDENT {
- return ""
- }
- b := ti.token().literal()
- if !ti.go_back() {
- return b
- }
- if ti.token().tok != token.PERIOD {
- return b
- }
- if !ti.go_back() {
- return b
- }
- if ti.token().tok != token.IDENT {
- return b
- }
- return ti.token().literal() + "." + b
-}
-
-// Starting from the token under the cursor move back and extract something
-// that resembles a valid Go primary expression. Examples of primary expressions
-// from Go spec:
-// x
-// 2
-// (s + ".txt")
-// f(3.1415, true)
-// Point{1, 2}
-// m["foo"]
-// s[i : j + 1]
-// obj.color
-// f.p[i].x()
-//
-// As you can see we can move through all of them using balanced bracket
-// matching and applying simple rules
-// E.g.
-// Point{1, 2}.m["foo"].s[i : j + 1].MethodCall(a, func(a, b int) int { return a + b }).
-// Can be seen as:
-// Point{ }.m[ ].s[ ].MethodCall( ).
-// Which boils the rules down to these connected via dots:
-// ident
-// ident[]
-// ident{}
-// ident()
-// Of course there are also slightly more complicated rules for brackets:
-// ident{}.ident()[5][4](), etc.
-func (this *token_iterator) extract_go_expr() string {
- orig := this.token_index
-
- // Contains the type of the previously scanned token (initialized with
- // the token right under the cursor). This is the token to the *right* of
- // the current one.
- prev := this.token().tok
-loop:
- for {
- if !this.go_back() {
- return token_items_to_string(this.tokens[:orig])
- }
- switch this.token().tok {
- case token.PERIOD:
- // If the '.' is not followed by IDENT, it's invalid.
- if prev != token.IDENT {
- break loop
- }
- case token.IDENT:
- // Valid tokens after IDENT are '.', '[', '{' and '('.
- switch prev {
- case token.PERIOD, token.LBRACK, token.LBRACE, token.LPAREN:
- // all ok
- default:
- break loop
- }
- case token.RBRACE:
- // This one can only be a part of type initialization, like:
- // Dummy{}.Hello()
- // It is valid Go if Hello method is defined on a non-pointer receiver.
- if prev != token.PERIOD {
- break loop
- }
- this.skip_to_balanced_pair()
- case token.RPAREN, token.RBRACK:
- // After ']' and ')' their opening counterparts are valid '[', '(',
- // as well as the dot.
- switch prev {
- case token.PERIOD, token.LBRACK, token.LPAREN:
- // all ok
- default:
- break loop
- }
- this.skip_to_balanced_pair()
- default:
- break loop
- }
- prev = this.token().tok
- }
- expr := token_items_to_string(this.tokens[this.token_index+1 : orig])
- if *g_debug {
- log.Printf("extracted expression tokens: %s", expr)
- }
- return expr
-}
-
-// Given a slice of token_item, reassembles them into the original literal
-// expression.
-func token_items_to_string(tokens []token_item) string {
- var buf bytes.Buffer
- for _, t := range tokens {
- buf.WriteString(t.literal())
- }
- return buf.String()
-}
-
-// this function is called when the cursor is at the '.' and you need to get the
-// declaration before that dot
-func (c *auto_complete_context) deduce_cursor_decl(iter *token_iterator) (*decl, ast.Expr) {
- expr, err := parser.ParseExpr(iter.extract_go_expr())
- if err != nil {
- return nil, nil
- }
- return expr_to_decl(expr, c.current.scope), expr
-}
-
-// try to find and extract the surrounding struct literal type
-func (c *auto_complete_context) deduce_struct_type_decl(iter *token_iterator) *decl {
- typ := iter.extract_struct_type()
- if typ == "" {
- return nil
- }
-
- expr, err := parser.ParseExpr(typ)
- if err != nil {
- return nil
- }
- decl := type_to_decl(expr, c.current.scope)
- if decl == nil {
- return nil
- }
- if _, ok := decl.typ.(*ast.StructType); !ok {
- return nil
- }
- return decl
-}
-
-// Entry point from autocompletion, the function looks at text before the cursor
-// and figures out the declaration the cursor is on. This declaration is
-// used in filtering the resulting set of autocompletion suggestions.
-func (c *auto_complete_context) deduce_cursor_context(file []byte, cursor int) (cursor_context, bool) {
- if cursor <= 0 {
- return cursor_context{}, true
- }
-
- iter := new_token_iterator(file, cursor)
- if len(iter.tokens) == 0 {
- return cursor_context{}, false
- }
-
- // figure out what is just before the cursor
- switch tok := iter.token(); tok.tok {
- case token.STRING:
- // make sure cursor is inside the string
- s := tok.literal()
- if len(s) > 1 && s[len(s)-1] == '"' && tok.off+len(s) <= cursor {
- return cursor_context{}, true
- }
- // now figure out if inside an import declaration
- var ptok = token.STRING
- for iter.go_back() {
- itok := iter.token().tok
- switch itok {
- case token.STRING:
- switch ptok {
- case token.SEMICOLON, token.IDENT, token.PERIOD:
- default:
- return cursor_context{}, true
- }
- case token.LPAREN, token.SEMICOLON:
- switch ptok {
- case token.STRING, token.IDENT, token.PERIOD:
- default:
- return cursor_context{}, true
- }
- case token.IDENT, token.PERIOD:
- switch ptok {
- case token.STRING:
- default:
- return cursor_context{}, true
- }
- case token.IMPORT:
- switch ptok {
- case token.STRING, token.IDENT, token.PERIOD, token.LPAREN:
- path_len := cursor - tok.off
- path := s[1:path_len]
- return cursor_context{decl_import: true, partial: path}, true
- default:
- return cursor_context{}, true
- }
- default:
- return cursor_context{}, true
- }
- ptok = itok
- }
- case token.PERIOD:
- // we're '.'
- // figure out decl, Partial is ""
- decl, expr := c.deduce_cursor_decl(&iter)
- return cursor_context{decl: decl, expr: expr}, decl != nil
- case token.IDENT, token.TYPE, token.CONST, token.VAR, token.FUNC, token.PACKAGE:
- // we're '.'
- // parse as Partial and figure out decl
- var partial string
- if tok.tok == token.IDENT {
- // Calculate the offset of the cursor position within the identifier.
- // For instance, if we are 'ab#c', we want partial_len = 2 and partial = ab.
- partial_len := cursor - tok.off
-
- // If it happens that the cursor is past the end of the literal,
- // means there is a space between the literal and the cursor, think
- // of it as no context, because that's what it really is.
- if partial_len > len(tok.literal()) {
- return cursor_context{}, true
- }
- partial = tok.literal()[0:partial_len]
- } else {
- // Do not try to truncate if it is not an identifier.
- partial = tok.literal()
- }
-
- iter.go_back()
- switch iter.token().tok {
- case token.PERIOD:
- decl, expr := c.deduce_cursor_decl(&iter)
- return cursor_context{decl: decl, partial: partial, expr: expr}, decl != nil
- case token.COMMA, token.LBRACE:
- // This can happen for struct fields:
- // &Struct{Hello: 1, Wor#} // (# - the cursor)
- // Let's try to find the struct type
- decl := c.deduce_struct_type_decl(&iter)
- return cursor_context{
- decl: decl,
- partial: partial,
- struct_field: decl != nil,
- }, true
- default:
- return cursor_context{partial: partial}, true
- }
- case token.COMMA, token.LBRACE:
- // Try to parse the current expression as a structure initialization.
- decl := c.deduce_struct_type_decl(&iter)
- return cursor_context{
- decl: decl,
- partial: "",
- struct_field: decl != nil,
- }, true
- }
-
- return cursor_context{}, true
-}
-
-// Decl deduction failed, but we're on ".", this ident can be an
-// unexported package, let's try to match the ident against a set of known
-// packages and if it matches try to import it.
-// TODO: Right now I've made a static list of built-in packages, but in theory
-// we could scan all GOPATH packages as well. Now, don't forget that default
-// package name has nothing to do with package file name, that's why we need to
-// scan the packages. And many of them will have conflicts. Can we make a smart
-// prediction algorithm which will prefer certain packages over another ones?
-func resolveKnownPackageIdent(ident string, filename string, context *package_lookup_context) *decl {
- importPath, ok := knownPackageIdents[ident]
- if !ok {
- return nil
- }
-
- path, ok := abs_path_for_package(filename, importPath, context)
- if !ok {
- return nil
- }
-
- p := new_package_file_cache(path)
- p.update_cache()
- return p.main
-}
-
-var knownPackageIdents = map[string]string{
- "adler32": "hash/adler32",
- "aes": "crypto/aes",
- "ascii85": "encoding/ascii85",
- "asn1": "encoding/asn1",
- "ast": "go/ast",
- "atomic": "sync/atomic",
- "base32": "encoding/base32",
- "base64": "encoding/base64",
- "big": "math/big",
- "binary": "encoding/binary",
- "bufio": "bufio",
- "build": "go/build",
- "bytes": "bytes",
- "bzip2": "compress/bzip2",
- "cgi": "net/http/cgi",
- "cgo": "runtime/cgo",
- "cipher": "crypto/cipher",
- "cmplx": "math/cmplx",
- "color": "image/color",
- "constant": "go/constant",
- "context": "context",
- "cookiejar": "net/http/cookiejar",
- "crc32": "hash/crc32",
- "crc64": "hash/crc64",
- "crypto": "crypto",
- "csv": "encoding/csv",
- "debug": "runtime/debug",
- "des": "crypto/des",
- "doc": "go/doc",
- "draw": "image/draw",
- "driver": "database/sql/driver",
- "dsa": "crypto/dsa",
- "dwarf": "debug/dwarf",
- "ecdsa": "crypto/ecdsa",
- "elf": "debug/elf",
- "elliptic": "crypto/elliptic",
- "encoding": "encoding",
- "errors": "errors",
- "exec": "os/exec",
- "expvar": "expvar",
- "fcgi": "net/http/fcgi",
- "filepath": "path/filepath",
- "flag": "flag",
- "flate": "compress/flate",
- "fmt": "fmt",
- "fnv": "hash/fnv",
- "format": "go/format",
- "gif": "image/gif",
- "gob": "encoding/gob",
- "gosym": "debug/gosym",
- "gzip": "compress/gzip",
- "hash": "hash",
- "heap": "container/heap",
- "hex": "encoding/hex",
- "hmac": "crypto/hmac",
- "hpack": "vendor/golang_org/x/net/http2/hpack",
- "html": "html",
- "http": "net/http",
- "httplex": "vendor/golang_org/x/net/lex/httplex",
- "httptest": "net/http/httptest",
- "httptrace": "net/http/httptrace",
- "httputil": "net/http/httputil",
- "image": "image",
- "importer": "go/importer",
- "io": "io",
- "iotest": "testing/iotest",
- "ioutil": "io/ioutil",
- "jpeg": "image/jpeg",
- "json": "encoding/json",
- "jsonrpc": "net/rpc/jsonrpc",
- "list": "container/list",
- "log": "log",
- "lzw": "compress/lzw",
- "macho": "debug/macho",
- "mail": "net/mail",
- "math": "math",
- "md5": "crypto/md5",
- "mime": "mime",
- "multipart": "mime/multipart",
- "net": "net",
- "os": "os",
- "palette": "image/color/palette",
- "parse": "text/template/parse",
- "parser": "go/parser",
- "path": "path",
- "pe": "debug/pe",
- "pem": "encoding/pem",
- "pkix": "crypto/x509/pkix",
- "plan9obj": "debug/plan9obj",
- "png": "image/png",
- "pprof": "net/http/pprof",
- "printer": "go/printer",
- "quick": "testing/quick",
- "quotedprintable": "mime/quotedprintable",
- "race": "runtime/race",
- "rand": "math/rand",
- "rc4": "crypto/rc4",
- "reflect": "reflect",
- "regexp": "regexp",
- "ring": "container/ring",
- "rpc": "net/rpc",
- "rsa": "crypto/rsa",
- "runtime": "runtime",
- "scanner": "text/scanner",
- "sha1": "crypto/sha1",
- "sha256": "crypto/sha256",
- "sha512": "crypto/sha512",
- "signal": "os/signal",
- "smtp": "net/smtp",
- "sort": "sort",
- "sql": "database/sql",
- "strconv": "strconv",
- "strings": "strings",
- "subtle": "crypto/subtle",
- "suffixarray": "index/suffixarray",
- "sync": "sync",
- "syntax": "regexp/syntax",
- "syscall": "syscall",
- "syslog": "log/syslog",
- "tabwriter": "text/tabwriter",
- "tar": "archive/tar",
- "template": "html/template",
- "testing": "testing",
- "textproto": "net/textproto",
- "time": "time",
- "tls": "crypto/tls",
- "token": "go/token",
- "trace": "runtime/trace",
- "types": "go/types",
- "unicode": "unicode",
- "url": "net/url",
- "user": "os/user",
- "utf16": "unicode/utf16",
- "utf8": "unicode/utf8",
- "x509": "crypto/x509",
- "xml": "encoding/xml",
- "zip": "archive/zip",
- "zlib": "compress/zlib",
- //"scanner": "go/scanner", // DUP: prefer text/scanner
- //"template": "text/template", // DUP: prefer html/template
- //"pprof": "runtime/pprof", // DUP: prefer net/http/pprof
- //"rand": "crypto/rand", // DUP: prefer math/rand
-}
diff --git a/vendor/github.com/nsf/gocode/decl.go b/vendor/github.com/nsf/gocode/decl.go
deleted file mode 100644
index a19a601..0000000
--- a/vendor/github.com/nsf/gocode/decl.go
+++ /dev/null
@@ -1,1412 +0,0 @@
-package main
-
-import (
- "bytes"
- "fmt"
- "go/ast"
- "go/token"
- "io"
- "reflect"
- "strings"
- "sync"
-)
-
-// decl.class
-type decl_class int16
-
-const (
- decl_invalid = decl_class(-1 + iota)
-
- // these are in a sorted order
- decl_const
- decl_func
- decl_import
- decl_package
- decl_type
- decl_var
-
- // this one serves as a temporary type for those methods that were
- // declared before their actual owner
- decl_methods_stub
-)
-
-func (this decl_class) String() string {
- switch this {
- case decl_invalid:
- return "PANIC"
- case decl_const:
- return "const"
- case decl_func:
- return "func"
- case decl_import:
- return "import"
- case decl_package:
- return "package"
- case decl_type:
- return "type"
- case decl_var:
- return "var"
- case decl_methods_stub:
- return "IF YOU SEE THIS, REPORT A BUG" // :D
- }
- panic("unreachable")
-}
-
-// decl.flags
-type decl_flags int16
-
-const (
- decl_foreign = decl_flags(1 << iota) // imported from another package
-
- // means that the decl is a part of the range statement
- // its type is inferred in a special way
- decl_rangevar
-
- // for preventing infinite recursions and loops in type inference code
- decl_visited
-)
-
-//-------------------------------------------------------------------------
-// decl
-//
-// The most important data structure of the whole gocode project. It
-// describes a single declaration and its children.
-//-------------------------------------------------------------------------
-
-type decl struct {
- // Name starts with '$' if the declaration describes an anonymous type.
- // '$s_%d' for anonymous struct types
- // '$i_%d' for anonymous interface types
- name string
- typ ast.Expr
- class decl_class
- flags decl_flags
-
- // functions for interface type, fields+methods for struct type
- children map[string]*decl
-
- // embedded types
- embedded []ast.Expr
-
- // if the type is unknown at AST building time, I'm using these
- value ast.Expr
-
- // if it's a multiassignment and the Value is a CallExpr, it is being set
- // to an index into the return value tuple, otherwise it's a -1
- value_index int
-
- // scope where this Decl was declared in (not its visibilty scope!)
- // Decl uses it for type inference
- scope *scope
-}
-
-func ast_decl_type(d ast.Decl) ast.Expr {
- switch t := d.(type) {
- case *ast.GenDecl:
- switch t.Tok {
- case token.CONST, token.VAR:
- c := t.Specs[0].(*ast.ValueSpec)
- return c.Type
- case token.TYPE:
- t := t.Specs[0].(*ast.TypeSpec)
- return t.Type
- }
- case *ast.FuncDecl:
- return t.Type
- }
- panic("unreachable")
- return nil
-}
-
-func ast_decl_class(d ast.Decl) decl_class {
- switch t := d.(type) {
- case *ast.GenDecl:
- switch t.Tok {
- case token.VAR:
- return decl_var
- case token.CONST:
- return decl_const
- case token.TYPE:
- return decl_type
- }
- case *ast.FuncDecl:
- return decl_func
- }
- panic("unreachable")
-}
-
-func ast_decl_convertable(d ast.Decl) bool {
- switch t := d.(type) {
- case *ast.GenDecl:
- switch t.Tok {
- case token.VAR, token.CONST, token.TYPE:
- return true
- }
- case *ast.FuncDecl:
- return true
- }
- return false
-}
-
-func ast_field_list_to_decls(f *ast.FieldList, class decl_class, flags decl_flags, scope *scope, add_anonymous bool) map[string]*decl {
- count := 0
- for _, field := range f.List {
- count += len(field.Names)
- }
-
- decls := make(map[string]*decl, count)
- for _, field := range f.List {
- for _, name := range field.Names {
- if flags&decl_foreign != 0 && !ast.IsExported(name.Name) {
- continue
- }
- d := &decl{
- name: name.Name,
- typ: field.Type,
- class: class,
- flags: flags,
- scope: scope,
- value_index: -1,
- }
- decls[d.name] = d
- }
-
- // add anonymous field as a child (type embedding)
- if class == decl_var && field.Names == nil && add_anonymous {
- tp := get_type_path(field.Type)
- if flags&decl_foreign != 0 && !ast.IsExported(tp.name) {
- continue
- }
- d := &decl{
- name: tp.name,
- typ: field.Type,
- class: class,
- flags: flags,
- scope: scope,
- value_index: -1,
- }
- decls[d.name] = d
- }
- }
- return decls
-}
-
-func ast_field_list_to_embedded(f *ast.FieldList) []ast.Expr {
- count := 0
- for _, field := range f.List {
- if field.Names == nil || field.Names[0].Name == "?" {
- count++
- }
- }
-
- if count == 0 {
- return nil
- }
-
- embedded := make([]ast.Expr, count)
- i := 0
- for _, field := range f.List {
- if field.Names == nil || field.Names[0].Name == "?" {
- embedded[i] = field.Type
- i++
- }
- }
-
- return embedded
-}
-
-func ast_type_to_embedded(ty ast.Expr) []ast.Expr {
- switch t := ty.(type) {
- case *ast.StructType:
- return ast_field_list_to_embedded(t.Fields)
- case *ast.InterfaceType:
- return ast_field_list_to_embedded(t.Methods)
- }
- return nil
-}
-
-func ast_type_to_children(ty ast.Expr, flags decl_flags, scope *scope) map[string]*decl {
- switch t := ty.(type) {
- case *ast.StructType:
- return ast_field_list_to_decls(t.Fields, decl_var, flags, scope, true)
- case *ast.InterfaceType:
- return ast_field_list_to_decls(t.Methods, decl_func, flags, scope, false)
- }
- return nil
-}
-
-//-------------------------------------------------------------------------
-// anonymous_id_gen
-//
-// ID generator for anonymous types (thread-safe)
-//-------------------------------------------------------------------------
-
-type anonymous_id_gen struct {
- sync.Mutex
- i int
-}
-
-func (a *anonymous_id_gen) gen() (id int) {
- a.Lock()
- defer a.Unlock()
- id = a.i
- a.i++
- return
-}
-
-var g_anon_gen anonymous_id_gen
-
-//-------------------------------------------------------------------------
-
-func check_for_anon_type(t ast.Expr, flags decl_flags, s *scope) ast.Expr {
- if t == nil {
- return nil
- }
- var name string
-
- switch t.(type) {
- case *ast.StructType:
- name = fmt.Sprintf("$s_%d", g_anon_gen.gen())
- case *ast.InterfaceType:
- name = fmt.Sprintf("$i_%d", g_anon_gen.gen())
- }
-
- if name != "" {
- anonymify_ast(t, flags, s)
- d := new_decl_full(name, decl_type, flags, t, nil, -1, s)
- s.add_named_decl(d)
- return ast.NewIdent(name)
- }
- return t
-}
-
-//-------------------------------------------------------------------------
-
-func new_decl_full(name string, class decl_class, flags decl_flags, typ, v ast.Expr, vi int, s *scope) *decl {
- if name == "_" {
- return nil
- }
- d := new(decl)
- d.name = name
- d.class = class
- d.flags = flags
- d.typ = typ
- d.value = v
- d.value_index = vi
- d.scope = s
- d.children = ast_type_to_children(d.typ, flags, s)
- d.embedded = ast_type_to_embedded(d.typ)
- return d
-}
-
-func new_decl(name string, class decl_class, scope *scope) *decl {
- decl := new(decl)
- decl.name = name
- decl.class = class
- decl.value_index = -1
- decl.scope = scope
- return decl
-}
-
-func new_decl_var(name string, typ ast.Expr, value ast.Expr, vindex int, scope *scope) *decl {
- if name == "_" {
- return nil
- }
- decl := new(decl)
- decl.name = name
- decl.class = decl_var
- decl.typ = typ
- decl.value = value
- decl.value_index = vindex
- decl.scope = scope
- return decl
-}
-
-func method_of(d ast.Decl) string {
- if t, ok := d.(*ast.FuncDecl); ok {
- if t.Recv != nil {
- switch t := t.Recv.List[0].Type.(type) {
- case *ast.StarExpr:
- if se, ok := t.X.(*ast.SelectorExpr); ok {
- return se.Sel.Name
- }
- if ident, ok := t.X.(*ast.Ident); ok {
- return ident.Name
- }
- return ""
- case *ast.Ident:
- return t.Name
- default:
- return ""
- }
- }
- }
- return ""
-}
-
-func (other *decl) deep_copy() *decl {
- d := new(decl)
- d.name = other.name
- d.class = other.class
- d.typ = other.typ
- d.value = other.value
- d.value_index = other.value_index
- d.children = make(map[string]*decl, len(other.children))
- for key, value := range other.children {
- d.children[key] = value
- }
- if other.embedded != nil {
- d.embedded = make([]ast.Expr, len(other.embedded))
- copy(d.embedded, other.embedded)
- }
- d.scope = other.scope
- return d
-}
-
-func (d *decl) clear_visited() {
- d.flags &^= decl_visited
-}
-
-func (d *decl) expand_or_replace(other *decl) {
- // expand only if it's a methods stub, otherwise simply copy
- if d.class != decl_methods_stub && other.class != decl_methods_stub {
- d = other
- return
- }
-
- if d.class == decl_methods_stub {
- d.typ = other.typ
- d.class = other.class
- }
-
- if other.children != nil {
- for _, c := range other.children {
- d.add_child(c)
- }
- }
-
- if other.embedded != nil {
- d.embedded = other.embedded
- d.scope = other.scope
- }
-}
-
-func (d *decl) matches() bool {
- if strings.HasPrefix(d.name, "$") || d.class == decl_methods_stub {
- return false
- }
- return true
-}
-
-func (d *decl) pretty_print_type(out io.Writer) {
- switch d.class {
- case decl_type:
- switch d.typ.(type) {
- case *ast.StructType:
- // TODO: not used due to anonymify?
- fmt.Fprintf(out, "struct")
- case *ast.InterfaceType:
- // TODO: not used due to anonymify?
- fmt.Fprintf(out, "interface")
- default:
- if d.typ != nil {
- pretty_print_type_expr(out, d.typ)
- }
- }
- case decl_var:
- if d.typ != nil {
- pretty_print_type_expr(out, d.typ)
- }
- case decl_func:
- pretty_print_type_expr(out, d.typ)
- }
-}
-
-func (d *decl) add_child(cd *decl) {
- if d.children == nil {
- d.children = make(map[string]*decl)
- }
- d.children[cd.name] = cd
-}
-
-func check_for_builtin_funcs(typ *ast.Ident, c *ast.CallExpr, scope *scope) (ast.Expr, *scope) {
- if strings.HasPrefix(typ.Name, "func(") {
- if t, ok := c.Fun.(*ast.Ident); ok {
- switch t.Name {
- case "new":
- if len(c.Args) > 0 {
- e := new(ast.StarExpr)
- e.X = c.Args[0]
- return e, scope
- }
- case "make":
- if len(c.Args) > 0 {
- return c.Args[0], scope
- }
- case "append":
- if len(c.Args) > 0 {
- t, scope, _ := infer_type(c.Args[0], scope, -1)
- return t, scope
- }
- case "complex":
- // TODO: fix it
- return ast.NewIdent("complex"), g_universe_scope
- case "closed":
- return ast.NewIdent("bool"), g_universe_scope
- case "cap":
- return ast.NewIdent("int"), g_universe_scope
- case "copy":
- return ast.NewIdent("int"), g_universe_scope
- case "len":
- return ast.NewIdent("int"), g_universe_scope
- }
- // TODO:
- // func recover() interface{}
- // func imag(c ComplexType) FloatType
- // func real(c ComplexType) FloatType
- }
- }
- return nil, nil
-}
-
-func func_return_type(f *ast.FuncType, index int) ast.Expr {
- if f.Results == nil {
- return nil
- }
-
- if index == -1 {
- return f.Results.List[0].Type
- }
-
- i := 0
- var field *ast.Field
- for _, field = range f.Results.List {
- if i >= index {
- return field.Type
- }
- if field.Names != nil {
- i += len(field.Names)
- } else {
- i++
- }
- }
- if i >= index {
- return field.Type
- }
- return nil
-}
-
-type type_path struct {
- pkg string
- name string
-}
-
-func (tp *type_path) is_nil() bool {
- return tp.pkg == "" && tp.name == ""
-}
-
-// converts type expressions like:
-// ast.Expr
-// *ast.Expr
-// $ast$go/ast.Expr
-// to a path that can be used to lookup a type related Decl
-func get_type_path(e ast.Expr) (r type_path) {
- if e == nil {
- return type_path{"", ""}
- }
-
- switch t := e.(type) {
- case *ast.Ident:
- r.name = t.Name
- case *ast.StarExpr:
- r = get_type_path(t.X)
- case *ast.SelectorExpr:
- if ident, ok := t.X.(*ast.Ident); ok {
- r.pkg = ident.Name
- }
- r.name = t.Sel.Name
- }
- return
-}
-
-func lookup_path(tp type_path, scope *scope) *decl {
- if tp.is_nil() {
- return nil
- }
- var decl *decl
- if tp.pkg != "" {
- decl = scope.lookup(tp.pkg)
- // return nil early if the package wasn't found but it's part
- // of the type specification
- if decl == nil {
- return nil
- }
- }
-
- if decl != nil {
- if tp.name != "" {
- return decl.find_child(tp.name)
- } else {
- return decl
- }
- }
-
- return scope.lookup(tp.name)
-}
-
-func lookup_pkg(tp type_path, scope *scope) string {
- if tp.is_nil() {
- return ""
- }
- if tp.pkg == "" {
- return ""
- }
- decl := scope.lookup(tp.pkg)
- if decl == nil {
- return ""
- }
- return decl.name
-}
-
-func type_to_decl(t ast.Expr, scope *scope) *decl {
- tp := get_type_path(t)
- d := lookup_path(tp, scope)
- if d != nil && d.class == decl_var {
- // weird variable declaration pointing to itself
- return nil
- }
- return d
-}
-
-func expr_to_decl(e ast.Expr, scope *scope) *decl {
- t, scope, _ := infer_type(e, scope, -1)
- return type_to_decl(t, scope)
-}
-
-//-------------------------------------------------------------------------
-// Type inference
-//-------------------------------------------------------------------------
-
-type type_predicate func(ast.Expr) bool
-
-func advance_to_type(pred type_predicate, v ast.Expr, scope *scope) (ast.Expr, *scope) {
- if pred(v) {
- return v, scope
- }
-
- decl := type_to_decl(v, scope)
- if decl == nil {
- return nil, nil
- }
-
- if decl.flags&decl_visited != 0 {
- return nil, nil
- }
- decl.flags |= decl_visited
- defer decl.clear_visited()
-
- return advance_to_type(pred, decl.typ, decl.scope)
-}
-
-func advance_to_struct_or_interface(decl *decl) *decl {
- if decl.flags&decl_visited != 0 {
- return nil
- }
- decl.flags |= decl_visited
- defer decl.clear_visited()
-
- if struct_interface_predicate(decl.typ) {
- return decl
- }
-
- decl = type_to_decl(decl.typ, decl.scope)
- if decl == nil {
- return nil
- }
- return advance_to_struct_or_interface(decl)
-}
-
-func struct_interface_predicate(v ast.Expr) bool {
- switch v.(type) {
- case *ast.StructType, *ast.InterfaceType:
- return true
- }
- return false
-}
-
-func chan_predicate(v ast.Expr) bool {
- _, ok := v.(*ast.ChanType)
- return ok
-}
-
-func index_predicate(v ast.Expr) bool {
- switch v.(type) {
- case *ast.ArrayType, *ast.MapType, *ast.Ellipsis:
- return true
- }
- return false
-}
-
-func star_predicate(v ast.Expr) bool {
- _, ok := v.(*ast.StarExpr)
- return ok
-}
-
-func func_predicate(v ast.Expr) bool {
- _, ok := v.(*ast.FuncType)
- return ok
-}
-
-func range_predicate(v ast.Expr) bool {
- switch t := v.(type) {
- case *ast.Ident:
- if t.Name == "string" {
- return true
- }
- case *ast.ArrayType, *ast.MapType, *ast.ChanType, *ast.Ellipsis:
- return true
- }
- return false
-}
-
-type anonymous_typer struct {
- flags decl_flags
- scope *scope
-}
-
-func (a *anonymous_typer) Visit(node ast.Node) ast.Visitor {
- switch t := node.(type) {
- case *ast.CompositeLit:
- t.Type = check_for_anon_type(t.Type, a.flags, a.scope)
- case *ast.MapType:
- t.Key = check_for_anon_type(t.Key, a.flags, a.scope)
- t.Value = check_for_anon_type(t.Value, a.flags, a.scope)
- case *ast.ArrayType:
- t.Elt = check_for_anon_type(t.Elt, a.flags, a.scope)
- case *ast.Ellipsis:
- t.Elt = check_for_anon_type(t.Elt, a.flags, a.scope)
- case *ast.ChanType:
- t.Value = check_for_anon_type(t.Value, a.flags, a.scope)
- case *ast.Field:
- t.Type = check_for_anon_type(t.Type, a.flags, a.scope)
- case *ast.CallExpr:
- t.Fun = check_for_anon_type(t.Fun, a.flags, a.scope)
- case *ast.ParenExpr:
- t.X = check_for_anon_type(t.X, a.flags, a.scope)
- case *ast.StarExpr:
- t.X = check_for_anon_type(t.X, a.flags, a.scope)
- case *ast.GenDecl:
- switch t.Tok {
- case token.VAR:
- for _, s := range t.Specs {
- vs := s.(*ast.ValueSpec)
- vs.Type = check_for_anon_type(vs.Type, a.flags, a.scope)
- }
- }
- }
- return a
-}
-
-func anonymify_ast(node ast.Node, flags decl_flags, scope *scope) {
- v := anonymous_typer{flags, scope}
- ast.Walk(&v, node)
-}
-
-// RETURNS:
-// - type expression which represents a full name of a type
-// - bool whether a type expression is actually a type (used internally)
-// - scope in which type makes sense
-func infer_type(v ast.Expr, scope *scope, index int) (ast.Expr, *scope, bool) {
- switch t := v.(type) {
- case *ast.CompositeLit:
- return t.Type, scope, true
- case *ast.Ident:
- if d := scope.lookup(t.Name); d != nil {
- if d.class == decl_package {
- return ast.NewIdent(t.Name), scope, false
- }
- typ, scope := d.infer_type()
- return typ, scope, d.class == decl_type
- }
- case *ast.UnaryExpr:
- switch t.Op {
- case token.AND:
- // &a makes sense only with values, don't even check for type
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
-
- e := new(ast.StarExpr)
- e.X = it
- return e, s, false
- case token.ARROW:
- // <-a makes sense only with values
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
- switch index {
- case -1, 0:
- it, s = advance_to_type(chan_predicate, it, s)
- return it.(*ast.ChanType).Value, s, false
- case 1:
- // technically it's a value, but in case of index == 1
- // it is always the last infer operation
- return ast.NewIdent("bool"), g_universe_scope, false
- }
- case token.ADD, token.NOT, token.SUB, token.XOR:
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
- return it, s, false
- }
- case *ast.BinaryExpr:
- switch t.Op {
- case token.EQL, token.NEQ, token.LSS, token.LEQ,
- token.GTR, token.GEQ, token.LOR, token.LAND:
- // logic operations, the result is a bool, always
- return ast.NewIdent("bool"), g_universe_scope, false
- case token.ADD, token.SUB, token.MUL, token.QUO, token.OR,
- token.XOR, token.REM, token.AND, token.AND_NOT:
- // try X, then Y, they should be the same anyway
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- it, s, _ = infer_type(t.Y, scope, -1)
- if it == nil {
- break
- }
- }
- return it, s, false
- case token.SHL, token.SHR:
- // try only X for shifts, Y is always uint
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
- return it, s, false
- }
- case *ast.IndexExpr:
- // something[another] always returns a value and it works on a value too
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
- it, s = advance_to_type(index_predicate, it, s)
- switch t := it.(type) {
- case *ast.ArrayType:
- return t.Elt, s, false
- case *ast.Ellipsis:
- return t.Elt, s, false
- case *ast.MapType:
- switch index {
- case -1, 0:
- return t.Value, s, false
- case 1:
- return ast.NewIdent("bool"), g_universe_scope, false
- }
- }
- case *ast.SliceExpr:
- // something[start : end] always returns a value
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
- it, s = advance_to_type(index_predicate, it, s)
- switch t := it.(type) {
- case *ast.ArrayType:
- e := new(ast.ArrayType)
- e.Elt = t.Elt
- return e, s, false
- }
- case *ast.StarExpr:
- it, s, is_type := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
- if is_type {
- // if it's a type, add * modifier, make it a 'pointer of' type
- e := new(ast.StarExpr)
- e.X = it
- return e, s, true
- } else {
- it, s := advance_to_type(star_predicate, it, s)
- if se, ok := it.(*ast.StarExpr); ok {
- return se.X, s, false
- }
- }
- case *ast.CallExpr:
- // this is a function call or a type cast:
- // myFunc(1,2,3) or int16(myvar)
- it, s, is_type := infer_type(t.Fun, scope, -1)
- if it == nil {
- break
- }
-
- if is_type {
- // a type cast
- return it, scope, false
- } else {
- // it must be a function call or a built-in function
- // first check for built-in
- if ct, ok := it.(*ast.Ident); ok {
- ty, s := check_for_builtin_funcs(ct, t, scope)
- if ty != nil {
- return ty, s, false
- }
- }
-
- // then check for an ordinary function call
- it, scope = advance_to_type(func_predicate, it, s)
- if ct, ok := it.(*ast.FuncType); ok {
- return func_return_type(ct, index), s, false
- }
- }
- case *ast.ParenExpr:
- it, s, is_type := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
- return it, s, is_type
- case *ast.SelectorExpr:
- it, s, _ := infer_type(t.X, scope, -1)
- if it == nil {
- break
- }
-
- if d := type_to_decl(it, s); d != nil {
- c := d.find_child_and_in_embedded(t.Sel.Name)
- if c != nil {
- if c.class == decl_type {
- return t, scope, true
- } else {
- typ, s := c.infer_type()
- return typ, s, false
- }
- }
- }
- case *ast.FuncLit:
- // it's a value, but I think most likely we don't even care, cause we can only
- // call it, and CallExpr uses the type itself to figure out
- return t.Type, scope, false
- case *ast.TypeAssertExpr:
- if t.Type == nil {
- return infer_type(t.X, scope, -1)
- }
- switch index {
- case -1, 0:
- // converting a value to a different type, but return thing is a value
- it, _, _ := infer_type(t.Type, scope, -1)
- return it, scope, false
- case 1:
- return ast.NewIdent("bool"), g_universe_scope, false
- }
- case *ast.ArrayType, *ast.MapType, *ast.ChanType, *ast.Ellipsis,
- *ast.FuncType, *ast.StructType, *ast.InterfaceType:
- return t, scope, true
- default:
- _ = reflect.TypeOf(v)
- //fmt.Println(ty)
- }
- return nil, nil, false
-}
-
-// Uses Value, ValueIndex and Scope to infer the type of this
-// declaration. Returns the type itself and the scope where this type
-// makes sense.
-func (d *decl) infer_type() (ast.Expr, *scope) {
- // special case for range vars
- if d.flags&decl_rangevar != 0 {
- var scope *scope
- d.typ, scope = infer_range_type(d.value, d.scope, d.value_index)
- return d.typ, scope
- }
-
- switch d.class {
- case decl_package:
- // package is handled specially in inferType
- return nil, nil
- case decl_type:
- return ast.NewIdent(d.name), d.scope
- }
-
- // shortcut
- if d.typ != nil && d.value == nil {
- return d.typ, d.scope
- }
-
- // prevent loops
- if d.flags&decl_visited != 0 {
- return nil, nil
- }
- d.flags |= decl_visited
- defer d.clear_visited()
-
- var scope *scope
- d.typ, scope, _ = infer_type(d.value, d.scope, d.value_index)
- return d.typ, scope
-}
-
-func (d *decl) find_child(name string) *decl {
- if d.flags&decl_visited != 0 {
- return nil
- }
- d.flags |= decl_visited
- defer d.clear_visited()
-
- if d.children != nil {
- if c, ok := d.children[name]; ok {
- return c
- }
- }
-
- decl := advance_to_struct_or_interface(d)
- if decl != nil && decl != d {
- return decl.find_child(name)
- }
- return nil
-}
-
-func (d *decl) find_child_and_in_embedded(name string) *decl {
- if d == nil {
- return nil
- }
-
- c := d.find_child(name)
- if c == nil {
- for _, e := range d.embedded {
- typedecl := type_to_decl(e, d.scope)
- c = typedecl.find_child_and_in_embedded(name)
- if c != nil {
- break
- }
- }
- }
- return c
-}
-
-// Special type inference for range statements.
-// [int], [int] := range [string]
-// [int], [value] := range [slice or array]
-// [key], [value] := range [map]
-// [value], [nil] := range [chan]
-func infer_range_type(e ast.Expr, sc *scope, valueindex int) (ast.Expr, *scope) {
- t, s, _ := infer_type(e, sc, -1)
- t, s = advance_to_type(range_predicate, t, s)
- if t != nil {
- var t1, t2 ast.Expr
- var s1, s2 *scope
- s1 = s
- s2 = s
-
- switch t := t.(type) {
- case *ast.Ident:
- // string
- if t.Name == "string" {
- t1 = ast.NewIdent("int")
- t2 = ast.NewIdent("rune")
- s1 = g_universe_scope
- s2 = g_universe_scope
- } else {
- t1, t2 = nil, nil
- }
- case *ast.ArrayType:
- t1 = ast.NewIdent("int")
- s1 = g_universe_scope
- t2 = t.Elt
- case *ast.Ellipsis:
- t1 = ast.NewIdent("int")
- s1 = g_universe_scope
- t2 = t.Elt
- case *ast.MapType:
- t1 = t.Key
- t2 = t.Value
- case *ast.ChanType:
- t1 = t.Value
- t2 = nil
- default:
- t1, t2 = nil, nil
- }
-
- switch valueindex {
- case 0:
- return t1, s1
- case 1:
- return t2, s2
- }
- }
- return nil, nil
-}
-
-//-------------------------------------------------------------------------
-// Pretty printing
-//-------------------------------------------------------------------------
-
-func get_array_len(e ast.Expr) string {
- switch t := e.(type) {
- case *ast.BasicLit:
- return string(t.Value)
- case *ast.Ellipsis:
- return "..."
- }
- return ""
-}
-
-func pretty_print_type_expr(out io.Writer, e ast.Expr) {
- switch t := e.(type) {
- case *ast.StarExpr:
- fmt.Fprintf(out, "*")
- pretty_print_type_expr(out, t.X)
- case *ast.Ident:
- if strings.HasPrefix(t.Name, "$") {
- // beautify anonymous types
- switch t.Name[1] {
- case 's':
- fmt.Fprintf(out, "struct")
- case 'i':
- // ok, in most cases anonymous interface is an
- // empty interface, I'll just pretend that
- // it's always true
- fmt.Fprintf(out, "interface{}")
- }
- } else if !*g_debug && strings.HasPrefix(t.Name, "#") {
- fmt.Fprintf(out, t.Name[1:])
- } else if !*g_debug && strings.HasPrefix(t.Name, "!") {
- // these are full package names for disambiguating and pretty
- // printing packages withing packages, e.g.
- // !go/ast!ast vs. !github.com/nsf/my/ast!ast
- // another ugly hack, if people are punished in hell for ugly hacks
- // I'm screwed...
- fmt.Fprintf(out, t.Name[strings.LastIndex(t.Name, "!")+1:])
- } else {
- fmt.Fprintf(out, t.Name)
- }
- case *ast.ArrayType:
- al := ""
- if t.Len != nil {
- al = get_array_len(t.Len)
- }
- if al != "" {
- fmt.Fprintf(out, "[%s]", al)
- } else {
- fmt.Fprintf(out, "[]")
- }
- pretty_print_type_expr(out, t.Elt)
- case *ast.SelectorExpr:
- pretty_print_type_expr(out, t.X)
- fmt.Fprintf(out, ".%s", t.Sel.Name)
- case *ast.FuncType:
- fmt.Fprintf(out, "func(")
- pretty_print_func_field_list(out, t.Params)
- fmt.Fprintf(out, ")")
-
- buf := bytes.NewBuffer(make([]byte, 0, 256))
- nresults := pretty_print_func_field_list(buf, t.Results)
- if nresults > 0 {
- results := buf.String()
- if strings.IndexAny(results, ", ") != -1 {
- results = "(" + results + ")"
- }
- fmt.Fprintf(out, " %s", results)
- }
- case *ast.MapType:
- fmt.Fprintf(out, "map[")
- pretty_print_type_expr(out, t.Key)
- fmt.Fprintf(out, "]")
- pretty_print_type_expr(out, t.Value)
- case *ast.InterfaceType:
- fmt.Fprintf(out, "interface{}")
- case *ast.Ellipsis:
- fmt.Fprintf(out, "...")
- pretty_print_type_expr(out, t.Elt)
- case *ast.StructType:
- fmt.Fprintf(out, "struct")
- case *ast.ChanType:
- switch t.Dir {
- case ast.RECV:
- fmt.Fprintf(out, "<-chan ")
- case ast.SEND:
- fmt.Fprintf(out, "chan<- ")
- case ast.SEND | ast.RECV:
- fmt.Fprintf(out, "chan ")
- }
- pretty_print_type_expr(out, t.Value)
- case *ast.ParenExpr:
- fmt.Fprintf(out, "(")
- pretty_print_type_expr(out, t.X)
- fmt.Fprintf(out, ")")
- case *ast.BadExpr:
- // TODO: probably I should check that in a separate function
- // and simply discard declarations with BadExpr as a part of their
- // type
- default:
- // the element has some weird type, just ignore it
- }
-}
-
-func pretty_print_func_field_list(out io.Writer, f *ast.FieldList) int {
- count := 0
- if f == nil {
- return count
- }
- for i, field := range f.List {
- // names
- if field.Names != nil {
- hasNonblank := false
- for j, name := range field.Names {
- if name.Name != "?" {
- hasNonblank = true
- fmt.Fprintf(out, "%s", name.Name)
- if j != len(field.Names)-1 {
- fmt.Fprintf(out, ", ")
- }
- }
- count++
- }
- if hasNonblank {
- fmt.Fprintf(out, " ")
- }
- } else {
- count++
- }
-
- // type
- pretty_print_type_expr(out, field.Type)
-
- // ,
- if i != len(f.List)-1 {
- fmt.Fprintf(out, ", ")
- }
- }
- return count
-}
-
-func ast_decl_names(d ast.Decl) []*ast.Ident {
- var names []*ast.Ident
-
- switch t := d.(type) {
- case *ast.GenDecl:
- switch t.Tok {
- case token.CONST:
- c := t.Specs[0].(*ast.ValueSpec)
- names = make([]*ast.Ident, len(c.Names))
- for i, name := range c.Names {
- names[i] = name
- }
- case token.TYPE:
- t := t.Specs[0].(*ast.TypeSpec)
- names = make([]*ast.Ident, 1)
- names[0] = t.Name
- case token.VAR:
- v := t.Specs[0].(*ast.ValueSpec)
- names = make([]*ast.Ident, len(v.Names))
- for i, name := range v.Names {
- names[i] = name
- }
- }
- case *ast.FuncDecl:
- names = make([]*ast.Ident, 1)
- names[0] = t.Name
- }
-
- return names
-}
-
-func ast_decl_values(d ast.Decl) []ast.Expr {
- // TODO: CONST values here too
- switch t := d.(type) {
- case *ast.GenDecl:
- switch t.Tok {
- case token.VAR:
- v := t.Specs[0].(*ast.ValueSpec)
- if v.Values != nil {
- return v.Values
- }
- }
- }
- return nil
-}
-
-func ast_decl_split(d ast.Decl) []ast.Decl {
- var decls []ast.Decl
- if t, ok := d.(*ast.GenDecl); ok {
- decls = make([]ast.Decl, len(t.Specs))
- for i, s := range t.Specs {
- decl := new(ast.GenDecl)
- *decl = *t
- decl.Specs = make([]ast.Spec, 1)
- decl.Specs[0] = s
- decls[i] = decl
- }
- } else {
- decls = make([]ast.Decl, 1)
- decls[0] = d
- }
- return decls
-}
-
-//-------------------------------------------------------------------------
-// decl_pack
-//-------------------------------------------------------------------------
-
-type decl_pack struct {
- names []*ast.Ident
- typ ast.Expr
- values []ast.Expr
-}
-
-type foreach_decl_struct struct {
- decl_pack
- decl ast.Decl
-}
-
-func (f *decl_pack) value(i int) ast.Expr {
- if f.values == nil {
- return nil
- }
- if len(f.values) > 1 {
- return f.values[i]
- }
- return f.values[0]
-}
-
-func (f *decl_pack) value_index(i int) (v ast.Expr, vi int) {
- // default: nil value
- v = nil
- vi = -1
-
- if f.values != nil {
- // A = B, if there is only one name, the value is solo too
- if len(f.names) == 1 {
- return f.values[0], -1
- }
-
- if len(f.values) > 1 {
- // in case if there are multiple values, it's a usual
- // multiassignment
- if i >= len(f.values) {
- i = len(f.values) - 1
- }
- v = f.values[i]
- } else {
- // in case if there is one value, but many names, it's
- // a tuple unpack.. use index here
- v = f.values[0]
- vi = i
- }
- }
- return
-}
-
-func (f *decl_pack) type_value_index(i int) (ast.Expr, ast.Expr, int) {
- if f.typ != nil {
- // If there is a type, we don't care about value, just return the type
- // and zero value.
- return f.typ, nil, -1
- }
-
- // And otherwise we simply return nil type and a valid value for later inferring.
- v, vi := f.value_index(i)
- return nil, v, vi
-}
-
-type foreach_decl_func func(data *foreach_decl_struct)
-
-func foreach_decl(decl ast.Decl, do foreach_decl_func) {
- decls := ast_decl_split(decl)
- var data foreach_decl_struct
- for _, decl := range decls {
- if !ast_decl_convertable(decl) {
- continue
- }
- data.names = ast_decl_names(decl)
- data.typ = ast_decl_type(decl)
- data.values = ast_decl_values(decl)
- data.decl = decl
-
- do(&data)
- }
-}
-
-//-------------------------------------------------------------------------
-// Built-in declarations
-//-------------------------------------------------------------------------
-
-var g_universe_scope = new_scope(nil)
-
-func init() {
- builtin := ast.NewIdent("built-in")
-
- add_type := func(name string) {
- d := new_decl(name, decl_type, g_universe_scope)
- d.typ = builtin
- g_universe_scope.add_named_decl(d)
- }
- add_type("bool")
- add_type("byte")
- add_type("complex64")
- add_type("complex128")
- add_type("float32")
- add_type("float64")
- add_type("int8")
- add_type("int16")
- add_type("int32")
- add_type("int64")
- add_type("string")
- add_type("uint8")
- add_type("uint16")
- add_type("uint32")
- add_type("uint64")
- add_type("int")
- add_type("uint")
- add_type("uintptr")
- add_type("rune")
-
- add_const := func(name string) {
- d := new_decl(name, decl_const, g_universe_scope)
- d.typ = builtin
- g_universe_scope.add_named_decl(d)
- }
- add_const("true")
- add_const("false")
- add_const("iota")
- add_const("nil")
-
- add_func := func(name, typ string) {
- d := new_decl(name, decl_func, g_universe_scope)
- d.typ = ast.NewIdent(typ)
- g_universe_scope.add_named_decl(d)
- }
- add_func("append", "func([]type, ...type) []type")
- add_func("cap", "func(container) int")
- add_func("close", "func(channel)")
- add_func("complex", "func(real, imag) complex")
- add_func("copy", "func(dst, src)")
- add_func("delete", "func(map[typeA]typeB, typeA)")
- add_func("imag", "func(complex)")
- add_func("len", "func(container) int")
- add_func("make", "func(type, len[, cap]) type")
- add_func("new", "func(type) *type")
- add_func("panic", "func(interface{})")
- add_func("print", "func(...interface{})")
- add_func("println", "func(...interface{})")
- add_func("real", "func(complex)")
- add_func("recover", "func() interface{}")
-
- // built-in error interface
- d := new_decl("error", decl_type, g_universe_scope)
- d.typ = &ast.InterfaceType{}
- d.children = make(map[string]*decl)
- d.children["Error"] = new_decl("Error", decl_func, g_universe_scope)
- d.children["Error"].typ = &ast.FuncType{
- Results: &ast.FieldList{
- List: []*ast.Field{
- {
- Type: ast.NewIdent("string"),
- },
- },
- },
- }
- g_universe_scope.add_named_decl(d)
-}
diff --git a/vendor/github.com/nsf/gocode/declcache.go b/vendor/github.com/nsf/gocode/declcache.go
deleted file mode 100644
index 6eb9313..0000000
--- a/vendor/github.com/nsf/gocode/declcache.go
+++ /dev/null
@@ -1,518 +0,0 @@
-package main
-
-import (
- "fmt"
- "go/ast"
- "go/build"
- "go/parser"
- "go/token"
- "log"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
- "sync"
-)
-
-//-------------------------------------------------------------------------
-// []package_import
-//-------------------------------------------------------------------------
-
-type package_import struct {
- alias string
- path string
-}
-
-// Parses import declarations until the first non-import declaration and fills
-// `packages` array with import information.
-func collect_package_imports(filename string, decls []ast.Decl, context *package_lookup_context) []package_import {
- pi := make([]package_import, 0, 16)
- for _, decl := range decls {
- if gd, ok := decl.(*ast.GenDecl); ok && gd.Tok == token.IMPORT {
- for _, spec := range gd.Specs {
- imp := spec.(*ast.ImportSpec)
- path, alias := path_and_alias(imp)
- path, ok := abs_path_for_package(filename, path, context)
- if ok && alias != "_" {
- pi = append(pi, package_import{alias, path})
- }
- }
- } else {
- break
- }
- }
- return pi
-}
-
-//-------------------------------------------------------------------------
-// decl_file_cache
-//
-// Contains cache for top-level declarations of a file as well as its
-// contents, AST and import information.
-//-------------------------------------------------------------------------
-
-type decl_file_cache struct {
- name string // file name
- mtime int64 // last modification time
-
- decls map[string]*decl // top-level declarations
- error error // last error
- packages []package_import // import information
- filescope *scope
-
- fset *token.FileSet
- context *package_lookup_context
-}
-
-func new_decl_file_cache(name string, context *package_lookup_context) *decl_file_cache {
- return &decl_file_cache{
- name: name,
- context: context,
- }
-}
-
-func (f *decl_file_cache) update() {
- stat, err := os.Stat(f.name)
- if err != nil {
- f.decls = nil
- f.error = err
- f.fset = nil
- return
- }
-
- statmtime := stat.ModTime().UnixNano()
- if f.mtime == statmtime {
- return
- }
-
- f.mtime = statmtime
- f.read_file()
-}
-
-func (f *decl_file_cache) read_file() {
- var data []byte
- data, f.error = file_reader.read_file(f.name)
- if f.error != nil {
- return
- }
- data, _ = filter_out_shebang(data)
-
- f.process_data(data)
-}
-
-func (f *decl_file_cache) process_data(data []byte) {
- var file *ast.File
- f.fset = token.NewFileSet()
- file, f.error = parser.ParseFile(f.fset, "", data, 0)
- f.filescope = new_scope(nil)
- for _, d := range file.Decls {
- anonymify_ast(d, 0, f.filescope)
- }
- f.packages = collect_package_imports(f.name, file.Decls, f.context)
- f.decls = make(map[string]*decl, len(file.Decls))
- for _, decl := range file.Decls {
- append_to_top_decls(f.decls, decl, f.filescope)
- }
-}
-
-func append_to_top_decls(decls map[string]*decl, decl ast.Decl, scope *scope) {
- foreach_decl(decl, func(data *foreach_decl_struct) {
- class := ast_decl_class(data.decl)
- for i, name := range data.names {
- typ, v, vi := data.type_value_index(i)
-
- d := new_decl_full(name.Name, class, 0, typ, v, vi, scope)
- if d == nil {
- return
- }
-
- methodof := method_of(decl)
- if methodof != "" {
- decl, ok := decls[methodof]
- if ok {
- decl.add_child(d)
- } else {
- decl = new_decl(methodof, decl_methods_stub, scope)
- decls[methodof] = decl
- decl.add_child(d)
- }
- } else {
- decl, ok := decls[d.name]
- if ok {
- decl.expand_or_replace(d)
- } else {
- decls[d.name] = d
- }
- }
- }
- })
-}
-
-func abs_path_for_package(filename, p string, context *package_lookup_context) (string, bool) {
- dir, _ := filepath.Split(filename)
- if len(p) == 0 {
- return "", false
- }
- if p[0] == '.' {
- return fmt.Sprintf("%s.a", filepath.Join(dir, p)), true
- }
- pkg, ok := find_go_dag_package(p, dir)
- if ok {
- return pkg, true
- }
- return find_global_file(p, context)
-}
-
-func path_and_alias(imp *ast.ImportSpec) (string, string) {
- path := ""
- if imp.Path != nil && len(imp.Path.Value) > 0 {
- path = string(imp.Path.Value)
- path = path[1 : len(path)-1]
- }
- alias := ""
- if imp.Name != nil {
- alias = imp.Name.Name
- }
- return path, alias
-}
-
-func find_go_dag_package(imp, filedir string) (string, bool) {
- // Support godag directory structure
- dir, pkg := filepath.Split(imp)
- godag_pkg := filepath.Join(filedir, "..", dir, "_obj", pkg+".a")
- if file_exists(godag_pkg) {
- return godag_pkg, true
- }
- return "", false
-}
-
-// autobuild compares the mod time of the source files of the package, and if any of them is newer
-// than the package object file will rebuild it.
-func autobuild(p *build.Package) error {
- if p.Dir == "" {
- return fmt.Errorf("no files to build")
- }
- ps, err := os.Stat(p.PkgObj)
- if err != nil {
- // Assume package file does not exist and build for the first time.
- return build_package(p)
- }
- pt := ps.ModTime()
- fs, err := readdir_lstat(p.Dir)
- if err != nil {
- return err
- }
- for _, f := range fs {
- if f.IsDir() {
- continue
- }
- if f.ModTime().After(pt) {
- // Source file is newer than package file; rebuild.
- return build_package(p)
- }
- }
- return nil
-}
-
-// build_package builds the package by calling `go install package/import`. If everything compiles
-// correctly, the newly compiled package should then be in the usual place in the `$GOPATH/pkg`
-// directory, and gocode will pick it up from there.
-func build_package(p *build.Package) error {
- if *g_debug {
- log.Printf("-------------------")
- log.Printf("rebuilding package %s", p.Name)
- log.Printf("package import: %s", p.ImportPath)
- log.Printf("package object: %s", p.PkgObj)
- log.Printf("package source dir: %s", p.Dir)
- log.Printf("package source files: %v", p.GoFiles)
- log.Printf("GOPATH: %v", g_daemon.context.GOPATH)
- log.Printf("GOROOT: %v", g_daemon.context.GOROOT)
- }
- env := os.Environ()
- for i, v := range env {
- if strings.HasPrefix(v, "GOPATH=") {
- env[i] = "GOPATH=" + g_daemon.context.GOPATH
- } else if strings.HasPrefix(v, "GOROOT=") {
- env[i] = "GOROOT=" + g_daemon.context.GOROOT
- }
- }
-
- cmd := exec.Command("go", "install", p.ImportPath)
- cmd.Env = env
-
- // TODO: Should read STDERR rather than STDOUT.
- out, err := cmd.CombinedOutput()
- if err != nil {
- return err
- }
- if *g_debug {
- log.Printf("build out: %s\n", string(out))
- }
- return nil
-}
-
-// executes autobuild function if autobuild option is enabled, logs error and
-// ignores it
-func try_autobuild(p *build.Package) {
- if g_config.Autobuild {
- err := autobuild(p)
- if err != nil && *g_debug {
- log.Printf("Autobuild error: %s\n", err)
- }
- }
-}
-
-func log_found_package_maybe(imp, pkgpath string) {
- if *g_debug {
- log.Printf("Found %q at %q\n", imp, pkgpath)
- }
-}
-
-func log_build_context(context *package_lookup_context) {
- log.Printf(" GOROOT: %s\n", context.GOROOT)
- log.Printf(" GOPATH: %s\n", context.GOPATH)
- log.Printf(" GOOS: %s\n", context.GOOS)
- log.Printf(" GOARCH: %s\n", context.GOARCH)
- log.Printf(" BzlProjectRoot: %q\n", context.BzlProjectRoot)
- log.Printf(" GBProjectRoot: %q\n", context.GBProjectRoot)
- log.Printf(" lib-path: %q\n", g_config.LibPath)
-}
-
-// find_global_file returns the file path of the compiled package corresponding to the specified
-// import, and a boolean stating whether such path is valid.
-// TODO: Return only one value, possibly empty string if not found.
-func find_global_file(imp string, context *package_lookup_context) (string, bool) {
- // gocode synthetically generates the builtin package
- // "unsafe", since the "unsafe.a" package doesn't really exist.
- // Thus, when the user request for the package "unsafe" we
- // would return synthetic global file that would be used
- // just as a key name to find this synthetic package
- if imp == "unsafe" {
- return "unsafe", true
- }
-
- pkgfile := fmt.Sprintf("%s.a", imp)
-
- // if lib-path is defined, use it
- if g_config.LibPath != "" {
- for _, p := range filepath.SplitList(g_config.LibPath) {
- pkg_path := filepath.Join(p, pkgfile)
- if file_exists(pkg_path) {
- log_found_package_maybe(imp, pkg_path)
- return pkg_path, true
- }
- // Also check the relevant pkg/OS_ARCH dir for the libpath, if provided.
- pkgdir := fmt.Sprintf("%s_%s", context.GOOS, context.GOARCH)
- pkg_path = filepath.Join(p, "pkg", pkgdir, pkgfile)
- if file_exists(pkg_path) {
- log_found_package_maybe(imp, pkg_path)
- return pkg_path, true
- }
- }
- }
-
- // gb-specific lookup mode, only if the root dir was found
- if g_config.PackageLookupMode == "gb" && context.GBProjectRoot != "" {
- root := context.GBProjectRoot
- pkg_path := filepath.Join(root, "pkg", context.GOOS+"-"+context.GOARCH, pkgfile)
- if file_exists(pkg_path) {
- log_found_package_maybe(imp, pkg_path)
- return pkg_path, true
- }
- }
-
- // bzl-specific lookup mode, only if the root dir was found
- if g_config.PackageLookupMode == "bzl" && context.BzlProjectRoot != "" {
- var root, impath string
- if strings.HasPrefix(imp, g_config.CustomPkgPrefix+"/") {
- root = filepath.Join(context.BzlProjectRoot, "bazel-bin")
- impath = imp[len(g_config.CustomPkgPrefix)+1:]
- } else if g_config.CustomVendorDir != "" {
- // Try custom vendor dir.
- root = filepath.Join(context.BzlProjectRoot, "bazel-bin", g_config.CustomVendorDir)
- impath = imp
- }
-
- if root != "" && impath != "" {
- // There might be more than one ".a" files in the pkg path with bazel.
- // But the best practice is to keep one go_library build target in each
- // pakcage directory so that it follows the standard Go package
- // structure. Thus here we assume there is at most one ".a" file existing
- // in the pkg path.
- if d, err := os.Open(filepath.Join(root, impath)); err == nil {
- defer d.Close()
-
- if fis, err := d.Readdir(-1); err == nil {
- for _, fi := range fis {
- if !fi.IsDir() && filepath.Ext(fi.Name()) == ".a" {
- pkg_path := filepath.Join(root, impath, fi.Name())
- log_found_package_maybe(imp, pkg_path)
- return pkg_path, true
- }
- }
- }
- }
- }
- }
-
- if context.CurrentPackagePath != "" {
- // Try vendor path first, see GO15VENDOREXPERIMENT.
- // We don't check this environment variable however, seems like there is
- // almost no harm in doing so (well.. if you experiment with vendoring,
- // gocode will fail after enabling/disabling the flag, and you'll be
- // forced to get rid of vendor binaries). But asking users to set this
- // env var is up will bring more trouble. Because we also need to pass
- // it from client to server, make sure their editors set it, etc.
- // So, whatever, let's just pretend it's always on.
- package_path := context.CurrentPackagePath
- for {
- limp := filepath.Join(package_path, "vendor", imp)
- if p, err := context.Import(limp, "", build.AllowBinary|build.FindOnly); err == nil {
- try_autobuild(p)
- if file_exists(p.PkgObj) {
- log_found_package_maybe(imp, p.PkgObj)
- return p.PkgObj, true
- }
- }
- if package_path == "" {
- break
- }
- next_path := filepath.Dir(package_path)
- // let's protect ourselves from inf recursion here
- if next_path == package_path {
- break
- }
- package_path = next_path
- }
- }
-
- if p, err := context.Import(imp, "", build.AllowBinary|build.FindOnly); err == nil {
- try_autobuild(p)
- if file_exists(p.PkgObj) {
- log_found_package_maybe(imp, p.PkgObj)
- return p.PkgObj, true
- }
- }
-
- if *g_debug {
- log.Printf("Import path %q was not resolved\n", imp)
- log.Println("Gocode's build context is:")
- log_build_context(context)
- }
- return "", false
-}
-
-func package_name(file *ast.File) string {
- if file.Name != nil {
- return file.Name.Name
- }
- return ""
-}
-
-//-------------------------------------------------------------------------
-// decl_cache
-//
-// Thread-safe collection of DeclFileCache entities.
-//-------------------------------------------------------------------------
-
-type package_lookup_context struct {
- build.Context
- BzlProjectRoot string
- GBProjectRoot string
- CurrentPackagePath string
-}
-
-// gopath returns the list of Go path directories.
-func (ctxt *package_lookup_context) gopath() []string {
- var all []string
- for _, p := range filepath.SplitList(ctxt.GOPATH) {
- if p == "" || p == ctxt.GOROOT {
- // Empty paths are uninteresting.
- // If the path is the GOROOT, ignore it.
- // People sometimes set GOPATH=$GOROOT.
- // Do not get confused by this common mistake.
- continue
- }
- if strings.HasPrefix(p, "~") {
- // Path segments starting with ~ on Unix are almost always
- // users who have incorrectly quoted ~ while setting GOPATH,
- // preventing it from expanding to $HOME.
- // The situation is made more confusing by the fact that
- // bash allows quoted ~ in $PATH (most shells do not).
- // Do not get confused by this, and do not try to use the path.
- // It does not exist, and printing errors about it confuses
- // those users even more, because they think "sure ~ exists!".
- // The go command diagnoses this situation and prints a
- // useful error.
- // On Windows, ~ is used in short names, such as c:\progra~1
- // for c:\program files.
- continue
- }
- all = append(all, p)
- }
- return all
-}
-
-func (ctxt *package_lookup_context) pkg_dirs() []string {
- pkgdir := fmt.Sprintf("%s_%s", ctxt.GOOS, ctxt.GOARCH)
-
- var all []string
- if ctxt.GOROOT != "" {
- dir := filepath.Join(ctxt.GOROOT, "pkg", pkgdir)
- if is_dir(dir) {
- all = append(all, dir)
- }
- }
-
- switch g_config.PackageLookupMode {
- case "go":
- for _, p := range ctxt.gopath() {
- dir := filepath.Join(p, "pkg", pkgdir)
- if is_dir(dir) {
- all = append(all, dir)
- }
- }
- case "gb":
- if ctxt.GBProjectRoot != "" {
- pkgdir := fmt.Sprintf("%s-%s", ctxt.GOOS, ctxt.GOARCH)
- dir := filepath.Join(ctxt.GBProjectRoot, "pkg", pkgdir)
- if is_dir(dir) {
- all = append(all, dir)
- }
- }
- case "bzl":
- // TODO: Support bazel mode
- }
- return all
-}
-
-type decl_cache struct {
- cache map[string]*decl_file_cache
- context *package_lookup_context
- sync.Mutex
-}
-
-func new_decl_cache(context *package_lookup_context) *decl_cache {
- return &decl_cache{
- cache: make(map[string]*decl_file_cache),
- context: context,
- }
-}
-
-func (c *decl_cache) get(filename string) *decl_file_cache {
- c.Lock()
- defer c.Unlock()
-
- f, ok := c.cache[filename]
- if !ok {
- f = new_decl_file_cache(filename, c.context)
- c.cache[filename] = f
- }
- return f
-}
-
-func (c *decl_cache) get_and_update(filename string) *decl_file_cache {
- f := c.get(filename)
- f.update()
- return f
-}
diff --git a/vendor/github.com/nsf/gocode/formatters.go b/vendor/github.com/nsf/gocode/formatters.go
deleted file mode 100644
index b0ec264..0000000
--- a/vendor/github.com/nsf/gocode/formatters.go
+++ /dev/null
@@ -1,172 +0,0 @@
-package main
-
-import (
- "fmt"
- "strings"
-)
-
-//-------------------------------------------------------------------------
-// formatter interfaces
-//-------------------------------------------------------------------------
-
-type formatter interface {
- write_candidates(candidates []candidate, num int)
-}
-
-//-------------------------------------------------------------------------
-// nice_formatter (just for testing, simple textual output)
-//-------------------------------------------------------------------------
-
-type nice_formatter struct{}
-
-func (*nice_formatter) write_candidates(candidates []candidate, num int) {
- if candidates == nil {
- fmt.Printf("Nothing to complete.\n")
- return
- }
-
- fmt.Printf("Found %d candidates:\n", len(candidates))
- for _, c := range candidates {
- abbr := fmt.Sprintf("%s %s %s", c.Class, c.Name, c.Type)
- if c.Class == decl_func {
- abbr = fmt.Sprintf("%s %s%s", c.Class, c.Name, c.Type[len("func"):])
- }
- fmt.Printf(" %s\n", abbr)
- }
-}
-
-//-------------------------------------------------------------------------
-// vim_formatter
-//-------------------------------------------------------------------------
-
-type vim_formatter struct{}
-
-func (*vim_formatter) write_candidates(candidates []candidate, num int) {
- if candidates == nil {
- fmt.Print("[0, []]")
- return
- }
-
- fmt.Printf("[%d, [", num)
- for i, c := range candidates {
- if i != 0 {
- fmt.Printf(", ")
- }
-
- word := c.Name
- if c.Class == decl_func {
- word += "("
- if strings.HasPrefix(c.Type, "func()") {
- word += ")"
- }
- }
-
- abbr := fmt.Sprintf("%s %s %s", c.Class, c.Name, c.Type)
- if c.Class == decl_func {
- abbr = fmt.Sprintf("%s %s%s", c.Class, c.Name, c.Type[len("func"):])
- }
- fmt.Printf("{'word': '%s', 'abbr': '%s', 'info': '%s'}", word, abbr, abbr)
- }
- fmt.Printf("]]")
-}
-
-//-------------------------------------------------------------------------
-// godit_formatter
-//-------------------------------------------------------------------------
-
-type godit_formatter struct{}
-
-func (*godit_formatter) write_candidates(candidates []candidate, num int) {
- fmt.Printf("%d,,%d\n", num, len(candidates))
- for _, c := range candidates {
- contents := c.Name
- if c.Class == decl_func {
- contents += "("
- if strings.HasPrefix(c.Type, "func()") {
- contents += ")"
- }
- }
-
- display := fmt.Sprintf("%s %s %s", c.Class, c.Name, c.Type)
- if c.Class == decl_func {
- display = fmt.Sprintf("%s %s%s", c.Class, c.Name, c.Type[len("func"):])
- }
- fmt.Printf("%s,,%s\n", display, contents)
- }
-}
-
-//-------------------------------------------------------------------------
-// emacs_formatter
-//-------------------------------------------------------------------------
-
-type emacs_formatter struct{}
-
-func (*emacs_formatter) write_candidates(candidates []candidate, num int) {
- for _, c := range candidates {
- var hint string
- switch {
- case c.Class == decl_func:
- hint = c.Type
- case c.Type == "":
- hint = c.Class.String()
- default:
- hint = c.Class.String() + " " + c.Type
- }
- fmt.Printf("%s,,%s\n", c.Name, hint)
- }
-}
-
-//-------------------------------------------------------------------------
-// csv_formatter
-//-------------------------------------------------------------------------
-
-type csv_formatter struct{}
-
-func (*csv_formatter) write_candidates(candidates []candidate, num int) {
- for _, c := range candidates {
- fmt.Printf("%s,,%s,,%s\n", c.Class, c.Name, c.Type)
- }
-}
-
-//-------------------------------------------------------------------------
-// json_formatter
-//-------------------------------------------------------------------------
-
-type json_formatter struct{}
-
-func (*json_formatter) write_candidates(candidates []candidate, num int) {
- if candidates == nil {
- fmt.Print("[]")
- return
- }
-
- fmt.Printf(`[%d, [`, num)
- for i, c := range candidates {
- if i != 0 {
- fmt.Printf(", ")
- }
- fmt.Printf(`{"class": "%s", "name": "%s", "type": "%s"}`,
- c.Class, c.Name, c.Type)
- }
- fmt.Print("]]")
-}
-
-//-------------------------------------------------------------------------
-
-func get_formatter(name string) formatter {
- switch name {
- case "vim":
- return new(vim_formatter)
- case "emacs":
- return new(emacs_formatter)
- case "nice":
- return new(nice_formatter)
- case "csv":
- return new(csv_formatter)
- case "json":
- return new(json_formatter)
- case "godit":
- return new(godit_formatter)
- }
- return new(nice_formatter)
-}
diff --git a/vendor/github.com/nsf/gocode/gocode.go b/vendor/github.com/nsf/gocode/gocode.go
deleted file mode 100644
index 650e346..0000000
--- a/vendor/github.com/nsf/gocode/gocode.go
+++ /dev/null
@@ -1,72 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "log"
- "net/http"
- _ "net/http/pprof"
- "os"
- "path/filepath"
-)
-
-var (
- g_is_server = flag.Bool("s", false, "run a server instead of a client")
- g_format = flag.String("f", "nice", "output format (vim | emacs | nice | csv | json)")
- g_input = flag.String("in", "", "use this file instead of stdin input")
- g_sock = create_sock_flag("sock", "socket type (unix | tcp)")
- g_addr = flag.String("addr", "127.0.0.1:37373", "address for tcp socket")
- g_debug = flag.Bool("debug", false, "enable server-side debug mode")
- g_profile = flag.Int("profile", 0, "port on which to expose profiling information for pprof; 0 to disable profiling")
-)
-
-func get_socket_filename() string {
- user := os.Getenv("USER")
- if user == "" {
- user = "all"
- }
- return filepath.Join(os.TempDir(), fmt.Sprintf("gocode-daemon.%s", user))
-}
-
-func show_usage() {
- fmt.Fprintf(os.Stderr,
- "Usage: %s [-s] [-f=] [-in=] [-sock=] [-addr=]\n"+
- " []\n\n",
- os.Args[0])
- fmt.Fprintf(os.Stderr,
- "Flags:\n")
- flag.PrintDefaults()
- fmt.Fprintf(os.Stderr,
- "\nCommands:\n"+
- " autocomplete [] main autocompletion command\n"+
- " close close the gocode daemon\n"+
- " status gocode daemon status report\n"+
- " drop-cache drop gocode daemon's cache\n"+
- " set [ []] list or set config options\n")
-}
-
-func main() {
- flag.Usage = show_usage
- flag.Parse()
-
- var retval int
- if *g_is_server {
- go func() {
- if *g_profile <= 0 {
- return
- }
- addr := fmt.Sprintf("localhost:%d", *g_profile)
- // Use the following commands to profile the binary:
- // go tool pprof http://localhost:6060/debug/pprof/profile # 30-second CPU profile
- // go tool pprof http://localhost:6060/debug/pprof/heap # heap profile
- // go tool pprof http://localhost:6060/debug/pprof/block # goroutine blocking profile
- // See http://blog.golang.org/profiling-go-programs for more info.
- log.Printf("enabling profiler on %s", addr)
- log.Print(http.ListenAndServe(addr, nil))
- }()
- retval = do_server()
- } else {
- retval = do_client()
- }
- os.Exit(retval)
-}
diff --git a/vendor/github.com/nsf/gocode/os_posix.go b/vendor/github.com/nsf/gocode/os_posix.go
deleted file mode 100644
index ac076e3..0000000
--- a/vendor/github.com/nsf/gocode/os_posix.go
+++ /dev/null
@@ -1,48 +0,0 @@
-// +build !windows
-
-package main
-
-import (
- "flag"
- "os"
- "os/exec"
- "path/filepath"
-)
-
-func create_sock_flag(name, desc string) *string {
- return flag.String(name, "unix", desc)
-}
-
-// Full path of the current executable
-func get_executable_filename() string {
- // try readlink first
- path, err := os.Readlink("/proc/self/exe")
- if err == nil {
- return path
- }
- // use argv[0]
- path = os.Args[0]
- if !filepath.IsAbs(path) {
- cwd, _ := os.Getwd()
- path = filepath.Join(cwd, path)
- }
- if file_exists(path) {
- return path
- }
- // Fallback : use "gocode" and assume we are in the PATH...
- path, err = exec.LookPath("gocode")
- if err == nil {
- return path
- }
- return ""
-}
-
-// config location
-
-func config_dir() string {
- return filepath.Join(xdg_home_dir(), "gocode")
-}
-
-func config_file() string {
- return filepath.Join(xdg_home_dir(), "gocode", "config.json")
-}
diff --git a/vendor/github.com/nsf/gocode/os_windows.go b/vendor/github.com/nsf/gocode/os_windows.go
deleted file mode 100644
index 1a63f9d..0000000
--- a/vendor/github.com/nsf/gocode/os_windows.go
+++ /dev/null
@@ -1,56 +0,0 @@
-package main
-
-import (
- "flag"
- "fmt"
- "path/filepath"
- "syscall"
- "unsafe"
-)
-
-var (
- shell32 = syscall.NewLazyDLL("shell32.dll")
- kernel32 = syscall.NewLazyDLL("kernel32.dll")
-)
-
-var (
- proc_sh_get_folder_path = shell32.NewProc("SHGetFolderPathW")
- proc_get_module_file_name = kernel32.NewProc("GetModuleFileNameW")
-)
-
-func create_sock_flag(name, desc string) *string {
- return flag.String(name, "tcp", desc)
-}
-
-// Full path of the current executable
-func get_executable_filename() string {
- b := make([]uint16, syscall.MAX_PATH)
- ret, _, err := syscall.Syscall(proc_get_module_file_name.Addr(), 3,
- 0, uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)))
- if int(ret) == 0 {
- panic(fmt.Sprintf("GetModuleFileNameW : err %d", int(err)))
- }
- return syscall.UTF16ToString(b)
-}
-
-const (
- csidl_appdata = 0x1a
-)
-
-func get_appdata_folder_path() string {
- b := make([]uint16, syscall.MAX_PATH)
- ret, _, err := syscall.Syscall6(proc_sh_get_folder_path.Addr(), 5,
- 0, csidl_appdata, 0, 0, uintptr(unsafe.Pointer(&b[0])), 0)
- if int(ret) != 0 {
- panic(fmt.Sprintf("SHGetFolderPathW : err %d", int(err)))
- }
- return syscall.UTF16ToString(b)
-}
-
-func config_dir() string {
- return filepath.Join(get_appdata_folder_path(), "gocode")
-}
-
-func config_file() string {
- return filepath.Join(get_appdata_folder_path(), "gocode", "config.json")
-}
diff --git a/vendor/github.com/nsf/gocode/package.go b/vendor/github.com/nsf/gocode/package.go
deleted file mode 100644
index ab57aad..0000000
--- a/vendor/github.com/nsf/gocode/package.go
+++ /dev/null
@@ -1,256 +0,0 @@
-package main
-
-import (
- "bytes"
- "fmt"
- "go/ast"
- "os"
- "strings"
-)
-
-type package_parser interface {
- parse_export(callback func(pkg string, decl ast.Decl))
-}
-
-//-------------------------------------------------------------------------
-// package_file_cache
-//
-// Structure that represents a cache for an imported pacakge. In other words
-// these are the contents of an archive (*.a) file.
-//-------------------------------------------------------------------------
-
-type package_file_cache struct {
- name string // file name
- mtime int64
- defalias string
-
- scope *scope
- main *decl // package declaration
- others map[string]*decl
-}
-
-func new_package_file_cache(name string) *package_file_cache {
- m := new(package_file_cache)
- m.name = name
- m.mtime = 0
- m.defalias = ""
- return m
-}
-
-// Creates a cache that stays in cache forever. Useful for built-in packages.
-func new_package_file_cache_forever(name, defalias string) *package_file_cache {
- m := new(package_file_cache)
- m.name = name
- m.mtime = -1
- m.defalias = defalias
- return m
-}
-
-func (m *package_file_cache) find_file() string {
- if file_exists(m.name) {
- return m.name
- }
-
- n := len(m.name)
- filename := m.name[:n-1] + "6"
- if file_exists(filename) {
- return filename
- }
-
- filename = m.name[:n-1] + "8"
- if file_exists(filename) {
- return filename
- }
-
- filename = m.name[:n-1] + "5"
- if file_exists(filename) {
- return filename
- }
- return m.name
-}
-
-func (m *package_file_cache) update_cache() {
- if m.mtime == -1 {
- return
- }
- fname := m.find_file()
- stat, err := os.Stat(fname)
- if err != nil {
- return
- }
-
- statmtime := stat.ModTime().UnixNano()
- if m.mtime != statmtime {
- m.mtime = statmtime
-
- data, err := file_reader.read_file(fname)
- if err != nil {
- return
- }
- m.process_package_data(data)
- }
-}
-
-func (m *package_file_cache) process_package_data(data []byte) {
- m.scope = new_scope(g_universe_scope)
-
- // find import section
- i := bytes.Index(data, []byte{'\n', '$', '$'})
- if i == -1 {
- panic(fmt.Sprintf("Can't find the import section in the package file %s", m.name))
- }
- data = data[i+len("\n$$"):]
-
- // main package
- m.main = new_decl(m.name, decl_package, nil)
- // create map for other packages
- m.others = make(map[string]*decl)
-
- var pp package_parser
- if data[0] == 'B' {
- // binary format, skip 'B\n'
- data = data[2:]
- var p gc_bin_parser
- p.init(data, m)
- pp = &p
- } else {
- // textual format, find the beginning of the package clause
- i = bytes.Index(data, []byte{'p', 'a', 'c', 'k', 'a', 'g', 'e'})
- if i == -1 {
- panic("Can't find the package clause")
- }
- data = data[i:]
-
- var p gc_parser
- p.init(data, m)
- pp = &p
- }
-
- pp.parse_export(func(pkg string, decl ast.Decl) {
- anonymify_ast(decl, decl_foreign, m.scope)
- if pkg == "" || strings.HasPrefix(pkg, "#") {
- // main package
- add_ast_decl_to_package(m.main, decl, m.scope)
- } else {
- // others
- if _, ok := m.others[pkg]; !ok {
- m.others[pkg] = new_decl(pkg, decl_package, nil)
- }
- add_ast_decl_to_package(m.others[pkg], decl, m.scope)
- }
- })
-
- // hack, add ourselves to the package scope
- mainName := "#" + m.defalias
- m.add_package_to_scope(mainName, m.name)
-
- // replace dummy package decls in package scope to actual packages
- for key := range m.scope.entities {
- if !strings.HasPrefix(key, "#") && !strings.HasPrefix(key, "!") {
- continue
- }
- pkg, ok := m.others[key]
- if !ok && key == mainName {
- pkg = m.main
- }
- m.scope.replace_decl(key, pkg)
- }
-}
-
-func (m *package_file_cache) add_package_to_scope(alias, realname string) {
- d := new_decl(realname, decl_package, nil)
- m.scope.add_decl(alias, d)
-}
-
-func add_ast_decl_to_package(pkg *decl, decl ast.Decl, scope *scope) {
- foreach_decl(decl, func(data *foreach_decl_struct) {
- class := ast_decl_class(data.decl)
- for i, name := range data.names {
- typ, v, vi := data.type_value_index(i)
-
- d := new_decl_full(name.Name, class, decl_foreign, typ, v, vi, scope)
- if d == nil {
- return
- }
-
- if !name.IsExported() && d.class != decl_type {
- return
- }
-
- methodof := method_of(data.decl)
- if methodof != "" {
- decl := pkg.find_child(methodof)
- if decl != nil {
- decl.add_child(d)
- } else {
- decl = new_decl(methodof, decl_methods_stub, scope)
- decl.add_child(d)
- pkg.add_child(decl)
- }
- } else {
- decl := pkg.find_child(d.name)
- if decl != nil {
- decl.expand_or_replace(d)
- } else {
- pkg.add_child(d)
- }
- }
- }
- })
-}
-
-//-------------------------------------------------------------------------
-// package_cache
-//-------------------------------------------------------------------------
-
-type package_cache map[string]*package_file_cache
-
-func new_package_cache() package_cache {
- m := make(package_cache)
-
- // add built-in "unsafe" package
- m.add_builtin_unsafe_package()
-
- return m
-}
-
-// Function fills 'ps' set with packages from 'packages' import information.
-// In case if package is not in the cache, it creates one and adds one to the cache.
-func (c package_cache) append_packages(ps map[string]*package_file_cache, pkgs []package_import) {
- for _, m := range pkgs {
- if _, ok := ps[m.path]; ok {
- continue
- }
-
- if mod, ok := c[m.path]; ok {
- ps[m.path] = mod
- } else {
- mod = new_package_file_cache(m.path)
- ps[m.path] = mod
- c[m.path] = mod
- }
- }
-}
-
-var g_builtin_unsafe_package = []byte(`
-import
-$$
-package unsafe
- type @"".Pointer uintptr
- func @"".Offsetof (? any) uintptr
- func @"".Sizeof (? any) uintptr
- func @"".Alignof (? any) uintptr
- func @"".Typeof (i interface { }) interface { }
- func @"".Reflect (i interface { }) (typ interface { }, addr @"".Pointer)
- func @"".Unreflect (typ interface { }, addr @"".Pointer) interface { }
- func @"".New (typ interface { }) @"".Pointer
- func @"".NewArray (typ interface { }, n int) @"".Pointer
-
-$$
-`)
-
-func (c package_cache) add_builtin_unsafe_package() {
- pkg := new_package_file_cache_forever("unsafe", "unsafe")
- pkg.process_package_data(g_builtin_unsafe_package)
- c["unsafe"] = pkg
-}
diff --git a/vendor/github.com/nsf/gocode/package_bin.go b/vendor/github.com/nsf/gocode/package_bin.go
deleted file mode 100644
index e93d5d2..0000000
--- a/vendor/github.com/nsf/gocode/package_bin.go
+++ /dev/null
@@ -1,762 +0,0 @@
-package main
-
-import (
- "encoding/binary"
- "fmt"
- "go/ast"
- "go/token"
- "strconv"
- "strings"
- "unicode"
- "unicode/utf8"
-)
-
-//-------------------------------------------------------------------------
-// gc_bin_parser
-//
-// The following part of the code may contain portions of the code from the Go
-// standard library, which tells me to retain their copyright notice:
-//
-// Copyright (c) 2012 The Go Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//-------------------------------------------------------------------------
-
-type gc_bin_parser struct {
- data []byte
- buf []byte // for reading strings
- version int
-
- // object lists
- strList []string // in order of appearance
- pkgList []string // in order of appearance
- typList []ast.Expr // in order of appearance
- callback func(pkg string, decl ast.Decl)
- pfc *package_file_cache
- trackAllTypes bool
-
- // position encoding
- posInfoFormat bool
- prevFile string
- prevLine int
-
- // debugging support
- debugFormat bool
- read int // bytes read
-
-}
-
-func (p *gc_bin_parser) init(data []byte, pfc *package_file_cache) {
- p.data = data
- p.version = -1 // unknown version
- p.strList = []string{""} // empty string is mapped to 0
- p.pfc = pfc
-}
-
-func (p *gc_bin_parser) parse_export(callback func(string, ast.Decl)) {
- p.callback = callback
-
- // read version info
- var versionstr string
- if b := p.rawByte(); b == 'c' || b == 'd' {
- // Go1.7 encoding; first byte encodes low-level
- // encoding format (compact vs debug).
- // For backward-compatibility only (avoid problems with
- // old installed packages). Newly compiled packages use
- // the extensible format string.
- // TODO(gri) Remove this support eventually; after Go1.8.
- if b == 'd' {
- p.debugFormat = true
- }
- p.trackAllTypes = p.rawByte() == 'a'
- p.posInfoFormat = p.int() != 0
- versionstr = p.string()
- if versionstr == "v1" {
- p.version = 0
- }
- } else {
- // Go1.8 extensible encoding
- // read version string and extract version number (ignore anything after the version number)
- versionstr = p.rawStringln(b)
- if s := strings.SplitN(versionstr, " ", 3); len(s) >= 2 && s[0] == "version" {
- if v, err := strconv.Atoi(s[1]); err == nil && v > 0 {
- p.version = v
- }
- }
- }
-
- // read version specific flags - extend as necessary
- switch p.version {
- // case 4:
- // ...
- // fallthrough
- case 3, 2, 1:
- // Support for Go 1.8 type aliases will be added very
- // soon (Oct 2016). In the meantime, we make a
- // best-effort attempt to read v3 export data, failing
- // if we encounter a type alias. This allows the
- // automated builders to make progress since
- // type aliases are not yet used in practice.
- // TODO(gri): add support for type aliases.
- p.debugFormat = p.rawStringln(p.rawByte()) == "debug"
- p.trackAllTypes = p.int() != 0
- p.posInfoFormat = p.int() != 0
- case 0:
- // Go1.7 encoding format - nothing to do here
- default:
- panic(fmt.Errorf("unknown export format version %d (%q)", p.version, versionstr))
- }
-
- // --- generic export data ---
-
- // populate typList with predeclared "known" types
- p.typList = append(p.typList, predeclared...)
-
- // read package data
- p.pfc.defalias = p.pkg()[1:]
-
- // read objects of phase 1 only (see cmd/compiler/internal/gc/bexport.go)
- objcount := 0
- for {
- tag := p.tagOrIndex()
- if tag == endTag {
- break
- }
- p.obj(tag)
- objcount++
- }
-
- // self-verification
- if count := p.int(); count != objcount {
- panic(fmt.Sprintf("got %d objects; want %d", objcount, count))
- }
-}
-
-func (p *gc_bin_parser) pkg() string {
- // if the package was seen before, i is its index (>= 0)
- i := p.tagOrIndex()
- if i >= 0 {
- return p.pkgList[i]
- }
-
- // otherwise, i is the package tag (< 0)
- if i != packageTag {
- panic(fmt.Sprintf("unexpected package tag %d", i))
- }
-
- // read package data
- name := p.string()
- path := p.string()
-
- // we should never see an empty package name
- if name == "" {
- panic("empty package name in import")
- }
-
- // an empty path denotes the package we are currently importing;
- // it must be the first package we see
- if (path == "") != (len(p.pkgList) == 0) {
- panic(fmt.Sprintf("package path %q for pkg index %d", path, len(p.pkgList)))
- }
-
- var fullName string
- if path != "" {
- fullName = "!" + path + "!" + name
- p.pfc.add_package_to_scope(fullName, path)
- } else {
- fullName = "#" + name
- }
-
- // if the package was imported before, use that one; otherwise create a new one
- p.pkgList = append(p.pkgList, fullName)
- return p.pkgList[len(p.pkgList)-1]
-}
-
-func (p *gc_bin_parser) obj(tag int) {
- switch tag {
- case constTag:
- p.pos()
- pkg, name := p.qualifiedName()
- typ := p.typ("")
- p.skipValue() // ignore const value, gocode's not interested
- p.callback(pkg, &ast.GenDecl{
- Tok: token.CONST,
- Specs: []ast.Spec{
- &ast.ValueSpec{
- Names: []*ast.Ident{ast.NewIdent(name)},
- Type: typ,
- Values: []ast.Expr{&ast.BasicLit{Kind: token.INT, Value: "0"}},
- },
- },
- })
- case typeTag:
- _ = p.typ("")
-
- case varTag:
- p.pos()
- pkg, name := p.qualifiedName()
- typ := p.typ("")
- p.callback(pkg, &ast.GenDecl{
- Tok: token.VAR,
- Specs: []ast.Spec{
- &ast.ValueSpec{
- Names: []*ast.Ident{ast.NewIdent(name)},
- Type: typ,
- },
- },
- })
- case funcTag:
- p.pos()
- pkg, name := p.qualifiedName()
- params := p.paramList()
- results := p.paramList()
- p.callback(pkg, &ast.FuncDecl{
- Name: ast.NewIdent(name),
- Type: &ast.FuncType{Params: params, Results: results},
- })
-
- default:
- panic(fmt.Sprintf("unexpected object tag %d", tag))
- }
-}
-
-func (p *gc_bin_parser) pos() {
- if !p.posInfoFormat {
- return
- }
-
- file := p.prevFile
- line := p.prevLine
- if delta := p.int(); delta != 0 {
- // line changed
- line += delta
- } else if n := p.int(); n >= 0 {
- // file changed
- file = p.prevFile[:n] + p.string()
- p.prevFile = file
- line = p.int()
- }
- p.prevLine = line
-
- // TODO(gri) register new position
-}
-
-func (p *gc_bin_parser) qualifiedName() (pkg string, name string) {
- name = p.string()
- pkg = p.pkg()
- return pkg, name
-}
-
-func (p *gc_bin_parser) reserveMaybe() int {
- if p.trackAllTypes {
- p.typList = append(p.typList, nil)
- return len(p.typList) - 1
- } else {
- return -1
- }
-}
-
-func (p *gc_bin_parser) recordMaybe(idx int, t ast.Expr) ast.Expr {
- if idx == -1 {
- return t
- }
- p.typList[idx] = t
- return t
-}
-
-func (p *gc_bin_parser) record(t ast.Expr) {
- p.typList = append(p.typList, t)
-}
-
-// parent is the package which declared the type; parent == nil means
-// the package currently imported. The parent package is needed for
-// exported struct fields and interface methods which don't contain
-// explicit package information in the export data.
-func (p *gc_bin_parser) typ(parent string) ast.Expr {
- // if the type was seen before, i is its index (>= 0)
- i := p.tagOrIndex()
- if i >= 0 {
- return p.typList[i]
- }
-
- // otherwise, i is the type tag (< 0)
- switch i {
- case namedTag:
- // read type object
- p.pos()
- parent, name := p.qualifiedName()
- tdecl := &ast.GenDecl{
- Tok: token.TYPE,
- Specs: []ast.Spec{
- &ast.TypeSpec{
- Name: ast.NewIdent(name),
- },
- },
- }
-
- // record it right away (underlying type can contain refs to t)
- t := &ast.SelectorExpr{X: ast.NewIdent(parent), Sel: ast.NewIdent(name)}
- p.record(t)
-
- // parse underlying type
- t0 := p.typ(parent)
- tdecl.Specs[0].(*ast.TypeSpec).Type = t0
-
- p.callback(parent, tdecl)
-
- // interfaces have no methods
- if _, ok := t0.(*ast.InterfaceType); ok {
- return t
- }
-
- // read associated methods
- for i := p.int(); i > 0; i-- {
- // TODO(gri) replace this with something closer to fieldName
- p.pos()
- name := p.string()
- if !exported(name) {
- p.pkg()
- }
-
- recv := p.paramList()
- params := p.paramList()
- results := p.paramList()
- p.int() // go:nointerface pragma - discarded
-
- strip_method_receiver(recv)
- p.callback(parent, &ast.FuncDecl{
- Recv: recv,
- Name: ast.NewIdent(name),
- Type: &ast.FuncType{Params: params, Results: results},
- })
- }
- return t
- case arrayTag:
- i := p.reserveMaybe()
- n := p.int64()
- elt := p.typ(parent)
- return p.recordMaybe(i, &ast.ArrayType{
- Len: &ast.BasicLit{Kind: token.INT, Value: fmt.Sprint(n)},
- Elt: elt,
- })
-
- case sliceTag:
- i := p.reserveMaybe()
- elt := p.typ(parent)
- return p.recordMaybe(i, &ast.ArrayType{Len: nil, Elt: elt})
-
- case dddTag:
- i := p.reserveMaybe()
- elt := p.typ(parent)
- return p.recordMaybe(i, &ast.Ellipsis{Elt: elt})
-
- case structTag:
- i := p.reserveMaybe()
- return p.recordMaybe(i, p.structType(parent))
-
- case pointerTag:
- i := p.reserveMaybe()
- elt := p.typ(parent)
- return p.recordMaybe(i, &ast.StarExpr{X: elt})
-
- case signatureTag:
- i := p.reserveMaybe()
- params := p.paramList()
- results := p.paramList()
- return p.recordMaybe(i, &ast.FuncType{Params: params, Results: results})
-
- case interfaceTag:
- i := p.reserveMaybe()
- if p.int() != 0 {
- panic("unexpected embedded interface")
- }
- methods := p.methodList(parent)
- return p.recordMaybe(i, &ast.InterfaceType{Methods: &ast.FieldList{List: methods}})
-
- case mapTag:
- i := p.reserveMaybe()
- key := p.typ(parent)
- val := p.typ(parent)
- return p.recordMaybe(i, &ast.MapType{Key: key, Value: val})
-
- case chanTag:
- i := p.reserveMaybe()
- dir := ast.SEND | ast.RECV
- switch d := p.int(); d {
- case 1:
- dir = ast.RECV
- case 2:
- dir = ast.SEND
- case 3:
- // already set
- default:
- panic(fmt.Sprintf("unexpected channel dir %d", d))
- }
- elt := p.typ(parent)
- return p.recordMaybe(i, &ast.ChanType{Dir: dir, Value: elt})
-
- default:
- panic(fmt.Sprintf("unexpected type tag %d", i))
- }
-}
-
-func (p *gc_bin_parser) structType(parent string) *ast.StructType {
- var fields []*ast.Field
- if n := p.int(); n > 0 {
- fields = make([]*ast.Field, n)
- for i := range fields {
- fields[i] = p.field(parent)
- p.string() // tag, not interested in tags
- }
- }
- return &ast.StructType{Fields: &ast.FieldList{List: fields}}
-}
-
-func (p *gc_bin_parser) field(parent string) *ast.Field {
- p.pos()
- _, name := p.fieldName(parent)
- typ := p.typ(parent)
-
- var names []*ast.Ident
- if name != "" {
- names = []*ast.Ident{ast.NewIdent(name)}
- }
- return &ast.Field{
- Names: names,
- Type: typ,
- }
-}
-
-func (p *gc_bin_parser) methodList(parent string) (methods []*ast.Field) {
- if n := p.int(); n > 0 {
- methods = make([]*ast.Field, n)
- for i := range methods {
- methods[i] = p.method(parent)
- }
- }
- return
-}
-
-func (p *gc_bin_parser) method(parent string) *ast.Field {
- p.pos()
- _, name := p.fieldName(parent)
- params := p.paramList()
- results := p.paramList()
- return &ast.Field{
- Names: []*ast.Ident{ast.NewIdent(name)},
- Type: &ast.FuncType{Params: params, Results: results},
- }
-}
-
-func (p *gc_bin_parser) fieldName(parent string) (string, string) {
- name := p.string()
- pkg := parent
- if p.version == 0 && name == "_" {
- // versions < 1 don't export a package for _ fields
- // TODO: remove once versions are not supported anymore
- return pkg, name
- }
- if name != "" && !exported(name) {
- // explicitly qualified field
- if name == "?" {
- name = ""
- }
- pkg = p.pkg()
- }
- return pkg, name
-}
-
-func (p *gc_bin_parser) paramList() *ast.FieldList {
- n := p.int()
- if n == 0 {
- return nil
- }
- // negative length indicates unnamed parameters
- named := true
- if n < 0 {
- n = -n
- named = false
- }
- // n > 0
- flds := make([]*ast.Field, n)
- for i := range flds {
- flds[i] = p.param(named)
- }
- return &ast.FieldList{List: flds}
-}
-
-func (p *gc_bin_parser) param(named bool) *ast.Field {
- t := p.typ("")
-
- name := "?"
- if named {
- name = p.string()
- if name == "" {
- panic("expected named parameter")
- }
- if name != "_" {
- p.pkg()
- }
- if i := strings.Index(name, "·"); i > 0 {
- name = name[:i] // cut off gc-specific parameter numbering
- }
- }
-
- // read and discard compiler-specific info
- p.string()
-
- return &ast.Field{
- Names: []*ast.Ident{ast.NewIdent(name)},
- Type: t,
- }
-}
-
-func exported(name string) bool {
- ch, _ := utf8.DecodeRuneInString(name)
- return unicode.IsUpper(ch)
-}
-
-func (p *gc_bin_parser) skipValue() {
- switch tag := p.tagOrIndex(); tag {
- case falseTag, trueTag:
- case int64Tag:
- p.int64()
- case floatTag:
- p.float()
- case complexTag:
- p.float()
- p.float()
- case stringTag:
- p.string()
- default:
- panic(fmt.Sprintf("unexpected value tag %d", tag))
- }
-}
-
-func (p *gc_bin_parser) float() {
- sign := p.int()
- if sign == 0 {
- return
- }
-
- p.int() // exp
- p.string() // mant
-}
-
-// ----------------------------------------------------------------------------
-// Low-level decoders
-
-func (p *gc_bin_parser) tagOrIndex() int {
- if p.debugFormat {
- p.marker('t')
- }
-
- return int(p.rawInt64())
-}
-
-func (p *gc_bin_parser) int() int {
- x := p.int64()
- if int64(int(x)) != x {
- panic("exported integer too large")
- }
- return int(x)
-}
-
-func (p *gc_bin_parser) int64() int64 {
- if p.debugFormat {
- p.marker('i')
- }
-
- return p.rawInt64()
-}
-
-func (p *gc_bin_parser) string() string {
- if p.debugFormat {
- p.marker('s')
- }
- // if the string was seen before, i is its index (>= 0)
- // (the empty string is at index 0)
- i := p.rawInt64()
- if i >= 0 {
- return p.strList[i]
- }
- // otherwise, i is the negative string length (< 0)
- if n := int(-i); n <= cap(p.buf) {
- p.buf = p.buf[:n]
- } else {
- p.buf = make([]byte, n)
- }
- for i := range p.buf {
- p.buf[i] = p.rawByte()
- }
- s := string(p.buf)
- p.strList = append(p.strList, s)
- return s
-}
-
-func (p *gc_bin_parser) marker(want byte) {
- if got := p.rawByte(); got != want {
- panic(fmt.Sprintf("incorrect marker: got %c; want %c (pos = %d)", got, want, p.read))
- }
-
- pos := p.read
- if n := int(p.rawInt64()); n != pos {
- panic(fmt.Sprintf("incorrect position: got %d; want %d", n, pos))
- }
-}
-
-// rawInt64 should only be used by low-level decoders.
-func (p *gc_bin_parser) rawInt64() int64 {
- i, err := binary.ReadVarint(p)
- if err != nil {
- panic(fmt.Sprintf("read error: %v", err))
- }
- return i
-}
-
-// rawStringln should only be used to read the initial version string.
-func (p *gc_bin_parser) rawStringln(b byte) string {
- p.buf = p.buf[:0]
- for b != '\n' {
- p.buf = append(p.buf, b)
- b = p.rawByte()
- }
- return string(p.buf)
-}
-
-// needed for binary.ReadVarint in rawInt64
-func (p *gc_bin_parser) ReadByte() (byte, error) {
- return p.rawByte(), nil
-}
-
-// byte is the bottleneck interface for reading p.data.
-// It unescapes '|' 'S' to '$' and '|' '|' to '|'.
-// rawByte should only be used by low-level decoders.
-func (p *gc_bin_parser) rawByte() byte {
- b := p.data[0]
- r := 1
- if b == '|' {
- b = p.data[1]
- r = 2
- switch b {
- case 'S':
- b = '$'
- case '|':
- // nothing to do
- default:
- panic("unexpected escape sequence in export data")
- }
- }
- p.data = p.data[r:]
- p.read += r
- return b
-
-}
-
-// ----------------------------------------------------------------------------
-// Export format
-
-// Tags. Must be < 0.
-const (
- // Objects
- packageTag = -(iota + 1)
- constTag
- typeTag
- varTag
- funcTag
- endTag
-
- // Types
- namedTag
- arrayTag
- sliceTag
- dddTag
- structTag
- pointerTag
- signatureTag
- interfaceTag
- mapTag
- chanTag
-
- // Values
- falseTag
- trueTag
- int64Tag
- floatTag
- fractionTag // not used by gc
- complexTag
- stringTag
- unknownTag // not used by gc (only appears in packages with errors)
-)
-
-var predeclared = []ast.Expr{
- // basic types
- ast.NewIdent("bool"),
- ast.NewIdent("int"),
- ast.NewIdent("int8"),
- ast.NewIdent("int16"),
- ast.NewIdent("int32"),
- ast.NewIdent("int64"),
- ast.NewIdent("uint"),
- ast.NewIdent("uint8"),
- ast.NewIdent("uint16"),
- ast.NewIdent("uint32"),
- ast.NewIdent("uint64"),
- ast.NewIdent("uintptr"),
- ast.NewIdent("float32"),
- ast.NewIdent("float64"),
- ast.NewIdent("complex64"),
- ast.NewIdent("complex128"),
- ast.NewIdent("string"),
-
- // aliases
- ast.NewIdent("byte"),
- ast.NewIdent("rune"),
-
- // error
- ast.NewIdent("error"),
-
- // TODO(nsf): don't think those are used in just package type info,
- // maybe for consts, but we are not interested in that
- // untyped types
- ast.NewIdent(">_<"), // TODO: types.Typ[types.UntypedBool],
- ast.NewIdent(">_<"), // TODO: types.Typ[types.UntypedInt],
- ast.NewIdent(">_<"), // TODO: types.Typ[types.UntypedRune],
- ast.NewIdent(">_<"), // TODO: types.Typ[types.UntypedFloat],
- ast.NewIdent(">_<"), // TODO: types.Typ[types.UntypedComplex],
- ast.NewIdent(">_<"), // TODO: types.Typ[types.UntypedString],
- ast.NewIdent(">_<"), // TODO: types.Typ[types.UntypedNil],
-
- // package unsafe
- &ast.SelectorExpr{X: ast.NewIdent("unsafe"), Sel: ast.NewIdent("Pointer")},
-
- // invalid type
- ast.NewIdent(">_<"), // TODO: types.Typ[types.Invalid], // only appears in packages with errors
-
- // used internally by gc; never used by this package or in .a files
- ast.NewIdent("any"),
-}
diff --git a/vendor/github.com/nsf/gocode/package_text.go b/vendor/github.com/nsf/gocode/package_text.go
deleted file mode 100644
index 9ed7451..0000000
--- a/vendor/github.com/nsf/gocode/package_text.go
+++ /dev/null
@@ -1,678 +0,0 @@
-package main
-
-import (
- "bytes"
- "errors"
- "fmt"
- "go/ast"
- "go/token"
- "strconv"
- "text/scanner"
-)
-
-//-------------------------------------------------------------------------
-// gc_parser
-//
-// The following part of the code may contain portions of the code from the Go
-// standard library, which tells me to retain their copyright notice:
-//
-// Copyright (c) 2009 The Go Authors. All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are
-// met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//-------------------------------------------------------------------------
-
-type gc_parser struct {
- scanner scanner.Scanner
- tok rune
- lit string
- path_to_name map[string]string
- beautify bool
- pfc *package_file_cache
-}
-
-func (p *gc_parser) init(data []byte, pfc *package_file_cache) {
- p.scanner.Init(bytes.NewReader(data))
- p.scanner.Error = func(_ *scanner.Scanner, msg string) { p.error(msg) }
- p.scanner.Mode = scanner.ScanIdents | scanner.ScanInts | scanner.ScanStrings |
- scanner.ScanComments | scanner.ScanChars | scanner.SkipComments
- p.scanner.Whitespace = 1<<'\t' | 1<<' ' | 1<<'\r' | 1<<'\v' | 1<<'\f'
- p.scanner.Filename = "package.go"
- p.next()
- // and the built-in "unsafe" package to the path_to_name map
- p.path_to_name = map[string]string{"unsafe": "unsafe"}
- p.pfc = pfc
-}
-
-func (p *gc_parser) next() {
- p.tok = p.scanner.Scan()
- switch p.tok {
- case scanner.Ident, scanner.Int, scanner.String:
- p.lit = p.scanner.TokenText()
- default:
- p.lit = ""
- }
-}
-
-func (p *gc_parser) error(msg string) {
- panic(errors.New(msg))
-}
-
-func (p *gc_parser) errorf(format string, args ...interface{}) {
- p.error(fmt.Sprintf(format, args...))
-}
-
-func (p *gc_parser) expect(tok rune) string {
- lit := p.lit
- if p.tok != tok {
- p.errorf("expected %s, got %s (%q)", scanner.TokenString(tok),
- scanner.TokenString(p.tok), lit)
- }
- p.next()
- return lit
-}
-
-func (p *gc_parser) expect_keyword(keyword string) {
- lit := p.expect(scanner.Ident)
- if lit != keyword {
- p.errorf("expected keyword: %s, got: %q", keyword, lit)
- }
-}
-
-func (p *gc_parser) expect_special(what string) {
- i := 0
- for i < len(what) {
- if p.tok != rune(what[i]) {
- break
- }
-
- nc := p.scanner.Peek()
- if i != len(what)-1 && nc <= ' ' {
- break
- }
-
- p.next()
- i++
- }
-
- if i < len(what) {
- p.errorf("expected: %q, got: %q", what, what[0:i])
- }
-}
-
-// dotIdentifier = "?" | ( ident | '·' ) { ident | int | '·' } .
-// we're doing lexer job here, kind of
-func (p *gc_parser) parse_dot_ident() string {
- if p.tok == '?' {
- p.next()
- return "?"
- }
-
- ident := ""
- sep := 'x'
- i, j := 0, -1
- for (p.tok == scanner.Ident || p.tok == scanner.Int || p.tok == '·') && sep > ' ' {
- ident += p.lit
- if p.tok == '·' {
- ident += "·"
- j = i
- i++
- }
- i += len(p.lit)
- sep = p.scanner.Peek()
- p.next()
- }
- // middot = \xc2\xb7
- if j != -1 && i > j+1 {
- c := ident[j+2]
- if c >= '0' && c <= '9' {
- ident = ident[0:j]
- }
- }
- return ident
-}
-
-// ImportPath = string_lit .
-// quoted name of the path, but we return it as an identifier, taking an alias
-// from 'pathToAlias' map, it is filled by import statements
-func (p *gc_parser) parse_package() *ast.Ident {
- path, err := strconv.Unquote(p.expect(scanner.String))
- if err != nil {
- panic(err)
- }
-
- return ast.NewIdent(path)
-}
-
-// ExportedName = "@" ImportPath "." dotIdentifier .
-func (p *gc_parser) parse_exported_name() *ast.SelectorExpr {
- p.expect('@')
- pkg := p.parse_package()
- if pkg.Name == "" {
- pkg.Name = "#" + p.pfc.defalias
- } else {
- pkg.Name = p.path_to_name[pkg.Name]
- }
- p.expect('.')
- name := ast.NewIdent(p.parse_dot_ident())
- return &ast.SelectorExpr{X: pkg, Sel: name}
-}
-
-// Name = identifier | "?" | ExportedName .
-func (p *gc_parser) parse_name() (string, ast.Expr) {
- switch p.tok {
- case scanner.Ident:
- name := p.lit
- p.next()
- return name, ast.NewIdent(name)
- case '?':
- p.next()
- return "?", ast.NewIdent("?")
- case '@':
- en := p.parse_exported_name()
- return en.Sel.Name, en
- }
- p.error("name expected")
- return "", nil
-}
-
-// Field = Name Type [ string_lit ] .
-func (p *gc_parser) parse_field() *ast.Field {
- var tag string
- name, _ := p.parse_name()
- typ := p.parse_type()
- if p.tok == scanner.String {
- tag = p.expect(scanner.String)
- }
-
- var names []*ast.Ident
- if name != "?" {
- names = []*ast.Ident{ast.NewIdent(name)}
- }
-
- return &ast.Field{
- Names: names,
- Type: typ,
- Tag: &ast.BasicLit{Kind: token.STRING, Value: tag},
- }
-}
-
-// Parameter = ( identifier | "?" ) [ "..." ] Type [ string_lit ] .
-func (p *gc_parser) parse_parameter() *ast.Field {
- // name
- name, _ := p.parse_name()
-
- // type
- var typ ast.Expr
- if p.tok == '.' {
- p.expect_special("...")
- typ = &ast.Ellipsis{Elt: p.parse_type()}
- } else {
- typ = p.parse_type()
- }
-
- var tag string
- if p.tok == scanner.String {
- tag = p.expect(scanner.String)
- }
-
- return &ast.Field{
- Names: []*ast.Ident{ast.NewIdent(name)},
- Type: typ,
- Tag: &ast.BasicLit{Kind: token.STRING, Value: tag},
- }
-}
-
-// Parameters = "(" [ ParameterList ] ")" .
-// ParameterList = { Parameter "," } Parameter .
-func (p *gc_parser) parse_parameters() *ast.FieldList {
- flds := []*ast.Field{}
- parse_parameter := func() {
- par := p.parse_parameter()
- flds = append(flds, par)
- }
-
- p.expect('(')
- if p.tok != ')' {
- parse_parameter()
- for p.tok == ',' {
- p.next()
- parse_parameter()
- }
- }
- p.expect(')')
- return &ast.FieldList{List: flds}
-}
-
-// Signature = Parameters [ Result ] .
-// Result = Type | Parameters .
-func (p *gc_parser) parse_signature() *ast.FuncType {
- var params *ast.FieldList
- var results *ast.FieldList
-
- params = p.parse_parameters()
- switch p.tok {
- case scanner.Ident, '[', '*', '<', '@':
- fld := &ast.Field{Type: p.parse_type()}
- results = &ast.FieldList{List: []*ast.Field{fld}}
- case '(':
- results = p.parse_parameters()
- }
- return &ast.FuncType{Params: params, Results: results}
-}
-
-// MethodOrEmbedSpec = Name [ Signature ] .
-func (p *gc_parser) parse_method_or_embed_spec() *ast.Field {
- name, nameexpr := p.parse_name()
- if p.tok == '(' {
- typ := p.parse_signature()
- return &ast.Field{
- Names: []*ast.Ident{ast.NewIdent(name)},
- Type: typ,
- }
- }
-
- return &ast.Field{
- Type: nameexpr,
- }
-}
-
-// int_lit = [ "-" | "+" ] { "0" ... "9" } .
-func (p *gc_parser) parse_int() {
- switch p.tok {
- case '-', '+':
- p.next()
- }
- p.expect(scanner.Int)
-}
-
-// number = int_lit [ "p" int_lit ] .
-func (p *gc_parser) parse_number() {
- p.parse_int()
- if p.lit == "p" {
- p.next()
- p.parse_int()
- }
-}
-
-//-------------------------------------------------------------------------------
-// gc_parser.types
-//-------------------------------------------------------------------------------
-
-// InterfaceType = "interface" "{" [ MethodOrEmbedList ] "}" .
-// MethodOrEmbedList = MethodOrEmbedSpec { ";" MethodOrEmbedSpec } .
-func (p *gc_parser) parse_interface_type() ast.Expr {
- var methods []*ast.Field
- parse_method := func() {
- meth := p.parse_method_or_embed_spec()
- methods = append(methods, meth)
- }
-
- p.expect_keyword("interface")
- p.expect('{')
- if p.tok != '}' {
- parse_method()
- for p.tok == ';' {
- p.next()
- parse_method()
- }
- }
- p.expect('}')
- return &ast.InterfaceType{Methods: &ast.FieldList{List: methods}}
-}
-
-// StructType = "struct" "{" [ FieldList ] "}" .
-// FieldList = Field { ";" Field } .
-func (p *gc_parser) parse_struct_type() ast.Expr {
- var fields []*ast.Field
- parse_field := func() {
- fld := p.parse_field()
- fields = append(fields, fld)
- }
-
- p.expect_keyword("struct")
- p.expect('{')
- if p.tok != '}' {
- parse_field()
- for p.tok == ';' {
- p.next()
- parse_field()
- }
- }
- p.expect('}')
- return &ast.StructType{Fields: &ast.FieldList{List: fields}}
-}
-
-// MapType = "map" "[" Type "]" Type .
-func (p *gc_parser) parse_map_type() ast.Expr {
- p.expect_keyword("map")
- p.expect('[')
- key := p.parse_type()
- p.expect(']')
- elt := p.parse_type()
- return &ast.MapType{Key: key, Value: elt}
-}
-
-// ChanType = ( "chan" [ "<-" ] | "<-" "chan" ) Type .
-func (p *gc_parser) parse_chan_type() ast.Expr {
- dir := ast.SEND | ast.RECV
- if p.tok == scanner.Ident {
- p.expect_keyword("chan")
- if p.tok == '<' {
- p.expect_special("<-")
- dir = ast.SEND
- }
- } else {
- p.expect_special("<-")
- p.expect_keyword("chan")
- dir = ast.RECV
- }
-
- elt := p.parse_type()
- return &ast.ChanType{Dir: dir, Value: elt}
-}
-
-// ArrayOrSliceType = ArrayType | SliceType .
-// ArrayType = "[" int_lit "]" Type .
-// SliceType = "[" "]" Type .
-func (p *gc_parser) parse_array_or_slice_type() ast.Expr {
- p.expect('[')
- if p.tok == ']' {
- // SliceType
- p.next() // skip ']'
- return &ast.ArrayType{Len: nil, Elt: p.parse_type()}
- }
-
- // ArrayType
- lit := p.expect(scanner.Int)
- p.expect(']')
- return &ast.ArrayType{
- Len: &ast.BasicLit{Kind: token.INT, Value: lit},
- Elt: p.parse_type(),
- }
-}
-
-// Type =
-// BasicType | TypeName | ArrayType | SliceType | StructType |
-// PointerType | FuncType | InterfaceType | MapType | ChanType |
-// "(" Type ")" .
-// BasicType = ident .
-// TypeName = ExportedName .
-// SliceType = "[" "]" Type .
-// PointerType = "*" Type .
-// FuncType = "func" Signature .
-func (p *gc_parser) parse_type() ast.Expr {
- switch p.tok {
- case scanner.Ident:
- switch p.lit {
- case "struct":
- return p.parse_struct_type()
- case "func":
- p.next()
- return p.parse_signature()
- case "interface":
- return p.parse_interface_type()
- case "map":
- return p.parse_map_type()
- case "chan":
- return p.parse_chan_type()
- default:
- lit := p.lit
- p.next()
- return ast.NewIdent(lit)
- }
- case '@':
- return p.parse_exported_name()
- case '[':
- return p.parse_array_or_slice_type()
- case '*':
- p.next()
- return &ast.StarExpr{X: p.parse_type()}
- case '<':
- return p.parse_chan_type()
- case '(':
- p.next()
- typ := p.parse_type()
- p.expect(')')
- return typ
- }
- p.errorf("unexpected token: %s", scanner.TokenString(p.tok))
- return nil
-}
-
-//-------------------------------------------------------------------------------
-// gc_parser.declarations
-//-------------------------------------------------------------------------------
-
-// ImportDecl = "import" identifier string_lit .
-func (p *gc_parser) parse_import_decl() {
- p.expect_keyword("import")
- alias := p.expect(scanner.Ident)
- path := p.parse_package()
- fullName := "!" + path.Name + "!" + alias
- p.path_to_name[path.Name] = fullName
- p.pfc.add_package_to_scope(fullName, path.Name)
-}
-
-// ConstDecl = "const" ExportedName [ Type ] "=" Literal .
-// Literal = bool_lit | int_lit | float_lit | complex_lit | string_lit .
-// bool_lit = "true" | "false" .
-// complex_lit = "(" float_lit "+" float_lit ")" .
-// rune_lit = "(" int_lit "+" int_lit ")" .
-// string_lit = `"` { unicode_char } `"` .
-func (p *gc_parser) parse_const_decl() (string, *ast.GenDecl) {
- // TODO: do we really need actual const value? gocode doesn't use this
- p.expect_keyword("const")
- name := p.parse_exported_name()
-
- var typ ast.Expr
- if p.tok != '=' {
- typ = p.parse_type()
- }
-
- p.expect('=')
-
- // skip the value
- switch p.tok {
- case scanner.Ident:
- // must be bool, true or false
- p.next()
- case '-', '+', scanner.Int:
- // number
- p.parse_number()
- case '(':
- // complex_lit or rune_lit
- p.next() // skip '('
- if p.tok == scanner.Char {
- p.next()
- } else {
- p.parse_number()
- }
- p.expect('+')
- p.parse_number()
- p.expect(')')
- case scanner.Char:
- p.next()
- case scanner.String:
- p.next()
- default:
- p.error("expected literal")
- }
-
- return name.X.(*ast.Ident).Name, &ast.GenDecl{
- Tok: token.CONST,
- Specs: []ast.Spec{
- &ast.ValueSpec{
- Names: []*ast.Ident{name.Sel},
- Type: typ,
- Values: []ast.Expr{&ast.BasicLit{Kind: token.INT, Value: "0"}},
- },
- },
- }
-}
-
-// TypeDecl = "type" ExportedName Type .
-func (p *gc_parser) parse_type_decl() (string, *ast.GenDecl) {
- p.expect_keyword("type")
- name := p.parse_exported_name()
- typ := p.parse_type()
- return name.X.(*ast.Ident).Name, &ast.GenDecl{
- Tok: token.TYPE,
- Specs: []ast.Spec{
- &ast.TypeSpec{
- Name: name.Sel,
- Type: typ,
- },
- },
- }
-}
-
-// VarDecl = "var" ExportedName Type .
-func (p *gc_parser) parse_var_decl() (string, *ast.GenDecl) {
- p.expect_keyword("var")
- name := p.parse_exported_name()
- typ := p.parse_type()
- return name.X.(*ast.Ident).Name, &ast.GenDecl{
- Tok: token.VAR,
- Specs: []ast.Spec{
- &ast.ValueSpec{
- Names: []*ast.Ident{name.Sel},
- Type: typ,
- },
- },
- }
-}
-
-// FuncBody = "{" ... "}" .
-func (p *gc_parser) parse_func_body() {
- p.expect('{')
- for i := 1; i > 0; p.next() {
- switch p.tok {
- case '{':
- i++
- case '}':
- i--
- }
- }
-}
-
-// FuncDecl = "func" ExportedName Signature [ FuncBody ] .
-func (p *gc_parser) parse_func_decl() (string, *ast.FuncDecl) {
- // "func" was already consumed by lookahead
- name := p.parse_exported_name()
- typ := p.parse_signature()
- if p.tok == '{' {
- p.parse_func_body()
- }
- return name.X.(*ast.Ident).Name, &ast.FuncDecl{
- Name: name.Sel,
- Type: typ,
- }
-}
-
-func strip_method_receiver(recv *ast.FieldList) string {
- var sel *ast.SelectorExpr
-
- // find selector expression
- typ := recv.List[0].Type
- switch t := typ.(type) {
- case *ast.StarExpr:
- sel = t.X.(*ast.SelectorExpr)
- case *ast.SelectorExpr:
- sel = t
- }
-
- // extract package path
- pkg := sel.X.(*ast.Ident).Name
-
- // write back stripped type
- switch t := typ.(type) {
- case *ast.StarExpr:
- t.X = sel.Sel
- case *ast.SelectorExpr:
- recv.List[0].Type = sel.Sel
- }
-
- return pkg
-}
-
-// MethodDecl = "func" Receiver Name Signature .
-// Receiver = "(" ( identifier | "?" ) [ "*" ] ExportedName ")" [ FuncBody ] .
-func (p *gc_parser) parse_method_decl() (string, *ast.FuncDecl) {
- recv := p.parse_parameters()
- pkg := strip_method_receiver(recv)
- name, _ := p.parse_name()
- typ := p.parse_signature()
- if p.tok == '{' {
- p.parse_func_body()
- }
- return pkg, &ast.FuncDecl{
- Recv: recv,
- Name: ast.NewIdent(name),
- Type: typ,
- }
-}
-
-// Decl = [ ImportDecl | ConstDecl | TypeDecl | VarDecl | FuncDecl | MethodDecl ] "\n" .
-func (p *gc_parser) parse_decl() (pkg string, decl ast.Decl) {
- switch p.lit {
- case "import":
- p.parse_import_decl()
- case "const":
- pkg, decl = p.parse_const_decl()
- case "type":
- pkg, decl = p.parse_type_decl()
- case "var":
- pkg, decl = p.parse_var_decl()
- case "func":
- p.next()
- if p.tok == '(' {
- pkg, decl = p.parse_method_decl()
- } else {
- pkg, decl = p.parse_func_decl()
- }
- }
- p.expect('\n')
- return
-}
-
-// Export = PackageClause { Decl } "$$" .
-// PackageClause = "package" identifier [ "safe" ] "\n" .
-func (p *gc_parser) parse_export(callback func(string, ast.Decl)) {
- p.expect_keyword("package")
- p.pfc.defalias = p.expect(scanner.Ident)
- if p.tok != '\n' {
- p.expect_keyword("safe")
- }
- p.expect('\n')
-
- for p.tok != '$' && p.tok != scanner.EOF {
- pkg, decl := p.parse_decl()
- if decl != nil {
- callback(pkg, decl)
- }
- }
-}
diff --git a/vendor/github.com/nsf/gocode/pre_go17.go b/vendor/github.com/nsf/gocode/pre_go17.go
deleted file mode 100644
index 202ef5a..0000000
--- a/vendor/github.com/nsf/gocode/pre_go17.go
+++ /dev/null
@@ -1,7 +0,0 @@
-// +build !go1.7
-
-package main
-
-func init() {
- knownPackageIdents["context"] = "golang.org/x/net/context"
-}
diff --git a/vendor/github.com/nsf/gocode/ripper.go b/vendor/github.com/nsf/gocode/ripper.go
deleted file mode 100644
index e1c2f75..0000000
--- a/vendor/github.com/nsf/gocode/ripper.go
+++ /dev/null
@@ -1,141 +0,0 @@
-package main
-
-import (
- "go/scanner"
- "go/token"
-)
-
-// All the code in this file serves single purpose:
-// It separates a function with the cursor inside and the rest of the code. I'm
-// doing that, because sometimes parser is not able to recover itself from an
-// error and the autocompletion results become less complete.
-
-type tok_pos_pair struct {
- tok token.Token
- pos token.Pos
-}
-
-type tok_collection struct {
- tokens []tok_pos_pair
- fset *token.FileSet
-}
-
-func (this *tok_collection) next(s *scanner.Scanner) bool {
- pos, tok, _ := s.Scan()
- if tok == token.EOF {
- return false
- }
-
- this.tokens = append(this.tokens, tok_pos_pair{tok, pos})
- return true
-}
-
-func (this *tok_collection) find_decl_beg(pos int) int {
- lowest := 0
- lowpos := -1
- lowi := -1
- cur := 0
- for i := pos; i >= 0; i-- {
- t := this.tokens[i]
- switch t.tok {
- case token.RBRACE:
- cur++
- case token.LBRACE:
- cur--
- }
-
- if cur < lowest {
- lowest = cur
- lowpos = this.fset.Position(t.pos).Offset
- lowi = i
- }
- }
-
- cur = lowest
- for i := lowi - 1; i >= 0; i-- {
- t := this.tokens[i]
- switch t.tok {
- case token.RBRACE:
- cur++
- case token.LBRACE:
- cur--
- }
- if t.tok == token.SEMICOLON && cur == lowest {
- lowpos = this.fset.Position(t.pos).Offset
- break
- }
- }
-
- return lowpos
-}
-
-func (this *tok_collection) find_decl_end(pos int) int {
- highest := 0
- highpos := -1
- cur := 0
-
- if this.tokens[pos].tok == token.LBRACE {
- pos++
- }
-
- for i := pos; i < len(this.tokens); i++ {
- t := this.tokens[i]
- switch t.tok {
- case token.RBRACE:
- cur++
- case token.LBRACE:
- cur--
- }
-
- if cur > highest {
- highest = cur
- highpos = this.fset.Position(t.pos).Offset
- }
- }
-
- return highpos
-}
-
-func (this *tok_collection) find_outermost_scope(cursor int) (int, int) {
- pos := 0
-
- for i, t := range this.tokens {
- if cursor <= this.fset.Position(t.pos).Offset {
- break
- }
- pos = i
- }
-
- return this.find_decl_beg(pos), this.find_decl_end(pos)
-}
-
-// return new cursor position, file without ripped part and the ripped part itself
-// variants:
-// new-cursor, file-without-ripped-part, ripped-part
-// old-cursor, file, nil
-func (this *tok_collection) rip_off_decl(file []byte, cursor int) (int, []byte, []byte) {
- this.fset = token.NewFileSet()
- var s scanner.Scanner
- s.Init(this.fset.AddFile("", this.fset.Base(), len(file)), file, nil, scanner.ScanComments)
- for this.next(&s) {
- }
-
- beg, end := this.find_outermost_scope(cursor)
- if beg == -1 || end == -1 {
- return cursor, file, nil
- }
-
- ripped := make([]byte, end+1-beg)
- copy(ripped, file[beg:end+1])
-
- newfile := make([]byte, len(file)-len(ripped))
- copy(newfile, file[:beg])
- copy(newfile[beg:], file[end+1:])
-
- return cursor - beg, newfile, ripped
-}
-
-func rip_off_decl(file []byte, cursor int) (int, []byte, []byte) {
- var tc tok_collection
- return tc.rip_off_decl(file, cursor)
-}
diff --git a/vendor/github.com/nsf/gocode/rpc.go b/vendor/github.com/nsf/gocode/rpc.go
deleted file mode 100644
index 9955f4d..0000000
--- a/vendor/github.com/nsf/gocode/rpc.go
+++ /dev/null
@@ -1,138 +0,0 @@
-// WARNING! Autogenerated by goremote, don't touch.
-
-package main
-
-import (
- "net/rpc"
-)
-
-type RPC struct {
-}
-
-// wrapper for: server_auto_complete
-
-type Args_auto_complete struct {
- Arg0 []byte
- Arg1 string
- Arg2 int
- Arg3 go_build_context
-}
-type Reply_auto_complete struct {
- Arg0 []candidate
- Arg1 int
-}
-
-func (r *RPC) RPC_auto_complete(args *Args_auto_complete, reply *Reply_auto_complete) error {
- reply.Arg0, reply.Arg1 = server_auto_complete(args.Arg0, args.Arg1, args.Arg2, args.Arg3)
- return nil
-}
-func client_auto_complete(cli *rpc.Client, Arg0 []byte, Arg1 string, Arg2 int, Arg3 go_build_context) (c []candidate, d int) {
- var args Args_auto_complete
- var reply Reply_auto_complete
- args.Arg0 = Arg0
- args.Arg1 = Arg1
- args.Arg2 = Arg2
- args.Arg3 = Arg3
- err := cli.Call("RPC.RPC_auto_complete", &args, &reply)
- if err != nil {
- panic(err)
- }
- return reply.Arg0, reply.Arg1
-}
-
-// wrapper for: server_close
-
-type Args_close struct {
- Arg0 int
-}
-type Reply_close struct {
- Arg0 int
-}
-
-func (r *RPC) RPC_close(args *Args_close, reply *Reply_close) error {
- reply.Arg0 = server_close(args.Arg0)
- return nil
-}
-func client_close(cli *rpc.Client, Arg0 int) int {
- var args Args_close
- var reply Reply_close
- args.Arg0 = Arg0
- err := cli.Call("RPC.RPC_close", &args, &reply)
- if err != nil {
- panic(err)
- }
- return reply.Arg0
-}
-
-// wrapper for: server_status
-
-type Args_status struct {
- Arg0 int
-}
-type Reply_status struct {
- Arg0 string
-}
-
-func (r *RPC) RPC_status(args *Args_status, reply *Reply_status) error {
- reply.Arg0 = server_status(args.Arg0)
- return nil
-}
-func client_status(cli *rpc.Client, Arg0 int) string {
- var args Args_status
- var reply Reply_status
- args.Arg0 = Arg0
- err := cli.Call("RPC.RPC_status", &args, &reply)
- if err != nil {
- panic(err)
- }
- return reply.Arg0
-}
-
-// wrapper for: server_drop_cache
-
-type Args_drop_cache struct {
- Arg0 int
-}
-type Reply_drop_cache struct {
- Arg0 int
-}
-
-func (r *RPC) RPC_drop_cache(args *Args_drop_cache, reply *Reply_drop_cache) error {
- reply.Arg0 = server_drop_cache(args.Arg0)
- return nil
-}
-func client_drop_cache(cli *rpc.Client, Arg0 int) int {
- var args Args_drop_cache
- var reply Reply_drop_cache
- args.Arg0 = Arg0
- err := cli.Call("RPC.RPC_drop_cache", &args, &reply)
- if err != nil {
- panic(err)
- }
- return reply.Arg0
-}
-
-// wrapper for: server_set
-
-type Args_set struct {
- Arg0, Arg1 string
-}
-type Reply_set struct {
- Arg0 string
-}
-
-func (r *RPC) RPC_set(args *Args_set, reply *Reply_set) error {
- reply.Arg0 = server_set(args.Arg0, args.Arg1)
- return nil
-}
-func client_set(cli *rpc.Client, Arg0, Arg1 string) string {
- var args Args_set
- var reply Reply_set
- args.Arg0 = Arg0
- args.Arg1 = Arg1
- err := cli.Call("RPC.RPC_set", &args, &reply)
- if err != nil {
- panic(err)
- }
- return reply.Arg0
-}
diff --git a/vendor/github.com/nsf/gocode/scope.go b/vendor/github.com/nsf/gocode/scope.go
deleted file mode 100644
index 34afb89..0000000
--- a/vendor/github.com/nsf/gocode/scope.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package main
-
-//-------------------------------------------------------------------------
-// scope
-//-------------------------------------------------------------------------
-
-type scope struct {
- parent *scope // nil for universe scope
- entities map[string]*decl
-}
-
-func new_scope(outer *scope) *scope {
- s := new(scope)
- s.parent = outer
- s.entities = make(map[string]*decl)
- return s
-}
-
-// returns: new, prev
-func advance_scope(s *scope) (*scope, *scope) {
- if len(s.entities) == 0 {
- return s, s.parent
- }
- return new_scope(s), s
-}
-
-// adds declaration or returns an existing one
-func (s *scope) add_named_decl(d *decl) *decl {
- return s.add_decl(d.name, d)
-}
-
-func (s *scope) add_decl(name string, d *decl) *decl {
- decl, ok := s.entities[name]
- if !ok {
- s.entities[name] = d
- return d
- }
- return decl
-}
-
-func (s *scope) replace_decl(name string, d *decl) {
- s.entities[name] = d
-}
-
-func (s *scope) merge_decl(d *decl) {
- decl, ok := s.entities[d.name]
- if !ok {
- s.entities[d.name] = d
- } else {
- decl := decl.deep_copy()
- decl.expand_or_replace(d)
- s.entities[d.name] = decl
- }
-}
-
-func (s *scope) lookup(name string) *decl {
- decl, ok := s.entities[name]
- if !ok {
- if s.parent != nil {
- return s.parent.lookup(name)
- } else {
- return nil
- }
- }
- return decl
-}
diff --git a/vendor/github.com/nsf/gocode/server.go b/vendor/github.com/nsf/gocode/server.go
deleted file mode 100644
index 15e7d01..0000000
--- a/vendor/github.com/nsf/gocode/server.go
+++ /dev/null
@@ -1,237 +0,0 @@
-package main
-
-import (
- "bytes"
- "fmt"
- "go/build"
- "log"
- "net"
- "net/rpc"
- "os"
- "path/filepath"
- "reflect"
- "runtime"
- "time"
-)
-
-func do_server() int {
- g_config.read()
- if g_config.ForceDebugOutput != "" {
- // forcefully enable debugging and redirect logging into the
- // specified file
- *g_debug = true
- f, err := os.Create(g_config.ForceDebugOutput)
- if err != nil {
- panic(err)
- }
- log.SetOutput(f)
- }
-
- addr := *g_addr
- if *g_sock == "unix" {
- addr = get_socket_filename()
- if file_exists(addr) {
- log.Printf("unix socket: '%s' already exists\n", addr)
- return 1
- }
- }
- g_daemon = new_daemon(*g_sock, addr)
- if *g_sock == "unix" {
- // cleanup unix socket file
- defer os.Remove(addr)
- }
-
- rpc.Register(new(RPC))
-
- g_daemon.loop()
- return 0
-}
-
-//-------------------------------------------------------------------------
-// daemon
-//-------------------------------------------------------------------------
-
-type daemon struct {
- listener net.Listener
- cmd_in chan int
- autocomplete *auto_complete_context
- pkgcache package_cache
- declcache *decl_cache
- context package_lookup_context
-}
-
-func new_daemon(network, address string) *daemon {
- var err error
-
- d := new(daemon)
- d.listener, err = net.Listen(network, address)
- if err != nil {
- panic(err)
- }
-
- d.cmd_in = make(chan int, 1)
- d.pkgcache = new_package_cache()
- d.declcache = new_decl_cache(&d.context)
- d.autocomplete = new_auto_complete_context(d.pkgcache, d.declcache)
- return d
-}
-
-func (this *daemon) drop_cache() {
- this.pkgcache = new_package_cache()
- this.declcache = new_decl_cache(&this.context)
- this.autocomplete = new_auto_complete_context(this.pkgcache, this.declcache)
-}
-
-const (
- daemon_close = iota
-)
-
-func (this *daemon) loop() {
- conn_in := make(chan net.Conn)
- go func() {
- for {
- c, err := this.listener.Accept()
- if err != nil {
- panic(err)
- }
- conn_in <- c
- }
- }()
-
- timeout := time.Duration(g_config.CloseTimeout) * time.Second
- countdown := time.NewTimer(timeout)
-
- for {
- // handle connections or server CMDs (currently one CMD)
- select {
- case c := <-conn_in:
- rpc.ServeConn(c)
- countdown.Reset(timeout)
- runtime.GC()
- case cmd := <-this.cmd_in:
- switch cmd {
- case daemon_close:
- return
- }
- case <-countdown.C:
- return
- }
- }
-}
-
-func (this *daemon) close() {
- this.cmd_in <- daemon_close
-}
-
-var g_daemon *daemon
-
-//-------------------------------------------------------------------------
-// server_* functions
-//
-// Corresponding client_* functions are autogenerated by goremote.
-//-------------------------------------------------------------------------
-
-func server_auto_complete(file []byte, filename string, cursor int, context_packed go_build_context) (c []candidate, d int) {
- context := unpack_build_context(&context_packed)
- defer func() {
- if err := recover(); err != nil {
- print_backtrace(err)
- c = []candidate{
- {"PANIC", "PANIC", decl_invalid},
- }
-
- // drop cache
- g_daemon.drop_cache()
- }
- }()
- // TODO: Probably we don't care about comparing all the fields, checking GOROOT and GOPATH
- // should be enough.
- if !reflect.DeepEqual(g_daemon.context.Context, context.Context) {
- g_daemon.context = context
- g_daemon.drop_cache()
- }
- switch g_config.PackageLookupMode {
- case "bzl":
- // when package lookup mode is bzl, we set GOPATH to "" explicitly and
- // BzlProjectRoot becomes valid (or empty)
- var err error
- g_daemon.context.GOPATH = ""
- g_daemon.context.BzlProjectRoot, err = find_bzl_project_root(g_config.LibPath, filename)
- if *g_debug && err != nil {
- log.Printf("Bzl project root not found: %s", err)
- }
- case "gb":
- // when package lookup mode is gb, we set GOPATH to "" explicitly and
- // GBProjectRoot becomes valid (or empty)
- var err error
- g_daemon.context.GOPATH = ""
- g_daemon.context.GBProjectRoot, err = find_gb_project_root(filename)
- if *g_debug && err != nil {
- log.Printf("Gb project root not found: %s", err)
- }
- case "go":
- // get current package path for GO15VENDOREXPERIMENT hack
- g_daemon.context.CurrentPackagePath = ""
- pkg, err := g_daemon.context.ImportDir(filepath.Dir(filename), build.FindOnly)
- if err == nil {
- if *g_debug {
- log.Printf("Go project path: %s", pkg.ImportPath)
- }
- g_daemon.context.CurrentPackagePath = pkg.ImportPath
- } else if *g_debug {
- log.Printf("Go project path not found: %s", err)
- }
- }
- if *g_debug {
- var buf bytes.Buffer
- log.Printf("Got autocompletion request for '%s'\n", filename)
- log.Printf("Cursor at: %d\n", cursor)
- buf.WriteString("-------------------------------------------------------\n")
- buf.Write(file[:cursor])
- buf.WriteString("#")
- buf.Write(file[cursor:])
- log.Print(buf.String())
- log.Println("-------------------------------------------------------")
- }
- candidates, d := g_daemon.autocomplete.apropos(file, filename, cursor)
- if *g_debug {
- log.Printf("Offset: %d\n", d)
- log.Printf("Number of candidates found: %d\n", len(candidates))
- log.Printf("Candidates are:\n")
- for _, c := range candidates {
- abbr := fmt.Sprintf("%s %s %s", c.Class, c.Name, c.Type)
- if c.Class == decl_func {
- abbr = fmt.Sprintf("%s %s%s", c.Class, c.Name, c.Type[len("func"):])
- }
- log.Printf(" %s\n", abbr)
- }
- log.Println("=======================================================")
- }
- return candidates, d
-}
-
-func server_close(notused int) int {
- g_daemon.close()
- return 0
-}
-
-func server_status(notused int) string {
- return g_daemon.autocomplete.status()
-}
-
-func server_drop_cache(notused int) int {
- // drop cache
- g_daemon.drop_cache()
- return 0
-}
-
-func server_set(key, value string) string {
- if key == "\x00" {
- return g_config.list()
- } else if value == "\x00" {
- return g_config.list_option(key)
- }
- // drop cache on settings changes
- g_daemon.drop_cache()
- return g_config.set_option(key, value)
-}
diff --git a/vendor/github.com/nsf/gocode/utils.go b/vendor/github.com/nsf/gocode/utils.go
deleted file mode 100644
index ece34dd..0000000
--- a/vendor/github.com/nsf/gocode/utils.go
+++ /dev/null
@@ -1,287 +0,0 @@
-package main
-
-import (
- "bytes"
- "fmt"
- "go/build"
- "io/ioutil"
- "os"
- "path/filepath"
- "runtime"
- "strings"
- "sync"
- "unicode/utf8"
-)
-
-// our own readdir, which skips the files it cannot lstat
-func readdir_lstat(name string) ([]os.FileInfo, error) {
- f, err := os.Open(name)
- if err != nil {
- return nil, err
- }
- defer f.Close()
-
- names, err := f.Readdirnames(-1)
- if err != nil {
- return nil, err
- }
-
- out := make([]os.FileInfo, 0, len(names))
- for _, lname := range names {
- s, err := os.Lstat(filepath.Join(name, lname))
- if err != nil {
- continue
- }
- out = append(out, s)
- }
- return out, nil
-}
-
-// our other readdir function, only opens and reads
-func readdir(dirname string) []os.FileInfo {
- f, err := os.Open(dirname)
- if err != nil {
- return nil
- }
- fi, err := f.Readdir(-1)
- f.Close()
- if err != nil {
- panic(err)
- }
- return fi
-}
-
-// returns truncated 'data' and amount of bytes skipped (for cursor pos adjustment)
-func filter_out_shebang(data []byte) ([]byte, int) {
- if len(data) > 2 && data[0] == '#' && data[1] == '!' {
- newline := bytes.Index(data, []byte("\n"))
- if newline != -1 && len(data) > newline+1 {
- return data[newline+1:], newline + 1
- }
- }
- return data, 0
-}
-
-func file_exists(filename string) bool {
- _, err := os.Stat(filename)
- if err != nil {
- return false
- }
- return true
-}
-
-func is_dir(path string) bool {
- fi, err := os.Stat(path)
- return err == nil && fi.IsDir()
-}
-
-func char_to_byte_offset(s []byte, offset_c int) (offset_b int) {
- for offset_b = 0; offset_c > 0 && offset_b < len(s); offset_b++ {
- if utf8.RuneStart(s[offset_b]) {
- offset_c--
- }
- }
- return offset_b
-}
-
-func xdg_home_dir() string {
- xdghome := os.Getenv("XDG_CONFIG_HOME")
- if xdghome == "" {
- xdghome = filepath.Join(os.Getenv("HOME"), ".config")
- }
- return xdghome
-}
-
-func has_prefix(s, prefix string, ignorecase bool) bool {
- if ignorecase {
- s = strings.ToLower(s)
- prefix = strings.ToLower(prefix)
- }
- return strings.HasPrefix(s, prefix)
-}
-
-func find_bzl_project_root(libpath, path string) (string, error) {
- if libpath == "" {
- return "", fmt.Errorf("could not find project root, libpath is empty")
- }
-
- pathMap := map[string]struct{}{}
- for _, lp := range strings.Split(libpath, ":") {
- lp := strings.TrimSpace(lp)
- pathMap[filepath.Clean(lp)] = struct{}{}
- }
-
- path = filepath.Dir(path)
- if path == "" {
- return "", fmt.Errorf("project root is blank")
- }
-
- start := path
- for path != "/" {
- if _, ok := pathMap[filepath.Clean(path)]; ok {
- return path, nil
- }
- path = filepath.Dir(path)
- }
- return "", fmt.Errorf("could not find project root in %q or its parents", start)
-}
-
-// Code taken directly from `gb`, I hope author doesn't mind.
-func find_gb_project_root(path string) (string, error) {
- path = filepath.Dir(path)
- if path == "" {
- return "", fmt.Errorf("project root is blank")
- }
- start := path
- for path != "/" {
- root := filepath.Join(path, "src")
- if _, err := os.Stat(root); err != nil {
- if os.IsNotExist(err) {
- path = filepath.Dir(path)
- continue
- }
- return "", err
- }
- path, err := filepath.EvalSymlinks(path)
- if err != nil {
- return "", err
- }
- return path, nil
- }
- return "", fmt.Errorf("could not find project root in %q or its parents", start)
-}
-
-// vendorlessImportPath returns the devendorized version of the provided import path.
-// e.g. "foo/bar/vendor/a/b" => "a/b"
-func vendorlessImportPath(ipath string) string {
- // Devendorize for use in import statement.
- if i := strings.LastIndex(ipath, "/vendor/"); i >= 0 {
- return ipath[i+len("/vendor/"):]
- }
- if strings.HasPrefix(ipath, "vendor/") {
- return ipath[len("vendor/"):]
- }
- return ipath
-}
-
-//-------------------------------------------------------------------------
-// print_backtrace
-//
-// a nicer backtrace printer than the default one
-//-------------------------------------------------------------------------
-
-var g_backtrace_mutex sync.Mutex
-
-func print_backtrace(err interface{}) {
- g_backtrace_mutex.Lock()
- defer g_backtrace_mutex.Unlock()
- fmt.Printf("panic: %v\n", err)
- i := 2
- for {
- pc, file, line, ok := runtime.Caller(i)
- if !ok {
- break
- }
- f := runtime.FuncForPC(pc)
- fmt.Printf("%d(%s): %s:%d\n", i-1, f.Name(), file, line)
- i++
- }
- fmt.Println("")
-}
-
-//-------------------------------------------------------------------------
-// File reader goroutine
-//
-// It's a bad idea to block multiple goroutines on file I/O. Creates many
-// threads which fight for HDD. Therefore only single goroutine should read HDD
-// at the same time.
-//-------------------------------------------------------------------------
-
-type file_read_request struct {
- filename string
- out chan file_read_response
-}
-
-type file_read_response struct {
- data []byte
- error error
-}
-
-type file_reader_type struct {
- in chan file_read_request
-}
-
-func new_file_reader() *file_reader_type {
- this := new(file_reader_type)
- this.in = make(chan file_read_request)
- go func() {
- var rsp file_read_response
- for {
- req := <-this.in
- rsp.data, rsp.error = ioutil.ReadFile(req.filename)
- req.out <- rsp
- }
- }()
- return this
-}
-
-func (this *file_reader_type) read_file(filename string) ([]byte, error) {
- req := file_read_request{
- filename,
- make(chan file_read_response),
- }
- this.in <- req
- rsp := <-req.out
- return rsp.data, rsp.error
-}
-
-var file_reader = new_file_reader()
-
-//-------------------------------------------------------------------------
-// copy of the build.Context without func fields
-//-------------------------------------------------------------------------
-
-type go_build_context struct {
- GOARCH string
- GOOS string
- GOROOT string
- GOPATH string
- CgoEnabled bool
- UseAllFiles bool
- Compiler string
- BuildTags []string
- ReleaseTags []string
- InstallSuffix string
-}
-
-func pack_build_context(ctx *build.Context) go_build_context {
- return go_build_context{
- GOARCH: ctx.GOARCH,
- GOOS: ctx.GOOS,
- GOROOT: ctx.GOROOT,
- GOPATH: ctx.GOPATH,
- CgoEnabled: ctx.CgoEnabled,
- UseAllFiles: ctx.UseAllFiles,
- Compiler: ctx.Compiler,
- BuildTags: ctx.BuildTags,
- ReleaseTags: ctx.ReleaseTags,
- InstallSuffix: ctx.InstallSuffix,
- }
-}
-
-func unpack_build_context(ctx *go_build_context) package_lookup_context {
- return package_lookup_context{
- Context: build.Context{
- GOARCH: ctx.GOARCH,
- GOOS: ctx.GOOS,
- GOROOT: ctx.GOROOT,
- GOPATH: ctx.GOPATH,
- CgoEnabled: ctx.CgoEnabled,
- UseAllFiles: ctx.UseAllFiles,
- Compiler: ctx.Compiler,
- BuildTags: ctx.BuildTags,
- ReleaseTags: ctx.ReleaseTags,
- InstallSuffix: ctx.InstallSuffix,
- },
- }
-}
diff --git a/vendor/github.com/visualfc/gotools/LICENSE b/vendor/github.com/visualfc/gotools/LICENSE
deleted file mode 100644
index 624d856..0000000
--- a/vendor/github.com/visualfc/gotools/LICENSE
+++ /dev/null
@@ -1,28 +0,0 @@
-Copyright (c) 2015, visualfc
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
-* Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
-* Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
-* Neither the name of gotools nor the names of its
- contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
diff --git a/vendor/github.com/visualfc/gotools/README.md b/vendor/github.com/visualfc/gotools/README.md
deleted file mode 100644
index a8ab9f3..0000000
--- a/vendor/github.com/visualfc/gotools/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# gotools
-liteide golang tools
diff --git a/vendor/github.com/visualfc/gotools/astview/astdoc.go b/vendor/github.com/visualfc/gotools/astview/astdoc.go
deleted file mode 100644
index ae44d3f..0000000
--- a/vendor/github.com/visualfc/gotools/astview/astdoc.go
+++ /dev/null
@@ -1,685 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package doc extracts source code documentation from a Go AST.
-package astview
-
-import (
- "go/ast"
- "go/token"
- "regexp"
- "sort"
- "strconv"
-)
-
-// ----------------------------------------------------------------------------
-
-type typeDoc struct {
- // len(decl.Specs) == 1, and the element type is *ast.TypeSpec
- // if the type declaration hasn't been seen yet, decl is nil
- decl *ast.GenDecl
- // values, factory functions, and methods associated with the type
- values []*ast.GenDecl // consts and vars
- factories map[string]*ast.FuncDecl
- methods map[string]*ast.FuncDecl
-}
-
-// docReader accumulates documentation for a single package.
-// It modifies the AST: Comments (declaration documentation)
-// that have been collected by the DocReader are set to nil
-// in the respective AST nodes so that they are not printed
-// twice (once when printing the documentation and once when
-// printing the corresponding AST node).
-//
-type docReader struct {
- doc *ast.CommentGroup // package documentation, if any
- pkgName string
- showAll bool
- values []*ast.GenDecl // consts and vars
- types map[string]*typeDoc
- funcs map[string]*ast.FuncDecl
- imports map[string]int
- bugs []*ast.CommentGroup
-}
-
-func (doc *docReader) init(pkgName string, showAll bool) {
- doc.pkgName = pkgName
- doc.showAll = showAll
- doc.imports = make(map[string]int)
- doc.types = make(map[string]*typeDoc)
- doc.funcs = make(map[string]*ast.FuncDecl)
-}
-
-func (doc *docReader) addDoc(comments *ast.CommentGroup) {
- if doc.doc == nil {
- // common case: just one package comment
- doc.doc = comments
- return
- }
-
- // More than one package comment: Usually there will be only
- // one file with a package comment, but it's better to collect
- // all comments than drop them on the floor.
- // (This code isn't particularly clever - no amortized doubling is
- // used - but this situation occurs rarely and is not time-critical.)
- n1 := len(doc.doc.List)
- n2 := len(comments.List)
- list := make([]*ast.Comment, n1+1+n2) // + 1 for separator line
- copy(list, doc.doc.List)
- list[n1] = &ast.Comment{token.NoPos, "//"} // separator line
- copy(list[n1+1:], comments.List)
- doc.doc = &ast.CommentGroup{list}
-}
-
-func (doc *docReader) addType(decl *ast.GenDecl) {
- spec := decl.Specs[0].(*ast.TypeSpec)
- typ := doc.lookupTypeDoc(spec.Name.Name)
- // typ should always be != nil since declared types
- // are always named - be conservative and check
- if typ != nil {
- // a type should be added at most once, so typ.decl
- // should be nil - if it isn't, simply overwrite it
- typ.decl = decl
- }
-}
-
-func (doc *docReader) lookupTypeDoc(name string) *typeDoc {
- if name == "" {
- return nil // no type docs for anonymous types
- }
- if tdoc, found := doc.types[name]; found {
- return tdoc
- }
- // type wasn't found - add one without declaration
- tdoc := &typeDoc{nil, nil, make(map[string]*ast.FuncDecl), make(map[string]*ast.FuncDecl)}
- doc.types[name] = tdoc
- return tdoc
-}
-
-func docBaseTypeName(typ ast.Expr, showAll bool) string {
- switch t := typ.(type) {
- case *ast.Ident:
- // if the type is not exported, the effect to
- // a client is as if there were no type name
- if showAll || t.IsExported() {
- return t.Name
- }
- case *ast.StarExpr:
- return docBaseTypeName(t.X, showAll)
- }
- return ""
-}
-
-func (doc *docReader) addValue(decl *ast.GenDecl) {
- // determine if decl should be associated with a type
- // Heuristic: For each typed entry, determine the type name, if any.
- // If there is exactly one type name that is sufficiently
- // frequent, associate the decl with the respective type.
- domName := ""
- domFreq := 0
- prev := ""
- for _, s := range decl.Specs {
- if v, ok := s.(*ast.ValueSpec); ok {
- name := ""
- switch {
- case v.Type != nil:
- // a type is present; determine its name
- name = docBaseTypeName(v.Type, doc.showAll)
- case decl.Tok == token.CONST:
- // no type is present but we have a constant declaration;
- // use the previous type name (w/o more type information
- // we cannot handle the case of unnamed variables with
- // initializer expressions except for some trivial cases)
- name = prev
- }
- if name != "" {
- // entry has a named type
- if domName != "" && domName != name {
- // more than one type name - do not associate
- // with any type
- domName = ""
- break
- }
- domName = name
- domFreq++
- }
- prev = name
- }
- }
-
- // determine values list
- const threshold = 0.75
- values := &doc.values
- if domName != "" && domFreq >= int(float64(len(decl.Specs))*threshold) {
- // typed entries are sufficiently frequent
- typ := doc.lookupTypeDoc(domName)
- if typ != nil {
- values = &typ.values // associate with that type
- }
- }
-
- *values = append(*values, decl)
-}
-
-// Helper function to set the table entry for function f. Makes sure that
-// at least one f with associated documentation is stored in table, if there
-// are multiple f's with the same name.
-func setFunc(table map[string]*ast.FuncDecl, f *ast.FuncDecl) {
- name := f.Name.Name
- if g, exists := table[name]; exists && g.Doc != nil {
- // a function with the same name has already been registered;
- // since it has documentation, assume f is simply another
- // implementation and ignore it
- // TODO(gri) consider collecting all functions, or at least
- // all comments
- return
- }
- // function doesn't exist or has no documentation; use f
- table[name] = f
-}
-
-func (doc *docReader) addFunc(fun *ast.FuncDecl) {
- name := fun.Name.Name
-
- // determine if it should be associated with a type
- if fun.Recv != nil {
- // method
- typ := doc.lookupTypeDoc(docBaseTypeName(fun.Recv.List[0].Type, doc.showAll))
- if typ != nil {
- // exported receiver type
- setFunc(typ.methods, fun)
- }
- // otherwise don't show the method
- // TODO(gri): There may be exported methods of non-exported types
- // that can be called because of exported values (consts, vars, or
- // function results) of that type. Could determine if that is the
- // case and then show those methods in an appropriate section.
- return
- }
-
- // perhaps a factory function
- // determine result type, if any
- if fun.Type.Results.NumFields() >= 1 {
- res := fun.Type.Results.List[0]
- if len(res.Names) <= 1 {
- // exactly one (named or anonymous) result associated
- // with the first type in result signature (there may
- // be more than one result)
- tname := docBaseTypeName(res.Type, doc.showAll)
- typ := doc.lookupTypeDoc(tname)
- if typ != nil {
- // named and exported result type
-
- // Work-around for failure of heuristic: In package os
- // too many functions are considered factory functions
- // for the Error type. Eliminate manually for now as
- // this appears to be the only important case in the
- // current library where the heuristic fails.
- if doc.pkgName == "os" && tname == "Error" &&
- name != "NewError" && name != "NewSyscallError" {
- // not a factory function for os.Error
- setFunc(doc.funcs, fun) // treat as ordinary function
- return
- }
-
- setFunc(typ.factories, fun)
- return
- }
- }
- }
-
- // ordinary function
- setFunc(doc.funcs, fun)
-}
-
-func (doc *docReader) addDecl(decl ast.Decl) {
- switch d := decl.(type) {
- case *ast.GenDecl:
- if len(d.Specs) > 0 {
- switch d.Tok {
- case token.IMPORT:
- // imports are handled individually
- for _, spec := range d.Specs {
- if s, ok := spec.(*ast.ImportSpec); ok {
- if import_, err := strconv.Unquote(s.Path.Value); err == nil {
- doc.imports[import_] = 1
- }
- }
- }
- case token.CONST, token.VAR:
- // constants and variables are always handled as a group
- doc.addValue(d)
- case token.TYPE:
- // types are handled individually
- for _, spec := range d.Specs {
- // make a (fake) GenDecl node for this TypeSpec
- // (we need to do this here - as opposed to just
- // for printing - so we don't lose the GenDecl
- // documentation)
- //
- // TODO(gri): Consider just collecting the TypeSpec
- // node (and copy in the GenDecl.doc if there is no
- // doc in the TypeSpec - this is currently done in
- // makeTypeDocs below). Simpler data structures, but
- // would lose GenDecl documentation if the TypeSpec
- // has documentation as well.
- doc.addType(&ast.GenDecl{d.Doc, d.Pos(), token.TYPE, token.NoPos, []ast.Spec{spec}, token.NoPos})
- // A new GenDecl node is created, no need to nil out d.Doc.
- }
- }
- }
- case *ast.FuncDecl:
- doc.addFunc(d)
- }
-}
-
-func copyCommentList(list []*ast.Comment) []*ast.Comment {
- return append([]*ast.Comment(nil), list...)
-}
-
-var (
- bug_markers = regexp.MustCompile("^/[/*][ \t]*BUG\\(.*\\):[ \t]*") // BUG(uid):
- bug_content = regexp.MustCompile("[^ \n\r\t]+") // at least one non-whitespace char
-)
-
-// addFile adds the AST for a source file to the docReader.
-// Adding the same AST multiple times is a no-op.
-//
-func (doc *docReader) addFile(src *ast.File) {
- // add package documentation
- if src.Doc != nil {
- doc.addDoc(src.Doc)
- src.Doc = nil // doc consumed - remove from ast.File node
- }
-
- // add all declarations
- for _, decl := range src.Decls {
- doc.addDecl(decl)
- }
-
- // collect BUG(...) comments
- for _, c := range src.Comments {
- text := c.List[0].Text
- if m := bug_markers.FindStringIndex(text); m != nil {
- // found a BUG comment; maybe empty
- if btxt := text[m[1]:]; bug_content.MatchString(btxt) {
- // non-empty BUG comment; collect comment without BUG prefix
- list := copyCommentList(c.List)
- list[0].Text = text[m[1]:]
- doc.bugs = append(doc.bugs, &ast.CommentGroup{list})
- }
- }
- }
- src.Comments = nil // consumed unassociated comments - remove from ast.File node
-}
-
-func NewFileDoc(file *ast.File, showAll bool) *PackageDoc {
- var r docReader
- r.init(file.Name.Name, showAll)
- r.addFile(file)
- return r.newDoc("", nil)
-}
-
-func NewPackageDoc(pkg *ast.Package, importpath string, showAll bool) *PackageDoc {
- var r docReader
- r.init(pkg.Name, showAll)
- filenames := make([]string, len(pkg.Files))
- i := 0
- for filename, f := range pkg.Files {
- r.addFile(f)
- filenames[i] = filename
- i++
- }
- return r.newDoc(importpath, filenames)
-}
-
-// ----------------------------------------------------------------------------
-// Conversion to external representation
-
-// ValueDoc is the documentation for a group of declared
-// values, either vars or consts.
-//
-type ValueDoc struct {
- Doc string
- Decl *ast.GenDecl
- order int
-}
-
-type sortValueDoc []*ValueDoc
-
-func (p sortValueDoc) Len() int { return len(p) }
-func (p sortValueDoc) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
-
-func declName(d *ast.GenDecl) string {
- if len(d.Specs) != 1 {
- return ""
- }
-
- switch v := d.Specs[0].(type) {
- case *ast.ValueSpec:
- return v.Names[0].Name
- case *ast.TypeSpec:
- return v.Name.Name
- }
-
- return ""
-}
-
-func (p sortValueDoc) Less(i, j int) bool {
- // sort by name
- // pull blocks (name = "") up to top
- // in original order
- if ni, nj := declName(p[i].Decl), declName(p[j].Decl); ni != nj {
- return ni < nj
- }
- return p[i].order < p[j].order
-}
-
-func makeValueDocs(list []*ast.GenDecl, tok token.Token) []*ValueDoc {
- d := make([]*ValueDoc, len(list)) // big enough in any case
- n := 0
- for i, decl := range list {
- if decl.Tok == tok {
- d[n] = &ValueDoc{decl.Doc.Text(), decl, i}
- n++
- decl.Doc = nil // doc consumed - removed from AST
- }
- }
- d = d[0:n]
- sort.Sort(sortValueDoc(d))
- return d
-}
-
-// FuncDoc is the documentation for a func declaration,
-// either a top-level function or a method function.
-//
-type FuncDoc struct {
- Doc string
- Recv ast.Expr // TODO(rsc): Would like string here
- Name string
- Decl *ast.FuncDecl
-}
-
-type sortFuncDoc []*FuncDoc
-
-func (p sortFuncDoc) Len() int { return len(p) }
-func (p sortFuncDoc) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
-func (p sortFuncDoc) Less(i, j int) bool { return p[i].Name < p[j].Name }
-
-func makeFuncDocs(m map[string]*ast.FuncDecl) []*FuncDoc {
- d := make([]*FuncDoc, len(m))
- i := 0
- for _, f := range m {
- doc := new(FuncDoc)
- doc.Doc = f.Doc.Text()
- f.Doc = nil // doc consumed - remove from ast.FuncDecl node
- if f.Recv != nil {
- doc.Recv = f.Recv.List[0].Type
- }
- doc.Name = f.Name.Name
- doc.Decl = f
- d[i] = doc
- i++
- }
- sort.Sort(sortFuncDoc(d))
- return d
-}
-
-// TypeDoc is the documentation for a declared type.
-// Consts and Vars are sorted lists of constants and variables of (mostly) that type.
-// Factories is a sorted list of factory functions that return that type.
-// Methods is a sorted list of method functions on that type.
-type TypeDoc struct {
- Doc string
- Type *ast.TypeSpec
- Consts []*ValueDoc
- Vars []*ValueDoc
- Funcs []*FuncDoc
- Methods []*FuncDoc
- Decl *ast.GenDecl
- order int
-}
-
-type sortTypeDoc []*TypeDoc
-
-func (p sortTypeDoc) Len() int { return len(p) }
-func (p sortTypeDoc) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
-func (p sortTypeDoc) Less(i, j int) bool {
- // sort by name
- // pull blocks (name = "") up to top
- // in original order
- if ni, nj := p[i].Type.Name.Name, p[j].Type.Name.Name; ni != nj {
- return ni < nj
- }
- return p[i].order < p[j].order
-}
-
-// NOTE(rsc): This would appear not to be correct for type ( )
-// blocks, but the doc extractor above has split them into
-// individual declarations.
-func (doc *docReader) makeTypeDocs(m map[string]*typeDoc) []*TypeDoc {
- d := make([]*TypeDoc, len(m))
- i := 0
- for _, old := range m {
- // all typeDocs should have a declaration associated with
- // them after processing an entire package - be conservative
- // and check
- if decl := old.decl; decl != nil {
- typespec := decl.Specs[0].(*ast.TypeSpec)
- t := new(TypeDoc)
- doc := typespec.Doc
- typespec.Doc = nil // doc consumed - remove from ast.TypeSpec node
- if doc == nil {
- // no doc associated with the spec, use the declaration doc, if any
- doc = decl.Doc
- }
- decl.Doc = nil // doc consumed - remove from ast.Decl node
- t.Doc = doc.Text()
- t.Type = typespec
- t.Consts = makeValueDocs(old.values, token.CONST)
- t.Vars = makeValueDocs(old.values, token.VAR)
- t.Funcs = makeFuncDocs(old.factories)
- t.Methods = makeFuncDocs(old.methods)
- t.Decl = old.decl
- t.order = i
- d[i] = t
- i++
- } else {
- // no corresponding type declaration found - move any associated
- // values, factory functions, and methods back to the top-level
- // so that they are not lost (this should only happen if a package
- // file containing the explicit type declaration is missing or if
- // an unqualified type name was used after a "." import)
- // 1) move values
- doc.values = append(doc.values, old.values...)
- // 2) move factory functions
- for name, f := range old.factories {
- doc.funcs[name] = f
- }
- // 3) move methods
- for name, f := range old.methods {
- // don't overwrite functions with the same name
- if _, found := doc.funcs[name]; !found {
- doc.funcs[name] = f
- }
- }
- }
- }
- d = d[0:i] // some types may have been ignored
- sort.Sort(sortTypeDoc(d))
- return d
-}
-
-func makeBugDocs(list []*ast.CommentGroup) []string {
- d := make([]string, len(list))
- for i, g := range list {
- d[i] = g.Text()
- }
- return d
-}
-
-// PackageDoc is the documentation for an entire package.
-//
-type PackageDoc struct {
- PackageName string
- ImportPath string
- Imports []string
- Filenames []string
- Doc string
- Consts []*ValueDoc
- Types []*TypeDoc
- Vars []*ValueDoc
- Funcs []*FuncDoc
- Factorys []*FuncDoc
- Bugs []string
-}
-
-// newDoc returns the accumulated documentation for the package.
-//
-func (doc *docReader) newDoc(importpath string, filenames []string) *PackageDoc {
- p := new(PackageDoc)
- p.PackageName = doc.pkgName
- p.ImportPath = importpath
- sort.Strings(filenames)
- p.Filenames = filenames
- p.Doc = doc.doc.Text()
- p.Imports = sortedKeys(doc.imports)
- // makeTypeDocs may extend the list of doc.values and
- // doc.funcs and thus must be called before any other
- // function consuming those lists
- p.Types = doc.makeTypeDocs(doc.types)
- p.Consts = makeValueDocs(doc.values, token.CONST)
- p.Vars = makeValueDocs(doc.values, token.VAR)
- p.Funcs = makeFuncDocs(doc.funcs)
- p.Bugs = makeBugDocs(doc.bugs)
-
- for _, d := range p.Types {
- switch d.Type.Type.(type) {
- case *ast.StructType:
- p.Factorys = append(p.Factorys, d.Funcs...)
- d.Funcs = make([]*FuncDoc, 0)
- case *ast.InterfaceType:
- p.Factorys = append(p.Factorys, d.Funcs...)
- d.Funcs = make([]*FuncDoc, 0)
- default:
- p.Vars = append(p.Vars, d.Vars...)
- d.Vars = make([]*ValueDoc, 0)
- p.Consts = append(p.Consts, d.Consts...)
- d.Consts = make([]*ValueDoc, 0)
- }
- }
- return p
-}
-
-func sortedKeys(m map[string]int) []string {
- list := make([]string, len(m))
- i := 0
- for key := range m {
- list[i] = key
- i++
- }
- sort.Strings(list)
- return list
-}
-
-// ----------------------------------------------------------------------------
-// Filtering by name
-
-type Filter func(string) bool
-
-func matchFields(fields *ast.FieldList, f Filter) bool {
- if fields != nil {
- for _, field := range fields.List {
- for _, name := range field.Names {
- if f(name.Name) {
- return true
- }
- }
- }
- }
- return false
-}
-
-func matchDecl(d *ast.GenDecl, f Filter) bool {
- for _, d := range d.Specs {
- switch v := d.(type) {
- case *ast.ValueSpec:
- for _, name := range v.Names {
- if f(name.Name) {
- return true
- }
- }
- case *ast.TypeSpec:
- if f(v.Name.Name) {
- return true
- }
- switch t := v.Type.(type) {
- case *ast.StructType:
- if matchFields(t.Fields, f) {
- return true
- }
- case *ast.InterfaceType:
- if matchFields(t.Methods, f) {
- return true
- }
- }
- }
- }
- return false
-}
-
-func filterValueDocs(a []*ValueDoc, f Filter) []*ValueDoc {
- w := 0
- for _, vd := range a {
- if matchDecl(vd.Decl, f) {
- a[w] = vd
- w++
- }
- }
- return a[0:w]
-}
-
-func filterFuncDocs(a []*FuncDoc, f Filter) []*FuncDoc {
- w := 0
- for _, fd := range a {
- if f(fd.Name) {
- a[w] = fd
- w++
- }
- }
- return a[0:w]
-}
-
-func filterTypeDocs(a []*TypeDoc, f Filter) []*TypeDoc {
- w := 0
- for _, td := range a {
- n := 0 // number of matches
- if matchDecl(td.Decl, f) {
- n = 1
- } else {
- // type name doesn't match, but we may have matching consts, vars, factories or methods
- td.Consts = filterValueDocs(td.Consts, f)
- td.Vars = filterValueDocs(td.Vars, f)
- td.Funcs = filterFuncDocs(td.Funcs, f)
- td.Methods = filterFuncDocs(td.Methods, f)
- n += len(td.Consts) + len(td.Vars) + len(td.Funcs) + len(td.Methods)
- }
- if n > 0 {
- a[w] = td
- w++
- }
- }
- return a[0:w]
-}
-
-// Filter eliminates documentation for names that don't pass through the filter f.
-// TODO: Recognize "Type.Method" as a name.
-//
-func (p *PackageDoc) Filter(f Filter) {
- p.Consts = filterValueDocs(p.Consts, f)
- p.Vars = filterValueDocs(p.Vars, f)
- p.Types = filterTypeDocs(p.Types, f)
- p.Funcs = filterFuncDocs(p.Funcs, f)
- p.Doc = "" // don't show top-level package doc
-}
diff --git a/vendor/github.com/visualfc/gotools/astview/astview.go b/vendor/github.com/visualfc/gotools/astview/astview.go
deleted file mode 100644
index af07319..0000000
--- a/vendor/github.com/visualfc/gotools/astview/astview.go
+++ /dev/null
@@ -1,346 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package astview
-
-import (
- "fmt"
- "go/ast"
- "go/parser"
- "go/token"
- "io"
- "io/ioutil"
- "os"
- "strings"
-
- "github.com/visualfc/gotools/command"
-
- "golang.org/x/tools/go/types"
-)
-
-var Command = &command.Command{
- Run: runAstView,
- UsageLine: "astview [-stdin] files...",
- Short: "print go files astview",
- Long: `print go files astview`,
-}
-
-var astViewStdin bool
-
-func init() {
- Command.Flag.BoolVar(&astViewStdin, "stdin", false, "input from stdin")
-}
-
-func runAstView(cmd *command.Command, args []string) error {
- if len(args) == 0 {
- cmd.Usage()
- return os.ErrInvalid
- }
- if astViewStdin {
- view, err := NewFilePackageSource(args[0], os.Stdin, true)
- if err != nil {
- fmt.Fprintf(os.Stderr, "astview: %s", err)
- command.SetExitStatus(3)
- command.Exit()
- }
- view.PrintTree(os.Stdout)
- } else {
- err := PrintFilesTree(args, os.Stdout, true)
- if err != nil {
- fmt.Fprintf(os.Stderr, "astview:%s", err)
- command.SetExitStatus(3)
- command.Exit()
- }
- }
- return nil
-}
-
-const (
- tag_package = "p"
- tag_imports_folder = "+m"
- tag_import = "mm"
- tag_type = "t"
- tag_struct = "s"
- tag_interface = "i"
- tag_value = "v"
- tag_const = "c"
- tag_func = "f"
- tag_value_folder = "+v"
- tag_const_folder = "+c"
- tag_func_folder = "+f"
- tag_factor_folder = "+tf"
- tag_type_method = "tm"
- tag_type_factor = "tf"
- tag_type_value = "tv"
-)
-
-type PackageView struct {
- fset *token.FileSet
- pdoc *PackageDoc
- pkg *ast.Package
- expr bool
-}
-
-var AllFiles []string
-
-func (p *PackageView) posFileIndex(pos token.Position) int {
- var index = -1
- for i := 0; i < len(AllFiles); i++ {
- if AllFiles[i] == pos.Filename {
- index = i
- break
- }
- }
- if index == -1 {
- AllFiles = append(AllFiles, pos.Filename)
- index = len(AllFiles) - 1
- }
- return index
-}
-
-func (p *PackageView) posText(pos token.Position) (s string) {
- index := p.posFileIndex(pos)
- return fmt.Sprintf("%d:%d:%d", index, pos.Line, pos.Column)
-}
-
-func NewFilePackage(filename string) (*PackageView, error) {
- p := new(PackageView)
- p.fset = token.NewFileSet()
- file, err := parser.ParseFile(p.fset, filename, nil, parser.AllErrors)
- if file == nil {
- return nil, err
- }
- m := make(map[string]*ast.File)
- m[filename] = file
- pkg, err := ast.NewPackage(p.fset, m, nil, nil)
- if err != nil {
- return nil, err
- }
- p.pkg = pkg
- p.pdoc = NewPackageDoc(pkg, pkg.Name, true)
- return p, nil
-}
-
-func NewPackageView(pkg *ast.Package, fset *token.FileSet, expr bool) (*PackageView, error) {
- p := new(PackageView)
- p.fset = fset
- p.pkg = pkg
- p.pdoc = NewPackageDoc(pkg, pkg.Name, true)
- p.expr = expr
- return p, nil
-}
-
-func ParseFiles(fset *token.FileSet, filenames []string, mode parser.Mode) (pkgs map[string]*ast.Package, pkgsfiles []string, first error) {
- pkgs = make(map[string]*ast.Package)
- for _, filename := range filenames {
- if src, err := parser.ParseFile(fset, filename, nil, mode); src != nil {
- name := src.Name.Name
- pkg, found := pkgs[name]
- if !found {
- pkg = &ast.Package{
- Name: name,
- Files: make(map[string]*ast.File),
- }
- pkgs[name] = pkg
- }
- pkg.Files[filename] = src
- pkgsfiles = append(pkgsfiles, filename)
- } else {
- first = err
- return
- }
- }
- return
-}
-
-func PrintFilesTree(filenames []string, w io.Writer, expr bool) error {
- fset := token.NewFileSet()
- pkgs, pkgsfiles, err := ParseFiles(fset, filenames, parser.AllErrors)
- if err != nil {
- return err
- }
- AllFiles = pkgsfiles
- for i := 0; i < len(AllFiles); i++ {
- fmt.Fprintf(w, "@%s\n", AllFiles[i])
- }
- for _, pkg := range pkgs {
- view, err := NewPackageView(pkg, fset, expr)
- if err != nil {
- return err
- }
- view.PrintTree(w)
- }
- return nil
-}
-
-func NewFilePackageSource(filename string, f *os.File, expr bool) (*PackageView, error) {
- src, err := ioutil.ReadAll(f)
- if err != nil {
- return nil, err
- }
- p := new(PackageView)
- p.fset = token.NewFileSet()
- p.expr = expr
- file, err := parser.ParseFile(p.fset, filename, src, 0)
- if err != nil {
- return nil, err
- }
- m := make(map[string]*ast.File)
- m[filename] = file
- pkg, err := ast.NewPackage(p.fset, m, nil, nil)
- if err != nil {
- return nil, err
- }
-
- p.pdoc = NewPackageDoc(pkg, pkg.Name, true)
- return p, nil
-}
-
-func (p *PackageView) printFuncsHelper(w io.Writer, funcs []*FuncDoc, level int, tag string, tag_folder string) {
- for _, f := range funcs {
- pos := p.fset.Position(f.Decl.Pos())
- if p.expr {
- fmt.Fprintf(w, "%d,%s,%s,%s@%s\n", level, tag, f.Name, p.posText(pos), types.ExprString(f.Decl.Type))
- } else {
- fmt.Fprintf(w, "%d,%s,%s,%s\n", level, tag, f.Name, p.posText(pos))
- }
- }
-}
-
-func (p *PackageView) PrintVars(w io.Writer, vars []*ValueDoc, level int, tag string, tag_folder string) {
- if len(tag_folder) > 0 && len(vars) > 0 {
- if tag_folder == tag_value_folder {
- fmt.Fprintf(w, "%d,%s,Variables\n", level, tag_folder)
- } else if tag_folder == tag_const_folder {
- fmt.Fprintf(w, "%d,%s,Constants\n", level, tag_folder)
- }
- level++
- }
- for _, v := range vars {
- if v.Decl == nil {
- continue
- }
- for _, s := range v.Decl.Specs {
- if m, ok := s.(*ast.ValueSpec); ok {
- pos := p.fset.Position(m.Pos())
- for i := 0; i < len(m.Names); i++ {
- if p.expr && m.Type != nil {
- fmt.Fprintf(w, "%d,%s,%s,%s@%s\n", level, tag, m.Names[i], p.posText(pos), types.ExprString(m.Type))
- } else {
- fmt.Fprintf(w, "%d,%s,%s,%s\n", level, tag, m.Names[i], p.posText(pos))
- }
- }
- }
- }
- }
-}
-func (p *PackageView) PrintTypes(w io.Writer, types []*TypeDoc, level int) {
- for _, d := range types {
- if d.Decl == nil {
- continue
- }
- typespec := d.Decl.Specs[0].(*ast.TypeSpec)
- var tag = tag_type
- if _, ok := typespec.Type.(*ast.InterfaceType); ok {
- tag = tag_interface
- } else if _, ok := typespec.Type.(*ast.StructType); ok {
- tag = tag_struct
- }
- pos := p.fset.Position(d.Decl.Pos())
- fmt.Fprintf(w, "%d,%s,%s,%s\n", level, tag, d.Type.Name, p.posText(pos))
- p.printFuncsHelper(w, d.Funcs, level+1, tag_type_factor, "")
- p.printFuncsHelper(w, d.Methods, level+1, tag_type_method, "")
- p.PrintTypeFields(w, d.Decl, level+1)
- //p.PrintVars(w, d.Consts, level+1, tag_const, "")
- //p.PrintVars(w, d.Vars, level+1, tag_value, "")
- }
-}
-
-func (p *PackageView) PrintTypeFields(w io.Writer, decl *ast.GenDecl, level int) {
- spec, ok := decl.Specs[0].(*ast.TypeSpec)
- if ok == false {
- return
- }
- switch d := spec.Type.(type) {
- case *ast.StructType:
- for _, list := range d.Fields.List {
- if list.Names == nil {
- continue
- }
- for _, m := range list.Names {
- pos := p.fset.Position(m.Pos())
- if list.Type != nil {
- fmt.Fprintf(w, "%d,%s,%s,%s@%s\n", level, tag_type_value, m.Name, p.posText(pos), types.ExprString(list.Type))
- } else {
- fmt.Fprintf(w, "%d,%s,%s,%s\n", level, tag_type_value, m.Name, p.posText(pos))
- }
- }
- }
- case *ast.InterfaceType:
- for _, list := range d.Methods.List {
- if list.Names == nil {
- continue
- }
- for _, m := range list.Names {
- pos := p.fset.Position(m.Pos())
- fmt.Fprintf(w, "%d,%s,%s,%s\n", level, tag_type_method, m.Name, p.posText(pos))
- }
- }
- }
-}
-
-func (p *PackageView) PrintHeader(w io.Writer, level int) {
- fmt.Fprintf(w, "%d,%s,%s\n", level, tag_package, p.pdoc.PackageName)
-}
-
-func (p *PackageView) PrintImports(w io.Writer, level int, tag, tag_folder string) {
- if tag_folder != "" && len(p.pdoc.Imports) > 0 {
- fmt.Fprintf(w, "%d,%s,%s\n", level, tag_folder, "Imports")
- level++
- }
- for _, name := range p.pdoc.Imports {
- vname := "\"" + name + "\""
- var ps []string
- for _, file := range p.pkg.Files {
- for _, v := range file.Imports {
- if v.Path.Value == vname {
- pos := p.fset.Position(v.Pos())
- ps = append(ps, p.posText(pos))
- }
- }
- }
- fmt.Fprintf(w, "%d,%s,%s,%s\n", level, tag, name, strings.Join(ps, ";"))
- }
-}
-
-func (p *PackageView) PrintFuncs(w io.Writer, level int, tag_folder string) {
- hasFolder := false
- if len(p.pdoc.Funcs) > 0 || len(p.pdoc.Factorys) > 0 {
- hasFolder = true
- }
- if !hasFolder {
- return
- }
- if len(tag_folder) > 0 {
- fmt.Fprintf(w, "%d,%s,Functions\n", level, tag_folder)
- level++
- }
- p.printFuncsHelper(w, p.pdoc.Factorys, level, tag_type_factor, tag_func_folder)
- p.printFuncsHelper(w, p.pdoc.Funcs, level, tag_func, tag_func_folder)
-}
-
-func (p *PackageView) PrintPackage(w io.Writer, level int) {
- p.PrintHeader(w, level)
- level++
- p.PrintImports(w, level, tag_import, tag_imports_folder)
- p.PrintVars(w, p.pdoc.Vars, level, tag_value, tag_value_folder)
- p.PrintVars(w, p.pdoc.Consts, level, tag_const, tag_const_folder)
- p.PrintFuncs(w, level, tag_func_folder)
- p.PrintTypes(w, p.pdoc.Types, level)
-}
-
-// level,tag,pos@info
-func (p *PackageView) PrintTree(w io.Writer) {
- p.PrintPackage(w, 0)
-}
diff --git a/vendor/github.com/visualfc/gotools/command/command.go b/vendor/github.com/visualfc/gotools/command/command.go
deleted file mode 100644
index a20a3fb..0000000
--- a/vendor/github.com/visualfc/gotools/command/command.go
+++ /dev/null
@@ -1,343 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//modify 2013-2014 visualfc
-
-package command
-
-import (
- "bytes"
- "flag"
- "fmt"
- "io"
- "log"
- "os"
- "strings"
- "sync"
- "text/template"
- "unicode"
- "unicode/utf8"
-)
-
-// A Command is an implementation of a go command
-// like go build or go fix.
-type Command struct {
- // Run runs the command.
- // The args are the arguments after the command name.
- Run func(cmd *Command, args []string) error
-
- // UsageLine is the one-line usage message.
- // The first word in the line is taken to be the command name.
- UsageLine string
-
- // Short is the short description shown in the 'go help' output.
- Short string
-
- // Long is the long message shown in the 'go help ' output.
- Long string
-
- // Flag is a set of flags specific to this command.
- Flag flag.FlagSet
-
- // CustomFlags indicates that the command will do its own
- // flag parsing.
- CustomFlags bool
-
- Stdin io.Reader
- Stdout io.Writer
- Stderr io.Writer
-}
-
-// Name returns the command's name: the first word in the usage line.
-func (c *Command) Name() string {
- name := c.UsageLine
- i := strings.Index(name, " ")
- if i >= 0 {
- name = name[:i]
- }
- return name
-}
-
-func (c *Command) Usage() {
- fmt.Fprintf(os.Stderr, "usage: %s %s\n", AppName, c.UsageLine)
- c.Flag.SetOutput(os.Stderr)
- c.Flag.PrintDefaults()
- //fmt.Fprintf(os.Stderr, "%s\n", strings.TrimSpace(c.Long))
- os.Exit(2)
-}
-
-func (c *Command) PrintUsage() {
- fmt.Fprintf(Stderr, "usage: %s %s\n", AppName, c.UsageLine)
- c.Flag.SetOutput(Stderr)
- c.Flag.PrintDefaults()
-}
-
-// Runnable reports whether the command can be run; otherwise
-// it is a documentation pseudo-command such as importpath.
-func (c *Command) Runnable() bool {
- return c.Run != nil
-}
-
-func (c *Command) Println(args ...interface{}) {
- fmt.Fprintln(c.Stdout, args...)
-}
-
-func (c *Command) Printf(format string, args ...interface{}) {
- fmt.Fprintf(c.Stdout, format, args...)
-}
-
-var commands []*Command
-
-func Register(cmd *Command) {
- commands = append(commands, cmd)
-}
-
-func CommandList() (cmds []string) {
- for _, cmd := range commands {
- cmds = append(cmds, cmd.Name())
- }
- return
-}
-
-var exitStatus = 0
-var exitMu sync.Mutex
-
-func SetExitStatus(n int) {
- exitMu.Lock()
- if exitStatus < n {
- exitStatus = n
- }
- exitMu.Unlock()
-}
-
-var (
- Stdout io.Writer = os.Stdout
- Stderr io.Writer = os.Stderr
- Stdin io.Reader = os.Stdin
-)
-
-func RunArgs(arguments []string, stdin io.Reader, stdout io.Writer, stderr io.Writer) error {
- flag.CommandLine.Parse(arguments)
- args := flag.Args()
- if len(args) < 1 {
- printUsage(os.Stderr)
- return os.ErrInvalid
- }
-
- if len(args) == 1 && strings.TrimSpace(args[0]) == "" {
- printUsage(os.Stderr)
- return os.ErrInvalid
- }
-
- if args[0] == "help" {
- if !help(args[1:]) {
- return os.ErrInvalid
- }
- return nil
- }
-
- for _, cmd := range commands {
- if cmd.Name() == args[0] && cmd.Run != nil {
- cmd.Flag.Usage = func() { cmd.Usage() }
- if cmd.CustomFlags {
- args = args[1:]
- } else {
- cmd.Flag.Parse(args[1:])
- args = cmd.Flag.Args()
- }
- cmd.Stdin = stdin
- cmd.Stdout = stdout
- cmd.Stderr = stderr
- return cmd.Run(cmd, args)
- }
- }
-
- fmt.Fprintf(os.Stderr, "%s: unknown subcommand %q\nRun '%s help' for usage.\n",
- AppName, args[0], AppName)
- return os.ErrInvalid
-}
-
-func Main() {
- flag.Usage = usage
- flag.Parse()
- log.SetFlags(0)
-
- args := flag.Args()
- if len(args) < 1 {
- usage()
- }
-
- if len(args) == 1 && strings.TrimSpace(args[0]) == "" {
- usage()
- }
-
- if args[0] == "help" {
- if !help(args[1:]) {
- os.Exit(2)
- }
- return
- }
-
- for _, cmd := range commands {
- if cmd.Name() == args[0] && cmd.Run != nil {
- cmd.Flag.Usage = func() { cmd.Usage() }
- if cmd.CustomFlags {
- args = args[1:]
- } else {
- cmd.Flag.Parse(args[1:])
- args = cmd.Flag.Args()
- }
- cmd.Stdin = Stdin
- cmd.Stdout = Stdout
- cmd.Stderr = Stderr
- cmd.Run(cmd, args)
- Exit()
- return
- }
- }
-
- fmt.Fprintf(os.Stderr, "%s: unknown subcommand %q\nRun '%s help' for usage.\n",
- AppName, args[0], AppName)
- SetExitStatus(2)
- Exit()
-}
-
-var AppInfo string = "LiteIDE golang tool."
-var AppName string = "tools"
-
-var usageTemplate = `
-Usage:
-
- {{AppName}} command [arguments]
-
-The commands are:
-{{range .}}{{if .Runnable}}
- {{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
-
-Use "{{AppName}} help [command]" for more information about a command.
-
-Additional help topics:
-{{range .}}{{if not .Runnable}}
- {{.Name | printf "%-11s"}} {{.Short}}{{end}}{{end}}
-
-Use "{{AppName}} help [topic]" for more information about that topic.
-
-`
-
-var helpTemplate = `{{if .Runnable}}usage: {{AppName}} {{.UsageLine}}
-
-{{end}}{{.Long | trim}}
-`
-
-var documentationTemplate = `//
-/*
-{{range .}}{{if .Short}}{{.Short | capitalize}}
-
-{{end}}{{if .Runnable}}Usage:
-
- {{AppName}} {{.UsageLine}}
-
-{{end}}{{.Long | trim}}
-
-
-{{end}}*/
-package main
-`
-
-// tmpl executes the given template text on data, writing the result to w.
-func tmpl(w io.Writer, text string, data interface{}) {
- t := template.New("top")
- t.Funcs(template.FuncMap{"trim": strings.TrimSpace, "capitalize": capitalize})
- template.Must(t.Parse(text))
- if err := t.Execute(w, data); err != nil {
- panic(err)
- }
-}
-
-func capitalize(s string) string {
- if s == "" {
- return s
- }
- r, n := utf8.DecodeRuneInString(s)
- return string(unicode.ToTitle(r)) + s[n:]
-}
-
-func printUsage(w io.Writer) {
- if len(AppInfo) > 0 {
- fmt.Fprintln(w, AppInfo)
- }
- tmpl(w, strings.Replace(usageTemplate, "{{AppName}}", AppName, -1), commands)
-}
-
-func usage() {
- printUsage(os.Stderr)
- os.Exit(2)
-}
-
-// help implements the 'help' command.
-func help(args []string) bool {
- if len(args) == 0 {
- printUsage(os.Stdout)
- // not exit 2: succeeded at 'go help'.
- return true
- }
- if len(args) != 1 {
- fmt.Fprintf(os.Stderr, "usage: %s help command\n\nToo many arguments given.\n", AppName)
- return false
- }
-
- arg := args[0]
-
- // 'go help documentation' generates doc.go.
- if arg == "documentation" {
- buf := new(bytes.Buffer)
- printUsage(buf)
- usage := &Command{Long: buf.String()}
- tmpl(os.Stdout, strings.Replace(documentationTemplate, "{{AppName}}", AppName, -1), append([]*Command{usage}, commands...))
- return false
- }
-
- for _, cmd := range commands {
- if cmd.Name() == arg {
- tmpl(os.Stdout, strings.Replace(helpTemplate, "{{AppName}}", AppName, -1), cmd)
- // not exit 2: succeeded at 'go help cmd'.
- return true
- }
- }
-
- fmt.Fprintf(os.Stderr, "Unknown help topic %#q. Run '%s help'.\n", arg, AppName)
- //os.Exit(2) // failed at 'go help cmd'
- return false
-}
-
-var atexitFuncs []func()
-
-func Atexit(f func()) {
- atexitFuncs = append(atexitFuncs, f)
-}
-
-func Exit() {
- for _, f := range atexitFuncs {
- f()
- }
- os.Exit(exitStatus)
-}
-
-func Fatalf(format string, args ...interface{}) {
- Errorf(format, args...)
- Exit()
-}
-
-func Errorf(format string, args ...interface{}) {
- log.Printf(format, args...)
- SetExitStatus(1)
-}
-
-var logf = log.Printf
-
-func ExitIfErrors() {
- if exitStatus != 0 {
- Exit()
- }
-}
diff --git a/vendor/github.com/visualfc/gotools/command/version.go b/vendor/github.com/visualfc/gotools/command/version.go
deleted file mode 100644
index 0a88780..0000000
--- a/vendor/github.com/visualfc/gotools/command/version.go
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package command
-
-import (
- "os"
- "runtime"
-)
-
-func init() {
- Register(cmdVersion)
-}
-
-var AppVersion string = "1.0"
-
-var cmdVersion = &Command{
- Run: runVersion,
- UsageLine: "version",
- Short: "print tool version",
- Long: `Version prints the version.`,
-}
-
-func runVersion(cmd *Command, args []string) error {
- if len(args) != 0 {
- cmd.PrintUsage()
- return os.ErrInvalid
- }
-
- cmd.Printf("%s version %s [%s %s/%s]\n", AppName, AppVersion, runtime.Version(), runtime.GOOS, runtime.GOARCH)
- return nil
-}
diff --git a/vendor/github.com/visualfc/gotools/doc.go b/vendor/github.com/visualfc/gotools/doc.go
deleted file mode 100644
index 2a2e1c4..0000000
--- a/vendor/github.com/visualfc/gotools/doc.go
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-/*
-gotools document
-*/
-package main
diff --git a/vendor/github.com/visualfc/gotools/docview/dirtrees.go b/vendor/github.com/visualfc/gotools/docview/dirtrees.go
deleted file mode 100644
index 2293e00..0000000
--- a/vendor/github.com/visualfc/gotools/docview/dirtrees.go
+++ /dev/null
@@ -1,352 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file contains the code dealing with package directory trees.
-
-package docview
-
-import (
- "bytes"
- "go/doc"
- "go/parser"
- "go/token"
- "log"
- "os"
- "path/filepath"
- "strings"
- "unicode"
-)
-
-type Directory struct {
- Depth int
- Path string // includes Name
- Name string
- Text string // package documentation, if any
- Dirs []*Directory // subdirectories
-}
-
-//func isGoFile(fi os.FileInfo) bool {
-// name := fi.Name()
-// return !fi.IsDir() &&
-// len(name) > 0 && name[0] != '.' && // ignore .files
-// filepath.Ext(name) == ".go"
-//}
-
-func isGoFile(f os.FileInfo) bool {
- // ignore non-Go files
- name := f.Name()
- return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go")
-}
-
-func isPkgFile(fi os.FileInfo) bool {
- return isGoFile(fi) &&
- !strings.HasSuffix(fi.Name(), "_test.go") // ignore test files
-}
-
-func isPkgDir(fi os.FileInfo) bool {
- name := fi.Name()
- return fi.IsDir() && len(name) > 0 &&
- name[0] != '_' && name[0] != '.' // ignore _files and .files
-}
-
-func firstSentence(s string) string {
- i := -1 // index+1 of first terminator (punctuation ending a sentence)
- j := -1 // index+1 of first terminator followed by white space
- prev := 'A'
- for k, ch := range s {
- k1 := k + 1
- if ch == '.' || ch == '!' || ch == '?' {
- if i < 0 {
- i = k1 // first terminator
- }
- if k1 < len(s) && s[k1] <= ' ' {
- if j < 0 {
- j = k1 // first terminator followed by white space
- }
- if !unicode.IsUpper(prev) {
- j = k1
- break
- }
- }
- }
- prev = ch
- }
-
- if j < 0 {
- // use the next best terminator
- j = i
- if j < 0 {
- // no terminator at all, use the entire string
- j = len(s)
- }
- }
-
- return s[0:j]
-}
-
-type treeBuilder struct {
- pathFilter func(string) bool
- maxDepth int
-}
-
-func (b *treeBuilder) newDirTree(fset *token.FileSet, path, name string, depth int) *Directory {
- if b.pathFilter != nil && !b.pathFilter(path) {
- return nil
- }
-
- if depth >= b.maxDepth {
- // return a dummy directory so that the parent directory
- // doesn't get discarded just because we reached the max
- // directory depth
- return &Directory{depth, path, name, "", nil}
- }
-
- list, err := fs.ReadDir(path)
- if err != nil {
- // newDirTree is called with a path that should be a package
- // directory; errors here should not happen, but if they do,
- // we want to know about them
- log.Printf("ReadDir(%s): %s", path, err)
- }
-
- // determine number of subdirectories and if there are package files
- ndirs := 0
- hasPkgFiles := false
- var synopses [4]string // prioritized package documentation (0 == highest priority)
- for _, d := range list {
- switch {
- case isPkgDir(d):
- ndirs++
- case isPkgFile(d):
- // looks like a package file, but may just be a file ending in ".go";
- // don't just count it yet (otherwise we may end up with hasPkgFiles even
- // though the directory doesn't contain any real package files - was bug)
- if synopses[0] == "" {
- // no "optimal" package synopsis yet; continue to collect synopses
- //file, err := parseFile(fset, filepath.Join(path, d.Name()),
- //parser.ParseComments|parser.PackageClauseOnly)
- file, err := parser.ParseFile(fset, filepath.Join(path, d.Name()), nil,
- parser.ParseComments|parser.PackageClauseOnly)
-
- if err == nil {
- hasPkgFiles = true
- if file.Doc != nil {
- // prioritize documentation
- i := -1
- switch file.Name.Name {
- case name:
- i = 0 // normal case: directory name matches package name
- case fakePkgName:
- i = 1 // synopses for commands
- case "main":
- i = 2 // directory contains a main package
- default:
- i = 3 // none of the above
- }
- if 0 <= i && i < len(synopses) && synopses[i] == "" {
- synopses[i] = doc.Synopsis(file.Doc.Text())
- }
- }
- }
- }
- }
- }
-
- // create subdirectory tree
- var dirs []*Directory
- if ndirs > 0 {
- dirs = make([]*Directory, ndirs)
- i := 0
- for _, d := range list {
- if isPkgDir(d) {
- name := d.Name()
- dd := b.newDirTree(fset, filepath.Join(path, name), name, depth+1)
- if dd != nil {
- dirs[i] = dd
- i++
- }
- }
- }
- dirs = dirs[0:i]
- }
-
- // if there are no package files and no subdirectories
- // containing package files, ignore the directory
- if !hasPkgFiles && len(dirs) == 0 {
- return nil
- }
-
- // select the highest-priority synopsis for the directory entry, if any
- synopsis := ""
- for _, synopsis = range synopses {
- if synopsis != "" {
- break
- }
- }
-
- return &Directory{depth, path, name, synopsis, dirs}
-}
-
-// newDirectory creates a new package directory tree with at most maxDepth
-// levels, anchored at root. The result tree is pruned such that it only
-// contains directories that contain package files or that contain
-// subdirectories containing package files (transitively). If a non-nil
-// pathFilter is provided, directory paths additionally must be accepted
-// by the filter (i.e., pathFilter(path) must be true). If a value >= 0 is
-// provided for maxDepth, nodes at larger depths are pruned as well; they
-// are assumed to contain package files even if their contents are not known
-// (i.e., in this case the tree may contain directories w/o any package files).
-//
-func newDirectory(root string, pathFilter func(string) bool, maxDepth int) *Directory {
- // The root could be a symbolic link so use Stat not Lstat.
- d, err := fs.Stat(root)
- // If we fail here, report detailed error messages; otherwise
- // is is hard to see why a directory tree was not built.
- switch {
- case err != nil:
- log.Printf("newDirectory(%s): %s", root, err)
- return nil
- case !isPkgDir(d):
- log.Printf("newDirectory(%s): not a package directory", root)
- return nil
- }
- if maxDepth < 0 {
- maxDepth = 1e6 // "infinity"
- }
- b := treeBuilder{pathFilter, maxDepth}
- // the file set provided is only for local parsing, no position
- // information escapes and thus we don't need to save the set
- return b.newDirTree(token.NewFileSet(), root, d.Name(), 0)
-}
-
-func (dir *Directory) writeLeafs(buf *bytes.Buffer) {
- if dir != nil {
- if len(dir.Dirs) == 0 {
- buf.WriteString(dir.Path)
- buf.WriteByte('\n')
- return
- }
-
- for _, d := range dir.Dirs {
- d.writeLeafs(buf)
- }
- }
-}
-
-func (dir *Directory) walk(c chan<- *Directory, skipRoot bool) {
- if dir != nil {
- if !skipRoot {
- c <- dir
- }
- for _, d := range dir.Dirs {
- d.walk(c, false)
- }
- }
-}
-
-func (dir *Directory) iter(skipRoot bool) <-chan *Directory {
- c := make(chan *Directory)
- go func() {
- dir.walk(c, skipRoot)
- close(c)
- }()
- return c
-}
-
-func (dir *Directory) lookupLocal(name string) *Directory {
- for _, d := range dir.Dirs {
- if d.Name == name {
- return d
- }
- }
- return nil
-}
-
-// lookup looks for the *Directory for a given path, relative to dir.
-func (dir *Directory) lookup(path string) *Directory {
- d := strings.Split(dir.Path, string(filepath.Separator))
- p := strings.Split(path, string(filepath.Separator))
- i := 0
- for i < len(d) {
- if i >= len(p) || d[i] != p[i] {
- return nil
- }
- i++
- }
- for dir != nil && i < len(p) {
- dir = dir.lookupLocal(p[i])
- i++
- }
- return dir
-}
-
-// DirEntry describes a directory entry. The Depth and Height values
-// are useful for presenting an entry in an indented fashion.
-//
-type DirEntry struct {
- Depth int // >= 0
- Height int // = DirList.MaxHeight - Depth, > 0
- Path string // includes Name, relative to DirList root
- Name string
- Synopsis string
-}
-
-type DirList struct {
- MaxHeight int // directory tree height, > 0
- List []DirEntry
-}
-
-// listing creates a (linear) directory listing from a directory tree.
-// If skipRoot is set, the root directory itself is excluded from the list.
-//
-func (root *Directory) listing(skipRoot bool) *DirList {
- if root == nil {
- return nil
- }
-
- // determine number of entries n and maximum height
- n := 0
- minDepth := 1 << 30 // infinity
- maxDepth := 0
- for d := range root.iter(skipRoot) {
- n++
- if minDepth > d.Depth {
- minDepth = d.Depth
- }
- if maxDepth < d.Depth {
- maxDepth = d.Depth
- }
- }
- maxHeight := maxDepth - minDepth + 1
-
- if n == 0 {
- return nil
- }
-
- // create list
- list := make([]DirEntry, n)
- i := 0
- for d := range root.iter(skipRoot) {
- p := &list[i]
- p.Depth = d.Depth - minDepth
- p.Height = maxHeight - p.Depth
- // the path is relative to root.Path - remove the root.Path
- // prefix (the prefix should always be present but avoid
- // crashes and check)
- path := d.Path
- if strings.HasPrefix(d.Path, root.Path) {
- path = d.Path[len(root.Path):]
- }
- // remove trailing separator if any - path must be relative
- if len(path) > 0 && path[0] == filepath.Separator {
- path = path[1:]
- }
- p.Path = filepath.ToSlash(path)
- p.Name = d.Name
- p.Synopsis = d.Text
- i++
- }
-
- return &DirList{maxHeight, list}
-}
diff --git a/vendor/github.com/visualfc/gotools/docview/docview.go b/vendor/github.com/visualfc/gotools/docview/docview.go
deleted file mode 100644
index 85d96b6..0000000
--- a/vendor/github.com/visualfc/gotools/docview/docview.go
+++ /dev/null
@@ -1,407 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package docview
-
-import (
- "bytes"
- "fmt"
- "go/build"
- "io"
- "log"
- "os"
- "path/filepath"
- "runtime"
- "strconv"
- "strings"
- "text/template"
- "time"
-
- "github.com/visualfc/gotools/command"
-)
-
-var Command = &command.Command{
- Run: runDocView,
- UsageLine: "docview [-mode] [-list|-find]",
- Short: "golang docview util",
- Long: `golang docview util`,
-}
-
-var goroot = runtime.GOROOT()
-
-var docViewFind string
-var docViewList string
-var docViewMode string
-
-func init() {
- Command.Flag.StringVar(&docViewFind, "find", "", "find package list, :pkg flag is best match")
- Command.Flag.StringVar(&docViewList, "list", "", "Print go packages list [pkg|cmd]")
- Command.Flag.StringVar(&docViewMode, "mode", "text", "Print mode [text|html|lite]")
-}
-
-func runDocView(cmd *command.Command, args []string) error {
- if docViewFind == "" && docViewList == "" {
- cmd.Usage()
- return os.ErrInvalid
- }
-
- var template string
- var info *Info
- if len(docViewList) > 0 {
- pkgPath := filepath.Join(goroot, "src", docViewList)
- if docViewList == "pkg" {
- _, err := os.Stat(pkgPath)
- if err != nil {
- pkgPath = filepath.Join(goroot, "src")
- }
- }
- info = NewListInfo(pkgPath)
- if info != nil {
- if docViewList == "pkg" {
- var filterList []DirEntry
- for _, v := range info.Dirs.List {
- if v.Path == "cmd" {
- continue
- }
- if strings.HasPrefix(v.Path, "cmd/") {
- continue
- }
- if strings.Contains(v.Path, "/testdata") {
- continue
- }
- filterList = append(filterList, v)
- }
- info.Dirs.List = filterList
- } else if docViewList == "cmd" {
- var filterList []DirEntry
- for _, v := range info.Dirs.List {
- if strings.Contains(v.Path, "/") {
- continue
- }
- if strings.Contains(v.Path, "internal") {
- continue
- }
- filterList = append(filterList, v)
- }
- info.Dirs.List = filterList
- }
- }
- switch docViewMode {
- case "html":
- template = listHTML
- case "lite":
- template = listLite
- case "text":
- template = listText
- default:
- template = listText
- }
- } else if len(docViewFind) > 0 {
- dir := NewSourceDir(goroot)
- info = dir.FindInfo(docViewFind)
- switch docViewMode {
- case "html":
- template = findHTML
- case "lite":
- template = findLite
- case "text":
- template = findText
- default:
- template = findText
- }
- }
- if info == nil {
- fmt.Fprintf(os.Stderr, "\n")
- command.SetExitStatus(3)
- command.Exit()
- }
- contents := info.GetPkgList(docViewMode, template)
- fmt.Fprintf(os.Stdout, "%s", contents)
- return nil
-}
-
-var (
- fs FileSystem = OS // the underlying file system
-)
-
-// Fake package file and name for commands. Contains the command documentation.
-const fakePkgFile = "doc.go"
-const fakePkgName = "documentation"
-
-func textFmt(w io.Writer, format string, x ...interface{}) {
- var buf bytes.Buffer
- fmt.Fprint(&buf, x)
- template.HTMLEscape(w, buf.Bytes())
-}
-
-func pathEscFmt(w io.Writer, format string, x ...interface{}) {
- switch v := x[0].(type) {
- case []byte:
- template.HTMLEscape(w, v)
- case string:
- template.HTMLEscape(w, []byte(filepath.ToSlash(v)))
- default:
- var buf bytes.Buffer
- fmt.Fprint(&buf, x)
- template.HTMLEscape(w, buf.Bytes())
- }
-}
-
-func htmlEscFmt(w io.Writer, format string, x ...interface{}) {
- switch v := x[0].(type) {
- case int:
- template.HTMLEscape(w, []byte(strconv.Itoa(v)))
- case []byte:
- template.HTMLEscape(w, v)
- case string:
- template.HTMLEscape(w, []byte(v))
- default:
- var buf bytes.Buffer
- fmt.Fprint(&buf, x)
- template.HTMLEscape(w, buf.Bytes())
- }
-}
-
-// Template formatter for "padding" format.
-func paddingFmt(w io.Writer, format string, x ...interface{}) {
- for i := x[0].(int); i > 0; i-- {
- fmt.Fprint(w, ` `)
- }
-}
-
-// Template formatter for "time" format.
-func timeFmt(w io.Writer, format string, x ...interface{}) {
- template.HTMLEscape(w, []byte(time.Unix(x[0].(int64)/1e9, 0).String()))
-}
-
-var fmap = template.FuncMap{
- "repeat": strings.Repeat,
-}
-
-func readTemplateData(name, data string) *template.Template {
- return template.Must(template.New(name).Funcs(fmap).Parse(data))
-}
-
-func readTemplateFile(name, path string) *template.Template {
- return template.Must(template.New(name).Funcs(fmap).ParseFiles(path))
-}
-
-func applyTemplate(t *template.Template, name string, data interface{}) []byte {
- var buf bytes.Buffer
- if err := t.Execute(&buf, data); err != nil {
- log.Printf("%s.Execute: %s", name, err)
- }
- return buf.Bytes()
-}
-
-type Info struct {
- Find string
- Best *DirEntry
- Dirs *DirList
-}
-
-type GodocDir struct {
- pkg *Directory
- cmd *Directory
- gopath []*Directory
-}
-
-func NewSourceDir(goroot string) *GodocDir {
- pkgPath := filepath.Join(goroot, "src/pkg")
- _, err := os.Stat(pkgPath)
- var cmd *Directory
- if err != nil {
- pkgPath = filepath.Join(goroot, "src")
- } else {
- cmd = newDirectory(filepath.Join(goroot, "src", "cmd"), nil, -1)
- }
- pkg := newDirectory(pkgPath, nil, -1)
- ctx := build.Default
- ctx.GOROOT = ""
- var gopath []*Directory
- for _, v := range ctx.SrcDirs() {
- gopath = append(gopath, newDirectory(v, nil, -1))
- }
- return &GodocDir{pkg, cmd, gopath}
-}
-
-func (dir *GodocDir) FindInfo(name string) *Info {
- max1, best1, list1 := FindDir(dir.pkg, name)
- max2, best2, list2 := FindDir(dir.cmd, name)
- var maxHeight int
- if max1 >= max2 {
- maxHeight = max1
- } else {
- maxHeight = max2
- }
- var best *DirEntry
- if best1 != nil {
- best = best1
- if best2 != nil {
- list2 = append(list2, *best2)
- }
- } else {
- best = best2
- }
- var list []DirEntry
- list = append(list, list1...)
- list = append(list, list2...)
- for _, v := range dir.gopath {
- max3, best3, list3 := FindDir(v, name)
- if max3 > maxHeight {
- maxHeight = max3
- }
- if best == nil {
- best = best3
- }
- list = append(list, list3...)
- }
- return &Info{name, best, &DirList{maxHeight, list}}
-}
-
-func FindDir(dir *Directory, pkgname string) (maxHeight int, best *DirEntry, list []DirEntry) {
- if dir == nil {
- return
- }
- dirList := dir.listing(true)
- max := len(dirList.List)
- maxHeight = dirList.MaxHeight
-
- for i := 0; i < max; i++ {
- name := dirList.List[i].Name
- path := filepath.ToSlash(dirList.List[i].Path)
- if name == pkgname || path == pkgname {
- best = &dirList.List[i]
- } else if strings.Contains(path, pkgname) {
- list = append(list, dirList.List[i])
- }
- }
- return
-}
-
-func appendList(list1, list2 []DirEntry) []DirEntry {
- list := list1
- max := len(list2)
- for i := 0; i < max; i++ {
- list = append(list, list2[i])
- }
- return list
-}
-
-func NewListInfo(root string) *Info {
- dir := newDirectory(root, nil, -1)
- if dir == nil {
- return nil
- }
- return &Info{"", nil, dir.listing(true)}
-}
-
-func FindPkgInfo(root string, pkgname string) *Info {
- dir := newDirectory(root, nil, -1)
- if dir == nil {
- return nil
- }
- dirList := dir.listing(true)
- if pkgname == "*" {
- return &Info{pkgname, nil, dirList}
- }
- var best DirEntry
- var list []DirEntry
- max := len(dirList.List)
- for i := 0; i < max; i++ {
- name := dirList.List[i].Name
- path := filepath.ToSlash(dirList.List[i].Path)
- if name == pkgname || path == pkgname {
- best = dirList.List[i]
- } else if strings.Contains(path, pkgname) {
- list = append(list, dirList.List[i])
- }
- }
- return &Info{pkgname, &best, &DirList{dirList.MaxHeight, list}}
-}
-
-func (info *Info) GetPkgList(name, templateData string) []byte {
- data := readTemplateData(name, templateData)
- return applyTemplate(data, "pkglist", info)
-}
-
-var listHTML = `
-
-Need more packages? The
-Package Dashboard
-provides a list of goinstallable packages.
-
-Subdirectories
-
-{{with .Dirs}}
-
-
-
- Name
-
- Synopsis
-
- {{range .List}}
-
- {{repeat " " .Depth}}
- {{html .Name}}
-
- {{html .Synopsis}}
-
- {{end}}
-
-
-{{end}}`
-
-var listText = `$list
-{{with .Dirs}}
-{{range .List}}{{.Path }}
-{{end}}
-{{end}}`
-
-var listLite = `$list{{with .Dirs}}{{range .List}},{{.Path}}{{end}}{{end}}`
-
-var findHTML = `
-
-Need more packages? The
-Package Dashboard
-provides a list of goinstallable packages.
-
-Subdirectories
-
-
- Best
-
- Synopsis
- {{with .Best}}
-
- {{.Path}}
-
- {{html .Synopsis}}
-
- {{end}}
- {{with .Dirs}}
-
- Match
-
- Synopsis
-
- {{range .List}}
-
- {{.Path}}
-
- {{html .Synopsis}}
-
- {{end}}
-
-
-{{end}}`
-
-var findText = `$best
-{{with .Best}}{{.Path}}{{end}}
-$list
-{{with .Dirs}}{{range .List}}{{.Path}}
-{{end}}{{end}}`
-
-var findLite = `$find,{{with .Best}}{{.Path}}{{end}}{{with .Dirs}}{{range .List}},{{.Path}}{{end}}{{end}}`
diff --git a/vendor/github.com/visualfc/gotools/docview/docx.go b/vendor/github.com/visualfc/gotools/docview/docx.go
deleted file mode 100644
index 01a9355..0000000
--- a/vendor/github.com/visualfc/gotools/docview/docx.go
+++ /dev/null
@@ -1,668 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package doc extracts source code documentation from a Go AST.
-package docview
-
-import (
- "go/ast"
- "go/token"
- "regexp"
- "sort"
- "strconv"
-)
-
-// ----------------------------------------------------------------------------
-
-type typeDoc struct {
- // len(decl.Specs) == 1, and the element type is *ast.TypeSpec
- // if the type declaration hasn't been seen yet, decl is nil
- decl *ast.GenDecl
- // values, factory functions, and methods associated with the type
- values []*ast.GenDecl // consts and vars
- factories map[string]*ast.FuncDecl
- methods map[string]*ast.FuncDecl
-}
-
-// docReader accumulates documentation for a single package.
-// It modifies the AST: Comments (declaration documentation)
-// that have been collected by the DocReader are set to nil
-// in the respective AST nodes so that they are not printed
-// twice (once when printing the documentation and once when
-// printing the corresponding AST node).
-//
-type docReader struct {
- doc *ast.CommentGroup // package documentation, if any
- pkgName string
- showAll bool
- values []*ast.GenDecl // consts and vars
- types map[string]*typeDoc
- funcs map[string]*ast.FuncDecl
- imports map[string]int
- bugs []*ast.CommentGroup
-}
-
-func (doc *docReader) init(pkgName string, showAll bool) {
- doc.pkgName = pkgName
- doc.showAll = showAll
- doc.imports = make(map[string]int)
- doc.types = make(map[string]*typeDoc)
- doc.funcs = make(map[string]*ast.FuncDecl)
-}
-
-func (doc *docReader) addDoc(comments *ast.CommentGroup) {
- if doc.doc == nil {
- // common case: just one package comment
- doc.doc = comments
- return
- }
-
- // More than one package comment: Usually there will be only
- // one file with a package comment, but it's better to collect
- // all comments than drop them on the floor.
- // (This code isn't particularly clever - no amortized doubling is
- // used - but this situation occurs rarely and is not time-critical.)
- n1 := len(doc.doc.List)
- n2 := len(comments.List)
- list := make([]*ast.Comment, n1+1+n2) // + 1 for separator line
- copy(list, doc.doc.List)
- list[n1] = &ast.Comment{token.NoPos, "//"} // separator line
- copy(list[n1+1:], comments.List)
- doc.doc = &ast.CommentGroup{list}
-}
-
-func (doc *docReader) addType(decl *ast.GenDecl) {
- spec := decl.Specs[0].(*ast.TypeSpec)
- typ := doc.lookupTypeDoc(spec.Name.Name)
- // typ should always be != nil since declared types
- // are always named - be conservative and check
- if typ != nil {
- // a type should be added at most once, so typ.decl
- // should be nil - if it isn't, simply overwrite it
- typ.decl = decl
- }
-}
-
-func (doc *docReader) lookupTypeDoc(name string) *typeDoc {
- if name == "" {
- return nil // no type docs for anonymous types
- }
- if tdoc, found := doc.types[name]; found {
- return tdoc
- }
- // type wasn't found - add one without declaration
- tdoc := &typeDoc{nil, nil, make(map[string]*ast.FuncDecl), make(map[string]*ast.FuncDecl)}
- doc.types[name] = tdoc
- return tdoc
-}
-
-func docBaseTypeName(typ ast.Expr, showAll bool) string {
- switch t := typ.(type) {
- case *ast.Ident:
- // if the type is not exported, the effect to
- // a client is as if there were no type name
- if showAll || t.IsExported() {
- return t.Name
- }
- case *ast.StarExpr:
- return docBaseTypeName(t.X, showAll)
- }
- return ""
-}
-
-func (doc *docReader) addValue(decl *ast.GenDecl) {
- // determine if decl should be associated with a type
- // Heuristic: For each typed entry, determine the type name, if any.
- // If there is exactly one type name that is sufficiently
- // frequent, associate the decl with the respective type.
- domName := ""
- domFreq := 0
- prev := ""
- for _, s := range decl.Specs {
- if v, ok := s.(*ast.ValueSpec); ok {
- name := ""
- switch {
- case v.Type != nil:
- // a type is present; determine its name
- name = docBaseTypeName(v.Type, doc.showAll)
- case decl.Tok == token.CONST:
- // no type is present but we have a constant declaration;
- // use the previous type name (w/o more type information
- // we cannot handle the case of unnamed variables with
- // initializer expressions except for some trivial cases)
- name = prev
- }
- if name != "" {
- // entry has a named type
- if domName != "" && domName != name {
- // more than one type name - do not associate
- // with any type
- domName = ""
- break
- }
- domName = name
- domFreq++
- }
- prev = name
- }
- }
-
- // determine values list
- const threshold = 0.75
- values := &doc.values
- if domName != "" && domFreq >= int(float64(len(decl.Specs))*threshold) {
- // typed entries are sufficiently frequent
- typ := doc.lookupTypeDoc(domName)
- if typ != nil {
- values = &typ.values // associate with that type
- }
- }
-
- *values = append(*values, decl)
-}
-
-// Helper function to set the table entry for function f. Makes sure that
-// at least one f with associated documentation is stored in table, if there
-// are multiple f's with the same name.
-func setFunc(table map[string]*ast.FuncDecl, f *ast.FuncDecl) {
- name := f.Name.Name
- if g, exists := table[name]; exists && g.Doc != nil {
- // a function with the same name has already been registered;
- // since it has documentation, assume f is simply another
- // implementation and ignore it
- // TODO(gri) consider collecting all functions, or at least
- // all comments
- return
- }
- // function doesn't exist or has no documentation; use f
- table[name] = f
-}
-
-func (doc *docReader) addFunc(fun *ast.FuncDecl) {
- name := fun.Name.Name
-
- // determine if it should be associated with a type
- if fun.Recv != nil {
- // method
- typ := doc.lookupTypeDoc(docBaseTypeName(fun.Recv.List[0].Type, doc.showAll))
- if typ != nil {
- // exported receiver type
- setFunc(typ.methods, fun)
- }
- // otherwise don't show the method
- // TODO(gri): There may be exported methods of non-exported types
- // that can be called because of exported values (consts, vars, or
- // function results) of that type. Could determine if that is the
- // case and then show those methods in an appropriate section.
- return
- }
-
- // perhaps a factory function
- // determine result type, if any
- if fun.Type.Results.NumFields() >= 1 {
- res := fun.Type.Results.List[0]
- if len(res.Names) <= 1 {
- // exactly one (named or anonymous) result associated
- // with the first type in result signature (there may
- // be more than one result)
- tname := docBaseTypeName(res.Type, doc.showAll)
- typ := doc.lookupTypeDoc(tname)
- if typ != nil {
- // named and exported result type
-
- // Work-around for failure of heuristic: In package os
- // too many functions are considered factory functions
- // for the Error type. Eliminate manually for now as
- // this appears to be the only important case in the
- // current library where the heuristic fails.
- if doc.pkgName == "os" && tname == "Error" &&
- name != "NewError" && name != "NewSyscallError" {
- // not a factory function for os.Error
- setFunc(doc.funcs, fun) // treat as ordinary function
- return
- }
-
- setFunc(typ.factories, fun)
- return
- }
- }
- }
-
- // ordinary function
- setFunc(doc.funcs, fun)
-}
-
-func (doc *docReader) addDecl(decl ast.Decl) {
- switch d := decl.(type) {
- case *ast.GenDecl:
- if len(d.Specs) > 0 {
- switch d.Tok {
- case token.IMPORT:
- // imports are handled individually
- for _, spec := range d.Specs {
- if s, ok := spec.(*ast.ImportSpec); ok {
- if import_, err := strconv.Unquote(s.Path.Value); err == nil {
- doc.imports[import_] = 1
- }
- }
- }
- case token.CONST, token.VAR:
- // constants and variables are always handled as a group
- doc.addValue(d)
- case token.TYPE:
- // types are handled individually
- for _, spec := range d.Specs {
- // make a (fake) GenDecl node for this TypeSpec
- // (we need to do this here - as opposed to just
- // for printing - so we don't lose the GenDecl
- // documentation)
- //
- // TODO(gri): Consider just collecting the TypeSpec
- // node (and copy in the GenDecl.doc if there is no
- // doc in the TypeSpec - this is currently done in
- // makeTypeDocs below). Simpler data structures, but
- // would lose GenDecl documentation if the TypeSpec
- // has documentation as well.
- doc.addType(&ast.GenDecl{d.Doc, d.Pos(), token.TYPE, token.NoPos, []ast.Spec{spec}, token.NoPos})
- // A new GenDecl node is created, no need to nil out d.Doc.
- }
- }
- }
- case *ast.FuncDecl:
- doc.addFunc(d)
- }
-}
-
-func copyCommentList(list []*ast.Comment) []*ast.Comment {
- return append([]*ast.Comment(nil), list...)
-}
-
-var (
- bug_markers = regexp.MustCompile("^/[/*][ \t]*BUG\\(.*\\):[ \t]*") // BUG(uid):
- bug_content = regexp.MustCompile("[^ \n\r\t]+") // at least one non-whitespace char
-)
-
-// addFile adds the AST for a source file to the docReader.
-// Adding the same AST multiple times is a no-op.
-//
-func (doc *docReader) addFile(src *ast.File) {
- // add package documentation
- if src.Doc != nil {
- doc.addDoc(src.Doc)
- src.Doc = nil // doc consumed - remove from ast.File node
- }
-
- // add all declarations
- for _, decl := range src.Decls {
- doc.addDecl(decl)
- }
-
- // collect BUG(...) comments
- for _, c := range src.Comments {
- text := c.List[0].Text
- if m := bug_markers.FindStringIndex(text); m != nil {
- // found a BUG comment; maybe empty
- if btxt := text[m[1]:]; bug_content.MatchString(btxt) {
- // non-empty BUG comment; collect comment without BUG prefix
- list := copyCommentList(c.List)
- list[0].Text = text[m[1]:]
- doc.bugs = append(doc.bugs, &ast.CommentGroup{list})
- }
- }
- }
- src.Comments = nil // consumed unassociated comments - remove from ast.File node
-}
-
-func NewFileDoc(file *ast.File, showAll bool) *PackageDoc {
- var r docReader
- r.init(file.Name.Name, showAll)
- r.addFile(file)
- return r.newDoc("", nil)
-}
-
-func NewPackageDoc(pkg *ast.Package, importpath string, showAll bool) *PackageDoc {
- var r docReader
- r.init(pkg.Name, showAll)
- filenames := make([]string, len(pkg.Files))
- i := 0
- for filename, f := range pkg.Files {
- r.addFile(f)
- filenames[i] = filename
- i++
- }
- return r.newDoc(importpath, filenames)
-}
-
-// ----------------------------------------------------------------------------
-// Conversion to external representation
-
-// ValueDoc is the documentation for a group of declared
-// values, either vars or consts.
-//
-type ValueDoc struct {
- Doc string
- Decl *ast.GenDecl
- order int
-}
-
-type sortValueDoc []*ValueDoc
-
-func (p sortValueDoc) Len() int { return len(p) }
-func (p sortValueDoc) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
-
-func declName(d *ast.GenDecl) string {
- if len(d.Specs) != 1 {
- return ""
- }
-
- switch v := d.Specs[0].(type) {
- case *ast.ValueSpec:
- return v.Names[0].Name
- case *ast.TypeSpec:
- return v.Name.Name
- }
-
- return ""
-}
-
-func (p sortValueDoc) Less(i, j int) bool {
- // sort by name
- // pull blocks (name = "") up to top
- // in original order
- if ni, nj := declName(p[i].Decl), declName(p[j].Decl); ni != nj {
- return ni < nj
- }
- return p[i].order < p[j].order
-}
-
-func makeValueDocs(list []*ast.GenDecl, tok token.Token) []*ValueDoc {
- d := make([]*ValueDoc, len(list)) // big enough in any case
- n := 0
- for i, decl := range list {
- if decl.Tok == tok {
- d[n] = &ValueDoc{decl.Doc.Text(), decl, i}
- n++
- decl.Doc = nil // doc consumed - removed from AST
- }
- }
- d = d[0:n]
- sort.Sort(sortValueDoc(d))
- return d
-}
-
-// FuncDoc is the documentation for a func declaration,
-// either a top-level function or a method function.
-//
-type FuncDoc struct {
- Doc string
- Recv ast.Expr // TODO(rsc): Would like string here
- Name string
- Decl *ast.FuncDecl
-}
-
-type sortFuncDoc []*FuncDoc
-
-func (p sortFuncDoc) Len() int { return len(p) }
-func (p sortFuncDoc) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
-func (p sortFuncDoc) Less(i, j int) bool { return p[i].Name < p[j].Name }
-
-func makeFuncDocs(m map[string]*ast.FuncDecl) []*FuncDoc {
- d := make([]*FuncDoc, len(m))
- i := 0
- for _, f := range m {
- doc := new(FuncDoc)
- doc.Doc = f.Doc.Text()
- f.Doc = nil // doc consumed - remove from ast.FuncDecl node
- if f.Recv != nil {
- doc.Recv = f.Recv.List[0].Type
- }
- doc.Name = f.Name.Name
- doc.Decl = f
- d[i] = doc
- i++
- }
- sort.Sort(sortFuncDoc(d))
- return d
-}
-
-// TypeDoc is the documentation for a declared type.
-// Consts and Vars are sorted lists of constants and variables of (mostly) that type.
-// Factories is a sorted list of factory functions that return that type.
-// Methods is a sorted list of method functions on that type.
-type TypeDoc struct {
- Doc string
- Type *ast.TypeSpec
- Consts []*ValueDoc
- Vars []*ValueDoc
- Funcs []*FuncDoc
- Methods []*FuncDoc
- Decl *ast.GenDecl
- order int
-}
-
-type sortTypeDoc []*TypeDoc
-
-func (p sortTypeDoc) Len() int { return len(p) }
-func (p sortTypeDoc) Swap(i, j int) { p[i], p[j] = p[j], p[i] }
-func (p sortTypeDoc) Less(i, j int) bool {
- // sort by name
- // pull blocks (name = "") up to top
- // in original order
- if ni, nj := p[i].Type.Name.Name, p[j].Type.Name.Name; ni != nj {
- return ni < nj
- }
- return p[i].order < p[j].order
-}
-
-// NOTE(rsc): This would appear not to be correct for type ( )
-// blocks, but the doc extractor above has split them into
-// individual declarations.
-func (doc *docReader) makeTypeDocs(m map[string]*typeDoc) []*TypeDoc {
- d := make([]*TypeDoc, len(m))
- i := 0
- for _, old := range m {
- // all typeDocs should have a declaration associated with
- // them after processing an entire package - be conservative
- // and check
- if decl := old.decl; decl != nil {
- typespec := decl.Specs[0].(*ast.TypeSpec)
- t := new(TypeDoc)
- doc := typespec.Doc
- typespec.Doc = nil // doc consumed - remove from ast.TypeSpec node
- if doc == nil {
- // no doc associated with the spec, use the declaration doc, if any
- doc = decl.Doc
- }
- decl.Doc = nil // doc consumed - remove from ast.Decl node
- t.Doc = doc.Text()
- t.Type = typespec
- t.Consts = makeValueDocs(old.values, token.CONST)
- t.Vars = makeValueDocs(old.values, token.VAR)
- t.Funcs = makeFuncDocs(old.factories)
- t.Methods = makeFuncDocs(old.methods)
- t.Decl = old.decl
- t.order = i
- d[i] = t
- i++
- } else {
- // no corresponding type declaration found - move any associated
- // values, factory functions, and methods back to the top-level
- // so that they are not lost (this should only happen if a package
- // file containing the explicit type declaration is missing or if
- // an unqualified type name was used after a "." import)
- // 1) move values
- doc.values = append(doc.values, old.values...)
- // 2) move factory functions
- for name, f := range old.factories {
- doc.funcs[name] = f
- }
- // 3) move methods
- for name, f := range old.methods {
- // don't overwrite functions with the same name
- if _, found := doc.funcs[name]; !found {
- doc.funcs[name] = f
- }
- }
- }
- }
- d = d[0:i] // some types may have been ignored
- sort.Sort(sortTypeDoc(d))
- return d
-}
-
-func makeBugDocs(list []*ast.CommentGroup) []string {
- d := make([]string, len(list))
- for i, g := range list {
- d[i] = g.Text()
- }
- return d
-}
-
-// PackageDoc is the documentation for an entire package.
-//
-type PackageDoc struct {
- PackageName string
- ImportPath string
- Imports []string
- Filenames []string
- Doc string
- Consts []*ValueDoc
- Types []*TypeDoc
- Vars []*ValueDoc
- Funcs []*FuncDoc
- Bugs []string
-}
-
-// newDoc returns the accumulated documentation for the package.
-//
-func (doc *docReader) newDoc(importpath string, filenames []string) *PackageDoc {
- p := new(PackageDoc)
- p.PackageName = doc.pkgName
- p.ImportPath = importpath
- sort.Strings(filenames)
- p.Filenames = filenames
- p.Doc = doc.doc.Text()
- p.Imports = sortedKeys(doc.imports)
- // makeTypeDocs may extend the list of doc.values and
- // doc.funcs and thus must be called before any other
- // function consuming those lists
- p.Types = doc.makeTypeDocs(doc.types)
- p.Consts = makeValueDocs(doc.values, token.CONST)
- p.Vars = makeValueDocs(doc.values, token.VAR)
- p.Funcs = makeFuncDocs(doc.funcs)
- p.Bugs = makeBugDocs(doc.bugs)
- return p
-}
-
-func sortedKeys(m map[string]int) []string {
- list := make([]string, len(m))
- i := 0
- for key := range m {
- list[i] = key
- i++
- }
- sort.Strings(list)
- return list
-}
-
-// ----------------------------------------------------------------------------
-// Filtering by name
-
-type Filter func(string) bool
-
-func matchFields(fields *ast.FieldList, f Filter) bool {
- if fields != nil {
- for _, field := range fields.List {
- for _, name := range field.Names {
- if f(name.Name) {
- return true
- }
- }
- }
- }
- return false
-}
-
-func matchDecl(d *ast.GenDecl, f Filter) bool {
- for _, d := range d.Specs {
- switch v := d.(type) {
- case *ast.ValueSpec:
- for _, name := range v.Names {
- if f(name.Name) {
- return true
- }
- }
- case *ast.TypeSpec:
- if f(v.Name.Name) {
- return true
- }
- switch t := v.Type.(type) {
- case *ast.StructType:
- if matchFields(t.Fields, f) {
- return true
- }
- case *ast.InterfaceType:
- if matchFields(t.Methods, f) {
- return true
- }
- }
- }
- }
- return false
-}
-
-func filterValueDocs(a []*ValueDoc, f Filter) []*ValueDoc {
- w := 0
- for _, vd := range a {
- if matchDecl(vd.Decl, f) {
- a[w] = vd
- w++
- }
- }
- return a[0:w]
-}
-
-func filterFuncDocs(a []*FuncDoc, f Filter) []*FuncDoc {
- w := 0
- for _, fd := range a {
- if f(fd.Name) {
- a[w] = fd
- w++
- }
- }
- return a[0:w]
-}
-
-func filterTypeDocs(a []*TypeDoc, f Filter) []*TypeDoc {
- w := 0
- for _, td := range a {
- n := 0 // number of matches
- if matchDecl(td.Decl, f) {
- n = 1
- } else {
- // type name doesn't match, but we may have matching consts, vars, factories or methods
- td.Consts = filterValueDocs(td.Consts, f)
- td.Vars = filterValueDocs(td.Vars, f)
- td.Funcs = filterFuncDocs(td.Funcs, f)
- td.Methods = filterFuncDocs(td.Methods, f)
- n += len(td.Consts) + len(td.Vars) + len(td.Funcs) + len(td.Methods)
- }
- if n > 0 {
- a[w] = td
- w++
- }
- }
- return a[0:w]
-}
-
-// Filter eliminates documentation for names that don't pass through the filter f.
-// TODO: Recognize "Type.Method" as a name.
-//
-func (p *PackageDoc) Filter(f Filter) {
- p.Consts = filterValueDocs(p.Consts, f)
- p.Vars = filterValueDocs(p.Vars, f)
- p.Types = filterTypeDocs(p.Types, f)
- p.Funcs = filterFuncDocs(p.Funcs, f)
- p.Doc = "" // don't show top-level package doc
-}
diff --git a/vendor/github.com/visualfc/gotools/docview/filesystem.go b/vendor/github.com/visualfc/gotools/docview/filesystem.go
deleted file mode 100644
index dc60649..0000000
--- a/vendor/github.com/visualfc/gotools/docview/filesystem.go
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This file defines types for abstract file system access and
-// provides an implementation accessing the file system of the
-// underlying OS.
-
-package docview
-
-import (
- "fmt"
- "io"
- "io/ioutil"
- "os"
-)
-
-// The FileSystem interface specifies the methods godoc is using
-// to access the file system for which it serves documentation.
-type FileSystem interface {
- Open(path string) (io.ReadCloser, error)
- Lstat(path string) (os.FileInfo, error)
- Stat(path string) (os.FileInfo, error)
- ReadDir(path string) ([]os.FileInfo, error)
-}
-
-// ReadFile reads the file named by path from fs and returns the contents.
-func ReadFile(fs FileSystem, path string) ([]byte, error) {
- rc, err := fs.Open(path)
- if err != nil {
- return nil, err
- }
- defer rc.Close()
- return ioutil.ReadAll(rc)
-}
-
-// ----------------------------------------------------------------------------
-// OS-specific FileSystem implementation
-
-var OS FileSystem = osFS{}
-
-// osFS is the OS-specific implementation of FileSystem
-type osFS struct{}
-
-func (osFS) Open(path string) (io.ReadCloser, error) {
- f, err := os.Open(path)
- if err != nil {
- return nil, err
- }
- fi, err := f.Stat()
- if err != nil {
- return nil, err
- }
- if fi.IsDir() {
- return nil, fmt.Errorf("Open: %s is a directory", path)
- }
- return f, nil
-}
-
-func (osFS) Lstat(path string) (os.FileInfo, error) {
- return os.Lstat(path)
-}
-
-func (osFS) Stat(path string) (os.FileInfo, error) {
- return os.Stat(path)
-}
-
-func (osFS) ReadDir(path string) ([]os.FileInfo, error) {
- return ioutil.ReadDir(path) // is sorted
-}
diff --git a/vendor/github.com/visualfc/gotools/finddoc/finddoc.go b/vendor/github.com/visualfc/gotools/finddoc/finddoc.go
deleted file mode 100644
index dfe2b75..0000000
--- a/vendor/github.com/visualfc/gotools/finddoc/finddoc.go
+++ /dev/null
@@ -1,609 +0,0 @@
-// Copyright 2013 The rspace Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Doc is a simple document printer that produces the doc comments for its
-// argument symbols, plus a link to the full documentation and a pointer to
-// the source. It has a more Go-like UI than godoc. It can also search for
-// symbols by looking in all packages, and case is ignored. For instance:
-// doc isupper
-// will find unicode.IsUpper.
-//
-// The -pkg flag retrieves package-level doc comments only.
-//
-// Usage:
-// doc pkg.name # "doc io.Writer"
-// doc pkg name # "doc fmt Printf"
-// doc name # "doc isupper" (finds unicode.IsUpper)
-// doc -pkg pkg # "doc fmt"
-//
-// The pkg is the last element of the package path;
-// no slashes (ast.Node not go/ast.Node).
-//
-// Flags
-// -c(onst) -f(unc) -i(nterface) -m(ethod) -s(truct) -t(ype) -v(ar)
-// restrict hits to declarations of the corresponding kind.
-// Flags
-// -doc -src -url
-// restrict printing to the documentation, source path, or godoc URL.
-package finddoc
-
-import (
- "bytes"
- "fmt"
- "go/ast"
- "go/parser"
- "go/printer"
- "go/token"
- "os"
- "path"
- "path/filepath"
- "regexp"
- "runtime"
- "strings"
-
- "github.com/visualfc/gotools/command"
- _ "golang.org/x/tools/go/gcimporter"
- "golang.org/x/tools/go/types"
-)
-
-const usageDoc = `Find documentation for names.
-usage:
- doc pkg.name # "doc io.Writer"
- doc pkg name # "doc fmt Printf"
- doc name # "doc isupper" finds unicode.IsUpper
- doc -pkg pkg # "doc fmt"
- doc -r expr # "doc -r '.*exported'"
-pkg is the last component of any package, e.g. fmt, parser
-name is the name of an exported symbol; case is ignored in matches.
-
-The name may also be a regular expression to select which names
-to match. In regular expression searches, case is ignored and
-the pattern must match the entire name, so ".?print" will match
-Print, Fprint and Sprint but not Fprintf.
-
-Flags
- -c(onst) -f(unc) -i(nterface) -m(ethod) -s(truct) -t(ype) -v(ar)
-restrict hits to declarations of the corresponding kind.
-Flags
- -doc -src -url
-restrict printing to the documentation, source path, or godoc URL.
-Flag
- -r
-takes a single argument (no package), a name or regular expression
-to search for in all packages.
-`
-
-var Command = &command.Command{
- Run: runDoc,
- UsageLine: "finddoc [pkg.name|pkg name|-pkg name]",
- Short: "golang doc lookup",
- Long: usageDoc,
-}
-
-var (
- // If none is set, all are set.
- docFlag bool
- srcFlag bool
- urlFlag bool
- regexpFlag bool
- matchWordFlag bool
- matchCaseFlag bool
- constantFlag bool
- functionFlag bool
- interfaceFlag bool
- methodFlag bool
- packageFlag bool
- structFlag bool
- typeFlag bool
- variableFlag bool
- urlHeadTag string
-)
-
-func init() {
- Command.Flag.BoolVar(&docFlag, "doc", false, "restrict output to documentation only")
- Command.Flag.BoolVar(&srcFlag, "src", false, "restrict output to source file only")
- Command.Flag.BoolVar(&urlFlag, "url", false, "restrict output to godoc URL only")
- Command.Flag.BoolVar(®expFlag, "r", false, "single argument is a regular expression for a name")
- Command.Flag.BoolVar(&matchWordFlag, "word", false, "search match whole word")
- Command.Flag.BoolVar(&matchCaseFlag, "case", false, "search match case")
-
- Command.Flag.BoolVar(&constantFlag, "const", false, "show doc for consts only")
- Command.Flag.BoolVar(&functionFlag, "func", false, "show doc for funcs only")
- Command.Flag.BoolVar(&interfaceFlag, "interface", false, "show doc for interfaces only")
- Command.Flag.BoolVar(&methodFlag, "method", false, "show doc for methods only")
- Command.Flag.BoolVar(&packageFlag, "package", false, "show top-level package doc only")
- Command.Flag.BoolVar(&structFlag, "struct", false, "show doc for structs only")
- Command.Flag.BoolVar(&typeFlag, "type", false, "show doc for types only")
- Command.Flag.BoolVar(&variableFlag, "var", false, "show doc for vars only")
-
- Command.Flag.BoolVar(&constantFlag, "c", false, "alias for -const")
- Command.Flag.BoolVar(&functionFlag, "f", false, "alias for -func")
- Command.Flag.BoolVar(&interfaceFlag, "i", false, "alias for -interface")
- Command.Flag.BoolVar(&methodFlag, "m", false, "alias for -method")
- Command.Flag.BoolVar(&packageFlag, "pkg", false, "alias for -package")
- Command.Flag.BoolVar(&structFlag, "s", false, "alias for -struct")
- Command.Flag.BoolVar(&typeFlag, "t", false, "alias for -type")
- Command.Flag.BoolVar(&variableFlag, "v", false, "alias for -var")
-
- Command.Flag.StringVar(&urlHeadTag, "urltag", "", "url head tag, liteide provate")
-}
-
-func runDoc(cmd *command.Command, args []string) error {
- if !(constantFlag || functionFlag || interfaceFlag || methodFlag || packageFlag || structFlag || typeFlag || variableFlag) { // none set
- constantFlag = true
- functionFlag = true
- methodFlag = true
- // Not package! It's special.
- typeFlag = true
- variableFlag = true
- }
- if !(docFlag || srcFlag || urlFlag) {
- docFlag = true
- srcFlag = true
- urlFlag = true
- }
- var pkg, name string
- switch len(args) {
- case 1:
- if packageFlag {
- pkg = args[0]
- } else if regexpFlag {
- name = args[0]
- } else if strings.Contains(args[0], ".") {
- pkg, name = split(args[0])
- } else {
- name = args[0]
- }
- case 2:
- if packageFlag {
- cmd.Usage()
- }
- pkg, name = args[0], args[1]
- default:
- cmd.Usage()
- return os.ErrInvalid
- }
- if strings.Contains(pkg, "/") {
- fmt.Fprintf(os.Stderr, "doc: package name cannot contain slash (TODO)\n")
- os.Exit(2)
- }
- for _, path := range Paths(pkg) {
- lookInDirectory(path, name)
- }
- return nil
-}
-
-var slash = string(filepath.Separator)
-var slashDot = string(filepath.Separator) + "."
-var goRootSrcPkg = filepath.Join(runtime.GOROOT(), "src", "pkg")
-var goRootSrcCmd = filepath.Join(runtime.GOROOT(), "src", "cmd")
-var goPaths = SplitGopath()
-
-func split(arg string) (pkg, name string) {
- dot := strings.IndexRune(arg, '.') // We know there's one there.
- return arg[0:dot], arg[dot+1:]
-}
-
-func Paths(pkg string) []string {
- pkgs := pathsFor(runtime.GOROOT(), pkg)
- for _, root := range goPaths {
- pkgs = append(pkgs, pathsFor(root, pkg)...)
- }
- return pkgs
-}
-
-func SplitGopath() []string {
- gopath := os.Getenv("GOPATH")
- if gopath == "" {
- return nil
- }
- return strings.Split(gopath, string(os.PathListSeparator))
-}
-
-// pathsFor recursively walks the tree looking for possible directories for the package:
-// those whose basename is pkg.
-func pathsFor(root, pkg string) []string {
- root = path.Join(root, "src")
- pkgPaths := make([]string, 0, 10)
- visit := func(pathName string, f os.FileInfo, err error) error {
- if err != nil {
- return nil
- }
- // One package per directory. Ignore the files themselves.
- if !f.IsDir() {
- return nil
- }
- // No .hg or other dot nonsense please.
- if strings.Contains(pathName, slashDot) {
- return filepath.SkipDir
- }
- // Is the last element of the path correct
- if pkg == "" || filepath.Base(pathName) == pkg {
- pkgPaths = append(pkgPaths, pathName)
- }
- return nil
- }
-
- filepath.Walk(root, visit)
- return pkgPaths
-}
-
-// lookInDirectory looks in the package (if any) in the directory for the named exported identifier.
-func lookInDirectory(directory, name string) {
- fset := token.NewFileSet()
- pkgs, _ := parser.ParseDir(fset, directory, nil, parser.ParseComments) // Ignore the error.
- for _, pkg := range pkgs {
- if pkg.Name == "main" || strings.HasSuffix(pkg.Name, "_test") {
- continue
- }
- doPackage(pkg, fset, name)
- }
-}
-
-// prefixDirectory places the directory name on the beginning of each name in the list.
-func prefixDirectory(directory string, names []string) {
- if directory != "." {
- for i, name := range names {
- names[i] = filepath.Join(directory, name)
- }
- }
-}
-
-// File is a wrapper for the state of a file used in the parser.
-// The parse tree walkers are all methods of this type.
-type File struct {
- fset *token.FileSet
- name string // Name of file.
- ident string // Identifier we are searching for.
- lowerIdent string // lower ident
- regexp *regexp.Regexp
- pathPrefix string // Prefix from GOROOT/GOPATH.
- urlPrefix string // Start of corresponding URL for golang.org or godoc.org.
- file *ast.File
- comments ast.CommentMap
- defs map[*ast.Ident]types.Object
- doPrint bool
- found bool
- allFiles []*File // All files in the package.
-}
-
-// doPackage analyzes the single package constructed from the named files, looking for
-// the definition of ident.
-func doPackage(pkg *ast.Package, fset *token.FileSet, ident string) {
- var files []*File
- found := false
- for name, astFile := range pkg.Files {
- if packageFlag && astFile.Doc == nil {
- continue
- }
- file := &File{
- fset: fset,
- name: name,
- ident: ident,
- lowerIdent: strings.ToLower(ident),
- file: astFile,
- comments: ast.NewCommentMap(fset, astFile, astFile.Comments),
- }
- if regexpFlag && regexp.QuoteMeta(ident) != ident {
- // It's a regular expression.
- var err error
- file.regexp, err = regexp.Compile("^(?i:" + ident + ")$")
- if err != nil {
- fmt.Fprintf(os.Stderr, "regular expression `%s`:", err)
- os.Exit(2)
- }
- }
- switch {
- case strings.HasPrefix(name, goRootSrcPkg):
- file.urlPrefix = "http://golang.org/pkg"
- file.pathPrefix = goRootSrcPkg
- case strings.HasPrefix(name, goRootSrcCmd):
- file.urlPrefix = "http://golang.org/cmd"
- file.pathPrefix = goRootSrcCmd
- default:
- file.urlPrefix = "http://godoc.org"
- for _, path := range goPaths {
- p := filepath.Join(path, "src")
- if strings.HasPrefix(name, p) {
- file.pathPrefix = p
- break
- }
- }
- }
- file.urlPrefix = urlHeadTag + file.urlPrefix
- files = append(files, file)
- if found {
- continue
- }
- file.doPrint = false
- if packageFlag {
- file.pkgComments()
- } else {
- ast.Walk(file, file.file)
- if file.found {
- found = true
- }
- }
- }
-
- if !found {
- return
- }
-
- // By providing the Context with our own error function, it will continue
- // past the first error. There is no need for that function to do anything.
- config := types.Config{
- Error: func(error) {},
- }
- info := &types.Info{
- Defs: make(map[*ast.Ident]types.Object),
- }
- path := ""
- var astFiles []*ast.File
- for name, astFile := range pkg.Files {
- if path == "" {
- path = name
- }
- astFiles = append(astFiles, astFile)
- }
- config.Check(path, fset, astFiles, info) // Ignore errors.
-
- // We need to search all files for methods, so record the full list in each file.
- for _, file := range files {
- file.allFiles = files
- }
- for _, file := range files {
- file.doPrint = true
- file.defs = info.Defs
- if packageFlag {
- file.pkgComments()
- } else {
- ast.Walk(file, file.file)
- }
- }
-}
-
-// Visit implements the ast.Visitor interface.
-func (f *File) Visit(node ast.Node) ast.Visitor {
- switch n := node.(type) {
- case *ast.GenDecl:
- // Variables, constants, types.
- for _, spec := range n.Specs {
- switch spec := spec.(type) {
- case *ast.ValueSpec:
- if constantFlag && n.Tok == token.CONST || variableFlag && n.Tok == token.VAR {
- for _, ident := range spec.Names {
- if f.match(ident.Name) {
- f.printNode(n, ident, f.nameURL(ident.Name))
- break
- }
- }
- }
- case *ast.TypeSpec:
- // If there is only one Spec, there are probably no parens and the
- // comment we want appears before the type keyword, bound to
- // the GenDecl. If the Specs are parenthesized, the comment we want
- // is bound to the Spec. Hence we dig into the GenDecl to the Spec,
- // but only if there are no parens.
- node := ast.Node(n)
- if n.Lparen.IsValid() {
- node = spec
- }
- if f.match(spec.Name.Name) {
- if typeFlag {
- f.printNode(node, spec.Name, f.nameURL(spec.Name.Name))
- } else {
- switch spec.Type.(type) {
- case *ast.InterfaceType:
- if interfaceFlag {
- f.printNode(node, spec.Name, f.nameURL(spec.Name.Name))
- }
- case *ast.StructType:
- if structFlag {
- f.printNode(node, spec.Name, f.nameURL(spec.Name.Name))
- }
- }
- }
- if f.doPrint && f.defs[spec.Name] != nil && f.defs[spec.Name].Type() != nil {
- ms := types.NewMethodSet(f.defs[spec.Name].Type()) //.Type().MethodSet()
- if ms.Len() == 0 {
- ms = types.NewMethodSet(types.NewPointer(f.defs[spec.Name].Type())) //.MethodSet()
- }
- f.methodSet(ms)
- }
- }
- case *ast.ImportSpec:
- continue // Don't care.
- }
- }
- case *ast.FuncDecl:
- // Methods, top-level functions.
- if f.match(n.Name.Name) {
- n.Body = nil // Do not print the function body.
- if methodFlag && n.Recv != nil {
- f.printNode(n, n.Name, f.methodURL(n.Recv.List[0].Type, n.Name.Name))
- } else if functionFlag && n.Recv == nil {
- f.printNode(n, n.Name, f.nameURL(n.Name.Name))
- }
- }
- }
- return f
-}
-
-func (f *File) match(name string) bool {
- // name must be exported.
- if !ast.IsExported(name) {
- return false
- }
- if f.regexp == nil {
- if matchWordFlag {
- if matchCaseFlag {
- return name == f.ident
- }
- return strings.ToLower(name) == f.lowerIdent
- } else {
- if matchCaseFlag {
- return strings.Contains(name, f.ident)
- }
- return strings.Contains(strings.ToLower(name), f.lowerIdent)
- }
- }
- return f.regexp.MatchString(name)
-}
-
-func (f *File) printNode(node, ident ast.Node, url string) {
- if !f.doPrint {
- f.found = true
- return
- }
- fmt.Printf("%s%s%s", url, f.sourcePos(f.fset.Position(ident.Pos())), f.docs(node))
-}
-
-func (f *File) docs(node ast.Node) []byte {
- if !docFlag {
- return nil
- }
- commentedNode := printer.CommentedNode{Node: node}
- if comments := f.comments.Filter(node).Comments(); comments != nil {
- commentedNode.Comments = comments
- }
- var b bytes.Buffer
- printer.Fprint(&b, f.fset, &commentedNode)
- b.Write([]byte("\n\n")) // Add a blank line between entries if we print documentation.
- return b.Bytes()
-}
-
-func (f *File) pkgComments() {
- doc := f.file.Doc
- if doc == nil {
- return
- }
- url := ""
- if urlFlag {
- url = f.packageURL() + "\n"
- }
- docText := ""
- if docFlag {
- docText = fmt.Sprintf("package %s\n%s\n\n", f.file.Name.Name, doc.Text())
- }
- fmt.Printf("%s%s%s", url, f.sourcePos(f.fset.Position(doc.Pos())), docText)
-}
-
-func (f *File) packageURL() string {
- s := strings.TrimPrefix(f.name, f.pathPrefix)
- // Now we have a path with a final file name. Drop it.
- if i := strings.LastIndex(s, slash); i > 0 {
- s = s[:i+1]
- }
- return f.urlPrefix + s
-}
-
-func (f *File) packageName() string {
- s := strings.TrimPrefix(f.name, f.pathPrefix)
- // Now we have a path with a final file name. Drop it.
- if i := strings.LastIndex(s, slash); i > 0 {
- s = s[:i+1]
- }
- s = strings.Trim(s, slash)
- return filepath.ToSlash(s)
-}
-
-func (f *File) sourcePos(posn token.Position) string {
- if !srcFlag {
- return ""
- }
- return fmt.Sprintf("%s:%d:\n", posn.Filename, posn.Line)
-}
-
-func (f *File) nameURL(name string) string {
- if !urlFlag {
- return ""
- }
- return fmt.Sprintf("%s#%s\n", f.packageURL(), name)
-}
-
-func (f *File) methodURL(typ ast.Expr, name string) string {
- if !urlFlag {
- return ""
- }
- var b bytes.Buffer
- printer.Fprint(&b, f.fset, typ)
- typeName := b.Bytes()
- if len(typeName) > 0 && typeName[0] == '*' {
- typeName = typeName[1:]
- }
- return fmt.Sprintf("%s#%s.%s\n", f.packageURL(), typeName, name)
-}
-
-// Here follows the code to find and print a method (actually a method set, because
-// we want to do only one redundant tree walk, not one per method).
-// It should be much easier than walking the whole tree again, but that's what we must do.
-// TODO.
-
-type method struct {
- index int // Which doc to write. (Keeps the results sorted)
- *types.Selection
-}
-
-type methodVisitor struct {
- *File
- methods []method
- docs []string
-}
-
-func (f *File) methodSet(set *types.MethodSet) {
- // Build the set of things we're looking for.
- methods := make([]method, 0, set.Len())
- docs := make([]string, set.Len())
- for i := 0; i < set.Len(); i++ {
- if ast.IsExported(set.At(i).Obj().Name()) {
- m := method{
- i,
- set.At(i),
- }
- methods = append(methods, m)
- }
- }
- if len(methods) == 0 {
- return
- }
- // Collect the docs.
- for _, file := range f.allFiles {
- visitor := &methodVisitor{
- File: file,
- methods: methods,
- docs: docs,
- }
- ast.Walk(visitor, file.file)
- methods = visitor.methods
- }
- // Print them in order. The incoming method set is sorted by name.
- for _, doc := range docs {
- if doc != "" {
- fmt.Print(doc)
- }
- }
-}
-
-// Visit implements the ast.Visitor interface.
-func (visitor *methodVisitor) Visit(node ast.Node) ast.Visitor {
- switch n := node.(type) {
- case *ast.FuncDecl:
- for i, method := range visitor.methods {
- // If this is the right one, the position of the name of its identifier will match.
- if method.Obj().Pos() == n.Name.Pos() {
- n.Body = nil // TODO. Ugly - don't print the function body.
- visitor.docs[method.index] = fmt.Sprintf("%s", visitor.File.docs(n))
- // If this was the last method, we're done.
- if len(visitor.methods) == 1 {
- return nil
- }
- // Drop this one from the list.
- visitor.methods = append(visitor.methods[:i], visitor.methods[i+1:]...)
- return visitor
- }
- }
- }
- return visitor
-}
diff --git a/vendor/github.com/visualfc/gotools/goapi/goapi.go b/vendor/github.com/visualfc/gotools/goapi/goapi.go
deleted file mode 100644
index 92721cc..0000000
--- a/vendor/github.com/visualfc/gotools/goapi/goapi.go
+++ /dev/null
@@ -1,3774 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Api computes the exported API of a set of Go packages.
-
-//modify 2013-2014 visualfc
-
-package goapi
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "go/ast"
- "go/build"
- "go/doc"
- "go/parser"
- "go/printer"
- "go/token"
- "io"
- "io/ioutil"
- "log"
- "os"
- "os/exec"
- "path"
- "path/filepath"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/visualfc/gotools/command"
-)
-
-var Command = &command.Command{
- Run: runApi,
- UsageLine: "goapi",
- Short: "golang api util",
- Long: `golang api util`,
-}
-
-var apiVerbose bool
-var apiAllmethods bool
-var apiAlldecls bool
-var apiShowpos bool
-var apiSeparate string
-var apiImportParser bool
-var apiDefaultCtx bool
-var apiCustomCtx string
-var apiLookupInfo string
-var apiLookupStdin bool
-var apiOutput string
-
-func init() {
- Command.Flag.BoolVar(&apiVerbose, "v", false, "verbose debugging")
- Command.Flag.BoolVar(&apiAllmethods, "e", true, "extract for all embedded methods")
- Command.Flag.BoolVar(&apiAlldecls, "a", false, "extract for all declarations")
- Command.Flag.BoolVar(&apiShowpos, "pos", false, "addition token position")
- Command.Flag.StringVar(&apiSeparate, "sep", ", ", "setup separators")
- Command.Flag.BoolVar(&apiImportParser, "dep", true, "parser package imports")
- Command.Flag.BoolVar(&apiDefaultCtx, "default_ctx", true, "extract for default context")
- Command.Flag.StringVar(&apiCustomCtx, "custom_ctx", "", "optional comma-separated list of -[-cgo] to override default contexts.")
- Command.Flag.StringVar(&apiLookupInfo, "cursor_info", "", "lookup cursor node info\"file.go:pos\"")
- Command.Flag.BoolVar(&apiLookupStdin, "cursor_std", false, "cursor_info use stdin")
- Command.Flag.StringVar(&apiOutput, "o", "", "output file")
-}
-
-func runApi(cmd *command.Command, args []string) error {
- if len(args) == 0 && apiLookupInfo == "" {
- cmd.Usage()
- return os.ErrInvalid
- }
- if apiVerbose {
- now := time.Now()
- defer func() {
- log.Println("time", time.Now().Sub(now))
- }()
- }
-
- var pkgs []string
- if len(args) > 0 {
- if args[0] == "std" || args[0] == "all" {
- out, err := exec.Command("go", "list", "-e", args[0]).Output()
- if err != nil {
- log.Fatal(err)
- }
- pkgs = strings.Fields(string(out))
- } else {
- pkgs = args
- }
- }
- var curinfo CursorInfo
- if apiLookupInfo != "" {
- pos := strings.Index(apiLookupInfo, ":")
- if pos != -1 {
- curinfo.file = (apiLookupInfo)[:pos]
- if i, err := strconv.Atoi((apiLookupInfo)[pos+1:]); err == nil {
- curinfo.pos = token.Pos(i)
- }
- }
- }
-
- if len(pkgs) == 1 && curinfo.pos != token.NoPos {
- curinfo.pkg = pkgs[0]
- }
-
- if apiLookupStdin {
- src, err := ioutil.ReadAll(os.Stdin)
- if err == nil {
- curinfo.src = src
- curinfo.std = true
- }
- }
-
- if apiCustomCtx != "" {
- apiDefaultCtx = false
- setCustomContexts()
- }
-
- var features []string
- w := NewWalker()
- if curinfo.pkg != "" {
- w.cursorInfo = &curinfo
- }
- w.sep = apiSeparate
-
- if apiDefaultCtx {
- w.context = &build.Default
-
- for _, pkg := range pkgs {
- w.wantedPkg[pkg] = true
- }
-
- for _, pkg := range pkgs {
- w.WalkPackage(pkg)
- }
- if w.cursorInfo != nil {
- goto lookup
- } else {
- var file io.Writer
- if apiOutput != "" {
- var err error
- file, err = os.Create(apiOutput)
- if err != nil {
- log.Fatal(err)
- }
- } else {
- file = os.Stdout
- }
- bw := bufio.NewWriter(file)
- defer bw.Flush()
- for _, p := range w.packageMap {
- if w.wantedPkg[p.name] {
- for _, f := range p.Features() {
- fmt.Fprintf(bw, "%s\n", f)
- }
- }
- }
- return nil
- }
- features = w.Features("")
- } else {
- for _, c := range contexts {
- c.Compiler = build.Default.Compiler
- }
-
- for _, pkg := range pkgs {
- w.wantedPkg[pkg] = true
- }
-
- var featureCtx = make(map[string]map[string]bool) // feature -> context name -> true
- for _, context := range contexts {
- w.context = context
- w.ctxName = contextName(w.context) + ":"
-
- for _, pkg := range pkgs {
- w.WalkPackage(pkg)
- }
- if w.cursorInfo != nil && w.cursorInfo.info != nil {
- goto lookup
- }
- }
-
- for pkg, p := range w.packageMap {
- if w.wantedPkg[p.name] {
- pos := strings.Index(pkg, ":")
- if pos == -1 {
- continue
- }
- ctxName := pkg[:pos]
- for _, f := range p.Features() {
- if featureCtx[f] == nil {
- featureCtx[f] = make(map[string]bool)
- }
- featureCtx[f][ctxName] = true
- }
- }
- }
-
- for f, cmap := range featureCtx {
- if len(cmap) == len(contexts) {
- features = append(features, f)
- continue
- }
- comma := strings.Index(f, ",")
- for cname := range cmap {
- f2 := fmt.Sprintf("%s (%s)%s", f[:comma], cname, f[comma:])
- features = append(features, f2)
- }
- }
- sort.Strings(features)
- }
-
-lookup:
- if w.cursorInfo != nil {
- info := w.cursorInfo.info
- if info == nil {
- os.Exit(1)
- return os.ErrInvalid
- }
- // fmt.Println("kind,", info.Kind)
- // fmt.Println("name,", info.Name)
- // if info.Type != "" {
- // fmt.Println("type,", strings.TrimLeft(info.Type, "*"))
- // }
- if info.Name == info.Type || info.Type == "" {
- fmt.Printf("info, %s, %s\n", info.Kind, info.Name)
- } else {
- fmt.Printf("info, %s, %s, %s\n", info.Kind, info.Name, info.Type)
- }
- if info.Kind == KindImport || info.Kind == KindPackage {
- if p := w.findPackage(info.Name); p != nil {
- fmt.Println("help,", p.name)
- }
- }
- if info.T != nil {
- for _, text := range []string{info.Name, info.Type} {
- typ := strings.TrimLeft(text, "*")
- pos := strings.Index(typ, ".")
- if pos != -1 {
- if p := w.findPackage(typ[:pos]); p != nil {
- fmt.Println("help,", p.name+typ[pos:])
- break
- }
- }
- }
- fmt.Println("pos,", w.fset.Position(info.T.Pos()))
- }
- return nil
- }
-
- fail := false
- defer func() {
- if fail {
- os.Exit(1)
- }
- }()
-
- bw := bufio.NewWriter(os.Stdout)
- defer bw.Flush()
-
- for _, f := range features {
- fmt.Fprintf(bw, "%s\n", f)
- }
- return nil
-}
-
-type CursorInfo struct {
- pkg string
- file string
- pos token.Pos
- src []byte
- std bool
- info *TypeInfo
-}
-
-// contexts are the default contexts which are scanned, unless
-// overridden by the -contexts flag.
-var contexts = []*build.Context{
- {GOOS: "linux", GOARCH: "386", CgoEnabled: true},
- {GOOS: "linux", GOARCH: "386"},
- {GOOS: "linux", GOARCH: "amd64", CgoEnabled: true},
- {GOOS: "linux", GOARCH: "amd64"},
- {GOOS: "linux", GOARCH: "arm"},
- {GOOS: "darwin", GOARCH: "386", CgoEnabled: true},
- {GOOS: "darwin", GOARCH: "386"},
- {GOOS: "darwin", GOARCH: "amd64", CgoEnabled: true},
- {GOOS: "darwin", GOARCH: "amd64"},
- {GOOS: "windows", GOARCH: "amd64"},
- {GOOS: "windows", GOARCH: "386"},
- {GOOS: "freebsd", GOARCH: "amd64"},
- {GOOS: "freebsd", GOARCH: "386"},
-}
-
-func contextName(c *build.Context) string {
- s := c.GOOS + "-" + c.GOARCH
- if c.CgoEnabled {
- return s + "-cgo"
- }
- return s
-}
-
-func osArchName(c *build.Context) string {
- return c.GOOS + "-" + c.GOARCH
-}
-
-func parseContext(c string) *build.Context {
- parts := strings.Split(c, "-")
- if len(parts) < 2 {
- log.Fatalf("bad context: %q", c)
- }
- bc := &build.Context{
- GOOS: parts[0],
- GOARCH: parts[1],
- }
- if len(parts) == 3 {
- if parts[2] == "cgo" {
- bc.CgoEnabled = true
- } else {
- log.Fatalf("bad context: %q", c)
- }
- }
- return bc
-}
-
-func setCustomContexts() {
- contexts = []*build.Context{}
- for _, c := range strings.Split(apiCustomCtx, ",") {
- contexts = append(contexts, parseContext(c))
- }
-}
-
-func set(items []string) map[string]bool {
- s := make(map[string]bool)
- for _, v := range items {
- s[v] = true
- }
- return s
-}
-
-var spaceParensRx = regexp.MustCompile(` \(\S+?\)`)
-
-func featureWithoutContext(f string) string {
- if !strings.Contains(f, "(") {
- return f
- }
- return spaceParensRx.ReplaceAllString(f, "")
-}
-
-func compareAPI(w io.Writer, features, required, optional, exception []string, allowNew bool) (ok bool) {
- ok = true
-
- optionalSet := set(optional)
- exceptionSet := set(exception)
- featureSet := set(features)
-
- sort.Strings(features)
- sort.Strings(required)
-
- take := func(sl *[]string) string {
- s := (*sl)[0]
- *sl = (*sl)[1:]
- return s
- }
-
- for len(required) > 0 || len(features) > 0 {
- switch {
- case len(features) == 0 || (len(required) > 0 && required[0] < features[0]):
- feature := take(&required)
- if exceptionSet[feature] {
- fmt.Fprintf(w, "~%s\n", feature)
- } else if featureSet[featureWithoutContext(feature)] {
- // okay.
- } else {
- fmt.Fprintf(w, "-%s\n", feature)
- ok = false // broke compatibility
- }
- case len(required) == 0 || (len(features) > 0 && required[0] > features[0]):
- newFeature := take(&features)
- if optionalSet[newFeature] {
- // Known added feature to the upcoming release.
- // Delete it from the map so we can detect any upcoming features
- // which were never seen. (so we can clean up the nextFile)
- delete(optionalSet, newFeature)
- } else {
- fmt.Fprintf(w, "+%s\n", newFeature)
- if !allowNew {
- ok = false // we're in lock-down mode for next release
- }
- }
- default:
- take(&required)
- take(&features)
- }
- }
-
- // In next file, but not in API.
- var missing []string
- for feature := range optionalSet {
- missing = append(missing, feature)
- }
- sort.Strings(missing)
- for _, feature := range missing {
- fmt.Fprintf(w, "±%s\n", feature)
- }
- return
-}
-
-func fileFeatures(filename string) []string {
- bs, err := ioutil.ReadFile(filename)
- if err != nil {
- log.Fatalf("Error reading file %s: %v", filename, err)
- }
- text := strings.TrimSpace(string(bs))
- if text == "" {
- return nil
- }
- return strings.Split(text, "\n")
-}
-
-func isExtract(name string) bool {
- if apiAlldecls {
- return true
- }
- return ast.IsExported(name)
-}
-
-// pkgSymbol represents a symbol in a package
-type pkgSymbol struct {
- pkg string // "net/http"
- symbol string // "RoundTripper"
-}
-
-//expression kind
-type Kind int
-
-const (
- KindBuiltin Kind = iota
- KindPackage
- KindImport
- KindVar
- KindConst
- KindInterface
- KindParam
- KindStruct
- KindMethod
- KindField
- KindType
- KindFunc
- KindChan
- KindArray
- KindMap
- KindSlice
- KindLabel
- KindBranch
-)
-
-func (k Kind) String() string {
- switch k {
- case KindBuiltin:
- return "builtin"
- case KindPackage:
- return "package"
- case KindImport:
- return "import"
- case KindVar:
- return "var"
- case KindConst:
- return "const"
- case KindParam:
- return "param"
- case KindInterface:
- return "interface"
- case KindStruct:
- return "struct"
- case KindMethod:
- return "method"
- case KindField:
- return "field"
- case KindType:
- return "type"
- case KindFunc:
- return "func"
- case KindChan:
- return "chan"
- case KindMap:
- return "map"
- case KindArray:
- return "array"
- case KindSlice:
- return "slice"
- case KindLabel:
- return "label"
- case KindBranch:
- return "branch"
- }
- return fmt.Sprint("unknown-kind")
-}
-
-//expression type
-type TypeInfo struct {
- Kind Kind
- Name string
- Type string
- X ast.Expr
- T ast.Expr
-}
-
-type ExprType struct {
- X ast.Expr
- T string
-}
-
-type Package struct {
- dpkg *doc.Package
- apkg *ast.Package
- interfaceMethods map[string]([]typeMethod)
- interfaces map[string]*ast.InterfaceType //interface
- structs map[string]*ast.StructType //struct
- types map[string]ast.Expr //type
- functions map[string]typeMethod //function
- consts map[string]*ExprType //const => type
- vars map[string]*ExprType //var => type
- name string
- dir string
- sep string
- deps []string
- features map[string](token.Pos) // set
-}
-
-func NewPackage() *Package {
- return &Package{
- interfaceMethods: make(map[string]([]typeMethod)),
- interfaces: make(map[string]*ast.InterfaceType),
- structs: make(map[string]*ast.StructType),
- types: make(map[string]ast.Expr),
- functions: make(map[string]typeMethod),
- consts: make(map[string]*ExprType),
- vars: make(map[string]*ExprType),
- features: make(map[string](token.Pos)),
- sep: ", ",
- }
-}
-
-func (p *Package) Features() (fs []string) {
- for f, ps := range p.features {
- if apiShowpos {
- fs = append(fs, f+p.sep+strconv.Itoa(int(ps)))
- } else {
- fs = append(fs, f)
- }
- }
- sort.Strings(fs)
- return
-}
-
-func (p *Package) findType(name string) ast.Expr {
- for k, v := range p.interfaces {
- if k == name {
- return v
- }
- }
- for k, v := range p.structs {
- if k == name {
- return v
- }
- }
- for k, v := range p.types {
- if k == name {
- return v
- }
- }
- return nil
-}
-
-func funcRetType(ft *ast.FuncType, index int) ast.Expr {
- if ft.Results != nil {
- pos := 0
- for _, fi := range ft.Results.List {
- if fi.Names == nil {
- if pos == index {
- return fi.Type
- }
- pos++
- } else {
- for _ = range fi.Names {
- if pos == index {
- return fi.Type
- }
- pos++
- }
- }
- }
- }
- return nil
-}
-
-func findFunction(funcs []*doc.Func, name string) (*ast.Ident, *ast.FuncType) {
- for _, f := range funcs {
- if f.Name == name {
- return &ast.Ident{Name: name, NamePos: f.Decl.Pos()}, f.Decl.Type
- }
- }
- return nil, nil
-}
-
-func (p *Package) findSelectorType(name string) ast.Expr {
- if t, ok := p.vars[name]; ok {
- return &ast.Ident{
- NamePos: t.X.Pos(),
- Name: t.T,
- }
- }
- if t, ok := p.consts[name]; ok {
- return &ast.Ident{
- NamePos: t.X.Pos(),
- Name: t.T,
- }
- }
- if t, ok := p.functions[name]; ok {
- return t.ft
- }
- for k, v := range p.structs {
- if k == name {
- return &ast.Ident{
- NamePos: v.Pos(),
- Name: name,
- }
- }
- }
- for k, v := range p.interfaces {
- if k == name {
- return &ast.Ident{
- NamePos: v.Pos(),
- Name: name,
- }
- }
- }
- for k, v := range p.types {
- if k == name {
- return v
- }
- }
- return nil
-}
-
-func (p *Package) findCallFunc(name string) ast.Expr {
- if fn, ok := p.functions[name]; ok {
- return fn.ft
- }
- if s, ok := p.structs[name]; ok {
- return s
- }
- if t, ok := p.types[name]; ok {
- return t
- }
- if v, ok := p.vars[name]; ok {
- if strings.HasPrefix(v.T, "func(") {
- e, err := parser.ParseExpr(v.T + "{}")
- if err == nil {
- return e
- }
- }
- }
- return nil
-}
-
-func (p *Package) findCallType(name string, index int) ast.Expr {
- if fn, ok := p.functions[name]; ok {
- return funcRetType(fn.ft, index)
- }
- if s, ok := p.structs[name]; ok {
- return &ast.Ident{
- NamePos: s.Pos(),
- Name: name,
- }
- }
- if t, ok := p.types[name]; ok {
- return &ast.Ident{
- NamePos: t.Pos(),
- Name: name,
- }
- }
- return nil
-}
-
-func (p *Package) findMethod(typ, name string) (*ast.Ident, *ast.FuncType) {
- if t, ok := p.interfaces[typ]; ok && t.Methods != nil {
- for _, fd := range t.Methods.List {
- switch ft := fd.Type.(type) {
- case *ast.FuncType:
- for _, ident := range fd.Names {
- if ident.Name == name {
- return ident, ft
- }
- }
- }
- }
- }
- for k, v := range p.interfaceMethods {
- if k == typ {
- for _, m := range v {
- if m.name == name {
- return &ast.Ident{Name: name, NamePos: m.pos}, m.ft
- }
- }
- }
- }
- if p.dpkg == nil {
- return nil, nil
- }
- for _, t := range p.dpkg.Types {
- if t.Name == typ {
- return findFunction(t.Methods, name)
- }
- }
- return nil, nil
-}
-
-type Walker struct {
- context *build.Context
- fset *token.FileSet
- scope []string
- // features map[string](token.Pos) // set
- lastConstType string
- curPackageName string
- sep string
- ctxName string
- curPackage *Package
- constDep map[string]*ExprType // key's const identifier has type of future value const identifier
- packageState map[string]loadState
- packageMap map[string]*Package
- interfaces map[pkgSymbol]*ast.InterfaceType
- selectorFullPkg map[string]string // "http" => "net/http", updated by imports
- wantedPkg map[string]bool // packages requested on the command line
- cursorInfo *CursorInfo
- localvar map[string]*ExprType
-}
-
-func NewWalker() *Walker {
- return &Walker{
- fset: token.NewFileSet(),
- // features: make(map[string]token.Pos),
- packageState: make(map[string]loadState),
- interfaces: make(map[pkgSymbol]*ast.InterfaceType),
- packageMap: make(map[string]*Package),
- selectorFullPkg: make(map[string]string),
- wantedPkg: make(map[string]bool),
- localvar: make(map[string]*ExprType),
- sep: ", ",
- }
-}
-
-// loadState is the state of a package's parsing.
-type loadState int
-
-const (
- notLoaded loadState = iota
- loading
- loaded
-)
-
-func (w *Walker) Features(ctx string) (fs []string) {
- for pkg, p := range w.packageMap {
- if w.wantedPkg[p.name] {
- if ctx == "" || strings.HasPrefix(pkg, ctx) {
- fs = append(fs, p.Features()...)
- }
- }
- }
- sort.Strings(fs)
- return
-}
-
-// fileDeps returns the imports in a file.
-func fileDeps(f *ast.File) (pkgs []string) {
- for _, is := range f.Imports {
- fpkg, err := strconv.Unquote(is.Path.Value)
- if err != nil {
- log.Fatalf("error unquoting import string %q: %v", is.Path.Value, err)
- }
- if fpkg != "C" {
- pkgs = append(pkgs, fpkg)
- }
- }
- return
-}
-
-func (w *Walker) findPackage(pkg string) *Package {
- if full, ok := w.selectorFullPkg[pkg]; ok {
- if w.ctxName != "" {
- ctxName := w.ctxName + full
- for k, v := range w.packageMap {
- if k == ctxName {
- return v
- }
- }
- }
- for k, v := range w.packageMap {
- if k == full {
- return v
- }
- }
- }
- return nil
-}
-
-func (w *Walker) findPackageOSArch(pkg string) *Package {
- if full, ok := w.selectorFullPkg[pkg]; ok {
- ctxName := osArchName(w.context) + ":" + full
- for k, v := range w.packageMap {
- if k == ctxName {
- return v
- }
- }
- }
- return nil
-}
-
-// WalkPackage walks all files in package `name'.
-// WalkPackage does nothing if the package has already been loaded.
-
-func (w *Walker) WalkPackage(pkg string) {
- if build.IsLocalImport(pkg) {
- wd, err := os.Getwd()
- if err != nil {
- if apiVerbose {
- log.Println(err)
- }
- return
- }
- dir := filepath.Clean(filepath.Join(wd, pkg))
- bp, err := w.context.ImportDir(dir, 0)
- if err != nil {
- if apiVerbose {
- log.Println(err)
- }
- return
- }
- if w.wantedPkg[pkg] == true {
- w.wantedPkg[bp.Name] = true
- delete(w.wantedPkg, pkg)
- }
- if w.cursorInfo != nil && w.cursorInfo.pkg == pkg {
- w.cursorInfo.pkg = bp.Name
- }
- w.WalkPackageDir(bp.Name, bp.Dir, bp)
- } else if filepath.IsAbs(pkg) {
- bp, err := build.ImportDir(pkg, 0)
- if err != nil {
- if apiVerbose {
- log.Println(err)
- }
- }
- if w.wantedPkg[pkg] == true {
- w.wantedPkg[bp.Name] = true
- delete(w.wantedPkg, pkg)
- }
- if w.cursorInfo != nil && w.cursorInfo.pkg == pkg {
- w.cursorInfo.pkg = bp.Name
- }
-
- w.WalkPackageDir(bp.Name, bp.Dir, bp)
- } else {
- bp, err := build.Import(pkg, "", build.FindOnly)
- if err != nil {
- if apiVerbose {
- log.Println(err)
- }
- return
- }
- w.WalkPackageDir(pkg, bp.Dir, nil)
- }
-}
-
-func (w *Walker) WalkPackageDir(name string, dir string, bp *build.Package) {
- ctxName := w.ctxName + name
- curName := name
- switch w.packageState[ctxName] {
- case loading:
- log.Fatalf("import cycle loading package %q?", name)
- return
- case loaded:
- return
- }
- w.packageState[ctxName] = loading
- w.selectorFullPkg[name] = name
-
- defer func() {
- w.packageState[ctxName] = loaded
- }()
-
- sname := name[strings.LastIndexAny(name, ".-/\\")+1:]
-
- apkg := &ast.Package{
- Files: make(map[string]*ast.File),
- }
- if bp == nil {
- bp, _ = w.context.ImportDir(dir, 0)
- }
- if bp == nil {
- return
- }
- if w.ctxName != "" {
- isCgo := (len(bp.CgoFiles) > 0) && w.context.CgoEnabled
- if isCgo {
- curName = ctxName
- } else {
- isOSArch := false
- for _, file := range bp.GoFiles {
- if isOSArchFile(w.context, file) {
- isOSArch = true
- break
- }
- }
- var p *Package
- if isOSArch {
- curName = osArchName(w.context) + ":" + name
- p = w.findPackageOSArch(name)
- } else {
- curName = name
- p = w.findPackage(name)
- }
- if p != nil {
- if apiImportParser {
- for _, dep := range p.deps {
- if _, ok := w.packageState[dep]; ok {
- continue
- }
- w.WalkPackage(dep)
- }
- }
- w.packageMap[ctxName] = p
- return
- }
- }
- }
-
- files := append(append([]string{}, bp.GoFiles...), bp.CgoFiles...)
-
- if w.cursorInfo != nil && w.cursorInfo.pkg == name {
- files = append(files, bp.TestGoFiles...)
- for _, v := range bp.XTestGoFiles {
- if v == w.cursorInfo.file {
- var xbp build.Package
- xbp.Name = name + "_test"
- xbp.GoFiles = append(xbp.GoFiles, bp.XTestGoFiles...)
- w.cursorInfo.pkg = xbp.Name
- w.WalkPackageDir(xbp.Name, dir, &xbp)
- break
- }
- }
- }
-
- if len(files) == 0 {
- if apiVerbose {
- log.Println("no Go source files in", bp.Dir)
- }
- return
- }
- var deps []string
-
- for _, file := range files {
- var src interface{} = nil
- if w.cursorInfo != nil &&
- w.cursorInfo.pkg == name &&
- w.cursorInfo.file == file &&
- w.cursorInfo.std {
- src = w.cursorInfo.src
- }
- f, err := parser.ParseFile(w.fset, filepath.Join(dir, file), src, 0)
- if err != nil {
- if apiVerbose {
- log.Printf("error parsing package %s, file %s: %v", name, file, err)
- }
- }
-
- if sname != f.Name.Name {
- continue
- }
- apkg.Files[file] = f
- if apiImportParser {
- deps = fileDeps(f)
- for _, dep := range deps {
- if _, ok := w.packageState[dep]; ok {
- continue
- }
- w.WalkPackage(dep)
- }
- }
- if apiShowpos && w.wantedPkg[name] {
- tf := w.fset.File(f.Pos())
- if tf != nil {
- fmt.Printf("pos %s%s%s%s%d%s%d\n", name, w.sep, filepath.Join(dir, file), w.sep, tf.Base(), w.sep, tf.Size())
- }
- }
- }
- /* else {
- fdir, err := os.Open(dir)
- if err != nil {
- log.Fatalln(err)
- }
- infos, err := fdir.Readdir(-1)
- fdir.Close()
- if err != nil {
- log.Fatalln(err)
- }
-
- for _, info := range infos {
- if info.IsDir() {
- continue
- }
- file := info.Name()
- if strings.HasPrefix(file, "_") || strings.HasSuffix(file, "_test.go") {
- continue
- }
- if strings.HasSuffix(file, ".go") {
- f, err := parser.ParseFile(w.fset, filepath.Join(dir, file), nil, 0)
- if err != nil {
- if apiVerbose {
- log.Printf("error parsing package %s, file %s: %v", name, file, err)
- }
- continue
- }
- if f.Name.Name != sname {
- continue
- }
-
- apkg.Files[file] = f
- if apiImportParser {
- for _, dep := range fileDeps(f) {
- w.WalkPackage(dep)
- }
- }
- if apiShowpos && w.wantedPkg[name] {
- tf := w.fset.File(f.Pos())
- if tf != nil {
- fmt.Printf("pos %s%s%s%s%d:%d\n", name, w.sep, filepath.Join(dir, file), w.sep, tf.Base(), tf.Base()+tf.Size())
- }
- }
- }
- }
- }*/
- if curName != ctxName {
- w.packageState[curName] = loading
-
- defer func() {
- w.packageState[curName] = loaded
- }()
- }
-
- if apiVerbose {
- log.Printf("package %s => %s, %v", ctxName, curName, w.wantedPkg[curName])
- }
- pop := w.pushScope("pkg " + name)
- defer pop()
-
- w.curPackageName = curName
- w.constDep = map[string]*ExprType{}
- w.curPackage = NewPackage()
- w.curPackage.apkg = apkg
- w.curPackage.name = name
- w.curPackage.dir = dir
- w.curPackage.deps = deps
- w.curPackage.sep = w.sep
- w.packageMap[curName] = w.curPackage
- w.packageMap[ctxName] = w.curPackage
-
- for _, afile := range apkg.Files {
- w.recordTypes(afile)
- }
-
- // Register all function declarations first.
- for _, afile := range apkg.Files {
- for _, di := range afile.Decls {
- if d, ok := di.(*ast.FuncDecl); ok {
- if !w.isExtract(d.Name.Name) {
- continue
- }
- w.peekFuncDecl(d)
- }
- }
- }
-
- for _, afile := range apkg.Files {
- w.walkFile(afile)
- }
-
- w.resolveConstantDeps()
-
- if w.cursorInfo != nil && w.cursorInfo.pkg == name {
- for k, v := range apkg.Files {
- if k == w.cursorInfo.file {
- f := w.fset.File(v.Pos())
- if f == nil {
- log.Fatalf("error fset postion %v", v.Pos())
- }
- info, err := w.lookupFile(v, token.Pos(f.Base())+w.cursorInfo.pos-1)
- if err != nil {
- log.Fatalln("lookup error,", err)
- } else {
- if info != nil && info.Kind == KindImport {
- for _, is := range v.Imports {
- fpath, err := strconv.Unquote(is.Path.Value)
- if err == nil {
- if info.Name == path.Base(fpath) {
- info.T = is.Path
- }
- }
- }
- }
- w.cursorInfo.info = info
- }
- break
- }
- }
- return
- }
-
- // Now that we're done walking types, vars and consts
- // in the *ast.Package, use go/doc to do the rest
- // (functions and methods). This is done here because
- // go/doc is destructive. We can't use the
- // *ast.Package after this.
- var mode doc.Mode
- if apiAllmethods {
- mode |= doc.AllMethods
- }
- if apiAlldecls && w.wantedPkg[w.ctxName] {
- mode |= doc.AllDecls
- }
-
- dpkg := doc.New(apkg, name, mode)
- w.curPackage.dpkg = dpkg
-
- if w.wantedPkg[name] != true {
- return
- }
-
- for _, t := range dpkg.Types {
- // Move funcs up to the top-level, not hiding in the Types.
- dpkg.Funcs = append(dpkg.Funcs, t.Funcs...)
-
- for _, m := range t.Methods {
- w.walkFuncDecl(m.Decl)
- }
- }
-
- for _, f := range dpkg.Funcs {
- w.walkFuncDecl(f.Decl)
- }
-}
-
-// pushScope enters a new scope (walking a package, type, node, etc)
-// and returns a function that will leave the scope (with sanity checking
-// for mismatched pushes & pops)
-func (w *Walker) pushScope(name string) (popFunc func()) {
- w.scope = append(w.scope, name)
- return func() {
- if len(w.scope) == 0 {
- log.Fatalf("attempt to leave scope %q with empty scope list", name)
- }
- if w.scope[len(w.scope)-1] != name {
- log.Fatalf("attempt to leave scope %q, but scope is currently %#v", name, w.scope)
- }
- w.scope = w.scope[:len(w.scope)-1]
- }
-}
-
-func (w *Walker) recordTypes(file *ast.File) {
- cur := w.curPackage
- for _, di := range file.Decls {
- switch d := di.(type) {
- case *ast.GenDecl:
- switch d.Tok {
- case token.TYPE:
- for _, sp := range d.Specs {
- ts := sp.(*ast.TypeSpec)
- name := ts.Name.Name
- switch t := ts.Type.(type) {
- case *ast.InterfaceType:
- if isExtract(name) {
- w.noteInterface(name, t)
- }
- cur.interfaces[name] = t
- case *ast.StructType:
- cur.structs[name] = t
- default:
- cur.types[name] = ts.Type
- }
- }
- }
- }
- }
-}
-
-func inRange(node ast.Node, p token.Pos) bool {
- if node == nil {
- return false
- }
- return p >= node.Pos() && p <= node.End()
-}
-
-func (w *Walker) lookupLabel(body *ast.BlockStmt, name string) (*TypeInfo, error) {
- for _, stmt := range body.List {
- switch v := stmt.(type) {
- case *ast.BlockStmt:
- return w.lookupLabel(v, name)
- case *ast.LabeledStmt:
- return &TypeInfo{Kind: KindLabel, Name: v.Label.Name, Type: "branch", T: v.Label}, nil
- }
- }
- return nil, nil
-}
-
-func (w *Walker) lookupFile(file *ast.File, p token.Pos) (*TypeInfo, error) {
- if inRange(file.Name, p) {
- return &TypeInfo{Kind: KindPackage, X: file.Name, Name: file.Name.Name, Type: file.Name.Name, T: file.Name}, nil
- }
- for _, di := range file.Decls {
- switch d := di.(type) {
- case *ast.GenDecl:
- if inRange(d, p) {
- return w.lookupDecl(d, p, false)
- }
- case *ast.FuncDecl:
- if inRange(d, p) {
- info, err := w.lookupDecl(d, p, false)
- if info != nil && info.Kind == KindBranch {
- return w.lookupLabel(d.Body, info.Name)
- }
- return info, err
- }
- if d.Body != nil && inRange(d.Body, p) {
- return w.lookupStmt(d.Body, p)
- }
- default:
- return nil, fmt.Errorf("un parser decl %T", di)
- }
- }
- return nil, fmt.Errorf("un find cursor %v", w.fset.Position(p))
-}
-
-func (w *Walker) isExtract(name string) bool {
- if w.wantedPkg[w.curPackageName] || apiAlldecls {
- return true
- }
- return ast.IsExported(name)
-}
-
-func (w *Walker) isType(typ string) *ExprType {
- pos := strings.Index(typ, ".")
- if pos != -1 {
- pkg := typ[:pos]
- typ = typ[pos+1:]
- if p := w.findPackage(pkg); p != nil {
- if t, ok := p.types[typ]; ok {
- if r := w.isType(typ); r != nil {
- return r
- }
- return &ExprType{X: t, T: w.pkgRetType(pkg, w.nodeString(t))}
- }
- }
- return nil
- }
- if t, ok := w.curPackage.types[typ]; ok {
- if r := w.isType(w.nodeString(t)); r != nil {
- return r
- }
- return &ExprType{X: t, T: w.nodeString(t)}
- }
- return nil
-}
-
-func (w *Walker) lookupStmt(vi ast.Stmt, p token.Pos) (*TypeInfo, error) {
- if vi == nil {
- return nil, nil
- }
- switch v := vi.(type) {
- case *ast.BadStmt:
- //
- case *ast.EmptyStmt:
- //
- case *ast.LabeledStmt:
- if inRange(v.Label, p) {
- return &TypeInfo{Kind: KindLabel, Name: v.Label.Name}, nil
- }
- return w.lookupStmt(v.Stmt, p)
- //
- case *ast.DeclStmt:
- return w.lookupDecl(v.Decl, p, true)
- case *ast.AssignStmt:
- if len(v.Lhs) == len(v.Rhs) {
- for i := 0; i < len(v.Lhs); i++ {
- switch lt := v.Lhs[i].(type) {
- case *ast.Ident:
- typ, err := w.varValueType(v.Rhs[i], 0)
- if err == nil && v.Tok == token.DEFINE {
- w.localvar[lt.Name] = &ExprType{T: typ, X: lt}
- } else if apiVerbose {
- log.Println(err)
- }
- }
- if inRange(v.Lhs[i], p) {
- return w.lookupExprInfo(v.Lhs[i], p)
- } else if inRange(v.Rhs[i], p) {
- return w.lookupExprInfo(v.Rhs[i], p)
- }
- if fl, ok := v.Rhs[i].(*ast.FuncLit); ok {
- if inRange(fl, p) {
- return w.lookupStmt(fl.Body, p)
- }
- }
- }
- } else if len(v.Rhs) == 1 {
- for i := 0; i < len(v.Lhs); i++ {
- switch lt := v.Lhs[i].(type) {
- case *ast.Ident:
- typ, err := w.varValueType(v.Rhs[0], i)
- if err == nil && v.Tok == token.DEFINE {
- w.localvar[lt.Name] = &ExprType{T: typ, X: lt}
- } else if apiVerbose {
- log.Println(err)
- }
- }
- if inRange(v.Lhs[i], p) {
- return w.lookupExprInfo(v.Lhs[i], p)
- } else if inRange(v.Rhs[0], p) {
- return w.lookupExprInfo(v.Rhs[0], p)
- }
- if fl, ok := v.Rhs[0].(*ast.FuncLit); ok {
- if inRange(fl, p) {
- return w.lookupStmt(fl.Body, p)
- }
- }
- }
- }
- return nil, nil
- case *ast.ExprStmt:
- return w.lookupExprInfo(v.X, p)
- case *ast.BlockStmt:
- for _, st := range v.List {
- if inRange(st, p) {
- return w.lookupStmt(st, p)
- }
- _, err := w.lookupStmt(st, p)
- if err != nil {
- log.Println(err)
- }
- }
- case *ast.IfStmt:
- if inRange(v.Init, p) {
- return w.lookupStmt(v.Init, p)
- } else {
- w.lookupStmt(v.Init, p)
- }
- if inRange(v.Cond, p) {
- return w.lookupExprInfo(v.Cond, p)
- } else if inRange(v.Body, p) {
- return w.lookupStmt(v.Body, p)
- } else if inRange(v.Else, p) {
- return w.lookupStmt(v.Else, p)
- }
- case *ast.SendStmt:
- if inRange(v.Chan, p) {
- return w.lookupExprInfo(v.Chan, p)
- } else if inRange(v.Value, p) {
- return w.lookupExprInfo(v.Value, p)
- }
- case *ast.IncDecStmt:
- return w.lookupExprInfo(v.X, p)
- case *ast.GoStmt:
- return w.lookupExprInfo(v.Call, p)
- case *ast.DeferStmt:
- return w.lookupExprInfo(v.Call, p)
- case *ast.ReturnStmt:
- for _, r := range v.Results {
- if inRange(r, p) {
- return w.lookupExprInfo(r, p)
- }
- }
- case *ast.BranchStmt:
- if inRange(v.Label, p) {
- return &TypeInfo{Kind: KindBranch, Name: v.Label.Name, Type: "label", T: v.Label}, nil
- }
- //
- case *ast.CaseClause:
- for _, r := range v.List {
- if inRange(r, p) {
- return w.lookupExprInfo(r, p)
- }
- }
- for _, body := range v.Body {
- if inRange(body, p) {
- return w.lookupStmt(body, p)
- } else {
- w.lookupStmt(body, p)
- }
- }
- case *ast.SwitchStmt:
- if inRange(v.Init, p) {
- return w.lookupStmt(v.Init, p)
- } else {
- w.lookupStmt(v.Init, p)
- }
- if inRange(v.Tag, p) {
- return w.lookupExprInfo(v.Tag, p)
- } else if inRange(v.Body, p) {
- return w.lookupStmt(v.Body, p)
- }
- case *ast.TypeSwitchStmt:
- if inRange(v.Assign, p) {
- return w.lookupStmt(v.Assign, p)
- } else {
- w.lookupStmt(v.Assign, p)
- }
- if inRange(v.Init, p) {
- return w.lookupStmt(v.Init, p)
- } else {
- w.lookupStmt(v.Init, p)
- }
- var vs string
- if as, ok := v.Assign.(*ast.AssignStmt); ok {
- if len(as.Lhs) == 1 {
- vs = w.nodeString(as.Lhs[0])
- }
- }
- if inRange(v.Body, p) {
- for _, s := range v.Body.List {
- if inRange(s, p) {
- switch cs := s.(type) {
- case *ast.CaseClause:
- for _, r := range cs.List {
- if inRange(r, p) {
- return w.lookupExprInfo(r, p)
- } else if vs != "" {
- typ, err := w.varValueType(r, 0)
- if err == nil {
- w.localvar[vs] = &ExprType{T: typ, X: r}
- }
- }
- }
- for _, body := range cs.Body {
- if inRange(body, p) {
- return w.lookupStmt(body, p)
- } else {
- w.lookupStmt(body, p)
- }
- }
- default:
- return w.lookupStmt(cs, p)
- }
- }
- }
- }
- case *ast.CommClause:
- if inRange(v.Comm, p) {
- return w.lookupStmt(v.Comm, p)
- }
- for _, body := range v.Body {
- if inRange(body, p) {
- return w.lookupStmt(body, p)
- }
- }
- case *ast.SelectStmt:
- if inRange(v.Body, p) {
- return w.lookupStmt(v.Body, p)
- }
- case *ast.ForStmt:
- if inRange(v.Init, p) {
- return w.lookupStmt(v.Init, p)
- } else {
- w.lookupStmt(v.Init, p)
- }
- if inRange(v.Cond, p) {
- return w.lookupExprInfo(v.Cond, p)
- } else if inRange(v.Body, p) {
- return w.lookupStmt(v.Body, p)
- } else if inRange(v.Post, p) {
- return w.lookupStmt(v.Post, p)
- }
- case *ast.RangeStmt:
- if inRange(v.X, p) {
- return w.lookupExprInfo(v.X, p)
- } else if inRange(v.Key, p) {
- return &TypeInfo{Kind: KindBuiltin, Name: w.nodeString(v.Key), Type: "int"}, nil
- } else if inRange(v.Value, p) {
- typ, err := w.lookupExprInfo(v.X, p)
- if typ != nil {
- typ.Name = w.nodeString(v.Value)
- return typ, err
- }
- } else {
- typ, err := w.varValueType(v.X, 0)
- //check is type
- if t := w.isType(typ); t != nil {
- typ = t.T
- }
- if err == nil {
- var kt, vt string
- if strings.HasPrefix(typ, "[]") {
- kt = "int"
- vt = typ[2:]
- } else if strings.HasPrefix(typ, "map[") {
- node, err := parser.ParseExpr(typ + "{}")
- if err == nil {
- if cl, ok := node.(*ast.CompositeLit); ok {
- if m, ok := cl.Type.(*ast.MapType); ok {
- kt = w.nodeString(w.namelessType(m.Key))
- vt = w.nodeString(w.namelessType(m.Value))
- }
- }
- }
- }
- if inRange(v.Key, p) {
- return &TypeInfo{Kind: KindVar, X: v.Key, Name: w.nodeString(v.Key), T: v.X, Type: kt}, nil
- } else if inRange(v.Value, p) {
- return &TypeInfo{Kind: KindVar, X: v.Value, Name: w.nodeString(v.Value), T: v.X, Type: vt}, nil
- }
- if key, ok := v.Key.(*ast.Ident); ok {
- w.localvar[key.Name] = &ExprType{T: kt, X: v.Key}
- }
- if value, ok := v.Value.(*ast.Ident); ok {
- w.localvar[value.Name] = &ExprType{T: vt, X: v.Value}
- }
- }
- }
- if inRange(v.Body, p) {
- return w.lookupStmt(v.Body, p)
- }
- }
- return nil, nil //fmt.Errorf("not lookup stmt %v %T", vi, vi)
-}
-
-func (w *Walker) lookupVar(vs *ast.ValueSpec, p token.Pos, local bool) (*TypeInfo, error) {
- if inRange(vs.Type, p) {
- return w.lookupExprInfo(vs.Type, p)
- }
- for _, v := range vs.Values {
- if inRange(v, p) {
- return w.lookupExprInfo(v, p)
- }
- }
- if vs.Type != nil {
- typ := w.nodeString(vs.Type)
- for _, ident := range vs.Names {
- if local {
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- }
- if inRange(ident, p) {
- return &TypeInfo{Kind: KindVar, X: ident, Name: ident.Name, T: vs.Type, Type: typ}, nil
- }
- }
- } else if len(vs.Names) == len(vs.Values) {
- for n, ident := range vs.Names {
- typ := ""
- if !local {
- if t, ok := w.curPackage.vars[ident.Name]; ok {
- typ = t.T
- }
- } else {
- typ, err := w.varValueType(vs.Values[n], n)
- if err != nil {
- if apiVerbose {
- log.Printf("unknown type of variable2 %q, type %T, error = %v, pos=%s",
- ident.Name, vs.Values[n], err, w.fset.Position(vs.Pos()))
- }
- typ = "unknown-type"
- }
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- }
- if inRange(ident, p) {
- return &TypeInfo{Kind: KindVar, X: ident, Name: ident.Name, T: ident, Type: typ}, nil
- }
- }
- } else if len(vs.Values) == 1 {
- for n, ident := range vs.Names {
- typ := ""
- if !local {
- if t, ok := w.curPackage.vars[ident.Name]; ok {
- typ = t.T
- }
- } else {
- typ, err := w.varValueType(vs.Values[0], n)
- if err != nil {
- if apiVerbose {
- log.Printf("unknown type of variable3 %q, type %T, error = %v, pos=%s",
- ident.Name, vs.Values[0], err, w.fset.Position(vs.Pos()))
- }
- typ = "unknown-type"
- }
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- }
- if inRange(ident, p) {
- return &TypeInfo{Kind: KindVar, X: ident, Name: ident.Name, T: ident, Type: typ}, nil
- }
- }
- }
- return nil, fmt.Errorf("not lookup var local:%v value:%v type:s%T", local, w.nodeString(vs), vs)
-}
-
-func (w *Walker) lookupConst(vs *ast.ValueSpec, p token.Pos, local bool) (*TypeInfo, error) {
- if inRange(vs.Type, p) {
- return w.lookupExprInfo(vs.Type, p)
- }
- for _, ident := range vs.Names {
- typ := ""
- if !local {
- if t, ok := w.curPackage.consts[ident.Name]; ok {
- typ = t.T
- }
- } else {
- litType := ""
- if vs.Type != nil {
- litType = w.nodeString(vs.Type)
- } else {
- litType = w.lastConstType
- if vs.Values != nil {
- if len(vs.Values) != 1 {
- if apiVerbose {
- log.Printf("const %q, values: %#v", ident.Name, vs.Values)
- }
- return nil, nil
- }
- var err error
- litType, err = w.constValueType(vs.Values[0])
- if err != nil {
- if apiVerbose {
- log.Printf("unknown kind in const %q (%T): %v", ident.Name, vs.Values[0], err)
- }
- litType = "unknown-type"
- }
- }
- }
- w.lastConstType = litType
- typ = litType
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- }
- if inRange(ident, p) {
- return &TypeInfo{Kind: KindConst, X: ident, Name: ident.Name, T: ident, Type: typ}, nil
- }
- }
- return nil, nil
-}
-
-func (w *Walker) lookupType(ts *ast.TypeSpec, p token.Pos, local bool) (*TypeInfo, error) {
- switch t := ts.Type.(type) {
- case *ast.StructType:
- if inRange(t.Fields, p) {
- for _, fd := range t.Fields.List {
- if inRange(fd.Type, p) {
- return w.lookupExprInfo(fd.Type, p)
- }
- for _, ident := range fd.Names {
- if inRange(ident, p) {
- return &TypeInfo{Kind: KindField, X: ident, Name: ts.Name.Name + "." + ident.Name, T: fd.Type, Type: w.nodeString(w.namelessType(fd.Type))}, nil
- }
- }
- }
- }
- return &TypeInfo{Kind: KindStruct, X: ts.Name, Name: ts.Name.Name, T: ts.Type, Type: "struct"}, nil
- case *ast.InterfaceType:
- if inRange(t.Methods, p) {
- for _, fd := range t.Methods.List {
- for _, ident := range fd.Names {
- if inRange(ident, p) {
- return &TypeInfo{Kind: KindMethod, X: ident, Name: ts.Name.Name + "." + ident.Name, T: ident, Type: w.nodeString(w.namelessType(fd.Type))}, nil
- }
- }
- if inRange(fd.Type, p) {
- return w.lookupExprInfo(fd.Type, p)
- }
- }
- }
- return &TypeInfo{Kind: KindInterface, X: ts.Name, Name: ts.Name.Name, T: ts.Type, Type: "interface"}, nil
- default:
- return &TypeInfo{Kind: KindType, X: ts.Name, Name: ts.Name.Name, T: ts.Type, Type: w.nodeString(w.namelessType(ts.Type))}, nil
- }
- return nil, nil
-}
-
-func (w *Walker) lookupDecl(di ast.Decl, p token.Pos, local bool) (*TypeInfo, error) {
- switch d := di.(type) {
- case *ast.GenDecl:
- switch d.Tok {
- case token.IMPORT:
- for _, sp := range d.Specs {
- is := sp.(*ast.ImportSpec)
- fpath, err := strconv.Unquote(is.Path.Value)
- if err != nil {
- return nil, err
- }
- name := path.Base(fpath)
- if is.Name != nil {
- name = is.Name.Name
- }
- if inRange(sp, p) {
- return &TypeInfo{Kind: KindImport, X: is.Name, Name: name, T: is.Name, Type: fpath}, nil
- }
- }
- case token.CONST:
- for _, sp := range d.Specs {
- if inRange(sp, p) {
- return w.lookupConst(sp.(*ast.ValueSpec), p, local)
- } else {
- w.lookupConst(sp.(*ast.ValueSpec), p, local)
- }
- }
- return nil, nil
- case token.TYPE:
- for _, sp := range d.Specs {
- if inRange(sp, p) {
- return w.lookupType(sp.(*ast.TypeSpec), p, local)
- } else {
- w.lookupType(sp.(*ast.TypeSpec), p, local)
- }
- }
- case token.VAR:
- for _, sp := range d.Specs {
- if inRange(sp, p) {
- return w.lookupVar(sp.(*ast.ValueSpec), p, local)
- } else {
- w.lookupVar(sp.(*ast.ValueSpec), p, local)
- }
- }
- return nil, nil
- default:
- return nil, fmt.Errorf("unknown token type %d %T in GenDecl", d.Tok, d)
- }
- case *ast.FuncDecl:
- if d.Type.Params != nil {
- for _, fd := range d.Type.Params.List {
- if inRange(fd, p) {
- return w.lookupExprInfo(fd.Type, p)
- }
- for _, ident := range fd.Names {
- if inRange(ident, p) {
- info, err := w.lookupExprInfo(fd.Type, p)
- if err == nil {
- return &TypeInfo{Kind: KindParam, X: ident, Name: ident.Name, T: info.T, Type: info.Type}, nil
- }
- }
- typ, err := w.varValueType(fd.Type, 0)
- if err == nil {
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- } else if apiVerbose {
- log.Println(err)
- }
- }
- }
- }
- if d.Type.Results != nil {
- for _, fd := range d.Type.Results.List {
- if inRange(fd, p) {
- return w.lookupExprInfo(fd.Type, p)
- }
- for _, ident := range fd.Names {
- typ, err := w.varValueType(fd.Type, 0)
- if err == nil {
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- }
- }
- }
- }
- if d.Recv != nil {
- for _, fd := range d.Recv.List {
- if inRange(fd, p) {
- return w.lookupExprInfo(fd.Type, p)
- }
- for _, ident := range fd.Names {
- w.localvar[ident.Name] = &ExprType{T: w.nodeString(fd.Type), X: ident}
- }
- }
- }
- if inRange(d.Body, p) {
- return w.lookupStmt(d.Body, p)
- }
- var fname = d.Name.Name
- kind := KindFunc
- if d.Recv != nil {
- recvTypeName, imp := baseTypeName(d.Recv.List[0].Type)
- if imp {
- return nil, nil
- }
- fname = recvTypeName + "." + d.Name.Name
- kind = KindMethod
- }
- return &TypeInfo{Kind: kind, X: d.Name, Name: fname, T: d.Type, Type: w.nodeString(w.namelessType(d.Type))}, nil
- default:
- return nil, fmt.Errorf("unhandled %T, %#v\n", di, di)
- }
- return nil, fmt.Errorf("not lookupDecl %v %T", w.nodeString(di), di)
-}
-
-func (w *Walker) lookupExprInfo(vi ast.Expr, p token.Pos) (*TypeInfo, error) {
- _, info, err := w.lookupExpr(vi, p)
- return info, err
-}
-
-// lookupExpr , return name,info,error
-func (w *Walker) lookupExpr(vi ast.Expr, p token.Pos) (string, *TypeInfo, error) {
- if apiVerbose {
- log.Printf("lookup expr %v %T", w.nodeString(vi), vi)
- }
- switch v := vi.(type) {
- case *ast.BasicLit:
- litType, ok := varType[v.Kind]
- if !ok {
- return "", nil, fmt.Errorf("unknown basic literal kind %#v", v)
- }
- name := v.Value
- if len(name) >= 128 {
- name = name[:128] + "..."
- }
- return litType, &TypeInfo{Kind: KindBuiltin, X: v, Name: name, T: v, Type: litType}, nil
- case *ast.StarExpr:
- s, info, err := w.lookupExpr(v.X, p)
- if err != nil {
- return "", nil, err
- }
- return "*" + s, &TypeInfo{Kind: info.Kind, X: v, Name: "*" + info.Name, T: info.T, Type: "*" + info.Type}, err
- case *ast.InterfaceType:
- return "interface{}", &TypeInfo{Kind: KindInterface, X: v, Name: w.nodeString(v), T: v, Type: "interface{}"}, nil
- case *ast.Ellipsis:
- s, info, err := w.lookupExpr(v.Elt, p)
- if err != nil {
- return "", nil, err
- }
- return "[]" + s, &TypeInfo{Kind: KindArray, X: v.Elt, Name: "..." + s, T: info.T, Type: "[]" + info.Type}, nil
- case *ast.KeyValueExpr:
- if inRange(v.Key, p) {
- return w.lookupExpr(v.Key, p)
- } else if inRange(v.Value, p) {
- return w.lookupExpr(v.Value, p)
- }
- case *ast.CompositeLit:
- typ, err := w.varValueType(v.Type, 0)
- if err == nil {
- typ = strings.TrimLeft(typ, "*")
- if strings.HasPrefix(typ, "[]") {
- typ = strings.TrimLeft(typ[2:], "*")
- }
- pos := strings.Index(typ, ".")
- var pt *Package = w.curPackage
- var pkgdot string
- if pos != -1 {
- pkg := typ[:pos]
- typ = typ[pos+1:]
- pt = w.findPackage(pkg)
- if pt != nil {
- pkgdot = pkg + "."
- }
- }
- if pt != nil {
- if ss, ok := pt.structs[typ]; ok {
- for _, elt := range v.Elts {
- if inRange(elt, p) {
- if cl, ok := elt.(*ast.CompositeLit); ok {
- for _, elt := range cl.Elts {
- if inRange(elt, p) {
- if kv, ok := elt.(*ast.KeyValueExpr); ok {
- if inRange(kv.Key, p) {
- n, t := w.findStructField(ss, w.nodeString(kv.Key))
- if n != nil {
- return pkgdot + typ + "." + w.nodeString(kv.Key), &TypeInfo{Kind: KindField, X: kv.Key, Name: pkgdot + typ + "." + w.nodeString(kv.Key), T: n, Type: w.nodeString(w.namelessType(t))}, nil
- }
- } else if inRange(kv.Value, p) {
- return w.lookupExpr(kv.Value, p)
- }
- }
- }
- }
- }
- if kv, ok := elt.(*ast.KeyValueExpr); ok {
- if inRange(kv.Key, p) {
- n, t := w.findStructField(ss, w.nodeString(kv.Key))
- if n != nil {
- return typ + "." + w.nodeString(kv.Key), &TypeInfo{Kind: KindField, X: kv.Key, Name: typ + "." + w.nodeString(kv.Key), T: n, Type: w.nodeString(w.namelessType(t))}, nil
- }
- } else if inRange(kv.Value, p) {
- return w.lookupExpr(kv.Value, p)
- }
- }
- }
- }
- }
- }
- }
- for _, elt := range v.Elts {
- if inRange(elt, p) {
- return w.lookupExpr(elt, p)
- }
- }
- return w.lookupExpr(v.Type, p)
- case *ast.UnaryExpr:
- s, info, err := w.lookupExpr(v.X, p)
- return v.Op.String() + s, info, err
- case *ast.TypeAssertExpr:
- if inRange(v.X, p) {
- return w.lookupExpr(v.X, p)
- }
- return w.lookupExpr(v.Type, p)
- case *ast.BinaryExpr:
- if inRange(v.X, p) {
- return w.lookupExpr(v.X, p)
- } else if inRange(v.Y, p) {
- return w.lookupExpr(v.Y, p)
- }
- return "", nil, nil
- case *ast.CallExpr:
- for _, arg := range v.Args {
- if inRange(arg, p) {
- return w.lookupExpr(arg, p)
- }
- }
- switch ft := v.Fun.(type) {
- case *ast.Ident:
- if typ, ok := w.localvar[ft.Name]; ok {
- return ft.Name, &TypeInfo{Kind: KindVar, X: ft, Name: ft.Name, T: typ.X, Type: typ.T}, nil
- }
- if typ, ok := w.curPackage.vars[ft.Name]; ok {
- return ft.Name, &TypeInfo{Kind: KindVar, X: v, Name: ft.Name, T: typ.X, Type: typ.T}, nil
- }
- if typ, ok := w.curPackage.functions[ft.Name]; ok {
- return ft.Name, &TypeInfo{Kind: KindFunc, X: ft, Name: ft.Name, T: typ.ft, Type: typ.sig}, nil
- }
- if typ, ok := w.curPackage.interfaces[ft.Name]; ok {
- return ft.Name, &TypeInfo{Kind: KindInterface, X: ft, Name: ft.Name, T: typ, Type: w.nodeString(w.namelessType(typ))}, nil
- }
- if typ, ok := w.curPackage.interfaces[ft.Name]; ok {
- return ft.Name, &TypeInfo{Kind: KindInterface, X: ft, Name: ft.Name, T: typ, Type: w.nodeString(w.namelessType(typ))}, nil
- }
- if typ, ok := w.curPackage.structs[ft.Name]; ok {
- return ft.Name, &TypeInfo{Kind: KindStruct, X: ft, Name: ft.Name, T: typ, Type: w.nodeString(w.namelessType(typ))}, nil
- }
- if typ, ok := w.curPackage.types[ft.Name]; ok {
- return ft.Name, &TypeInfo{Kind: KindType, X: ft, Name: ft.Name, T: typ, Type: w.nodeString(w.namelessType(typ))}, nil
- }
- if isBuiltinType(ft.Name) {
- return ft.Name, &TypeInfo{Kind: KindBuiltin, X: ft, Name: ft.Name}, nil
- }
- return "", nil, fmt.Errorf("lookup unknown ident %v", v)
- case *ast.FuncLit:
- if inRange(ft.Body, p) {
- info, err := w.lookupStmt(ft.Body, p)
- if err == nil {
- return "", info, nil
- }
- return "", nil, err
- }
- return w.lookupExpr(ft.Type, p)
- case *ast.ParenExpr:
- return w.lookupExpr(ft.X, p)
- case *ast.SelectorExpr:
- switch st := ft.X.(type) {
- case *ast.Ident:
- if inRange(st, p) {
- return w.lookupExpr(st, p)
- }
- s, info, err := w.lookupExpr(st, p)
- if err != nil {
- return "", nil, err
- }
- typ := info.Type
- if typ == "" {
- typ = s
- }
- fname := typ + "." + ft.Sel.Name
- typ = strings.TrimLeft(typ, "*")
- if fn, ok := w.curPackage.functions[fname]; ok {
- return fname, &TypeInfo{Kind: KindMethod, X: st, Name: fname, T: fn.ft, Type: w.nodeString(w.namelessType(fn.ft))}, nil
- }
- info, e := w.lookupFunction(typ, ft.Sel.Name)
- if e != nil {
- return "", nil, e
- }
- return fname, info, nil
- case *ast.SelectorExpr:
- if inRange(st.X, p) {
- return w.lookupExpr(st.X, p)
- }
- if inRange(st, p) {
- return w.lookupExpr(st, p)
- }
- typ, err := w.varValueType(st, 0)
- if err != nil {
- return "", nil, err
- }
- /*
- typ = strings.TrimLeft(typ, "*")
- if t := w.curPackage.findType(typ); t != nil {
- if ss, ok := t.(*ast.StructType); ok {
- for _, fi := range ss.Fields.List {
- for _, n := range fi.Names {
- if n.Name == st.Sel.Name {
- //return fname, &TypeInfo{Kind: KindField, X: n, Name: fname, T: fi.Type, Type: w.nodeString(w.namelessType(fi.Type))}, nil
- typ = w.nodeString(w.namelessType(fi.Type))
- }
- }
- }
- }
- }
- */
- info, e := w.lookupFunction(typ, ft.Sel.Name)
- if e != nil {
- return "", nil, e
- }
- return typ + "." + st.Sel.Name, info, nil
- case *ast.CallExpr:
- if inRange(st, p) {
- return w.lookupExpr(st, p)
- }
- if info, err := w.lookupExprInfo(st, p); err == nil {
- if fn, ok := info.X.(*ast.FuncType); ok {
- if fn.Results.NumFields() == 1 {
- info, err := w.lookupFunction(w.nodeString(fn.Results.List[0].Type), ft.Sel.Name)
- if err == nil {
- return info.Name, info, err
- }
- return "", nil, err
- }
- }
- }
- //w.lookupFunction(w.nodeString(info.X))
- typ, err := w.varValueType(st, 0)
- if err != nil {
- return "", nil, err
- }
- info, e := w.lookupFunction(typ, ft.Sel.Name)
- if e != nil {
- return "", nil, e
- }
- return typ + "." + ft.Sel.Name, info, nil
- case *ast.TypeAssertExpr:
- if inRange(st.X, p) {
- return w.lookupExpr(st.X, p)
- }
- typ := w.nodeString(w.namelessType(st.Type))
- info, e := w.lookupFunction(typ, ft.Sel.Name)
- if e != nil {
- return "", nil, e
- }
- return typ + "." + ft.Sel.Name, info, nil
- default:
- return "", nil, fmt.Errorf("not find select %v %T", v, st)
- }
- }
- return "", nil, fmt.Errorf("not find call %v %T", w.nodeString(v), v.Fun)
- case *ast.SelectorExpr:
- switch st := v.X.(type) {
- case *ast.Ident:
- if inRange(st, p) {
- return w.lookupExpr(st, p)
- }
- info, err := w.lookupSelector(st.Name, v.Sel.Name)
- if err != nil {
- return "", nil, err
- }
- return st.Name + "." + v.Sel.Name, info, nil
- // case *ast.CallExpr:
- // typ, err := w.varValueType(v.X, index)
- // if err == nil {
- // if strings.HasPrefix(typ, "*") {
- // typ = typ[1:]
- // }
- // t := w.curPackage.findType(typ)
- // if st, ok := t.(*ast.StructType); ok {
- // for _, fi := range st.Fields.List {
- // for _, n := range fi.Names {
- // if n.Name == v.Sel.Name {
- // return w.varValueType(fi.Type, index)
- // }
- // }
- // }
- // }
- // }
- case *ast.SelectorExpr:
- if inRange(st.X, p) {
- return w.lookupExpr(st.X, p)
- }
-
- if inRange(st, p) {
- return w.lookupExpr(st, p)
- }
-
- typ, err := w.varValueType(st, 0)
- if err == nil {
- info, err := w.lookupSelector(typ, v.Sel.Name)
- if err != nil {
- return "", nil, err
- }
- return typ + v.Sel.Name, info, nil
- }
- // case *ast.IndexExpr:
- // typ, err := w.varValueType(st.X, 0)
- // log.Println(typ, err)
- // if err == nil {
- // if strings.HasPrefix(typ, "[]") {
- // return w.varSelectorType(typ[2:], v.Sel.Name)
- // }
- // }
- }
- return "", nil, fmt.Errorf("unknown lookup selector expr: %T %s.%s", v.X, w.nodeString(v.X), v.Sel)
-
- // s, info, err := w.lookupExpr(v.X, p)
- // if err != nil {
- // return "", "", err
- // }
- // if strings.HasPrefix(s, "*") {
- // s = s[1:]
- // }
- // if inRange(v.X, p) {
- // return s, info, err
- // }
- // t := w.curPackage.findType(s)
- // fname := s + "." + v.Sel.Name
- // if st, ok := t.(*ast.StructType); ok {
- // for _, fi := range st.Fields.List {
- // for _, n := range fi.Names {
- // if n.Name == v.Sel.Name {
- // return fname, fmt.Sprintf("var,%s,%s,%s", fname, w.nodeString(w.namelessType(fi.Type)), w.fset.Position(n.Pos())), nil
- // }
- // }
- // }
- // }
- // log.Println(">>", s)
- // info, e := w.lookupSelector(s, v.Sel.Name)
- // return fname, info, e
- case *ast.Ident:
- if typ, ok := w.localvar[v.Name]; ok {
- return typ.T, &TypeInfo{Kind: KindVar, X: v, Name: v.Name, T: typ.X, Type: typ.T}, nil
- }
- if typ, ok := w.curPackage.interfaces[v.Name]; ok {
- return v.Name, &TypeInfo{Kind: KindInterface, X: v, Name: v.Name, T: typ, Type: "interface"}, nil
- }
- if typ, ok := w.curPackage.structs[v.Name]; ok {
- return v.Name, &TypeInfo{Kind: KindStruct, X: v, Name: v.Name, T: typ, Type: "struct"}, nil
- }
- if typ, ok := w.curPackage.types[v.Name]; ok {
- return v.Name, &TypeInfo{Kind: KindType, X: v, Name: v.Name, T: typ, Type: v.Name}, nil
- }
- if typ, ok := w.curPackage.vars[v.Name]; ok {
- return v.Name, &TypeInfo{Kind: KindVar, X: v, Name: v.Name, T: typ.X, Type: typ.T}, nil
- }
- if typ, ok := w.curPackage.consts[v.Name]; ok {
- return v.Name, &TypeInfo{Kind: KindConst, X: v, Name: v.Name, T: typ.X, Type: typ.T}, nil
- }
- if typ, ok := w.curPackage.functions[v.Name]; ok {
- return v.Name, &TypeInfo{Kind: KindFunc, X: typ.ft, Name: v.Name, T: typ.ft, Type: typ.sig}, nil
- }
- if p := w.findPackage(v.Name); p != nil {
- return v.Name, &TypeInfo{Kind: KindImport, X: v, Name: v.Name, Type: p.name}, nil
- }
- if isBuiltinType(v.Name) {
- return v.Name, &TypeInfo{Kind: KindBuiltin, Name: v.Name}, nil
- }
- return "", nil, fmt.Errorf("lookup unknown ident %v", v)
- //return v.Name, &TypeInfo{Kind: KindVar, X: v, Name: v.Name, T: v, Type: v.Name}, nil
- case *ast.IndexExpr:
- if inRange(v.Index, p) {
- return w.lookupExpr(v.Index, p)
- }
- return w.lookupExpr(v.X, p)
- case *ast.ParenExpr:
- return w.lookupExpr(v.X, p)
- case *ast.FuncLit:
- if inRange(v.Type, p) {
- return w.lookupExpr(v.Type, p)
- } else {
- w.lookupExpr(v.Type, p)
- }
- typ, err := w.varValueType(v.Type, 0)
- if err != nil {
- return "", nil, err
- }
- info, e := w.lookupStmt(v.Body, p)
- if e != nil {
- return "", nil, err
- }
- return typ, info, nil
- case *ast.FuncType:
- if v.Params != nil {
- for _, fd := range v.Params.List {
- if inRange(fd, p) {
- return w.lookupExpr(fd.Type, p)
- }
- for _, ident := range fd.Names {
- typ, err := w.varValueType(fd.Type, 0)
- if err == nil {
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- }
- }
- }
- }
- if v.Results != nil {
- for _, fd := range v.Results.List {
- if inRange(fd, p) {
- return w.lookupExpr(fd.Type, p)
- }
- for _, ident := range fd.Names {
- typ, err := w.varValueType(fd.Type, 0)
- if err == nil {
- w.localvar[ident.Name] = &ExprType{T: typ, X: ident}
- }
- }
- }
- }
- return "", nil, nil
- case *ast.ArrayType:
- s, info, err := w.lookupExpr(v.Elt, p)
- if err != nil {
- return "", nil, err
- }
- return "[]" + s, &TypeInfo{Kind: KindArray, Name: "[]" + info.Name, Type: "[]" + info.Type, T: info.T}, nil
- case *ast.SliceExpr:
- if inRange(v.High, p) {
- return w.lookupExpr(v.High, p)
- } else if inRange(v.Low, p) {
- return w.lookupExpr(v.Low, p)
- }
- return w.lookupExpr(v.X, p)
- case *ast.MapType:
- if inRange(v.Key, p) {
- return w.lookupExpr(v.Key, p)
- } else if inRange(v.Value, p) {
- return w.lookupExpr(v.Value, p)
- }
- typ, err := w.varValueType(v, 0)
- if err != nil {
- return "", nil, err
- }
- return typ, &TypeInfo{Kind: KindMap, X: v, Name: w.nodeString(v), T: v, Type: typ}, nil
- case *ast.ChanType:
- if inRange(v.Value, p) {
- return w.lookupExpr(v.Value, p)
- }
- typ, err := w.varValueType(v, 0)
- if err != nil {
- return "", nil, err
- }
- return typ, &TypeInfo{Kind: KindChan, X: v, Name: w.nodeString(v), T: v, Type: typ}, nil
- default:
- return "", nil, fmt.Errorf("not lookupExpr %v %T", w.nodeString(v), v)
- }
- return "", nil, fmt.Errorf("not lookupExpr %v %T", w.nodeString(vi), vi)
-}
-
-func (w *Walker) walkFile(file *ast.File) {
- // Not entering a scope here; file boundaries aren't interesting.
- for _, di := range file.Decls {
- switch d := di.(type) {
- case *ast.GenDecl:
- switch d.Tok {
- case token.IMPORT:
- for _, sp := range d.Specs {
- is := sp.(*ast.ImportSpec)
- fpath, err := strconv.Unquote(is.Path.Value)
- if err != nil {
- log.Fatal(err)
- }
- //name := path.Base(fpath)
- name := fpath
- if i := strings.LastIndexAny(name, ".-/\\"); i > 0 {
- name = name[i+1:]
- }
- if is.Name != nil {
- name = is.Name.Name
- }
- w.selectorFullPkg[name] = fpath
- }
- case token.CONST:
- for _, sp := range d.Specs {
- w.walkConst(sp.(*ast.ValueSpec))
- }
- case token.TYPE:
- for _, sp := range d.Specs {
- w.walkTypeSpec(sp.(*ast.TypeSpec))
- }
- case token.VAR:
- for _, sp := range d.Specs {
- w.walkVar(sp.(*ast.ValueSpec))
- }
- default:
- log.Fatalf("unknown token type %d in GenDecl", d.Tok)
- }
- case *ast.FuncDecl:
- // Ignore. Handled in subsequent pass, by go/doc.
- default:
- log.Printf("unhandled %T, %#v\n", di, di)
- printer.Fprint(os.Stderr, w.fset, di)
- os.Stderr.Write([]byte("\n"))
- }
- }
-}
-
-var constType = map[token.Token]string{
- token.INT: "ideal-int",
- token.FLOAT: "ideal-float",
- token.STRING: "ideal-string",
- token.CHAR: "ideal-char",
- token.IMAG: "ideal-imag",
-}
-
-var varType = map[token.Token]string{
- token.INT: "int",
- token.FLOAT: "float64",
- token.STRING: "string",
- token.CHAR: "rune",
- token.IMAG: "complex128",
-}
-
-var builtinTypes = []string{
- "bool", "byte", "complex64", "complex128", "error", "float32", "float64",
- "int", "int8", "int16", "int32", "int64", "rune", "string",
- "uint", "uint8", "uint16", "uint32", "uint64", "uintptr",
-}
-
-func isBuiltinType(typ string) bool {
- for _, v := range builtinTypes {
- if v == typ {
- return true
- }
- }
- return false
-}
-
-func constTypePriority(typ string) int {
- switch typ {
- case "complex128":
- return 100
- case "ideal-imag":
- return 99
- case "complex64":
- return 98
- case "float64":
- return 97
- case "ideal-float":
- return 96
- case "float32":
- return 95
- case "int64":
- return 94
- case "int", "uint", "uintptr":
- return 93
- case "ideal-int":
- return 92
- case "int16", "uint16", "int8", "uint8", "byte":
- return 91
- case "ideal-char":
- return 90
- }
- return 101
-}
-
-func (w *Walker) constRealType(typ string) string {
- pos := strings.Index(typ, ".")
- if pos >= 0 {
- pkg := typ[:pos]
- if pkg == "C" {
- return "int"
- }
- typ = typ[pos+1:]
- if p := w.findPackage(pkg); p != nil {
- ret := p.findType(typ)
- if ret != nil {
- return w.nodeString(w.namelessType(ret))
- }
- }
- } else {
- ret := w.curPackage.findType(typ)
- if ret != nil {
- return w.nodeString(w.namelessType(ret))
- }
- }
- return typ
-}
-
-func (w *Walker) constValueType(vi interface{}) (string, error) {
- switch v := vi.(type) {
- case *ast.BasicLit:
- litType, ok := constType[v.Kind]
- if !ok {
- return "", fmt.Errorf("unknown basic literal kind %#v", v)
- }
- return litType, nil
- case *ast.UnaryExpr:
- return w.constValueType(v.X)
- case *ast.SelectorExpr:
- lhs := w.nodeString(v.X)
- rhs := w.nodeString(v.Sel)
- //if CGO
- if lhs == "C" {
- return lhs + "." + rhs, nil
- }
- if p := w.findPackage(lhs); p != nil {
- if ret, ok := p.consts[rhs]; ok {
- return w.pkgRetType(p.name, ret.T), nil
- }
- }
- return "", fmt.Errorf("unknown constant reference to %s.%s", lhs, rhs)
- case *ast.Ident:
- if v.Name == "iota" {
- return "ideal-int", nil // hack.
- }
- if v.Name == "false" || v.Name == "true" {
- return "bool", nil
- }
- if t, ok := w.curPackage.consts[v.Name]; ok {
- return t.T, nil
- }
- return constDepPrefix + v.Name, nil
- case *ast.BinaryExpr:
- //== > < ! != >= <=
- if v.Op == token.EQL || v.Op == token.LSS || v.Op == token.GTR || v.Op == token.NOT ||
- v.Op == token.NEQ || v.Op == token.LEQ || v.Op == token.GEQ {
- return "bool", nil
- }
- left, err := w.constValueType(v.X)
- if err != nil {
- return "", err
- }
- if v.Op == token.SHL || v.Op == token.SHR {
- return left, err
- }
- right, err := w.constValueType(v.Y)
- if err != nil {
- return "", err
- }
- //const left != right , one or two is ideal-
- if left != right {
- if strings.HasPrefix(left, constDepPrefix) && strings.HasPrefix(right, constDepPrefix) {
- // Just pick one.
- // e.g. text/scanner GoTokens const-dependency:ScanIdents, const-dependency:ScanFloats
- return left, nil
- }
- lp := constTypePriority(w.constRealType(left))
- rp := constTypePriority(w.constRealType(right))
- if lp >= rp {
- return left, nil
- } else {
- return right, nil
- }
- return "", fmt.Errorf("in BinaryExpr, unhandled type mismatch; left=%q, right=%q", left, right)
- }
- return left, nil
- case *ast.CallExpr:
- // Not a call, but a type conversion.
- typ := w.nodeString(v.Fun)
- switch typ {
- case "complex":
- return "complex128", nil
- case "real", "imag":
- return "float64", nil
- }
- return typ, nil
- case *ast.ParenExpr:
- return w.constValueType(v.X)
- }
- return "", fmt.Errorf("unknown const value type %T", vi)
-}
-
-func (w *Walker) pkgRetType(pkg, ret string) string {
- pkg = pkg[strings.LastIndex(pkg, "/")+1:]
- if strings.HasPrefix(ret, "[]") {
- return "[]" + w.pkgRetType(pkg, ret[2:])
- }
- if strings.HasPrefix(ret, "*") {
- return "*" + w.pkgRetType(pkg, ret[1:])
- }
- if ast.IsExported(ret) {
- return pkg + "." + ret
- }
- return ret
-}
-
-func (w *Walker) findStructFieldType(st ast.Expr, name string) ast.Expr {
- _, expr := w.findStructField(st, name)
- return expr
-}
-
-func (w *Walker) findStructFieldFunction(st ast.Expr, name string) (*TypeInfo, error) {
- if s, ok := st.(*ast.StructType); ok {
- for _, fi := range s.Fields.List {
- typ := fi.Type
- if fi.Names == nil {
- switch v := typ.(type) {
- case *ast.Ident:
- if t := w.curPackage.findType(v.Name); t != nil {
- return w.lookupFunction(v.Name, name)
- }
- case *ast.SelectorExpr:
- pt := w.nodeString(typ)
- pos := strings.Index(pt, ".")
- if pos != -1 {
- if p := w.findPackage(pt[:pos]); p != nil {
- if t := p.findType(pt[pos+1:]); t != nil {
- return w.lookupFunction(pt, name)
- }
- }
- }
- case *ast.StarExpr:
- return w.findStructFieldFunction(v.X, name)
- default:
- if apiVerbose {
- log.Printf("unable to handle embedded %T", typ)
- }
- }
- }
- }
- }
- return nil, nil
-}
-
-func (w *Walker) findStructField(st ast.Expr, name string) (*ast.Ident, ast.Expr) {
- if s, ok := st.(*ast.StructType); ok {
- for _, fi := range s.Fields.List {
- typ := fi.Type
- for _, n := range fi.Names {
- if n.Name == name {
- return n, fi.Type
- }
- }
- if fi.Names == nil {
- switch v := typ.(type) {
- case *ast.Ident:
- if t := w.curPackage.findType(v.Name); t != nil {
- if v.Name == name {
- return v, v
- }
- id, expr := w.findStructField(t, name)
- if id != nil {
- return id, expr
- }
- }
- case *ast.StarExpr:
- switch vv := v.X.(type) {
- case *ast.Ident:
- if t := w.curPackage.findType(vv.Name); t != nil {
- if vv.Name == name {
- return vv, v.X
- }
- id, expr := w.findStructField(t, name)
- if id != nil {
- return id, expr
- }
- }
- case *ast.SelectorExpr:
- pt := w.nodeString(typ)
- pos := strings.Index(pt, ".")
- if pos != -1 {
- if p := w.findPackage(pt[:pos]); p != nil {
- if t := p.findType(pt[pos+1:]); t != nil {
- return w.findStructField(t, name)
- }
- }
- }
- default:
- if apiVerbose {
- log.Printf("unable to handle embedded starexpr before %T", typ)
- }
- }
- case *ast.SelectorExpr:
- pt := w.nodeString(typ)
- pos := strings.Index(pt, ".")
- if pos != -1 {
- if p := w.findPackage(pt[:pos]); p != nil {
- if t := p.findType(pt[pos+1:]); t != nil {
- return w.findStructField(t, name)
- }
- }
- }
- default:
- if apiVerbose {
- log.Printf("unable to handle embedded %T", typ)
- }
- }
- }
- }
- }
- return nil, nil
-}
-
-func (w *Walker) lookupFunction(name, sel string) (*TypeInfo, error) {
- name = strings.TrimLeft(name, "*")
- if p := w.findPackage(name); p != nil {
- fn := p.findCallFunc(sel)
- if fn != nil {
- return &TypeInfo{Kind: KindFunc, X: fn, Name: name + "." + sel, T: fn, Type: w.nodeString(w.namelessType(fn))}, nil
- }
- }
- pos := strings.Index(name, ".")
- if pos != -1 {
- pkg := name[:pos]
- typ := name[pos+1:]
- if p := w.findPackage(pkg); p != nil {
- if ident, fn := p.findMethod(typ, sel); fn != nil {
- return &TypeInfo{Kind: KindMethod, X: fn, Name: name + "." + sel, T: ident, Type: w.nodeString(w.namelessType(fn))}, nil
- }
- }
- return nil, fmt.Errorf("not lookup pkg type function pkg: %s, %s. %s. %s", name, pkg, typ, sel)
- }
-
- //find local var.func()
- if ns, nt, n := w.resolveName(name); n >= 0 {
- var vt string
- if nt != nil {
- vt = w.nodeString(w.namelessType(nt))
- } else if ns != nil {
- typ, err := w.varValueType(ns, n)
- if err == nil {
- vt = typ
- }
- } else {
- typ := w.curPackage.findSelectorType(name)
- if typ != nil {
- vt = w.nodeString(w.namelessType(typ))
- }
- }
- if strings.HasPrefix(vt, "*") {
- vt = vt[1:]
- }
- if vt == "error" && sel == "Error" {
- return &TypeInfo{Kind: KindBuiltin, Name: "error.Error", Type: "()string"}, nil
- }
- if fn, ok := w.curPackage.functions[vt+"."+sel]; ok {
- return &TypeInfo{Kind: KindMethod, X: fn.ft, Name: name + "." + sel, T: fn.ft, Type: w.nodeString(w.namelessType(fn))}, nil
- }
- }
- if typ, ok := w.curPackage.structs[name]; ok {
- if fn, ok := w.curPackage.functions[name+"."+sel]; ok {
- return &TypeInfo{Kind: KindMethod, X: fn.ft, Name: name + "." + sel, T: fn.ft, Type: w.nodeString(w.namelessType(fn.ft))}, nil
- }
- if info, err := w.findStructFieldFunction(typ, sel); err == nil {
- return info, nil
- }
- // struct field is type function
- if ft := w.findStructFieldType(typ, sel); ft != nil {
- typ, err := w.varValueType(ft, 0)
- if err != nil {
- typ = w.nodeString(ft)
- }
- return &TypeInfo{Kind: KindField, X: ft, Name: name + "." + sel, T: ft, Type: typ}, nil
- }
- }
-
- if ident, fn := w.curPackage.findMethod(name, sel); ident != nil && fn != nil {
- return &TypeInfo{Kind: KindMethod, X: fn, Name: name + "." + sel, T: ident, Type: w.nodeString(w.namelessType(fn))}, nil
- }
-
- if p := w.findPackage(name); p != nil {
- fn := p.findCallFunc(sel)
- if fn != nil {
- return &TypeInfo{Kind: KindFunc, X: fn, Name: name + "." + sel, T: fn, Type: w.nodeString(w.namelessType(fn))}, nil
- }
- return nil, fmt.Errorf("not find pkg func0 %v.%v", p.name, sel)
- }
- return nil, fmt.Errorf("not lookup func %v.%v", name, sel)
-}
-
-func (w *Walker) varFunctionType(name, sel string, index int) (string, error) {
- name = strings.TrimLeft(name, "*")
- pos := strings.Index(name, ".")
- if pos != -1 {
- pkg := name[:pos]
- typ := name[pos+1:]
-
- if p := w.findPackage(pkg); p != nil {
- _, fn := p.findMethod(typ, sel)
- if fn != nil {
- ret := funcRetType(fn, index)
- if ret != nil {
- return w.pkgRetType(p.name, w.nodeString(w.namelessType(ret))), nil
- }
- }
- }
- return "", fmt.Errorf("unknown pkg type function pkg: %s.%s.%s", pkg, typ, sel)
- }
- //find local var
- if v, ok := w.localvar[name]; ok {
- vt := v.T
- if strings.HasPrefix(vt, "*") {
- vt = vt[1:]
- }
- if vt == "error" && sel == "Error" {
- return "string", nil
- }
- typ, err := w.varFunctionType(vt, sel, 0)
- if err == nil {
- return typ, nil
- }
- }
- //find global var.func()
- if ns, nt, n := w.resolveName(name); n >= 0 {
- var vt string
- if nt != nil {
- vt = w.nodeString(w.namelessType(nt))
- } else if ns != nil {
- typ, err := w.varValueType(ns, n)
- if err == nil {
- vt = typ
- }
- } else {
- typ := w.curPackage.findSelectorType(name)
- if typ != nil {
- vt = w.nodeString(w.namelessType(typ))
- }
- }
- if strings.HasPrefix(vt, "*") {
- vt = vt[1:]
- }
- if vt == "error" && sel == "Error" {
- return "string", nil
- }
- if fn, ok := w.curPackage.functions[vt+"."+sel]; ok {
- return w.nodeString(w.namelessType(funcRetType(fn.ft, index))), nil
- }
- }
- if typ, ok := w.curPackage.structs[name]; ok {
- if ft := w.findStructFieldType(typ, sel); ft != nil {
- return w.varValueType(ft, index)
- }
- }
- //find pkg.func()
- if p := w.findPackage(name); p != nil {
- typ := p.findCallType(sel, index)
- if typ != nil {
- return w.pkgRetType(p.name, w.nodeString(w.namelessType(typ))), nil
- }
- //log.Println("->", p.functions)
- return "", fmt.Errorf("not find pkg func1 %v . %v", p.name, sel)
- }
- return "", fmt.Errorf("not find func %v.%v", name, sel)
-}
-
-func (w *Walker) lookupSelector(name string, sel string) (*TypeInfo, error) {
- name = strings.TrimLeft(name, "*")
- pos := strings.Index(name, ".")
- if pos != -1 {
- pkg := name[:pos]
- typ := name[pos+1:]
- if p := w.findPackage(pkg); p != nil {
- t := p.findType(typ)
- if t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return &TypeInfo{Kind: KindField, X: typ, Name: name + "." + sel, T: typ, Type: w.pkgRetType(p.name, w.nodeString(w.namelessType(typ)))}, nil
- }
- }
- }
- return nil, fmt.Errorf("lookup unknown pkg type selector pkg: %s.%s %s", pkg, typ, sel)
- }
-
- if lv, ok := w.localvar[name]; ok {
- return w.lookupSelector(lv.T, sel)
- }
-
- vs, vt, n := w.resolveName(name)
- if n >= 0 {
- var typ string
- if vt != nil {
- typ = w.nodeString(w.namelessType(vt))
- } else {
- typ, _ = w.varValueType(vs, n)
- }
- if strings.HasPrefix(typ, "*") {
- typ = typ[1:]
- }
- //typ is type, find real type
- for k, v := range w.curPackage.types {
- if k == typ {
- typ = w.nodeString(w.namelessType(v))
- }
- }
- pos := strings.Index(typ, ".")
- if pos == -1 {
- t := w.curPackage.findType(typ)
- if t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return &TypeInfo{Kind: KindField, X: typ, Name: name + "." + sel, T: typ, Type: w.nodeString(w.namelessType(typ))}, nil
- }
- }
- } else {
- name := typ[:pos]
- typ = typ[pos+1:]
- if p := w.findPackage(name); p != nil {
- t := p.findType(typ)
- if t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return &TypeInfo{Kind: KindField, X: typ, Name: name + "." + sel, T: typ, Type: w.nodeString(w.namelessType(typ))}, nil
- }
- }
- }
- }
- }
- if p := w.findPackage(name); p != nil {
- typ := p.findSelectorType(sel)
- if typ != nil {
- return &TypeInfo{Kind: KindType, X: typ, Name: name + "." + sel, T: typ, Type: w.pkgRetType(p.name, w.nodeString(w.namelessType(typ)))}, nil
- }
- }
- t := w.curPackage.findType(name)
- if t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return &TypeInfo{Kind: KindField, X: typ, Name: name + "." + sel, T: typ, Type: w.nodeString(w.namelessType(typ))}, nil
- }
- }
- if t, ok := w.curPackage.types[name]; ok {
- return w.lookupSelector(w.nodeString(t), sel)
- }
- return nil, fmt.Errorf("unknown selector expr ident: %s.%s", name, sel)
-}
-
-func (w *Walker) varSelectorType(name string, sel string) (string, error) {
- name = strings.TrimLeft(name, "*")
- pos := strings.Index(name, ".")
- if pos != -1 {
- pkg := name[:pos]
- typ := name[pos+1:]
- if p := w.findPackage(pkg); p != nil {
- t := p.findType(typ)
- if t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return w.pkgRetType(pkg, w.nodeString(w.namelessType(typ))), nil
- }
- }
- }
- return "", fmt.Errorf("unknown pkg type selector pkg: %s.%s.%s", pkg, typ, sel)
- }
- //check local
- if lv, ok := w.localvar[name]; ok {
- return w.varSelectorType(lv.T, sel)
- }
- //check struct
- if t := w.curPackage.findType(name); t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return w.nodeString(w.namelessType(typ)), nil
- }
- }
- //check var
- vs, vt, n := w.resolveName(name)
- if n >= 0 {
- var typ string
- if vt != nil {
- typ = w.nodeString(w.namelessType(vt))
- } else {
- typ, _ = w.varValueType(vs, n)
- }
- if strings.HasPrefix(typ, "*") {
- typ = typ[1:]
- }
- //typ is type, find real type
- for k, v := range w.curPackage.types {
- if k == typ {
- typ = w.nodeString(w.namelessType(v))
- }
- }
- pos := strings.Index(typ, ".")
- if pos == -1 {
- t := w.curPackage.findType(typ)
- if t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return w.nodeString(w.namelessType(typ)), nil
- }
- }
- } else {
- name := typ[:pos]
- typ = typ[pos+1:]
- if p := w.findPackage(name); p != nil {
- t := p.findType(typ)
- if t != nil {
- typ := w.findStructFieldType(t, sel)
- if typ != nil {
- return w.nodeString(w.namelessType(typ)), nil
- }
- }
- }
- }
- }
-
- if p := w.findPackage(name); p != nil {
- typ := p.findSelectorType(sel)
- if typ != nil {
- return w.pkgRetType(p.name, w.nodeString(w.namelessType(typ))), nil
- }
- }
- return "", fmt.Errorf("unknown var selector expr ident: %s.%s", name, sel)
-}
-
-func (w *Walker) varValueType(vi ast.Expr, index int) (string, error) {
- if vi == nil {
- return "", nil
- }
- switch v := vi.(type) {
- case *ast.BasicLit:
- litType, ok := varType[v.Kind]
- if !ok {
- return "", fmt.Errorf("unknown basic literal kind %#v", v)
- }
- return litType, nil
- case *ast.CompositeLit:
- return w.nodeString(v.Type), nil
- case *ast.FuncLit:
- return w.nodeString(w.namelessType(v.Type)), nil
- case *ast.InterfaceType:
- return w.nodeString(v), nil
- case *ast.Ellipsis:
- typ, err := w.varValueType(v.Elt, index)
- if err != nil {
- return "", err
- }
- return "[]" + typ, nil
- case *ast.StarExpr:
- typ, err := w.varValueType(v.X, index)
- if err != nil {
- return "", err
- }
- return "*" + typ, err
- case *ast.UnaryExpr:
- if v.Op == token.AND {
- typ, err := w.varValueType(v.X, index)
- return "*" + typ, err
- }
- return "", fmt.Errorf("unknown unary expr: %#v", v)
- case *ast.SelectorExpr:
- switch st := v.X.(type) {
- case *ast.Ident:
- return w.varSelectorType(st.Name, v.Sel.Name)
- case *ast.CallExpr:
- typ, err := w.varValueType(v.X, index)
- if err == nil {
- if strings.HasPrefix(typ, "*") {
- typ = typ[1:]
- }
- t := w.curPackage.findType(typ)
- if st, ok := t.(*ast.StructType); ok {
- for _, fi := range st.Fields.List {
- for _, n := range fi.Names {
- if n.Name == v.Sel.Name {
- return w.varValueType(fi.Type, index)
- }
- }
- }
- }
- }
- case *ast.SelectorExpr:
- typ, err := w.varValueType(v.X, index)
- if err == nil {
- return w.varSelectorType(typ, v.Sel.Name)
- }
- case *ast.IndexExpr:
- typ, err := w.varValueType(st.X, index)
- if err == nil {
- if strings.HasPrefix(typ, "[]") {
- return w.varSelectorType(typ[2:], v.Sel.Name)
- }
- }
- case *ast.CompositeLit:
- typ, err := w.varValueType(st.Type, 0)
- if err == nil {
- //log.Println(typ, v.Sel.Name)
- t, err := w.varSelectorType(typ, v.Sel.Name)
- if err == nil {
- return t, nil
- }
- }
- }
- return "", fmt.Errorf("var unknown selector expr: %T %s.%s", v.X, w.nodeString(v.X), v.Sel)
- case *ast.Ident:
- if v.Name == "true" || v.Name == "false" {
- return "bool", nil
- }
- if isBuiltinType(v.Name) {
- return v.Name, nil
- }
- if lv, ok := w.localvar[v.Name]; ok {
- return lv.T, nil
- }
- vt := w.curPackage.findType(v.Name)
- if vt != nil {
- if _, ok := vt.(*ast.StructType); ok {
- return v.Name, nil
- }
- return w.nodeString(vt), nil
- }
- vs, _, n := w.resolveName(v.Name)
- if n >= 0 {
- return w.varValueType(vs, n)
- }
- return "", fmt.Errorf("unresolved identifier: %q", v.Name)
- case *ast.BinaryExpr:
- //== > < ! != >= <=
- if v.Op == token.EQL || v.Op == token.LSS || v.Op == token.GTR || v.Op == token.NOT ||
- v.Op == token.NEQ || v.Op == token.LEQ || v.Op == token.GEQ {
- return "bool", nil
- }
- left, err := w.varValueType(v.X, index)
- if err != nil {
- return "", err
- }
- right, err := w.varValueType(v.Y, index)
- if err != nil {
- return "", err
- }
- if left != right {
- return "", fmt.Errorf("in BinaryExpr, unhandled type mismatch; left=%q, right=%q", left, right)
- }
- return left, nil
- case *ast.ParenExpr:
- return w.varValueType(v.X, index)
- case *ast.CallExpr:
- switch ft := v.Fun.(type) {
- case *ast.ArrayType:
- return w.nodeString(v.Fun), nil
- case *ast.Ident:
- switch ft.Name {
- case "make":
- return w.nodeString(w.namelessType(v.Args[0])), nil
- case "new":
- return "*" + w.nodeString(w.namelessType(v.Args[0])), nil
- case "append":
- return w.varValueType(v.Args[0], 0)
- case "recover":
- return "interface{}", nil
- case "len", "cap", "copy":
- return "int", nil
- case "complex":
- return "complex128", nil
- case "real":
- return "float64", nil
- case "imag":
- return "float64", nil
- }
- if isBuiltinType(ft.Name) {
- return ft.Name, nil
- }
- typ := w.curPackage.findCallType(ft.Name, index)
- if typ != nil {
- return w.nodeString(w.namelessType(typ)), nil
- }
- //if local var type
- if fn, ok := w.localvar[ft.Name]; ok {
- typ := fn.T
- if strings.HasPrefix(typ, "func(") {
- expr, err := parser.ParseExpr(typ + "{}")
- if err == nil {
- if fl, ok := expr.(*ast.FuncLit); ok {
- retType := funcRetType(fl.Type, index)
- if retType != nil {
- return w.nodeString(w.namelessType(retType)), nil
- }
- }
- }
- }
- }
- //if var is func() type
- vs, _, n := w.resolveName(ft.Name)
- if n >= 0 {
- if vs != nil {
- typ, err := w.varValueType(vs, n)
- if err == nil {
- if strings.HasPrefix(typ, "func(") {
- expr, err := parser.ParseExpr(typ + "{}")
- if err == nil {
- if fl, ok := expr.(*ast.FuncLit); ok {
- retType := funcRetType(fl.Type, index)
- if retType != nil {
- return w.nodeString(w.namelessType(retType)), nil
- }
- }
- }
- }
- }
- }
- }
- return "", fmt.Errorf("unknown funcion %s %s", w.curPackageName, ft.Name)
- case *ast.SelectorExpr:
- typ, err := w.varValueType(ft.X, index)
- if err == nil {
- if strings.HasPrefix(typ, "*") {
- typ = typ[1:]
- }
- retType := w.curPackage.findCallType(typ+"."+ft.Sel.Name, index)
- if retType != nil {
- return w.nodeString(w.namelessType(retType)), nil
- }
- }
- switch st := ft.X.(type) {
- case *ast.Ident:
- return w.varFunctionType(st.Name, ft.Sel.Name, index)
- case *ast.CallExpr:
- typ, err := w.varValueType(st, 0)
- if err != nil {
- return "", err
- }
- return w.varFunctionType(typ, ft.Sel.Name, index)
- case *ast.SelectorExpr:
- typ, err := w.varValueType(st, index)
- if err == nil {
- return w.varFunctionType(typ, ft.Sel.Name, index)
- }
- case *ast.IndexExpr:
- typ, err := w.varValueType(st.X, index)
- if err == nil {
- if strings.HasPrefix(typ, "[]") {
- return w.varFunctionType(typ[2:], ft.Sel.Name, index)
- }
- }
- case *ast.TypeAssertExpr:
- typ := w.nodeString(w.namelessType(st.Type))
- typ = strings.TrimLeft(typ, "*")
- return w.varFunctionType(typ, ft.Sel.Name, index)
- }
- return "", fmt.Errorf("unknown var function selector %v %T", w.nodeString(ft.X), ft.X)
- case *ast.FuncLit:
- retType := funcRetType(ft.Type, index)
- if retType != nil {
- return w.nodeString(w.namelessType(retType)), nil
- }
- case *ast.CallExpr:
- typ, err := w.varValueType(v.Fun, 0)
- if err == nil && strings.HasPrefix(typ, "func(") {
- expr, err := parser.ParseExpr(typ + "{}")
- if err == nil {
- if fl, ok := expr.(*ast.FuncLit); ok {
- retType := funcRetType(fl.Type, index)
- if retType != nil {
- return w.nodeString(w.namelessType(retType)), nil
- }
- }
- }
- }
- }
- return "", fmt.Errorf("not a known function %T %v", v.Fun, w.nodeString(v.Fun))
- case *ast.MapType:
- return fmt.Sprintf("map[%s](%s)", w.nodeString(w.namelessType(v.Key)), w.nodeString(w.namelessType(v.Value))), nil
- case *ast.ArrayType:
- return fmt.Sprintf("[]%s", w.nodeString(w.namelessType(v.Elt))), nil
- case *ast.FuncType:
- return w.nodeString(w.namelessType(v)), nil
- case *ast.IndexExpr:
- typ, err := w.varValueType(v.X, index)
- typ = strings.TrimLeft(typ, "*")
- if err == nil {
- if index == 0 {
- return typ, nil
- } else if index == 1 {
- return "bool", nil
- }
- if strings.HasPrefix(typ, "[]") {
- return typ[2:], nil
- } else if strings.HasPrefix(typ, "map[") {
- node, err := parser.ParseExpr(typ + "{}")
- if err == nil {
- if cl, ok := node.(*ast.CompositeLit); ok {
- if m, ok := cl.Type.(*ast.MapType); ok {
- return w.nodeString(w.namelessType(m.Value)), nil
- }
- }
- }
- }
- }
- return "", fmt.Errorf("unknown index %v %v %v %v", typ, v.X, index, err)
- case *ast.SliceExpr:
- return w.varValueType(v.X, index)
- case *ast.ChanType:
- typ, err := w.varValueType(v.Value, index)
- if err == nil {
- if v.Dir == ast.RECV {
- return "<-chan " + typ, nil
- } else if v.Dir == ast.SEND {
- return "chan<- " + typ, nil
- }
- return "chan " + typ, nil
- }
- case *ast.TypeAssertExpr:
- if index == 1 {
- return "bool", nil
- }
- return w.nodeString(w.namelessType(v.Type)), nil
- default:
- return "", fmt.Errorf("unknown value type %v %T", w.nodeString(vi), vi)
- }
- //panic("unreachable")
- return "", fmt.Errorf("unreachable value type %v %T", vi, vi)
-}
-
-// resolveName finds a top-level node named name and returns the node
-// v and its type t, if known.
-func (w *Walker) resolveName(name string) (v ast.Expr, t interface{}, n int) {
- for _, file := range w.curPackage.apkg.Files {
- for _, di := range file.Decls {
- switch d := di.(type) {
- case *ast.GenDecl:
- switch d.Tok {
- case token.VAR:
- for _, sp := range d.Specs {
- vs := sp.(*ast.ValueSpec)
- for i, vname := range vs.Names {
- if vname.Name == name {
- if len(vs.Values) == 1 {
- return vs.Values[0], vs.Type, i
- }
- return nil, vs.Type, i
- }
- }
- }
- }
- }
- }
- }
- return nil, nil, -1
-}
-
-// constDepPrefix is a magic prefix that is used by constValueType
-// and walkConst to signal that a type isn't known yet. These are
-// resolved at the end of walking of a package's files.
-const constDepPrefix = "const-dependency:"
-
-func (w *Walker) walkConst(vs *ast.ValueSpec) {
- for _, ident := range vs.Names {
- if !w.isExtract(ident.Name) {
- continue
- }
- litType := ""
- if vs.Type != nil {
- litType = w.nodeString(vs.Type)
- } else {
- litType = w.lastConstType
- if vs.Values != nil {
- if len(vs.Values) != 1 {
- log.Fatalf("const %q, values: %#v", ident.Name, vs.Values)
- }
- var err error
- litType, err = w.constValueType(vs.Values[0])
- if err != nil {
- if apiVerbose {
- log.Printf("unknown kind in const %q (%T): %v", ident.Name, vs.Values[0], err)
- }
- litType = "unknown-type"
- }
- }
- }
- if strings.HasPrefix(litType, constDepPrefix) {
- dep := litType[len(constDepPrefix):]
- w.constDep[ident.Name] = &ExprType{T: dep, X: ident}
- continue
- }
- if litType == "" {
- if apiVerbose {
- log.Printf("unknown kind in const %q", ident.Name)
- }
- continue
- }
- w.lastConstType = litType
-
- w.curPackage.consts[ident.Name] = &ExprType{T: litType, X: ident}
-
- if isExtract(ident.Name) {
- w.emitFeature(fmt.Sprintf("const %s %s", ident, litType), ident.Pos())
- }
- }
-}
-
-func (w *Walker) resolveConstantDeps() {
- var findConstType func(string) string
- findConstType = func(ident string) string {
- if dep, ok := w.constDep[ident]; ok {
- return findConstType(dep.T)
- }
- if t, ok := w.curPackage.consts[ident]; ok {
- return t.T
- }
- return ""
- }
- for ident, info := range w.constDep {
- if !isExtract(ident) {
- continue
- }
- t := findConstType(ident)
- if t == "" {
- if apiVerbose {
- log.Printf("failed to resolve constant %q", ident)
- }
- continue
- }
- w.curPackage.consts[ident] = &ExprType{T: t, X: info.X}
- w.emitFeature(fmt.Sprintf("const %s %s", ident, t), info.X.Pos())
- }
-}
-
-func (w *Walker) walkVar(vs *ast.ValueSpec) {
- if vs.Type != nil {
- typ := w.nodeString(vs.Type)
- for _, ident := range vs.Names {
- w.curPackage.vars[ident.Name] = &ExprType{T: typ, X: ident}
- if isExtract(ident.Name) {
- w.emitFeature(fmt.Sprintf("var %s %s", ident, typ), ident.Pos())
- }
- }
- } else if len(vs.Names) == len(vs.Values) {
- for n, ident := range vs.Names {
- if !w.isExtract(ident.Name) {
- continue
- }
- typ, err := w.varValueType(vs.Values[n], n)
- if err != nil {
- if apiVerbose {
- log.Printf("unknown type of variable0 %q, type %T, error = %v, pos=%s",
- ident.Name, vs.Values[n], err, w.fset.Position(vs.Pos()))
- }
- typ = "unknown-type"
- }
- w.curPackage.vars[ident.Name] = &ExprType{T: typ, X: ident}
- if isExtract(ident.Name) {
- w.emitFeature(fmt.Sprintf("var %s %s", ident, typ), ident.Pos())
- }
- }
- } else if len(vs.Values) == 1 {
- for n, ident := range vs.Names {
- if !w.isExtract(ident.Name) {
- continue
- }
- typ, err := w.varValueType(vs.Values[0], n)
- if err != nil {
- if apiVerbose {
- log.Printf("unknown type of variable1 %q, type %T, error = %v, pos=%s",
- ident.Name, vs.Values[0], err, w.fset.Position(vs.Pos()))
- }
- typ = "unknown-type"
- }
- w.curPackage.vars[ident.Name] = &ExprType{T: typ, X: ident}
- if isExtract(ident.Name) {
- w.emitFeature(fmt.Sprintf("var %s %s", ident, typ), ident.Pos())
- }
- }
- }
-}
-
-func (w *Walker) nodeString(node interface{}) string {
- if node == nil {
- return ""
- }
- var b bytes.Buffer
- printer.Fprint(&b, w.fset, node)
- return b.String()
-}
-
-func (w *Walker) nodeDebug(node interface{}) string {
- if node == nil {
- return ""
- }
- var b bytes.Buffer
- ast.Fprint(&b, w.fset, node, nil)
- return b.String()
-}
-
-func (w *Walker) noteInterface(name string, it *ast.InterfaceType) {
- w.interfaces[pkgSymbol{w.curPackageName, name}] = it
-}
-
-func (w *Walker) walkTypeSpec(ts *ast.TypeSpec) {
- name := ts.Name.Name
- if !isExtract(name) {
- return
- }
- switch t := ts.Type.(type) {
- case *ast.StructType:
- w.walkStructType(name, t)
- case *ast.InterfaceType:
- w.walkInterfaceType(name, t)
- default:
- w.emitFeature(fmt.Sprintf("type %s %s", name, w.nodeString(ts.Type)), t.Pos()-token.Pos(len(name)+1))
- }
-}
-
-func (w *Walker) walkStructType(name string, t *ast.StructType) {
- typeStruct := fmt.Sprintf("type %s struct", name)
- w.emitFeature(typeStruct, t.Pos()-token.Pos(len(name)+1))
- pop := w.pushScope(typeStruct)
- defer pop()
- for _, f := range t.Fields.List {
- typ := f.Type
- for _, name := range f.Names {
- if isExtract(name.Name) {
- w.emitFeature(fmt.Sprintf("%s %s", name, w.nodeString(w.namelessType(typ))), name.Pos())
- }
- }
- if f.Names == nil {
- switch v := typ.(type) {
- case *ast.Ident:
- if isExtract(v.Name) {
- w.emitFeature(fmt.Sprintf("embedded %s", v.Name), v.Pos())
- }
- case *ast.StarExpr:
- switch vv := v.X.(type) {
- case *ast.Ident:
- if isExtract(vv.Name) {
- w.emitFeature(fmt.Sprintf("embedded *%s", vv.Name), vv.Pos())
- }
- case *ast.SelectorExpr:
- w.emitFeature(fmt.Sprintf("embedded %s", w.nodeString(typ)), v.Pos())
- default:
- log.Fatalf("unable to handle embedded starexpr before %T", typ)
- }
- case *ast.SelectorExpr:
- w.emitFeature(fmt.Sprintf("embedded %s", w.nodeString(typ)), v.Pos())
- default:
- if apiVerbose {
- log.Printf("unable to handle embedded %T", typ)
- }
- }
- }
- }
-}
-
-// typeMethod is a method of an interface.
-type typeMethod struct {
- name string // "Read"
- sig string // "([]byte) (int, error)", from funcSigString
- ft *ast.FuncType
- pos token.Pos
- recv ast.Expr
-}
-
-// interfaceMethods returns the expanded list of exported methods for an interface.
-// The boolean complete reports whether the list contains all methods (that is, the
-// interface has no unexported methods).
-// pkg is the complete package name ("net/http")
-// iname is the interface name.
-func (w *Walker) interfaceMethods(pkg, iname string) (methods []typeMethod, complete bool) {
- t, ok := w.interfaces[pkgSymbol{pkg, iname}]
- if !ok {
- if apiVerbose {
- log.Printf("failed to find interface %s.%s", pkg, iname)
- }
- return
- }
-
- complete = true
- for _, f := range t.Methods.List {
- typ := f.Type
- switch tv := typ.(type) {
- case *ast.FuncType:
- for _, mname := range f.Names {
- if isExtract(mname.Name) {
- ft := typ.(*ast.FuncType)
- methods = append(methods, typeMethod{
- name: mname.Name,
- sig: w.funcSigString(ft),
- ft: ft,
- pos: f.Pos(),
- })
- } else {
- complete = false
- }
- }
- case *ast.Ident:
- embedded := typ.(*ast.Ident).Name
- if embedded == "error" {
- methods = append(methods, typeMethod{
- name: "Error",
- sig: "() string",
- ft: &ast.FuncType{
- Params: nil,
- Results: &ast.FieldList{
- List: []*ast.Field{
- &ast.Field{
- Type: &ast.Ident{
- Name: "string",
- },
- },
- },
- },
- },
- pos: f.Pos(),
- })
- continue
- }
- if !isExtract(embedded) {
- log.Fatalf("unexported embedded interface %q in exported interface %s.%s; confused",
- embedded, pkg, iname)
- }
- m, c := w.interfaceMethods(pkg, embedded)
- methods = append(methods, m...)
- complete = complete && c
- case *ast.SelectorExpr:
- lhs := w.nodeString(tv.X)
- rhs := w.nodeString(tv.Sel)
- fpkg, ok := w.selectorFullPkg[lhs]
- if !ok {
- log.Fatalf("can't resolve selector %q in interface %s.%s", lhs, pkg, iname)
- }
- m, c := w.interfaceMethods(fpkg, rhs)
- methods = append(methods, m...)
- complete = complete && c
- default:
- log.Fatalf("unknown type %T in interface field", typ)
- }
- }
- return
-}
-
-func (w *Walker) walkInterfaceType(name string, t *ast.InterfaceType) {
- methNames := []string{}
- pop := w.pushScope("type " + name + " interface")
- methods, complete := w.interfaceMethods(w.curPackageName, name)
- w.packageMap[w.curPackageName].interfaceMethods[name] = methods
- for _, m := range methods {
- methNames = append(methNames, m.name)
- w.emitFeature(fmt.Sprintf("%s%s", m.name, m.sig), m.pos)
- }
- if !complete {
- // The method set has unexported methods, so all the
- // implementations are provided by the same package,
- // so the method set can be extended. Instead of recording
- // the full set of names (below), record only that there were
- // unexported methods. (If the interface shrinks, we will notice
- // because a method signature emitted during the last loop,
- // will disappear.)
- w.emitFeature("unexported methods", 0)
- }
- pop()
-
- if !complete {
- return
- }
-
- sort.Strings(methNames)
- if len(methNames) == 0 {
- w.emitFeature(fmt.Sprintf("type %s interface {}", name), t.Pos()-token.Pos(len(name)+1))
- } else {
- w.emitFeature(fmt.Sprintf("type %s interface { %s }", name, strings.Join(methNames, ", ")), t.Pos()-token.Pos(len(name)+1))
- }
-}
-
-func baseTypeName(x ast.Expr) (name string, imported bool) {
- switch t := x.(type) {
- case *ast.Ident:
- return t.Name, false
- case *ast.SelectorExpr:
- if _, ok := t.X.(*ast.Ident); ok {
- // only possible for qualified type names;
- // assume type is imported
- return t.Sel.Name, true
- }
- case *ast.StarExpr:
- return baseTypeName(t.X)
- }
- return
-}
-
-func (w *Walker) peekFuncDecl(f *ast.FuncDecl) {
- var fname = f.Name.Name
- var recv ast.Expr
- if f.Recv != nil {
- recvTypeName, imp := baseTypeName(f.Recv.List[0].Type)
- if imp {
- return
- }
- fname = recvTypeName + "." + f.Name.Name
- recv = f.Recv.List[0].Type
- }
- // Record return type for later use.
- //if f.Type.Results != nil && len(f.Type.Results.List) >= 1 {
- // record all function
- w.curPackage.functions[fname] = typeMethod{
- name: fname,
- sig: w.funcSigString(f.Type),
- ft: f.Type,
- pos: f.Pos(),
- recv: recv,
- }
- //}
-}
-
-func (w *Walker) walkFuncDecl(f *ast.FuncDecl) {
- if !w.isExtract(f.Name.Name) {
- return
- }
- if f.Recv != nil {
- // Method.
- recvType := w.nodeString(f.Recv.List[0].Type)
- keep := isExtract(recvType) ||
- (strings.HasPrefix(recvType, "*") &&
- isExtract(recvType[1:]))
- if !keep {
- return
- }
- w.emitFeature(fmt.Sprintf("method (%s) %s%s", recvType, f.Name.Name, w.funcSigString(f.Type)), f.Name.Pos())
- return
- }
- // Else, a function
- w.emitFeature(fmt.Sprintf("func %s%s", f.Name.Name, w.funcSigString(f.Type)), f.Name.Pos())
-}
-
-func (w *Walker) funcSigString(ft *ast.FuncType) string {
- var b bytes.Buffer
- writeField := func(b *bytes.Buffer, f *ast.Field) {
- if n := len(f.Names); n > 1 {
- for i := 0; i < n; i++ {
- if i > 0 {
- b.WriteString(", ")
- }
- b.WriteString(w.nodeString(w.namelessType(f.Type)))
- }
- } else {
- b.WriteString(w.nodeString(w.namelessType(f.Type)))
- }
- }
- b.WriteByte('(')
- if ft.Params != nil {
- for i, f := range ft.Params.List {
- if i > 0 {
- b.WriteString(", ")
- }
- writeField(&b, f)
- }
- }
- b.WriteByte(')')
- if ft.Results != nil {
- nr := 0
- for _, f := range ft.Results.List {
- if n := len(f.Names); n > 1 {
- nr += n
- } else {
- nr++
- }
- }
- if nr > 0 {
- b.WriteByte(' ')
- if nr > 1 {
- b.WriteByte('(')
- }
- for i, f := range ft.Results.List {
- if i > 0 {
- b.WriteString(", ")
- }
- writeField(&b, f)
- }
- if nr > 1 {
- b.WriteByte(')')
- }
- }
- }
- return b.String()
-}
-
-// namelessType returns a type node that lacks any variable names.
-func (w *Walker) namelessType(t interface{}) interface{} {
- ft, ok := t.(*ast.FuncType)
- if !ok {
- return t
- }
- return &ast.FuncType{
- Params: w.namelessFieldList(ft.Params),
- Results: w.namelessFieldList(ft.Results),
- }
-}
-
-// namelessFieldList returns a deep clone of fl, with the cloned fields
-// lacking names.
-func (w *Walker) namelessFieldList(fl *ast.FieldList) *ast.FieldList {
- fl2 := &ast.FieldList{}
- if fl != nil {
- for _, f := range fl.List {
- n := len(f.Names)
- if n >= 1 {
- for i := 0; i < n; i++ {
- fl2.List = append(fl2.List, w.namelessField(f))
- }
- } else {
- fl2.List = append(fl2.List, w.namelessField(f))
- }
- }
- }
- return fl2
-}
-
-// namelessField clones f, but not preserving the names of fields.
-// (comments and tags are also ignored)
-func (w *Walker) namelessField(f *ast.Field) *ast.Field {
- return &ast.Field{
- Type: f.Type,
- }
-}
-
-func (w *Walker) emitFeature(feature string, pos token.Pos) {
- if !w.wantedPkg[w.curPackage.name] {
- return
- }
- more := strings.Index(feature, "\n")
- if more != -1 {
- if len(feature) <= 1024 {
- feature = strings.Replace(feature, "\n", " ", 1)
- feature = strings.Replace(feature, "\n", ";", -1)
- feature = strings.Replace(feature, "\t", " ", -1)
- } else {
- feature = feature[:more] + " ...more"
- if apiVerbose {
- log.Printf("feature contains newlines: %v, %s", feature, w.fset.Position(pos))
- }
- }
- }
- f := strings.Join(w.scope, w.sep) + w.sep + feature
-
- if _, dup := w.curPackage.features[f]; dup {
- return
- }
- w.curPackage.features[f] = pos
-}
-
-func strListContains(l []string, s string) bool {
- for _, v := range l {
- if v == s {
- return true
- }
- }
- return false
-}
-
-const goosList = "darwin freebsd linux netbsd openbsd plan9 windows "
-const goarchList = "386 amd64 arm "
-
-// goodOSArchFile returns false if the name contains a $GOOS or $GOARCH
-// suffix which does not match the current system.
-// The recognized name formats are:
-//
-// name_$(GOOS).*
-// name_$(GOARCH).*
-// name_$(GOOS)_$(GOARCH).*
-// name_$(GOOS)_test.*
-// name_$(GOARCH)_test.*
-// name_$(GOOS)_$(GOARCH)_test.*
-//
-func isOSArchFile(ctxt *build.Context, name string) bool {
- if dot := strings.Index(name, "."); dot != -1 {
- name = name[:dot]
- }
- l := strings.Split(name, "_")
- if n := len(l); n > 0 && l[n-1] == "test" {
- l = l[:n-1]
- }
- n := len(l)
- if n >= 2 && knownOS[l[n-2]] && knownArch[l[n-1]] {
- return l[n-2] == ctxt.GOOS && l[n-1] == ctxt.GOARCH
- }
- if n >= 1 && knownOS[l[n-1]] {
- return l[n-1] == ctxt.GOOS
- }
- if n >= 1 && knownArch[l[n-1]] {
- return l[n-1] == ctxt.GOARCH
- }
- return false
-}
-
-var knownOS = make(map[string]bool)
-var knownArch = make(map[string]bool)
-
-func init() {
- for _, v := range strings.Fields(goosList) {
- knownOS[v] = true
- }
- for _, v := range strings.Fields(goarchList) {
- knownArch[v] = true
- }
-}
diff --git a/vendor/github.com/visualfc/gotools/goimports/fix.go b/vendor/github.com/visualfc/gotools/goimports/fix.go
deleted file mode 100644
index 0fabc77..0000000
--- a/vendor/github.com/visualfc/gotools/goimports/fix.go
+++ /dev/null
@@ -1,394 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package goimports
-
-import (
- "fmt"
- "go/ast"
- "go/build"
- "go/parser"
- "go/token"
- "os"
- "path"
- "path/filepath"
- "strings"
- "sync"
-
- "github.com/visualfc/gotools/stdlib"
-
- "golang.org/x/tools/go/ast/astutil"
-)
-
-// importToGroup is a list of functions which map from an import path to
-// a group number.
-var importToGroup = []func(importPath string) (num int, ok bool){
- func(importPath string) (num int, ok bool) {
- if strings.HasPrefix(importPath, "appengine") {
- return 2, true
- }
- return
- },
- func(importPath string) (num int, ok bool) {
- if strings.Contains(importPath, ".") {
- return 1, true
- }
- return
- },
-}
-
-func importGroup(importPath string) int {
- for _, fn := range importToGroup {
- if n, ok := fn(importPath); ok {
- return n
- }
- }
- return 0
-}
-
-func fixImports(fset *token.FileSet, f *ast.File) (added []string, err error) {
- // refs are a set of possible package references currently unsatisfied by imports.
- // first key: either base package (e.g. "fmt") or renamed package
- // second key: referenced package symbol (e.g. "Println")
- refs := make(map[string]map[string]bool)
-
- // decls are the current package imports. key is base package or renamed package.
- decls := make(map[string]*ast.ImportSpec)
-
- // collect potential uses of packages.
- var visitor visitFn
- visitor = visitFn(func(node ast.Node) ast.Visitor {
- if node == nil {
- return visitor
- }
- switch v := node.(type) {
- case *ast.ImportSpec:
- if v.Name != nil {
- decls[v.Name.Name] = v
- } else {
- local := importPathToName(strings.Trim(v.Path.Value, `\"`))
- decls[local] = v
- }
- case *ast.SelectorExpr:
- xident, ok := v.X.(*ast.Ident)
- if !ok {
- break
- }
- if xident.Obj != nil {
- // if the parser can resolve it, it's not a package ref
- break
- }
- pkgName := xident.Name
- if refs[pkgName] == nil {
- refs[pkgName] = make(map[string]bool)
- }
- if decls[pkgName] == nil {
- refs[pkgName][v.Sel.Name] = true
- }
- }
- return visitor
- })
- ast.Walk(visitor, f)
-
- // Search for imports matching potential package references.
- searches := 0
- type result struct {
- ipath string
- name string
- err error
- }
- results := make(chan result)
- for pkgName, symbols := range refs {
- if len(symbols) == 0 {
- continue // skip over packages already imported
- }
- go func(pkgName string, symbols map[string]bool) {
- ipath, rename, err := findImport(pkgName, symbols)
- r := result{ipath: ipath, err: err}
- if rename {
- r.name = pkgName
- }
- results <- r
- }(pkgName, symbols)
- searches++
- }
- for i := 0; i < searches; i++ {
- result := <-results
- if result.err != nil {
- return nil, result.err
- }
- if result.ipath != "" {
- if result.name != "" {
- astutil.AddNamedImport(fset, f, result.name, result.ipath)
- } else {
- astutil.AddImport(fset, f, result.ipath)
- }
- added = append(added, result.ipath)
- }
- }
-
- // Nil out any unused ImportSpecs, to be removed in following passes
- unusedImport := map[string]bool{}
- for pkg, is := range decls {
- if refs[pkg] == nil && pkg != "_" && pkg != "." {
- unusedImport[strings.Trim(is.Path.Value, `"`)] = true
- }
- }
- for ipath := range unusedImport {
- if ipath == "C" {
- // Don't remove cgo stuff.
- continue
- }
- astutil.DeleteImport(fset, f, ipath)
- }
-
- return added, nil
-}
-
-// importPathToName returns the package name for the given import path.
-var importPathToName = importPathToNameGoPath
-
-// importPathToNameBasic assumes the package name is the base of import path.
-func importPathToNameBasic(importPath string) (packageName string) {
- return path.Base(importPath)
-}
-
-// importPathToNameGoPath finds out the actual package name, as declared in its .go files.
-// If there's a problem, it falls back to using importPathToNameBasic.
-func importPathToNameGoPath(importPath string) (packageName string) {
- if stdlib.IsStdPkg(importPath) {
- return path.Base(importPath)
- }
- if buildPkg, err := build.Import(importPath, "", 0); err == nil {
- return buildPkg.Name
- } else {
- return importPathToNameBasic(importPath)
- }
-}
-
-type pkg struct {
- importpath string // full pkg import path, e.g. "net/http"
- dir string // absolute file path to pkg directory e.g. "/usr/lib/go/src/fmt"
-}
-
-var pkgIndexOnce sync.Once
-
-var pkgIndex struct {
- sync.Mutex
- m map[string][]pkg // shortname => []pkg, e.g "http" => "net/http"
-}
-
-// gate is a semaphore for limiting concurrency.
-type gate chan struct{}
-
-func (g gate) enter() { g <- struct{}{} }
-func (g gate) leave() { <-g }
-
-// fsgate protects the OS & filesystem from too much concurrency.
-// Too much disk I/O -> too many threads -> swapping and bad scheduling.
-var fsgate = make(gate, 8)
-
-func loadPkgIndex() {
- pkgIndex.Lock()
- pkgIndex.m = make(map[string][]pkg)
- pkgIndex.Unlock()
-
- var wg sync.WaitGroup
- for _, path := range build.Default.SrcDirs() {
- fsgate.enter()
- f, err := os.Open(path)
- if err != nil {
- fsgate.leave()
- fmt.Fprint(os.Stderr, err)
- continue
- }
- children, err := f.Readdir(-1)
- f.Close()
- fsgate.leave()
- if err != nil {
- fmt.Fprint(os.Stderr, err)
- continue
- }
- for _, child := range children {
- if child.IsDir() {
- wg.Add(1)
- go func(path, name string) {
- defer wg.Done()
- loadPkg(&wg, path, name)
- }(path, child.Name())
- }
- }
- }
- wg.Wait()
-}
-
-func loadPkg(wg *sync.WaitGroup, root, pkgrelpath string) {
- importpath := filepath.ToSlash(pkgrelpath)
- dir := filepath.Join(root, importpath)
-
- fsgate.enter()
- defer fsgate.leave()
- pkgDir, err := os.Open(dir)
- if err != nil {
- return
- }
- children, err := pkgDir.Readdir(-1)
- pkgDir.Close()
- if err != nil {
- return
- }
- // hasGo tracks whether a directory actually appears to be a
- // Go source code directory. If $GOPATH == $HOME, and
- // $HOME/src has lots of other large non-Go projects in it,
- // then the calls to importPathToName below can be expensive.
- hasGo := false
- for _, child := range children {
- name := child.Name()
- if name == "" {
- continue
- }
- if c := name[0]; c == '.' || ('0' <= c && c <= '9') {
- continue
- }
- if strings.HasSuffix(name, ".go") {
- hasGo = true
- }
- if child.IsDir() {
- wg.Add(1)
- go func(root, name string) {
- defer wg.Done()
- loadPkg(wg, root, name)
- }(root, filepath.Join(importpath, name))
- }
- }
- if hasGo {
- shortName := importPathToName(importpath)
- pkgIndex.Lock()
- pkgIndex.m[shortName] = append(pkgIndex.m[shortName], pkg{
- importpath: importpath,
- dir: dir,
- })
- pkgIndex.Unlock()
- }
-
-}
-
-// loadExports returns a list exports for a package.
-var loadExports = loadExportsGoPath
-
-func loadExportsGoPath(dir string) map[string]bool {
- exports := make(map[string]bool)
- buildPkg, err := build.ImportDir(dir, 0)
- if err != nil {
- if strings.Contains(err.Error(), "no buildable Go source files in") {
- return nil
- }
- fmt.Fprintf(os.Stderr, "could not import %q: %v\n", dir, err)
- return nil
- }
- fset := token.NewFileSet()
- for _, files := range [...][]string{buildPkg.GoFiles, buildPkg.CgoFiles} {
- for _, file := range files {
- f, err := parser.ParseFile(fset, filepath.Join(dir, file), nil, 0)
- if err != nil {
- fmt.Fprintf(os.Stderr, "could not parse %q: %v\n", file, err)
- continue
- }
- for name := range f.Scope.Objects {
- if ast.IsExported(name) {
- exports[name] = true
- }
- }
- }
- }
- return exports
-}
-
-// findImport searches for a package with the given symbols.
-// If no package is found, findImport returns "".
-// Declared as a variable rather than a function so goimports can be easily
-// extended by adding a file with an init function.
-var findImport = findImportGoPath
-
-func findImportGoPath(pkgName string, symbols map[string]bool) (string, bool, error) {
- // Fast path for the standard library.
- // In the common case we hopefully never have to scan the GOPATH, which can
- // be slow with moving disks.
- if pkg, rename, ok := findImportStdlib(pkgName, symbols); ok {
- return pkg, rename, nil
- }
-
- // TODO(sameer): look at the import lines for other Go files in the
- // local directory, since the user is likely to import the same packages
- // in the current Go file. Return rename=true when the other Go files
- // use a renamed package that's also used in the current file.
-
- pkgIndexOnce.Do(loadPkgIndex)
-
- // Collect exports for packages with matching names.
- var wg sync.WaitGroup
- var pkgsMu sync.Mutex // guards pkgs
- // full importpath => exported symbol => True
- // e.g. "net/http" => "Client" => True
- pkgs := make(map[string]map[string]bool)
- pkgIndex.Lock()
- for _, pkg := range pkgIndex.m[pkgName] {
- wg.Add(1)
- go func(importpath, dir string) {
- defer wg.Done()
- exports := loadExports(dir)
- if exports != nil {
- pkgsMu.Lock()
- pkgs[importpath] = exports
- pkgsMu.Unlock()
- }
- }(pkg.importpath, pkg.dir)
- }
- pkgIndex.Unlock()
- wg.Wait()
-
- // Filter out packages missing required exported symbols.
- for symbol := range symbols {
- for importpath, exports := range pkgs {
- if !exports[symbol] {
- delete(pkgs, importpath)
- }
- }
- }
- if len(pkgs) == 0 {
- return "", false, nil
- }
-
- // If there are multiple candidate packages, the shortest one wins.
- // This is a heuristic to prefer the standard library (e.g. "bytes")
- // over e.g. "github.com/foo/bar/bytes".
- shortest := ""
- for importPath := range pkgs {
- if shortest == "" || len(importPath) < len(shortest) {
- shortest = importPath
- }
- }
- return shortest, false, nil
-}
-
-type visitFn func(node ast.Node) ast.Visitor
-
-func (fn visitFn) Visit(node ast.Node) ast.Visitor {
- return fn(node)
-}
-
-func findImportStdlib(shortPkg string, symbols map[string]bool) (importPath string, rename, ok bool) {
- for symbol := range symbols {
- path := stdlib.Symbols[shortPkg+"."+symbol]
- if path == "" {
- return "", false, false
- }
- if importPath != "" && importPath != path {
- // Ambiguous. Symbols pointed to different things.
- return "", false, false
- }
- importPath = path
- }
- return importPath, false, importPath != ""
-}
diff --git a/vendor/github.com/visualfc/gotools/goimports/goimports.go b/vendor/github.com/visualfc/gotools/goimports/goimports.go
deleted file mode 100644
index 0a9b108..0000000
--- a/vendor/github.com/visualfc/gotools/goimports/goimports.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package goimports
-
-import (
- "bytes"
- "fmt"
- "go/parser"
- "go/printer"
- "go/scanner"
- "go/token"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "runtime"
- "strings"
- "sync"
-
- "github.com/visualfc/gotools/command"
-)
-
-var Command = &command.Command{
- Run: runGoimports,
- UsageLine: "goimports [flags] [path ...]",
- Short: "updates go import lines",
- Long: `goimports updates your Go import lines, adding missing ones and removing unreferenced ones. `,
-}
-
-var (
- goimportsList bool
- goimportsWrite bool
- goimportsDiff bool
- goimportsAllErrors bool
-
- // layout control
- goimportsComments bool
- goimportsTabWidth int
- goimportsTabIndent bool
-)
-
-//func init
-func init() {
- Command.Flag.BoolVar(&goimportsList, "l", false, "list files whose formatting differs from goimport's")
- Command.Flag.BoolVar(&goimportsWrite, "w", false, "write result to (source) file instead of stdout")
- Command.Flag.BoolVar(&goimportsDiff, "d", false, "display diffs instead of rewriting files")
- Command.Flag.BoolVar(&goimportsAllErrors, "e", false, "report all errors (not just the first 10 on different lines)")
-
- // layout control
- Command.Flag.BoolVar(&goimportsComments, "comments", true, "print comments")
- Command.Flag.IntVar(&goimportsTabWidth, "tabwidth", 8, "tab width")
- Command.Flag.BoolVar(&goimportsTabIndent, "tabs", true, "indent with tabs")
-}
-
-var (
- fileSet = token.NewFileSet() // per process FileSet
- exitCode = 0
-
- initModesOnce sync.Once // guards calling initModes
- parserMode parser.Mode
- printerMode printer.Mode
- options *Options
-)
-
-func report(err error) {
- scanner.PrintError(os.Stderr, err)
- exitCode = 2
-}
-
-func runGoimports(cmd *command.Command, args []string) error {
- runtime.GOMAXPROCS(runtime.NumCPU())
-
- if goimportsTabWidth < 0 {
- fmt.Fprintf(os.Stderr, "negative tabwidth %d\n", goimportsTabWidth)
- exitCode = 2
- os.Exit(exitCode)
- return os.ErrInvalid
- }
-
- options = &Options{
- TabWidth: goimportsTabWidth,
- TabIndent: goimportsTabIndent,
- Comments: goimportsComments,
- AllErrors: goimportsAllErrors,
- Fragment: true,
- }
-
- if len(args) == 0 {
- if err := processFile("", os.Stdin, os.Stdout, true); err != nil {
- report(err)
- }
- } else {
- for _, path := range args {
- switch dir, err := os.Stat(path); {
- case err != nil:
- report(err)
- case dir.IsDir():
- walkDir(path)
- default:
- if err := processFile(path, nil, os.Stdout, false); err != nil {
- report(err)
- }
- }
- }
- }
- os.Exit(exitCode)
- return nil
-}
-
-func isGoFile(f os.FileInfo) bool {
- // ignore non-Go files
- name := f.Name()
- return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go")
-}
-
-func processFile(filename string, in io.Reader, out io.Writer, stdin bool) error {
- if in == nil {
- f, err := os.Open(filename)
- if err != nil {
- return err
- }
- defer f.Close()
- in = f
- }
-
- src, err := ioutil.ReadAll(in)
- if err != nil {
- return err
- }
-
- res, err := Process(filename, src, options)
- if err != nil {
- return err
- }
-
- if !bytes.Equal(src, res) {
- // formatting has changed
- if goimportsList {
- fmt.Fprintln(out, filename)
- }
- if goimportsWrite {
- err = ioutil.WriteFile(filename, res, 0)
- if err != nil {
- return err
- }
- }
- if goimportsDiff {
- data, err := diff(src, res)
- if err != nil {
- return fmt.Errorf("computing diff: %s", err)
- }
- fmt.Printf("diff %s gofmt/%s\n", filename, filename)
- out.Write(data)
- }
- }
-
- if !goimportsList && !goimportsWrite && !goimportsDiff {
- _, err = out.Write(res)
- }
-
- return err
-}
-
-func visitFile(path string, f os.FileInfo, err error) error {
- if err == nil && isGoFile(f) {
- err = processFile(path, nil, os.Stdout, false)
- }
- if err != nil {
- report(err)
- }
- return nil
-}
-
-func walkDir(path string) {
- filepath.Walk(path, visitFile)
-}
-
-func diff(b1, b2 []byte) (data []byte, err error) {
- f1, err := ioutil.TempFile("", "gofmt")
- if err != nil {
- return
- }
- defer os.Remove(f1.Name())
- defer f1.Close()
-
- f2, err := ioutil.TempFile("", "gofmt")
- if err != nil {
- return
- }
- defer os.Remove(f2.Name())
- defer f2.Close()
-
- f1.Write(b1)
- f2.Write(b2)
-
- data, err = exec.Command("diff", "-u", f1.Name(), f2.Name()).CombinedOutput()
- if len(data) > 0 {
- // diff exits with a non-zero status when the files don't match.
- // Ignore that failure as long as we get output.
- err = nil
- }
- return
-}
diff --git a/vendor/github.com/visualfc/gotools/goimports/imports.go b/vendor/github.com/visualfc/gotools/goimports/imports.go
deleted file mode 100644
index 161b5c0..0000000
--- a/vendor/github.com/visualfc/gotools/goimports/imports.go
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Package imports implements a Go pretty-printer (like package "go/format")
-// that also adds or removes import statements as necessary.
-package goimports
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "go/ast"
- "go/format"
- "go/parser"
- "go/printer"
- "go/token"
- "io"
- "regexp"
- "strconv"
- "strings"
-
- "golang.org/x/tools/go/ast/astutil"
-)
-
-// Options specifies options for processing files.
-type Options struct {
- Fragment bool // Accept fragment of a source file (no package statement)
- AllErrors bool // Report all errors (not just the first 10 on different lines)
-
- Comments bool // Print comments (true if nil *Options provided)
- TabIndent bool // Use tabs for indent (true if nil *Options provided)
- Format bool
- TabWidth int // Tab width (8 if nil *Options provided)
-}
-
-// Process formats and adjusts imports for the provided file.
-// If opt is nil the defaults are used.
-func Process(filename string, src []byte, opt *Options) ([]byte, error) {
- if opt == nil {
- opt = &Options{Comments: true, TabIndent: true, TabWidth: 8}
- }
-
- fileSet := token.NewFileSet()
- file, adjust, err := goImportParse(fileSet, filename, src, opt)
- if err != nil {
- return nil, err
- }
-
- _, err = fixImports(fileSet, file)
- if err != nil {
- return nil, err
- }
-
- sortImports(fileSet, file)
- imps := astutil.Imports(fileSet, file)
-
- var spacesBefore []string // import paths we need spaces before
- for _, impSection := range imps {
- // Within each block of contiguous imports, see if any
- // import lines are in different group numbers. If so,
- // we'll need to put a space between them so it's
- // compatible with gofmt.
- lastGroup := -1
- for _, importSpec := range impSection {
- importPath, _ := strconv.Unquote(importSpec.Path.Value)
- groupNum := importGroup(importPath)
- if groupNum != lastGroup && lastGroup != -1 {
- spacesBefore = append(spacesBefore, importPath)
- }
- lastGroup = groupNum
- }
-
- }
-
- printerMode := printer.UseSpaces
- if opt.TabIndent {
- printerMode |= printer.TabIndent
- }
- printConfig := &printer.Config{Mode: printerMode, Tabwidth: opt.TabWidth}
-
- var buf bytes.Buffer
- err = printConfig.Fprint(&buf, fileSet, file)
- if err != nil {
- return nil, err
- }
- out := buf.Bytes()
- if adjust != nil {
- out = adjust(src, out)
- }
- if len(spacesBefore) > 0 {
- out = addImportSpaces(bytes.NewReader(out), spacesBefore)
- }
- if opt.Format {
- out, err = format.Source(out)
- if err != nil {
- return nil, err
- }
- }
- return out, nil
-}
-
-// parse parses src, which was read from filename,
-// as a Go source file or statement list.
-func goImportParse(fset *token.FileSet, filename string, src []byte, opt *Options) (*ast.File, func(orig, src []byte) []byte, error) {
- parserMode := parser.Mode(0)
- if opt.Comments {
- parserMode |= parser.ParseComments
- }
- if opt.AllErrors {
- parserMode |= parser.AllErrors
- }
-
- // Try as whole source file.
- file, err := parser.ParseFile(fset, filename, src, parserMode)
- if err == nil {
- return file, nil, nil
- }
- // If the error is that the source file didn't begin with a
- // package line and we accept fragmented input, fall through to
- // try as a source fragment. Stop and return on any other error.
- if !opt.Fragment || !strings.Contains(err.Error(), "expected 'package'") {
- return nil, nil, err
- }
-
- // If this is a declaration list, make it a source file
- // by inserting a package clause.
- // Insert using a ;, not a newline, so that the line numbers
- // in psrc match the ones in src.
- psrc := append([]byte("package main;"), src...)
- file, err = parser.ParseFile(fset, filename, psrc, parserMode)
- if err == nil {
- // If a main function exists, we will assume this is a main
- // package and leave the file.
- if containsMainFunc(file) {
- return file, nil, nil
- }
-
- adjust := func(orig, src []byte) []byte {
- // Remove the package clause.
- // Gofmt has turned the ; into a \n.
- src = src[len("package main\n"):]
- return matchSpace(orig, src)
- }
- return file, adjust, nil
- }
- // If the error is that the source file didn't begin with a
- // declaration, fall through to try as a statement list.
- // Stop and return on any other error.
- if !strings.Contains(err.Error(), "expected declaration") {
- return nil, nil, err
- }
-
- // If this is a statement list, make it a source file
- // by inserting a package clause and turning the list
- // into a function body. This handles expressions too.
- // Insert using a ;, not a newline, so that the line numbers
- // in fsrc match the ones in src.
- fsrc := append(append([]byte("package p; func _() {"), src...), '}')
- file, err = parser.ParseFile(fset, filename, fsrc, parserMode)
- if err == nil {
- adjust := func(orig, src []byte) []byte {
- // Remove the wrapping.
- // Gofmt has turned the ; into a \n\n.
- src = src[len("package p\n\nfunc _() {"):]
- src = src[:len(src)-len("}\n")]
- // Gofmt has also indented the function body one level.
- // Remove that indent.
- src = bytes.Replace(src, []byte("\n\t"), []byte("\n"), -1)
- return matchSpace(orig, src)
- }
- return file, adjust, nil
- }
-
- // Failed, and out of options.
- return nil, nil, err
-}
-
-// containsMainFunc checks if a file contains a function declaration with the
-// function signature 'func main()'
-func containsMainFunc(file *ast.File) bool {
- for _, decl := range file.Decls {
- if f, ok := decl.(*ast.FuncDecl); ok {
- if f.Name.Name != "main" {
- continue
- }
-
- if len(f.Type.Params.List) != 0 {
- continue
- }
-
- if f.Type.Results != nil && len(f.Type.Results.List) != 0 {
- continue
- }
-
- return true
- }
- }
-
- return false
-}
-
-func cutSpace(b []byte) (before, middle, after []byte) {
- i := 0
- for i < len(b) && (b[i] == ' ' || b[i] == '\t' || b[i] == '\n') {
- i++
- }
- j := len(b)
- for j > 0 && (b[j-1] == ' ' || b[j-1] == '\t' || b[j-1] == '\n') {
- j--
- }
- if i <= j {
- return b[:i], b[i:j], b[j:]
- }
- return nil, nil, b[j:]
-}
-
-// matchSpace reformats src to use the same space context as orig.
-// 1) If orig begins with blank lines, matchSpace inserts them at the beginning of src.
-// 2) matchSpace copies the indentation of the first non-blank line in orig
-// to every non-blank line in src.
-// 3) matchSpace copies the trailing space from orig and uses it in place
-// of src's trailing space.
-func matchSpace(orig []byte, src []byte) []byte {
- before, _, after := cutSpace(orig)
- i := bytes.LastIndex(before, []byte{'\n'})
- before, indent := before[:i+1], before[i+1:]
-
- _, src, _ = cutSpace(src)
-
- var b bytes.Buffer
- b.Write(before)
- for len(src) > 0 {
- line := src
- if i := bytes.IndexByte(line, '\n'); i >= 0 {
- line, src = line[:i+1], line[i+1:]
- } else {
- src = nil
- }
- if len(line) > 0 && line[0] != '\n' { // not blank
- b.Write(indent)
- }
- b.Write(line)
- }
- b.Write(after)
- return b.Bytes()
-}
-
-var impLine = regexp.MustCompile(`^\s+(?:[\w\.]+\s+)?"(.+)"`)
-
-func addImportSpaces(r io.Reader, breaks []string) []byte {
- var out bytes.Buffer
- sc := bufio.NewScanner(r)
- inImports := false
- done := false
- for sc.Scan() {
- s := sc.Text()
-
- if !inImports && !done && strings.HasPrefix(s, "import") {
- inImports = true
- }
- if inImports && (strings.HasPrefix(s, "var") ||
- strings.HasPrefix(s, "func") ||
- strings.HasPrefix(s, "const") ||
- strings.HasPrefix(s, "type")) {
- done = true
- inImports = false
- }
- if inImports && len(breaks) > 0 {
- if m := impLine.FindStringSubmatch(s); m != nil {
- if m[1] == string(breaks[0]) {
- out.WriteByte('\n')
- breaks = breaks[1:]
- }
- }
- }
-
- fmt.Fprintln(&out, s)
- }
- return out.Bytes()
-}
diff --git a/vendor/github.com/visualfc/gotools/goimports/sortimports.go b/vendor/github.com/visualfc/gotools/goimports/sortimports.go
deleted file mode 100644
index 35eaac7..0000000
--- a/vendor/github.com/visualfc/gotools/goimports/sortimports.go
+++ /dev/null
@@ -1,214 +0,0 @@
-// +build go1.2
-
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Hacked up copy of go/ast/import.go
-
-package goimports
-
-import (
- "go/ast"
- "go/token"
- "sort"
- "strconv"
-)
-
-// sortImports sorts runs of consecutive import lines in import blocks in f.
-// It also removes duplicate imports when it is possible to do so without data loss.
-func sortImports(fset *token.FileSet, f *ast.File) {
- for i, d := range f.Decls {
- d, ok := d.(*ast.GenDecl)
- if !ok || d.Tok != token.IMPORT {
- // Not an import declaration, so we're done.
- // Imports are always first.
- break
- }
-
- if len(d.Specs) == 0 {
- // Empty import block, remove it.
- f.Decls = append(f.Decls[:i], f.Decls[i+1:]...)
- }
-
- if !d.Lparen.IsValid() {
- // Not a block: sorted by default.
- continue
- }
-
- // Identify and sort runs of specs on successive lines.
- i := 0
- specs := d.Specs[:0]
- for j, s := range d.Specs {
- if j > i && fset.Position(s.Pos()).Line > 1+fset.Position(d.Specs[j-1].End()).Line {
- // j begins a new run. End this one.
- specs = append(specs, sortSpecs(fset, f, d.Specs[i:j])...)
- i = j
- }
- }
- specs = append(specs, sortSpecs(fset, f, d.Specs[i:])...)
- d.Specs = specs
-
- // Deduping can leave a blank line before the rparen; clean that up.
- if len(d.Specs) > 0 {
- lastSpec := d.Specs[len(d.Specs)-1]
- lastLine := fset.Position(lastSpec.Pos()).Line
- if rParenLine := fset.Position(d.Rparen).Line; rParenLine > lastLine+1 {
- fset.File(d.Rparen).MergeLine(rParenLine - 1)
- }
- }
- }
-}
-
-func importPath(s ast.Spec) string {
- t, err := strconv.Unquote(s.(*ast.ImportSpec).Path.Value)
- if err == nil {
- return t
- }
- return ""
-}
-
-func importName(s ast.Spec) string {
- n := s.(*ast.ImportSpec).Name
- if n == nil {
- return ""
- }
- return n.Name
-}
-
-func importComment(s ast.Spec) string {
- c := s.(*ast.ImportSpec).Comment
- if c == nil {
- return ""
- }
- return c.Text()
-}
-
-// collapse indicates whether prev may be removed, leaving only next.
-func collapse(prev, next ast.Spec) bool {
- if importPath(next) != importPath(prev) || importName(next) != importName(prev) {
- return false
- }
- return prev.(*ast.ImportSpec).Comment == nil
-}
-
-type posSpan struct {
- Start token.Pos
- End token.Pos
-}
-
-func sortSpecs(fset *token.FileSet, f *ast.File, specs []ast.Spec) []ast.Spec {
- // Can't short-circuit here even if specs are already sorted,
- // since they might yet need deduplication.
- // A lone import, however, may be safely ignored.
- if len(specs) <= 1 {
- return specs
- }
-
- // Record positions for specs.
- pos := make([]posSpan, len(specs))
- for i, s := range specs {
- pos[i] = posSpan{s.Pos(), s.End()}
- }
-
- // Identify comments in this range.
- // Any comment from pos[0].Start to the final line counts.
- lastLine := fset.Position(pos[len(pos)-1].End).Line
- cstart := len(f.Comments)
- cend := len(f.Comments)
- for i, g := range f.Comments {
- if g.Pos() < pos[0].Start {
- continue
- }
- if i < cstart {
- cstart = i
- }
- if fset.Position(g.End()).Line > lastLine {
- cend = i
- break
- }
- }
- comments := f.Comments[cstart:cend]
-
- // Assign each comment to the import spec preceding it.
- importComment := map[*ast.ImportSpec][]*ast.CommentGroup{}
- specIndex := 0
- for _, g := range comments {
- for specIndex+1 < len(specs) && pos[specIndex+1].Start <= g.Pos() {
- specIndex++
- }
- s := specs[specIndex].(*ast.ImportSpec)
- importComment[s] = append(importComment[s], g)
- }
-
- // Sort the import specs by import path.
- // Remove duplicates, when possible without data loss.
- // Reassign the import paths to have the same position sequence.
- // Reassign each comment to abut the end of its spec.
- // Sort the comments by new position.
- sort.Sort(byImportSpec(specs))
-
- // Dedup. Thanks to our sorting, we can just consider
- // adjacent pairs of imports.
- deduped := specs[:0]
- for i, s := range specs {
- if i == len(specs)-1 || !collapse(s, specs[i+1]) {
- deduped = append(deduped, s)
- } else {
- p := s.Pos()
- fset.File(p).MergeLine(fset.Position(p).Line)
- }
- }
- specs = deduped
-
- // Fix up comment positions
- for i, s := range specs {
- s := s.(*ast.ImportSpec)
- if s.Name != nil {
- s.Name.NamePos = pos[i].Start
- }
- s.Path.ValuePos = pos[i].Start
- s.EndPos = pos[i].End
- for _, g := range importComment[s] {
- for _, c := range g.List {
- c.Slash = pos[i].End
- }
- }
- }
-
- sort.Sort(byCommentPos(comments))
-
- return specs
-}
-
-type byImportSpec []ast.Spec // slice of *ast.ImportSpec
-
-func (x byImportSpec) Len() int { return len(x) }
-func (x byImportSpec) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x byImportSpec) Less(i, j int) bool {
- ipath := importPath(x[i])
- jpath := importPath(x[j])
-
- igroup := importGroup(ipath)
- jgroup := importGroup(jpath)
- if igroup != jgroup {
- return igroup < jgroup
- }
-
- if ipath != jpath {
- return ipath < jpath
- }
- iname := importName(x[i])
- jname := importName(x[j])
-
- if iname != jname {
- return iname < jname
- }
- return importComment(x[i]) < importComment(x[j])
-}
-
-type byCommentPos []*ast.CommentGroup
-
-func (x byCommentPos) Len() int { return len(x) }
-func (x byCommentPos) Swap(i, j int) { x[i], x[j] = x[j], x[i] }
-func (x byCommentPos) Less(i, j int) bool { return x[i].Pos() < x[j].Pos() }
diff --git a/vendor/github.com/visualfc/gotools/goimports/sortimports_compat.go b/vendor/github.com/visualfc/gotools/goimports/sortimports_compat.go
deleted file mode 100644
index 1624ce8..0000000
--- a/vendor/github.com/visualfc/gotools/goimports/sortimports_compat.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// +build !go1.2
-
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package goimports
-
-import "go/ast"
-
-// Go 1.1 users don't get fancy package grouping.
-// But this is still gofmt-compliant:
-
-var sortImports = ast.SortImports
diff --git a/vendor/github.com/visualfc/gotools/gopresent/gopresent.go b/vendor/github.com/visualfc/gotools/gopresent/gopresent.go
deleted file mode 100644
index e0242a2..0000000
--- a/vendor/github.com/visualfc/gotools/gopresent/gopresent.go
+++ /dev/null
@@ -1,383 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//modify 2013-2014 visualfc
-
-package gopresent
-
-import (
- "fmt"
- "html/template"
- "io"
- "os"
- "path/filepath"
-
- "github.com/visualfc/gotools/command"
- "golang.org/x/tools/present"
-)
-
-var Command = &command.Command{
- Run: runPresent,
- UsageLine: "gopresent",
- Short: "golang present util",
- Long: `golang present util`,
-}
-
-var presentVerifyOnly bool
-var presentInput string
-var presentStdout bool
-var presentOutput string
-
-func init() {
- Command.Flag.BoolVar(&presentVerifyOnly, "v", false, "verify present only")
- Command.Flag.BoolVar(&presentStdout, "stdout", false, "output use std output")
- Command.Flag.StringVar(&presentInput, "i", "", "input golang present file")
- Command.Flag.StringVar(&presentOutput, "o", "", "output html file name")
-}
-
-func runPresent(cmd *command.Command, args []string) error {
- if presentInput == "" || !isDoc(presentInput) {
- cmd.Usage()
- return os.ErrInvalid
- }
-
- if presentVerifyOnly {
- err := VerifyDoc(presentInput)
- if err != nil {
- fmt.Fprintf(os.Stderr, "present:%s", err)
- command.SetExitStatus(3)
- command.Exit()
- }
- return nil
- }
- w := os.Stdout
- if !presentStdout {
- if presentOutput == "" {
- presentOutput = presentInput + ".html"
- }
- ext := filepath.Ext(presentOutput)
- if ext != ".htm" && ext != ".html" {
- presentOutput += ".html"
- }
- var err error
- w, err = os.Create(presentOutput)
- if err != nil {
- fmt.Fprintf(os.Stderr, "present:%s", err)
- command.SetExitStatus(3)
- command.Exit()
- }
- }
- err := RenderDoc(w, presentInput)
- if err != nil {
- fmt.Fprintf(os.Stderr, "present:%s", err)
- command.SetExitStatus(3)
- command.Exit()
- }
- return nil
-}
-
-var extensions = map[string]string{
- ".slide": "slides.tmpl",
- ".article": "article.tmpl",
-}
-
-var extensions_tmpl = map[string]string{
- ".slide": slides_tmpl,
- ".article": article_tmpl,
-}
-
-func isDoc(path string) bool {
- _, ok := extensions[filepath.Ext(path)]
- return ok
-}
-
-func VerifyDoc(docFile string) error {
- doc, err := parse(docFile, 0)
- if err != nil {
- return err
- }
- dir := filepath.Dir(docFile)
- return verify_doc(dir, doc)
-}
-
-// renderDoc reads the present file, builds its template representation,
-// and executes the template, sending output to w.
-func renderDoc(w io.Writer, base, docFile string) error {
- // Read the input and build the doc structure.
- doc, err := parse(docFile, 0)
- if err != nil {
- return err
- }
-
- // Find which template should be executed.
- ext := filepath.Ext(docFile)
- contentTmpl, ok := extensions[ext]
- if !ok {
- return fmt.Errorf("no template for extension %v", ext)
- }
-
- // Locate the template file.
- actionTmpl := filepath.Join(base, "templates/action.tmpl")
- contentTmpl = filepath.Join(base, "templates", contentTmpl)
-
- // Read and parse the input.
- tmpl := present.Template()
- tmpl = tmpl.Funcs(template.FuncMap{"playable": playable})
- if _, err := tmpl.ParseFiles(actionTmpl, contentTmpl); err != nil {
- return err
- }
- // Execute the template.
- return doc.Render(w, tmpl)
-}
-
-func RenderDoc(w io.Writer, docFile string) error {
- // Read the input and build the doc structure.
- doc, err := parse(docFile, 0)
- if err != nil {
- return err
- }
-
- // Find which template should be executed.
- ext := filepath.Ext(docFile)
- contentTmpl, ok := extensions_tmpl[ext]
- if !ok {
- return fmt.Errorf("no template for extension %v", ext)
- }
-
- // Locate the template file.
- actionTmpl := action_tmpl //filepath.Join(base, "templates/action.tmpl")
- // Read and parse the input.
- tmpl := present.Template()
- tmpl = tmpl.Funcs(template.FuncMap{"playable": playable})
- if tmpl, err = tmpl.New("action").Parse(actionTmpl); err != nil {
- return err
- }
- if tmpl, err = tmpl.New("content").Parse(contentTmpl); err != nil {
- return err
- }
-
- // Execute the template.
- return doc.Render(w, tmpl)
-}
-
-func parse(name string, mode present.ParseMode) (*present.Doc, error) {
- f, err := os.Open(name)
- if err != nil {
- return nil, err
- }
- defer f.Close()
- return present.Parse(f, name, 0)
-}
-
-func playable(c present.Code) bool {
- return present.PlayEnabled && c.Play
-}
-
-func isSkipURL(url string) bool {
- if filepath.HasPrefix(url, "http://") {
- return true
- }
- if filepath.HasPrefix(url, "https://") {
- return true
- }
- return false
-}
-
-func verify_path(root string, url string) error {
- if isSkipURL(url) {
- return nil
- }
- path := url
- if !filepath.IsAbs(url) {
- path = filepath.Join(root, path)
- }
- _, err := os.Stat(path)
- if err != nil {
- return err
- }
- return nil
-}
-
-func verify_doc(root string, doc *present.Doc) error {
- for _, section := range doc.Sections {
- for _, elem := range section.Elem {
- switch i := elem.(type) {
- case present.Image:
- if err := verify_path(root, i.URL); err != nil {
- return fmt.Errorf("! .image %s not exist", i.URL)
- }
- }
- }
- }
- return nil
-}
-
-var action_tmpl = `
-{/*
-This is the action template.
-It determines how the formatting actions are rendered.
-*/}
-
-{{define "section"}}
- {{.FormattedNumber}} {{.Title}}
- {{range .Elem}}{{elem $.Template .}}{{end}}
-{{end}}
-
-{{define "list"}}
-
- {{range .Bullet}}
- {{style .}}
- {{end}}
-
-{{end}}
-
-{{define "text"}}
- {{if .Pre}}
- {{range .Lines}}{{.}}{{end}}
- {{else}}
-
- {{range $i, $l := .Lines}}{{if $i}}{{template "newline"}}
- {{end}}{{style $l}}{{end}}
-
- {{end}}
-{{end}}
-
-{{define "code"}}
- {{.Text}}
-{{end}}
-
-{{define "image"}}
-
-
-
-{{end}}
-
-{{define "iframe"}}
-
-{{end}}
-
-{{define "link"}}{{style .Label}}
{{end}}
-
-{{define "html"}}{{.HTML}}{{end}}
-`
-
-var article_tmpl = `
-{/* This is the article template. It defines how articles are formatted. */}
-
-{{define "root"}}
-
-
-
- {{.Title}}
-
-
-
-
-
-
-
-
{{.Title}}
- {{with .Subtitle}}{{.}}{{end}}
-
-
-
-
-
- {{with .Sections}}
-
- {{template "TOC" .}}
-
- {{end}}
-
- {{range .Sections}}
- {{elem $.Template .}}
- {{end}}{{/* of Section block */}}
-
-
Authors
- {{range .Authors}}
-
- {{range .Elem}}{{elem $.Template .}}{{end}}
-
- {{end}}
-
-
-
-
-
-{{end}}
-
-{{define "TOC"}}
-
- {{range .}}
- {{.Title}}
- {{with .Sections}}{{template "TOC" .}}{{end}}
- {{end}}
-
-{{end}}
-
-{{define "newline"}}
-{{/* No automatic line break. Paragraphs are free-form. */}}
-{{end}}
-`
-
-var slides_tmpl = `
-{/* This is the slide template. It defines how presentations are formatted. */}
-
-{{define "root"}}
-
-
-
- {{.Title}}
-
-
-
-
-
-
-
-
-
- {{.Title}}
- {{with .Subtitle}}{{.}} {{end}}
- {{if not .Time.IsZero}}{{.Time.Format "2 January 2006"}} {{end}}
- {{range .Authors}}
-
- {{range .TextElem}}{{elem $.Template .}}{{end}}
-
- {{end}}
-
-
- {{range $i, $s := .Sections}}
-
-
- {{if $s.Elem}}
- {{$s.Title}}
- {{range $s.Elem}}{{elem $.Template .}}{{end}}
- {{else}}
- {{$s.Title}}
- {{end}}
-
-
- {{end}}{{/* of Slide block */}}
-
-
- Thank you
- {{range .Authors}}
-
- {{range .Elem}}{{elem $.Template .}}{{end}}
-
- {{end}}
-
-
-
- {{if .PlayEnabled}}
-
- {{end}}
-
-{{end}}
-
-{{define "newline"}}
-
-{{end}}
-`
diff --git a/vendor/github.com/visualfc/gotools/jsonfmt/jsonfmt.go b/vendor/github.com/visualfc/gotools/jsonfmt/jsonfmt.go
deleted file mode 100644
index f9657ef..0000000
--- a/vendor/github.com/visualfc/gotools/jsonfmt/jsonfmt.go
+++ /dev/null
@@ -1,206 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package jsonfmt
-
-import (
- "bytes"
- "encoding/json"
- "fmt"
- "io"
- "io/ioutil"
- "os"
- "os/exec"
- "path/filepath"
- "strings"
-
- "github.com/visualfc/gotools/command"
-)
-
-var Command = &command.Command{
- Run: runJsonFmt,
- UsageLine: "jsonfmt",
- Short: "json format util",
- Long: `json format util.`,
-}
-
-var (
- jsonFmtList bool
- jsonFmtCompact bool
- jsonFmtWrite bool
- jsonFmtDiff bool
- jsonTabWidth int
- jsonTabIndent bool
-)
-
-func init() {
- Command.Flag.BoolVar(&jsonFmtList, "l", false, "list files whose formatting differs")
- Command.Flag.BoolVar(&jsonFmtCompact, "c", false, "compact json")
- Command.Flag.BoolVar(&jsonFmtWrite, "w", false, "write result to (source) file instead of stdout")
- Command.Flag.BoolVar(&jsonFmtDiff, "d", false, "display diffs instead of rewriting files")
- Command.Flag.IntVar(&jsonTabWidth, "tabwidth", 4, "tab width")
- Command.Flag.BoolVar(&jsonTabIndent, "tabs", false, "indent with tabs")
-}
-
-func runJsonFmt(cmd *command.Command, args []string) error {
- opt := &JsonFmtOption{}
- opt.List = jsonFmtList
- opt.Compact = jsonFmtCompact
- opt.IndentTab = jsonTabIndent
- opt.TabWidth = jsonTabWidth
- opt.Write = jsonFmtWrite
- opt.Diff = jsonFmtDiff
-
- if len(args) == 0 {
- if err := processJsonFile("", os.Stdin, os.Stdout, true, opt); err != nil {
- reportJsonError(err)
- }
- } else {
- for _, path := range args {
- switch dir, err := os.Stat(path); {
- case err != nil:
- reportJsonError(err)
- case dir.IsDir():
- filepath.Walk(path, func(path string, f os.FileInfo, err error) error {
- if err == nil && isJsonFile(f) {
- err = processJsonFile(path, nil, os.Stdout, false, opt)
- }
- if err != nil {
- reportJsonError(err)
- }
- return nil
- })
- default:
- if err := processJsonFile(path, nil, os.Stdout, false, opt); err != nil {
- reportJsonError(err)
- }
- }
- }
- }
- return nil
-}
-
-type JsonFmtOption struct {
- List bool
- Compact bool
- Format bool
- Write bool
- Diff bool
- IndentTab bool
- TabWidth int
-}
-
-func isJsonFile(f os.FileInfo) bool {
- // ignore non-Go files
- name := f.Name()
- return !f.IsDir() && !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".json")
-}
-
-func reportJsonError(err error) {
- fmt.Fprintf(os.Stderr, "%s\n", err)
- os.Exit(2)
-}
-
-func processJson(filename string, src []byte, opt *JsonFmtOption) ([]byte, error) {
- if opt.Compact {
- var out bytes.Buffer
- err := json.Compact(&out, src)
- if err != nil {
- return nil, err
- }
- return out.Bytes(), nil
- } else {
- var out bytes.Buffer
- var err error
- if opt.IndentTab {
- err = json.Indent(&out, src, "", "\t")
- } else {
- var indent string
- for i := 0; i < opt.TabWidth; i++ {
- indent += " "
- }
- err = json.Indent(&out, src, "", indent)
- }
- if err != nil {
- return nil, err
- }
- return out.Bytes(), nil
- }
- return src, nil
-}
-
-func processJsonFile(filename string, in io.Reader, out io.Writer, stdin bool, opt *JsonFmtOption) error {
- if in == nil {
- f, err := os.Open(filename)
- if err != nil {
- return err
- }
- defer f.Close()
- in = f
- }
-
- src, err := ioutil.ReadAll(in)
- if err != nil {
- return err
- }
-
- res, err := processJson(filename, src, opt)
- if err != nil {
- return err
- }
-
- if !bytes.Equal(src, res) {
- // formatting has changed
- if opt.List {
- fmt.Fprintln(out, filename)
- }
- if opt.Write {
- err = ioutil.WriteFile(filename, res, 0)
- if err != nil {
- return err
- }
- }
- if opt.Diff {
- data, err := diffJson(src, res)
- if err != nil {
- return fmt.Errorf("computing diff: %s", err)
- }
- fmt.Printf("diff %s json/%s\n", filename, filename)
- out.Write(data)
- }
- }
-
- if !opt.List && !opt.Write && !opt.Diff {
- _, err = out.Write(res)
- }
-
- return err
-}
-
-func diffJson(b1, b2 []byte) (data []byte, err error) {
- f1, err := ioutil.TempFile("", "json")
- if err != nil {
- return
- }
- defer os.Remove(f1.Name())
- defer f1.Close()
-
- f2, err := ioutil.TempFile("", "json")
- if err != nil {
- return
- }
- defer os.Remove(f2.Name())
- defer f2.Close()
-
- f1.Write(b1)
- f2.Write(b2)
-
- data, err = exec.Command("diff", "-u", f1.Name(), f2.Name()).CombinedOutput()
- if len(data) > 0 {
- // diff exits with a non-zero status when the files don't match.
- // Ignore that failure as long as we get output.
- err = nil
- }
- return
-}
diff --git a/vendor/github.com/visualfc/gotools/main.go b/vendor/github.com/visualfc/gotools/main.go
deleted file mode 100644
index bc14399..0000000
--- a/vendor/github.com/visualfc/gotools/main.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
- "github.com/visualfc/gotools/astview"
- "github.com/visualfc/gotools/command"
- "github.com/visualfc/gotools/docview"
- "github.com/visualfc/gotools/finddoc"
- "github.com/visualfc/gotools/goapi"
- "github.com/visualfc/gotools/goimports"
- "github.com/visualfc/gotools/gopresent"
- "github.com/visualfc/gotools/jsonfmt"
- "github.com/visualfc/gotools/oracle"
- "github.com/visualfc/gotools/pkgs"
- "github.com/visualfc/gotools/runcmd"
- "github.com/visualfc/gotools/types"
-)
-
-func init() {
- command.Register(types.Command)
- command.Register(jsonfmt.Command)
- command.Register(finddoc.Command)
- command.Register(runcmd.Command)
- command.Register(docview.Command)
- command.Register(astview.Command)
- command.Register(goimports.Command)
- command.Register(gopresent.Command)
- command.Register(goapi.Command)
- command.Register(pkgs.Command)
- command.Register(oracle.Command)
-}
-
-func main() {
- command.AppName = "gotools"
- command.AppVersion = "1.0"
- command.AppInfo = "Go tools for liteide."
- command.Main()
-}
diff --git a/vendor/github.com/visualfc/gotools/oracle/oracle.go b/vendor/github.com/visualfc/gotools/oracle/oracle.go
deleted file mode 100644
index eff6fae..0000000
--- a/vendor/github.com/visualfc/gotools/oracle/oracle.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package oracle
-
-import (
- "fmt"
- "go/build"
- "log"
- "os"
- "runtime"
-
- "github.com/visualfc/gotools/command"
-
- "golang.org/x/tools/oracle"
-)
-
-//The mode argument determines the query to perform:
-
-// callees show possible targets of selected function call
-// callers show possible callers of selected function
-// callgraph show complete callgraph of program
-// callstack show path from callgraph root to selected function
-// describe describe selected syntax: definition, methods, etc
-// freevars show free variables of selection
-// implements show 'implements' relation for selected type
-// peers show send/receive corresponding to selected channel op
-// referrers show all refs to entity denoted by selected identifier
-// what show basic information about the selected syntax node
-
-var Command = &command.Command{
- Run: runOracle,
- UsageLine: "oracle",
- Short: "golang oracle util",
- Long: `golang oracle util.`,
-}
-
-var (
- oraclePos string
- oracleReflect bool
-)
-
-func init() {
- Command.Flag.StringVar(&oraclePos, "pos", "", "filename:#offset")
- Command.Flag.BoolVar(&oracleReflect, "reflect", false, "Analyze reflection soundly (slow).")
-}
-
-func runOracle(cmd *command.Command, args []string) error {
- if len(args) < 2 {
- cmd.Usage()
- return os.ErrInvalid
- }
- if os.Getenv("GOMAXPROCS") == "" {
- n := runtime.NumCPU()
- if n < 4 {
- n = 4
- }
- runtime.GOMAXPROCS(n)
- }
- mode := args[0]
- args = args[1:]
- if args[0] == "." {
- pkgPath, err := os.Getwd()
- if err != nil {
- log.Fatalln(err)
- }
- pkg, err := build.Default.ImportDir(pkgPath, 0)
- if err != nil {
- log.Fatalln(err)
- }
- args = pkg.GoFiles
- //log.Println(pkg.ImportPath)
- if pkg.ImportPath != "." && pkg.ImportPath != "" {
- args = []string{pkg.ImportPath}
- }
- }
- query := oracle.Query{
- Mode: mode,
- Pos: oraclePos,
- Build: &build.Default,
- Scope: args,
- PTALog: nil,
- Reflection: oracleReflect,
- }
-
- if err := oracle.Run(&query); err != nil {
- fmt.Fprintf(os.Stderr, "oracle: %s.\n", err)
- return err
- }
-
- if mode == "referrers" {
- ref := query.Serial().Referrers
- if ref != nil {
- fmt.Fprintln(os.Stdout, ref.Desc)
- fmt.Fprintln(os.Stdout, ref.ObjPos)
- for _, v := range ref.Refs {
- fmt.Fprintln(os.Stdout, v)
- }
- }
- } else {
- query.WriteTo(os.Stdout)
- }
- return nil
-}
diff --git a/vendor/github.com/visualfc/gotools/pkgs/pkgs.go b/vendor/github.com/visualfc/gotools/pkgs/pkgs.go
deleted file mode 100644
index fe47e5c..0000000
--- a/vendor/github.com/visualfc/gotools/pkgs/pkgs.go
+++ /dev/null
@@ -1,379 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package pkgs
-
-import (
- "encoding/json"
- "fmt"
- "go/build"
- "os"
- "path/filepath"
- "runtime"
- "sort"
- "strings"
- "sync"
-
- "github.com/visualfc/gotools/command"
- "github.com/visualfc/gotools/goapi"
-)
-
-var Command = &command.Command{
- Run: runPkgs,
- UsageLine: "pkgs",
- Short: "print liteide_stub version",
- Long: `Version prints the liteide_stub version.`,
-}
-
-var (
- pkgsList bool
- pkgsJson bool
- pkgsFind string
- pkgsStd bool
- pkgsPkgOnly bool
- pkgsSkipGoroot bool
-)
-
-func init() {
- Command.Flag.BoolVar(&pkgsList, "list", false, "list all package")
- Command.Flag.BoolVar(&pkgsJson, "json", false, "json format")
- Command.Flag.BoolVar(&pkgsStd, "std", false, "std library")
- Command.Flag.BoolVar(&pkgsPkgOnly, "pkg", false, "pkg only")
- Command.Flag.BoolVar(&pkgsSkipGoroot, "skip_goroot", false, "skip goroot")
- Command.Flag.StringVar(&pkgsFind, "find", "", "find package by name")
-}
-
-func runPkgs(cmd *command.Command, args []string) error {
- runtime.GOMAXPROCS(runtime.NumCPU())
- if len(args) != 0 {
- cmd.Usage()
- return os.ErrInvalid
- }
- //pkgIndexOnce.Do(loadPkgsList)
- var pp PathPkgsIndex
- pp.LoadIndex()
- pp.Sort()
- if pkgsList {
- for _, pi := range pp.indexs {
- for _, pkg := range pi.pkgs {
- if pkgsPkgOnly && pkg.IsCommand() {
- continue
- }
- if pkgsJson {
- var p GoPackage
- p.copyBuild(pkg)
- b, err := json.MarshalIndent(&p, "", "\t")
- if err == nil {
- cmd.Stdout.Write(b)
- cmd.Stdout.Write([]byte{'\n'})
- }
- } else {
- cmd.Println(pkg.ImportPath)
- }
- }
- }
- } else if pkgsFind != "" {
- for _, pi := range pp.indexs {
- for _, pkg := range pi.pkgs {
- if pkg.Name == pkgsFind {
- if pkgsPkgOnly && pkg.IsCommand() {
- continue
- }
- if pkgsJson {
- var p GoPackage
- p.copyBuild(pkg)
- b, err := json.MarshalIndent(p, "", "\t")
- if err == nil {
- cmd.Stdout.Write(b)
- cmd.Stdout.Write([]byte{'\n'})
- }
- } else {
- cmd.Println(pkg.Name)
- }
- break
- }
- }
- }
- }
- return nil
-}
-
-// A Package describes a single package found in a directory.
-type GoPackage struct {
- // Note: These fields are part of the go command's public API.
- // See list.go. It is okay to add fields, but not to change or
- // remove existing ones. Keep in sync with list.go
- Dir string `json:",omitempty"` // directory containing package sources
- ImportPath string `json:",omitempty"` // import path of package in dir
- Name string `json:",omitempty"` // package name
- Doc string `json:",omitempty"` // package documentation string
- Target string `json:",omitempty"` // install path
- Goroot bool `json:",omitempty"` // is this package found in the Go root?
- Standard bool `json:",omitempty"` // is this package part of the standard Go library?
- Stale bool `json:",omitempty"` // would 'go install' do anything for this package?
- Root string `json:",omitempty"` // Go root or Go path dir containing this package
- ConflictDir string `json:",omitempty"` // Dir is hidden by this other directory
-
- // Source files
- GoFiles []string `json:",omitempty"` // .go source files (excluding CgoFiles, TestGoFiles, XTestGoFiles)
- CgoFiles []string `json:",omitempty"` // .go sources files that import "C"
- IgnoredGoFiles []string `json:",omitempty"` // .go sources ignored due to build constraints
- CFiles []string `json:",omitempty"` // .c source files
- CXXFiles []string `json:",omitempty"` // .cc, .cpp and .cxx source files
- MFiles []string `json:",omitempty"` // .m source files
- HFiles []string `json:",omitempty"` // .h, .hh, .hpp and .hxx source files
- SFiles []string `json:",omitempty"` // .s source files
- SwigFiles []string `json:",omitempty"` // .swig files
- SwigCXXFiles []string `json:",omitempty"` // .swigcxx files
- SysoFiles []string `json:",omitempty"` // .syso system object files added to package
-
- // Cgo directives
- CgoCFLAGS []string `json:",omitempty"` // cgo: flags for C compiler
- CgoCPPFLAGS []string `json:",omitempty"` // cgo: flags for C preprocessor
- CgoCXXFLAGS []string `json:",omitempty"` // cgo: flags for C++ compiler
- CgoLDFLAGS []string `json:",omitempty"` // cgo: flags for linker
- CgoPkgConfig []string `json:",omitempty"` // cgo: pkg-config names
-
- // Dependency information
- Imports []string `json:",omitempty"` // import paths used by this package
- Deps []string `json:",omitempty"` // all (recursively) imported dependencies
-
- // Error information
- Incomplete bool `json:",omitempty"` // was there an error loading this package or dependencies?
-
- // Test information
- TestGoFiles []string `json:",omitempty"` // _test.go files in package
- TestImports []string `json:",omitempty"` // imports from TestGoFiles
- XTestGoFiles []string `json:",omitempty"` // _test.go files outside package
- XTestImports []string `json:",omitempty"` // imports from XTestGoFiles
-
- // Unexported fields are not part of the public API.
- build *build.Package
- pkgdir string // overrides build.PkgDir
- imports []*goapi.Package
- deps []*goapi.Package
- gofiles []string // GoFiles+CgoFiles+TestGoFiles+XTestGoFiles files, absolute paths
- sfiles []string
- allgofiles []string // gofiles + IgnoredGoFiles, absolute paths
- target string // installed file for this package (may be executable)
- fake bool // synthesized package
- forceBuild bool // this package must be rebuilt
- forceLibrary bool // this package is a library (even if named "main")
- cmdline bool // defined by files listed on command line
- local bool // imported via local path (./ or ../)
- localPrefix string // interpret ./ and ../ imports relative to this prefix
- exeName string // desired name for temporary executable
- coverMode string // preprocess Go source files with the coverage tool in this mode
- coverVars map[string]*CoverVar // variables created by coverage analysis
- omitDWARF bool // tell linker not to write DWARF information
-}
-
-// CoverVar holds the name of the generated coverage variables targeting the named file.
-type CoverVar struct {
- File string // local file name
- Var string // name of count struct
-}
-
-func (p *GoPackage) copyBuild(pp *build.Package) {
- p.build = pp
-
- p.Dir = pp.Dir
- p.ImportPath = pp.ImportPath
- p.Name = pp.Name
- p.Doc = pp.Doc
- p.Root = pp.Root
- p.ConflictDir = pp.ConflictDir
- // TODO? Target
- p.Goroot = pp.Goroot
- p.Standard = p.Goroot && p.ImportPath != "" && !strings.Contains(p.ImportPath, ".")
- p.GoFiles = pp.GoFiles
- p.CgoFiles = pp.CgoFiles
- p.IgnoredGoFiles = pp.IgnoredGoFiles
- p.CFiles = pp.CFiles
- p.CXXFiles = pp.CXXFiles
- p.MFiles = pp.MFiles
- p.HFiles = pp.HFiles
- p.SFiles = pp.SFiles
- p.SwigFiles = pp.SwigFiles
- p.SwigCXXFiles = pp.SwigCXXFiles
- p.SysoFiles = pp.SysoFiles
- p.CgoCFLAGS = pp.CgoCFLAGS
- p.CgoCPPFLAGS = pp.CgoCPPFLAGS
- p.CgoCXXFLAGS = pp.CgoCXXFLAGS
- p.CgoLDFLAGS = pp.CgoLDFLAGS
- p.CgoPkgConfig = pp.CgoPkgConfig
- p.Imports = pp.Imports
- p.TestGoFiles = pp.TestGoFiles
- p.TestImports = pp.TestImports
- p.XTestGoFiles = pp.XTestGoFiles
- p.XTestImports = pp.XTestImports
-}
-
-type PathPkgsIndex struct {
- indexs []*PkgsIndex
-}
-
-func (p *PathPkgsIndex) LoadIndex() {
- var wg sync.WaitGroup
- var context = build.Default
- if pkgsStd {
- context.GOPATH = ""
- }
- var srcDirs []string
- goroot := context.GOROOT
- gopath := context.GOPATH
- context.GOPATH = ""
-
- if !pkgsSkipGoroot {
- //go1.4 go/src/
- //go1.3 go/src/pkg; go/src/cmd
- _, err := os.Stat(filepath.Join(goroot, "src/pkg/runtime"))
- if err == nil {
- for _, v := range context.SrcDirs() {
- if strings.HasSuffix(v, "pkg") {
- srcDirs = append(srcDirs, v[:len(v)-3]+"cmd")
- }
- srcDirs = append(srcDirs, v)
- }
- } else {
- srcDirs = append(srcDirs, filepath.Join(goroot, "src"))
- }
- }
-
- context.GOPATH = gopath
- context.GOROOT = ""
- for _, v := range context.SrcDirs() {
- srcDirs = append(srcDirs, v)
- }
- context.GOROOT = goroot
- for _, path := range srcDirs {
- pi := &PkgsIndex{}
- p.indexs = append(p.indexs, pi)
- pkgsGate.enter()
- f, err := os.Open(path)
- if err != nil {
- pkgsGate.leave()
- fmt.Fprint(os.Stderr, err)
- continue
- }
- children, err := f.Readdir(-1)
- f.Close()
- pkgsGate.leave()
- if err != nil {
- fmt.Fprint(os.Stderr, err)
- continue
- }
- for _, child := range children {
- if child.IsDir() {
- wg.Add(1)
- go func(path, name string) {
- defer wg.Done()
- pi.loadPkgsPath(&wg, path, name)
- }(path, child.Name())
- }
- }
- }
- wg.Wait()
-}
-
-func (p *PathPkgsIndex) Sort() {
- for _, v := range p.indexs {
- v.sort()
- }
-}
-
-type PkgsIndex struct {
- sync.Mutex
- pkgs []*build.Package
-}
-
-func (p *PkgsIndex) sort() {
- sort.Sort(PkgSlice(p.pkgs))
-}
-
-type PkgSlice []*build.Package
-
-func (p PkgSlice) Len() int {
- return len([]*build.Package(p))
-}
-
-func (p PkgSlice) Less(i, j int) bool {
- if p[i].IsCommand() && !p[j].IsCommand() {
- return true
- } else if !p[i].IsCommand() && p[j].IsCommand() {
- return false
- }
- return p[i].ImportPath < p[j].ImportPath
-}
-
-func (p PkgSlice) Swap(i, j int) {
- p[i], p[j] = p[j], p[i]
-}
-
-// pkgsgate protects the OS & filesystem from too much concurrency.
-// Too much disk I/O -> too many threads -> swapping and bad scheduling.
-// gate is a semaphore for limiting concurrency.
-type gate chan struct{}
-
-func (g gate) enter() { g <- struct{}{} }
-func (g gate) leave() { <-g }
-
-var pkgsGate = make(gate, 8)
-
-func (p *PkgsIndex) loadPkgsPath(wg *sync.WaitGroup, root, pkgrelpath string) {
- importpath := filepath.ToSlash(pkgrelpath)
- dir := filepath.Join(root, importpath)
-
- pkgsGate.enter()
- defer pkgsGate.leave()
- pkgDir, err := os.Open(dir)
- if err != nil {
- return
- }
- children, err := pkgDir.Readdir(-1)
- pkgDir.Close()
- if err != nil {
- return
- }
- // hasGo tracks whether a directory actually appears to be a
- // Go source code directory. If $GOPATH == $HOME, and
- // $HOME/src has lots of other large non-Go projects in it,
- // then the calls to importPathToName below can be expensive.
- hasGo := false
- for _, child := range children {
- name := child.Name()
- if name == "" {
- continue
- }
- if c := name[0]; c == '.' || ('0' <= c && c <= '9') {
- continue
- }
- if strings.HasSuffix(name, ".go") {
- hasGo = true
- }
- if child.IsDir() {
- if strings.HasPrefix(name, ".") || strings.HasPrefix(name, "_") || name == "testdata" {
- continue
- }
- wg.Add(1)
- go func(root, name string) {
- defer wg.Done()
- p.loadPkgsPath(wg, root, name)
- }(root, filepath.Join(importpath, name))
- }
- }
- if hasGo {
- buildPkg, err := build.ImportDir(dir, 0)
- if err == nil {
- if buildPkg.ImportPath == "." {
- buildPkg.ImportPath = filepath.ToSlash(pkgrelpath)
- buildPkg.Root = root
- buildPkg.Goroot = true
- }
- p.Lock()
- p.pkgs = append(p.pkgs, buildPkg)
- p.Unlock()
- }
- }
-}
diff --git a/vendor/github.com/visualfc/gotools/runcmd/runcmd.go b/vendor/github.com/visualfc/gotools/runcmd/runcmd.go
deleted file mode 100644
index 6560d62..0000000
--- a/vendor/github.com/visualfc/gotools/runcmd/runcmd.go
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package runcmd
-
-import (
- "fmt"
- "os"
- "os/exec"
- "strings"
-
- "github.com/visualfc/gotools/command"
-)
-
-var Command = &command.Command{
- Run: runCmd,
- UsageLine: "runcmd [-w work_path] [arguments...]",
- Short: "run program",
- Long: `run program and arguments`,
-}
-
-var execWorkPath string
-var execWaitEnter bool
-
-func init() {
- Command.Flag.StringVar(&execWorkPath, "w", "", "work path")
- Command.Flag.BoolVar(&execWaitEnter, "e", true, "wait enter and continue")
-}
-
-func runCmd(cmd *command.Command, args []string) error {
- if len(args) == 0 {
- cmd.Usage()
- return os.ErrInvalid
- }
- if execWorkPath == "" {
- var err error
- execWorkPath, err = os.Getwd()
- if err != nil {
- fmt.Fprintf(os.Stderr, "liteide_stub exec: os.Getwd() false\n")
- command.SetExitStatus(3)
- command.Exit()
- return err
- }
- }
- fileName := args[0]
-
- filePath, err := exec.LookPath(fileName)
- if err != nil {
- filePath, err = exec.LookPath("./" + fileName)
- }
- if err != nil {
- fmt.Fprintf(os.Stderr, "liteide_stub exec: file %s not found\n", fileName)
- command.SetExitStatus(3)
- command.Exit()
- }
-
- fmt.Println("Starting Process", filePath, strings.Join(args[1:], " "), "...")
-
- command := exec.Command(filePath, args[1:]...)
- command.Dir = execWorkPath
- command.Stdin = os.Stdin
- command.Stdout = os.Stdout
- command.Stderr = os.Stderr
-
- err = command.Run()
-
- if err != nil {
- fmt.Println("\nEnd Process", err)
- } else {
- fmt.Println("\nEnd Process", "exit status 0")
- }
-
- exitWaitEnter()
- return nil
-}
-
-func exitWaitEnter() {
- if !execWaitEnter {
- return
- }
- fmt.Println("\nPress enter key to continue")
- var s = [256]byte{}
- os.Stdin.Read(s[:])
- command.SetExitStatus(0)
- command.Exit()
-}
diff --git a/vendor/github.com/visualfc/gotools/stdlib/go13.go b/vendor/github.com/visualfc/gotools/stdlib/go13.go
deleted file mode 100644
index d81ad91..0000000
--- a/vendor/github.com/visualfc/gotools/stdlib/go13.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build !go1.4
-
-package stdlib
-
-import (
- "go/build"
- "os"
- "path/filepath"
-)
-
-func ImportStdPkg(context *build.Context, path string, mode build.ImportMode) (*build.Package, error) {
- realpath := filepath.Join(context.GOROOT, "src", "pkg", path)
- if _, err := os.Stat(realpath); err != nil {
- realpath = filepath.Join(context.GOROOT, "src", path)
- }
- pkg, err := context.ImportDir(realpath, 0)
- pkg.ImportPath = path
- return pkg, err
-}
diff --git a/vendor/github.com/visualfc/gotools/stdlib/go14.go b/vendor/github.com/visualfc/gotools/stdlib/go14.go
deleted file mode 100644
index 9bd79d2..0000000
--- a/vendor/github.com/visualfc/gotools/stdlib/go14.go
+++ /dev/null
@@ -1,19 +0,0 @@
-// +build go1.4
-
-package stdlib
-
-import (
- "go/build"
- "os"
- "path/filepath"
-)
-
-func ImportStdPkg(context *build.Context, path string, mode build.ImportMode) (*build.Package, error) {
- realpath := filepath.Join(context.GOROOT, "src", path)
- if _, err := os.Stat(realpath); err != nil {
- realpath = filepath.Join(context.GOROOT, "src/pkg", path)
- }
- pkg, err := context.ImportDir(realpath, 0)
- pkg.ImportPath = path
- return pkg, err
-}
diff --git a/vendor/github.com/visualfc/gotools/stdlib/mkpkglist.go b/vendor/github.com/visualfc/gotools/stdlib/mkpkglist.go
deleted file mode 100644
index ea408ae..0000000
--- a/vendor/github.com/visualfc/gotools/stdlib/mkpkglist.go
+++ /dev/null
@@ -1,168 +0,0 @@
-// +build ignore
-
-package main
-
-import (
- "fmt"
- "strings"
-)
-
-var pkgList = `
-cmd/cgo
-cmd/fix
-cmd/go
-cmd/gofmt
-cmd/yacc
-archive/tar
-archive/zip
-bufio
-bytes
-compress/bzip2
-compress/flate
-compress/gzip
-compress/lzw
-compress/zlib
-container/heap
-container/list
-container/ring
-crypto
-crypto/aes
-crypto/cipher
-crypto/des
-crypto/dsa
-crypto/ecdsa
-crypto/elliptic
-crypto/hmac
-crypto/md5
-crypto/rand
-crypto/rc4
-crypto/rsa
-crypto/sha1
-crypto/sha256
-crypto/sha512
-crypto/subtle
-crypto/tls
-crypto/x509
-crypto/x509/pkix
-database/sql
-database/sql/driver
-debug/dwarf
-debug/elf
-debug/gosym
-debug/macho
-debug/pe
-encoding
-encoding/ascii85
-encoding/asn1
-encoding/base32
-encoding/base64
-encoding/binary
-encoding/csv
-encoding/gob
-encoding/hex
-encoding/json
-encoding/pem
-encoding/xml
-errors
-expvar
-flag
-fmt
-go/ast
-go/build
-go/doc
-go/format
-go/parser
-go/printer
-go/scanner
-go/token
-hash
-hash/adler32
-hash/crc32
-hash/crc64
-hash/fnv
-html
-html/template
-image
-image/color
-image/color/palette
-image/draw
-image/gif
-image/jpeg
-image/png
-index/suffixarray
-io
-io/ioutil
-log
-log/syslog
-math
-math/big
-math/cmplx
-math/rand
-mime
-mime/multipart
-net
-net/http
-net/http/cgi
-net/http/cookiejar
-net/http/fcgi
-net/http/httptest
-net/http/httputil
-net/http/pprof
-net/mail
-net/rpc
-net/rpc/jsonrpc
-net/smtp
-net/textproto
-net/url
-os
-os/exec
-os/signal
-os/user
-path
-path/filepath
-reflect
-regexp
-regexp/syntax
-runtime
-runtime/cgo
-runtime/debug
-runtime/pprof
-runtime/race
-sort
-strconv
-strings
-sync
-sync/atomic
-syscall
-testing
-testing/iotest
-testing/quick
-text/scanner
-text/tabwriter
-text/template
-text/template/parse
-time
-unicode
-unicode/utf16
-unicode/utf8
-unsafe
-`
-
-func main() {
- //fmt.Println(pkgList)
- var list []string
- index := 0
- for _, v := range strings.Split(pkgList, "\n") {
- v = strings.TrimSpace(v)
- if v == "" {
- continue
- }
- v = "\"" + v + "\""
- if index%4 == 0 && index != 0 {
- v = "\n" + v
- }
- list = append(list, v)
- index++
- }
- fmt.Println(strings.Join(list, ","))
-}
diff --git a/vendor/github.com/visualfc/gotools/stdlib/mkstdlib.go b/vendor/github.com/visualfc/gotools/stdlib/mkstdlib.go
deleted file mode 100644
index 7118f2d..0000000
--- a/vendor/github.com/visualfc/gotools/stdlib/mkstdlib.go
+++ /dev/null
@@ -1,91 +0,0 @@
-// +build ignore
-
-// mkstdlib generates the zstdlib.go file, containing the Go standard
-// library API symbols. It's baked into the binary to avoid scanning
-// GOPATH in the common case.
-package main
-
-import (
- "bufio"
- "bytes"
- "fmt"
- "go/format"
- "io"
- "log"
- "os"
- "path"
- "path/filepath"
- "regexp"
- "sort"
- "strings"
-)
-
-func mustOpen(name string) io.Reader {
- f, err := os.Open(name)
- if err != nil {
- log.Fatal(err)
- }
- return f
-}
-
-func api(base string) string {
- return filepath.Join(os.Getenv("GOROOT"), "api", base)
-}
-
-var sym = regexp.MustCompile(`^pkg (\S+).*?, (?:var|func|type|const) ([A-Z]\w*)`)
-
-func main() {
- var buf bytes.Buffer
- outf := func(format string, args ...interface{}) {
- fmt.Fprintf(&buf, format, args...)
- }
- outf("// AUTO-GENERATED BY mkstdlib.go\n\n")
- outf("package imports\n")
- outf("var stdlib = map[string]string{\n")
- f := io.MultiReader(
- mustOpen(api("go1.txt")),
- mustOpen(api("go1.1.txt")),
- mustOpen(api("go1.2.txt")),
- mustOpen(api("go1.3.txt")),
- )
- sc := bufio.NewScanner(f)
- fullImport := map[string]string{} // "zip.NewReader" => "archive/zip"
- ambiguous := map[string]bool{}
- var keys []string
- for sc.Scan() {
- l := sc.Text()
- has := func(v string) bool { return strings.Contains(l, v) }
- if has("struct, ") || has("interface, ") || has(", method (") {
- continue
- }
- if m := sym.FindStringSubmatch(l); m != nil {
- full := m[1]
- key := path.Base(full) + "." + m[2]
- if exist, ok := fullImport[key]; ok {
- if exist != full {
- ambiguous[key] = true
- }
- } else {
- fullImport[key] = full
- keys = append(keys, key)
- }
- }
- }
- if err := sc.Err(); err != nil {
- log.Fatal(err)
- }
- sort.Strings(keys)
- for _, key := range keys {
- if ambiguous[key] {
- outf("\t// %q is ambiguous\n", key)
- } else {
- outf("\t%q: %q,\n", key, fullImport[key])
- }
- }
- outf("}\n")
- fmtbuf, err := format.Source(buf.Bytes())
- if err != nil {
- log.Fatal(err)
- }
- os.Stdout.Write(fmtbuf)
-}
diff --git a/vendor/github.com/visualfc/gotools/stdlib/pkglist.go b/vendor/github.com/visualfc/gotools/stdlib/pkglist.go
deleted file mode 100644
index 2dc4164..0000000
--- a/vendor/github.com/visualfc/gotools/stdlib/pkglist.go
+++ /dev/null
@@ -1,48 +0,0 @@
-package stdlib
-
-var Packages = []string{
- "cmd/cgo", "cmd/fix", "cmd/go", "cmd/gofmt",
- "cmd/yacc", "archive/tar", "archive/zip", "bufio",
- "bytes", "compress/bzip2", "compress/flate", "compress/gzip",
- "compress/lzw", "compress/zlib", "container/heap", "container/list",
- "container/ring", "crypto", "crypto/aes", "crypto/cipher",
- "crypto/des", "crypto/dsa", "crypto/ecdsa", "crypto/elliptic",
- "crypto/hmac", "crypto/md5", "crypto/rand", "crypto/rc4",
- "crypto/rsa", "crypto/sha1", "crypto/sha256", "crypto/sha512",
- "crypto/subtle", "crypto/tls", "crypto/x509", "crypto/x509/pkix",
- "database/sql", "database/sql/driver", "debug/dwarf", "debug/elf",
- "debug/gosym", "debug/macho", "debug/pe", "encoding",
- "encoding/ascii85", "encoding/asn1", "encoding/base32", "encoding/base64",
- "encoding/binary", "encoding/csv", "encoding/gob", "encoding/hex",
- "encoding/json", "encoding/pem", "encoding/xml", "errors",
- "expvar", "flag", "fmt", "go/ast",
- "go/build", "go/doc", "go/format", "go/parser",
- "go/printer", "go/scanner", "go/token", "hash",
- "hash/adler32", "hash/crc32", "hash/crc64", "hash/fnv",
- "html", "html/template", "image", "image/color",
- "image/color/palette", "image/draw", "image/gif", "image/jpeg",
- "image/png", "index/suffixarray", "io", "io/ioutil",
- "log", "log/syslog", "math", "math/big",
- "math/cmplx", "math/rand", "mime", "mime/multipart",
- "net", "net/http", "net/http/cgi", "net/http/cookiejar",
- "net/http/fcgi", "net/http/httptest", "net/http/httputil", "net/http/pprof",
- "net/mail", "net/rpc", "net/rpc/jsonrpc", "net/smtp",
- "net/textproto", "net/url", "os", "os/exec",
- "os/signal", "os/user", "path", "path/filepath",
- "reflect", "regexp", "regexp/syntax", "runtime",
- "runtime/cgo", "runtime/debug", "runtime/pprof", "runtime/race",
- "sort", "strconv", "strings", "sync",
- "sync/atomic", "syscall", "testing", "testing/iotest",
- "testing/quick", "text/scanner", "text/tabwriter", "text/template",
- "text/template/parse", "time", "unicode", "unicode/utf16",
- "unicode/utf8", "unsafe",
-}
-
-func IsStdPkg(pkg string) bool {
- for _, v := range Packages {
- if v == pkg {
- return true
- }
- }
- return false
-}
diff --git a/vendor/github.com/visualfc/gotools/stdlib/zstdlib.go b/vendor/github.com/visualfc/gotools/stdlib/zstdlib.go
deleted file mode 100644
index ab4ec64..0000000
--- a/vendor/github.com/visualfc/gotools/stdlib/zstdlib.go
+++ /dev/null
@@ -1,8479 +0,0 @@
-// AUTO-GENERATED BY mkstdlib.go
-
-package stdlib
-
-var Symbols = map[string]string{
- "adler32.Checksum": "hash/adler32",
- "adler32.New": "hash/adler32",
- "adler32.Size": "hash/adler32",
- "aes.BlockSize": "crypto/aes",
- "aes.KeySizeError": "crypto/aes",
- "aes.NewCipher": "crypto/aes",
- "ascii85.CorruptInputError": "encoding/ascii85",
- "ascii85.Decode": "encoding/ascii85",
- "ascii85.Encode": "encoding/ascii85",
- "ascii85.MaxEncodedLen": "encoding/ascii85",
- "ascii85.NewDecoder": "encoding/ascii85",
- "ascii85.NewEncoder": "encoding/ascii85",
- "asn1.BitString": "encoding/asn1",
- "asn1.Enumerated": "encoding/asn1",
- "asn1.Flag": "encoding/asn1",
- "asn1.Marshal": "encoding/asn1",
- "asn1.ObjectIdentifier": "encoding/asn1",
- "asn1.RawContent": "encoding/asn1",
- "asn1.RawValue": "encoding/asn1",
- "asn1.StructuralError": "encoding/asn1",
- "asn1.SyntaxError": "encoding/asn1",
- "asn1.Unmarshal": "encoding/asn1",
- "asn1.UnmarshalWithParams": "encoding/asn1",
- "ast.ArrayType": "go/ast",
- "ast.AssignStmt": "go/ast",
- "ast.Bad": "go/ast",
- "ast.BadDecl": "go/ast",
- "ast.BadExpr": "go/ast",
- "ast.BadStmt": "go/ast",
- "ast.BasicLit": "go/ast",
- "ast.BinaryExpr": "go/ast",
- "ast.BlockStmt": "go/ast",
- "ast.BranchStmt": "go/ast",
- "ast.CallExpr": "go/ast",
- "ast.CaseClause": "go/ast",
- "ast.ChanDir": "go/ast",
- "ast.ChanType": "go/ast",
- "ast.CommClause": "go/ast",
- "ast.Comment": "go/ast",
- "ast.CommentGroup": "go/ast",
- "ast.CommentMap": "go/ast",
- "ast.CompositeLit": "go/ast",
- "ast.Con": "go/ast",
- "ast.DeclStmt": "go/ast",
- "ast.DeferStmt": "go/ast",
- "ast.Ellipsis": "go/ast",
- "ast.EmptyStmt": "go/ast",
- "ast.ExprStmt": "go/ast",
- "ast.Field": "go/ast",
- "ast.FieldFilter": "go/ast",
- "ast.FieldList": "go/ast",
- "ast.File": "go/ast",
- "ast.FileExports": "go/ast",
- "ast.Filter": "go/ast",
- "ast.FilterDecl": "go/ast",
- "ast.FilterFile": "go/ast",
- "ast.FilterFuncDuplicates": "go/ast",
- "ast.FilterImportDuplicates": "go/ast",
- "ast.FilterPackage": "go/ast",
- "ast.FilterUnassociatedComments": "go/ast",
- "ast.ForStmt": "go/ast",
- "ast.Fprint": "go/ast",
- "ast.Fun": "go/ast",
- "ast.FuncDecl": "go/ast",
- "ast.FuncLit": "go/ast",
- "ast.FuncType": "go/ast",
- "ast.GenDecl": "go/ast",
- "ast.GoStmt": "go/ast",
- "ast.Ident": "go/ast",
- "ast.IfStmt": "go/ast",
- "ast.ImportSpec": "go/ast",
- "ast.Importer": "go/ast",
- "ast.IncDecStmt": "go/ast",
- "ast.IndexExpr": "go/ast",
- "ast.Inspect": "go/ast",
- "ast.InterfaceType": "go/ast",
- "ast.IsExported": "go/ast",
- "ast.KeyValueExpr": "go/ast",
- "ast.LabeledStmt": "go/ast",
- "ast.Lbl": "go/ast",
- "ast.MapType": "go/ast",
- "ast.MergeMode": "go/ast",
- "ast.MergePackageFiles": "go/ast",
- "ast.NewCommentMap": "go/ast",
- "ast.NewIdent": "go/ast",
- "ast.NewObj": "go/ast",
- "ast.NewPackage": "go/ast",
- "ast.NewScope": "go/ast",
- "ast.Node": "go/ast",
- "ast.NotNilFilter": "go/ast",
- "ast.ObjKind": "go/ast",
- "ast.Object": "go/ast",
- "ast.Package": "go/ast",
- "ast.PackageExports": "go/ast",
- "ast.ParenExpr": "go/ast",
- "ast.Pkg": "go/ast",
- "ast.Print": "go/ast",
- "ast.RECV": "go/ast",
- "ast.RangeStmt": "go/ast",
- "ast.ReturnStmt": "go/ast",
- "ast.SEND": "go/ast",
- "ast.Scope": "go/ast",
- "ast.SelectStmt": "go/ast",
- "ast.SelectorExpr": "go/ast",
- "ast.SendStmt": "go/ast",
- "ast.SliceExpr": "go/ast",
- "ast.SortImports": "go/ast",
- "ast.StarExpr": "go/ast",
- "ast.StructType": "go/ast",
- "ast.SwitchStmt": "go/ast",
- "ast.Typ": "go/ast",
- "ast.TypeAssertExpr": "go/ast",
- "ast.TypeSpec": "go/ast",
- "ast.TypeSwitchStmt": "go/ast",
- "ast.UnaryExpr": "go/ast",
- "ast.ValueSpec": "go/ast",
- "ast.Var": "go/ast",
- "ast.Visitor": "go/ast",
- "ast.Walk": "go/ast",
- "atomic.AddInt32": "sync/atomic",
- "atomic.AddInt64": "sync/atomic",
- "atomic.AddUint32": "sync/atomic",
- "atomic.AddUint64": "sync/atomic",
- "atomic.AddUintptr": "sync/atomic",
- "atomic.CompareAndSwapInt32": "sync/atomic",
- "atomic.CompareAndSwapInt64": "sync/atomic",
- "atomic.CompareAndSwapPointer": "sync/atomic",
- "atomic.CompareAndSwapUint32": "sync/atomic",
- "atomic.CompareAndSwapUint64": "sync/atomic",
- "atomic.CompareAndSwapUintptr": "sync/atomic",
- "atomic.LoadInt32": "sync/atomic",
- "atomic.LoadInt64": "sync/atomic",
- "atomic.LoadPointer": "sync/atomic",
- "atomic.LoadUint32": "sync/atomic",
- "atomic.LoadUint64": "sync/atomic",
- "atomic.LoadUintptr": "sync/atomic",
- "atomic.StoreInt32": "sync/atomic",
- "atomic.StoreInt64": "sync/atomic",
- "atomic.StorePointer": "sync/atomic",
- "atomic.StoreUint32": "sync/atomic",
- "atomic.StoreUint64": "sync/atomic",
- "atomic.StoreUintptr": "sync/atomic",
- "atomic.SwapInt32": "sync/atomic",
- "atomic.SwapInt64": "sync/atomic",
- "atomic.SwapPointer": "sync/atomic",
- "atomic.SwapUint32": "sync/atomic",
- "atomic.SwapUint64": "sync/atomic",
- "atomic.SwapUintptr": "sync/atomic",
- "base32.CorruptInputError": "encoding/base32",
- "base32.Encoding": "encoding/base32",
- "base32.HexEncoding": "encoding/base32",
- "base32.NewDecoder": "encoding/base32",
- "base32.NewEncoder": "encoding/base32",
- "base32.NewEncoding": "encoding/base32",
- "base32.StdEncoding": "encoding/base32",
- "base64.CorruptInputError": "encoding/base64",
- "base64.Encoding": "encoding/base64",
- "base64.NewDecoder": "encoding/base64",
- "base64.NewEncoder": "encoding/base64",
- "base64.NewEncoding": "encoding/base64",
- "base64.StdEncoding": "encoding/base64",
- "base64.URLEncoding": "encoding/base64",
- "big.Int": "math/big",
- "big.MaxBase": "math/big",
- "big.NewInt": "math/big",
- "big.NewRat": "math/big",
- "big.Rat": "math/big",
- "big.Word": "math/big",
- "binary.BigEndian": "encoding/binary",
- "binary.ByteOrder": "encoding/binary",
- "binary.LittleEndian": "encoding/binary",
- "binary.MaxVarintLen16": "encoding/binary",
- "binary.MaxVarintLen32": "encoding/binary",
- "binary.MaxVarintLen64": "encoding/binary",
- "binary.PutUvarint": "encoding/binary",
- "binary.PutVarint": "encoding/binary",
- "binary.Read": "encoding/binary",
- "binary.ReadUvarint": "encoding/binary",
- "binary.ReadVarint": "encoding/binary",
- "binary.Size": "encoding/binary",
- "binary.Uvarint": "encoding/binary",
- "binary.Varint": "encoding/binary",
- "binary.Write": "encoding/binary",
- "bufio.ErrAdvanceTooFar": "bufio",
- "bufio.ErrBufferFull": "bufio",
- "bufio.ErrInvalidUnreadByte": "bufio",
- "bufio.ErrInvalidUnreadRune": "bufio",
- "bufio.ErrNegativeAdvance": "bufio",
- "bufio.ErrNegativeCount": "bufio",
- "bufio.ErrTooLong": "bufio",
- "bufio.MaxScanTokenSize": "bufio",
- "bufio.NewReadWriter": "bufio",
- "bufio.NewReader": "bufio",
- "bufio.NewReaderSize": "bufio",
- "bufio.NewScanner": "bufio",
- "bufio.NewWriter": "bufio",
- "bufio.NewWriterSize": "bufio",
- "bufio.ReadWriter": "bufio",
- "bufio.Reader": "bufio",
- "bufio.ScanBytes": "bufio",
- "bufio.ScanLines": "bufio",
- "bufio.ScanRunes": "bufio",
- "bufio.ScanWords": "bufio",
- "bufio.Scanner": "bufio",
- "bufio.SplitFunc": "bufio",
- "bufio.Writer": "bufio",
- "build.AllowBinary": "go/build",
- "build.ArchChar": "go/build",
- "build.Context": "go/build",
- "build.Default": "go/build",
- "build.FindOnly": "go/build",
- "build.Import": "go/build",
- "build.ImportDir": "go/build",
- "build.ImportMode": "go/build",
- "build.IsLocalImport": "go/build",
- "build.NoGoError": "go/build",
- "build.Package": "go/build",
- "build.ToolDir": "go/build",
- "bytes.Buffer": "bytes",
- "bytes.Compare": "bytes",
- "bytes.Contains": "bytes",
- "bytes.Count": "bytes",
- "bytes.Equal": "bytes",
- "bytes.EqualFold": "bytes",
- "bytes.ErrTooLarge": "bytes",
- "bytes.Fields": "bytes",
- "bytes.FieldsFunc": "bytes",
- "bytes.HasPrefix": "bytes",
- "bytes.HasSuffix": "bytes",
- "bytes.Index": "bytes",
- "bytes.IndexAny": "bytes",
- "bytes.IndexByte": "bytes",
- "bytes.IndexFunc": "bytes",
- "bytes.IndexRune": "bytes",
- "bytes.Join": "bytes",
- "bytes.LastIndex": "bytes",
- "bytes.LastIndexAny": "bytes",
- "bytes.LastIndexFunc": "bytes",
- "bytes.Map": "bytes",
- "bytes.MinRead": "bytes",
- "bytes.NewBuffer": "bytes",
- "bytes.NewBufferString": "bytes",
- "bytes.NewReader": "bytes",
- "bytes.Reader": "bytes",
- "bytes.Repeat": "bytes",
- "bytes.Replace": "bytes",
- "bytes.Runes": "bytes",
- "bytes.Split": "bytes",
- "bytes.SplitAfter": "bytes",
- "bytes.SplitAfterN": "bytes",
- "bytes.SplitN": "bytes",
- "bytes.Title": "bytes",
- "bytes.ToLower": "bytes",
- "bytes.ToLowerSpecial": "bytes",
- "bytes.ToTitle": "bytes",
- "bytes.ToTitleSpecial": "bytes",
- "bytes.ToUpper": "bytes",
- "bytes.ToUpperSpecial": "bytes",
- "bytes.Trim": "bytes",
- "bytes.TrimFunc": "bytes",
- "bytes.TrimLeft": "bytes",
- "bytes.TrimLeftFunc": "bytes",
- "bytes.TrimPrefix": "bytes",
- "bytes.TrimRight": "bytes",
- "bytes.TrimRightFunc": "bytes",
- "bytes.TrimSpace": "bytes",
- "bytes.TrimSuffix": "bytes",
- "bzip2.NewReader": "compress/bzip2",
- "bzip2.StructuralError": "compress/bzip2",
- "cgi.Handler": "net/http/cgi",
- "cgi.Request": "net/http/cgi",
- "cgi.RequestFromMap": "net/http/cgi",
- "cgi.Serve": "net/http/cgi",
- "cipher.AEAD": "crypto/cipher",
- "cipher.Block": "crypto/cipher",
- "cipher.BlockMode": "crypto/cipher",
- "cipher.NewCBCDecrypter": "crypto/cipher",
- "cipher.NewCBCEncrypter": "crypto/cipher",
- "cipher.NewCFBDecrypter": "crypto/cipher",
- "cipher.NewCFBEncrypter": "crypto/cipher",
- "cipher.NewCTR": "crypto/cipher",
- "cipher.NewGCM": "crypto/cipher",
- "cipher.NewOFB": "crypto/cipher",
- "cipher.Stream": "crypto/cipher",
- "cipher.StreamReader": "crypto/cipher",
- "cipher.StreamWriter": "crypto/cipher",
- "cmplx.Abs": "math/cmplx",
- "cmplx.Acos": "math/cmplx",
- "cmplx.Acosh": "math/cmplx",
- "cmplx.Asin": "math/cmplx",
- "cmplx.Asinh": "math/cmplx",
- "cmplx.Atan": "math/cmplx",
- "cmplx.Atanh": "math/cmplx",
- "cmplx.Conj": "math/cmplx",
- "cmplx.Cos": "math/cmplx",
- "cmplx.Cosh": "math/cmplx",
- "cmplx.Cot": "math/cmplx",
- "cmplx.Exp": "math/cmplx",
- "cmplx.Inf": "math/cmplx",
- "cmplx.IsInf": "math/cmplx",
- "cmplx.IsNaN": "math/cmplx",
- "cmplx.Log": "math/cmplx",
- "cmplx.Log10": "math/cmplx",
- "cmplx.NaN": "math/cmplx",
- "cmplx.Phase": "math/cmplx",
- "cmplx.Polar": "math/cmplx",
- "cmplx.Pow": "math/cmplx",
- "cmplx.Rect": "math/cmplx",
- "cmplx.Sin": "math/cmplx",
- "cmplx.Sinh": "math/cmplx",
- "cmplx.Sqrt": "math/cmplx",
- "cmplx.Tan": "math/cmplx",
- "cmplx.Tanh": "math/cmplx",
- "color.Alpha": "image/color",
- "color.Alpha16": "image/color",
- "color.Alpha16Model": "image/color",
- "color.AlphaModel": "image/color",
- "color.Black": "image/color",
- "color.Color": "image/color",
- "color.Gray": "image/color",
- "color.Gray16": "image/color",
- "color.Gray16Model": "image/color",
- "color.GrayModel": "image/color",
- "color.Model": "image/color",
- "color.ModelFunc": "image/color",
- "color.NRGBA": "image/color",
- "color.NRGBA64": "image/color",
- "color.NRGBA64Model": "image/color",
- "color.NRGBAModel": "image/color",
- "color.Opaque": "image/color",
- "color.Palette": "image/color",
- "color.RGBA": "image/color",
- "color.RGBA64": "image/color",
- "color.RGBA64Model": "image/color",
- "color.RGBAModel": "image/color",
- "color.RGBToYCbCr": "image/color",
- "color.Transparent": "image/color",
- "color.White": "image/color",
- "color.YCbCr": "image/color",
- "color.YCbCrModel": "image/color",
- "color.YCbCrToRGB": "image/color",
- "cookiejar.Jar": "net/http/cookiejar",
- "cookiejar.New": "net/http/cookiejar",
- "cookiejar.Options": "net/http/cookiejar",
- "cookiejar.PublicSuffixList": "net/http/cookiejar",
- "crc32.Castagnoli": "hash/crc32",
- "crc32.Checksum": "hash/crc32",
- "crc32.ChecksumIEEE": "hash/crc32",
- "crc32.IEEE": "hash/crc32",
- "crc32.IEEETable": "hash/crc32",
- "crc32.Koopman": "hash/crc32",
- "crc32.MakeTable": "hash/crc32",
- "crc32.New": "hash/crc32",
- "crc32.NewIEEE": "hash/crc32",
- "crc32.Size": "hash/crc32",
- "crc32.Table": "hash/crc32",
- "crc32.Update": "hash/crc32",
- "crc64.Checksum": "hash/crc64",
- "crc64.ECMA": "hash/crc64",
- "crc64.ISO": "hash/crc64",
- "crc64.MakeTable": "hash/crc64",
- "crc64.New": "hash/crc64",
- "crc64.Size": "hash/crc64",
- "crc64.Table": "hash/crc64",
- "crc64.Update": "hash/crc64",
- "crypto.Hash": "crypto",
- "crypto.MD4": "crypto",
- "crypto.MD5": "crypto",
- "crypto.MD5SHA1": "crypto",
- "crypto.PrivateKey": "crypto",
- "crypto.PublicKey": "crypto",
- "crypto.RIPEMD160": "crypto",
- "crypto.RegisterHash": "crypto",
- "crypto.SHA1": "crypto",
- "crypto.SHA224": "crypto",
- "crypto.SHA256": "crypto",
- "crypto.SHA384": "crypto",
- "crypto.SHA512": "crypto",
- "csv.ErrBareQuote": "encoding/csv",
- "csv.ErrFieldCount": "encoding/csv",
- "csv.ErrQuote": "encoding/csv",
- "csv.ErrTrailingComma": "encoding/csv",
- "csv.NewReader": "encoding/csv",
- "csv.NewWriter": "encoding/csv",
- "csv.ParseError": "encoding/csv",
- "csv.Reader": "encoding/csv",
- "csv.Writer": "encoding/csv",
- "debug.FreeOSMemory": "runtime/debug",
- "debug.GCStats": "runtime/debug",
- "debug.PrintStack": "runtime/debug",
- "debug.ReadGCStats": "runtime/debug",
- "debug.SetGCPercent": "runtime/debug",
- "debug.SetMaxStack": "runtime/debug",
- "debug.SetMaxThreads": "runtime/debug",
- "debug.SetPanicOnFault": "runtime/debug",
- "debug.Stack": "runtime/debug",
- "debug.WriteHeapDump": "runtime/debug",
- "des.BlockSize": "crypto/des",
- "des.KeySizeError": "crypto/des",
- "des.NewCipher": "crypto/des",
- "des.NewTripleDESCipher": "crypto/des",
- "doc.AllDecls": "go/doc",
- "doc.AllMethods": "go/doc",
- "doc.Example": "go/doc",
- "doc.Examples": "go/doc",
- "doc.Filter": "go/doc",
- "doc.Func": "go/doc",
- "doc.IllegalPrefixes": "go/doc",
- "doc.Mode": "go/doc",
- "doc.New": "go/doc",
- "doc.Note": "go/doc",
- "doc.Package": "go/doc",
- "doc.Synopsis": "go/doc",
- "doc.ToHTML": "go/doc",
- "doc.ToText": "go/doc",
- "doc.Type": "go/doc",
- "doc.Value": "go/doc",
- "draw.Draw": "image/draw",
- "draw.DrawMask": "image/draw",
- "draw.Drawer": "image/draw",
- "draw.FloydSteinberg": "image/draw",
- "draw.Image": "image/draw",
- "draw.Op": "image/draw",
- "draw.Over": "image/draw",
- "draw.Quantizer": "image/draw",
- "draw.Src": "image/draw",
- "driver.Bool": "database/sql/driver",
- "driver.ColumnConverter": "database/sql/driver",
- "driver.Conn": "database/sql/driver",
- "driver.DefaultParameterConverter": "database/sql/driver",
- "driver.Driver": "database/sql/driver",
- "driver.ErrBadConn": "database/sql/driver",
- "driver.ErrSkip": "database/sql/driver",
- "driver.Execer": "database/sql/driver",
- "driver.Int32": "database/sql/driver",
- "driver.IsScanValue": "database/sql/driver",
- "driver.IsValue": "database/sql/driver",
- "driver.NotNull": "database/sql/driver",
- "driver.Null": "database/sql/driver",
- "driver.Queryer": "database/sql/driver",
- "driver.Result": "database/sql/driver",
- "driver.ResultNoRows": "database/sql/driver",
- "driver.Rows": "database/sql/driver",
- "driver.RowsAffected": "database/sql/driver",
- "driver.Stmt": "database/sql/driver",
- "driver.String": "database/sql/driver",
- "driver.Tx": "database/sql/driver",
- "driver.Value": "database/sql/driver",
- "driver.ValueConverter": "database/sql/driver",
- "driver.Valuer": "database/sql/driver",
- "dsa.ErrInvalidPublicKey": "crypto/dsa",
- "dsa.GenerateKey": "crypto/dsa",
- "dsa.GenerateParameters": "crypto/dsa",
- "dsa.L1024N160": "crypto/dsa",
- "dsa.L2048N224": "crypto/dsa",
- "dsa.L2048N256": "crypto/dsa",
- "dsa.L3072N256": "crypto/dsa",
- "dsa.ParameterSizes": "crypto/dsa",
- "dsa.Parameters": "crypto/dsa",
- "dsa.PrivateKey": "crypto/dsa",
- "dsa.PublicKey": "crypto/dsa",
- "dsa.Sign": "crypto/dsa",
- "dsa.Verify": "crypto/dsa",
- "dwarf.AddrType": "debug/dwarf",
- "dwarf.ArrayType": "debug/dwarf",
- "dwarf.Attr": "debug/dwarf",
- "dwarf.AttrAbstractOrigin": "debug/dwarf",
- "dwarf.AttrAccessibility": "debug/dwarf",
- "dwarf.AttrAddrClass": "debug/dwarf",
- "dwarf.AttrAllocated": "debug/dwarf",
- "dwarf.AttrArtificial": "debug/dwarf",
- "dwarf.AttrAssociated": "debug/dwarf",
- "dwarf.AttrBaseTypes": "debug/dwarf",
- "dwarf.AttrBitOffset": "debug/dwarf",
- "dwarf.AttrBitSize": "debug/dwarf",
- "dwarf.AttrByteSize": "debug/dwarf",
- "dwarf.AttrCallColumn": "debug/dwarf",
- "dwarf.AttrCallFile": "debug/dwarf",
- "dwarf.AttrCallLine": "debug/dwarf",
- "dwarf.AttrCalling": "debug/dwarf",
- "dwarf.AttrCommonRef": "debug/dwarf",
- "dwarf.AttrCompDir": "debug/dwarf",
- "dwarf.AttrConstValue": "debug/dwarf",
- "dwarf.AttrContainingType": "debug/dwarf",
- "dwarf.AttrCount": "debug/dwarf",
- "dwarf.AttrDataLocation": "debug/dwarf",
- "dwarf.AttrDataMemberLoc": "debug/dwarf",
- "dwarf.AttrDeclColumn": "debug/dwarf",
- "dwarf.AttrDeclFile": "debug/dwarf",
- "dwarf.AttrDeclLine": "debug/dwarf",
- "dwarf.AttrDeclaration": "debug/dwarf",
- "dwarf.AttrDefaultValue": "debug/dwarf",
- "dwarf.AttrDescription": "debug/dwarf",
- "dwarf.AttrDiscr": "debug/dwarf",
- "dwarf.AttrDiscrList": "debug/dwarf",
- "dwarf.AttrDiscrValue": "debug/dwarf",
- "dwarf.AttrEncoding": "debug/dwarf",
- "dwarf.AttrEntrypc": "debug/dwarf",
- "dwarf.AttrExtension": "debug/dwarf",
- "dwarf.AttrExternal": "debug/dwarf",
- "dwarf.AttrFrameBase": "debug/dwarf",
- "dwarf.AttrFriend": "debug/dwarf",
- "dwarf.AttrHighpc": "debug/dwarf",
- "dwarf.AttrIdentifierCase": "debug/dwarf",
- "dwarf.AttrImport": "debug/dwarf",
- "dwarf.AttrInline": "debug/dwarf",
- "dwarf.AttrIsOptional": "debug/dwarf",
- "dwarf.AttrLanguage": "debug/dwarf",
- "dwarf.AttrLocation": "debug/dwarf",
- "dwarf.AttrLowerBound": "debug/dwarf",
- "dwarf.AttrLowpc": "debug/dwarf",
- "dwarf.AttrMacroInfo": "debug/dwarf",
- "dwarf.AttrName": "debug/dwarf",
- "dwarf.AttrNamelistItem": "debug/dwarf",
- "dwarf.AttrOrdering": "debug/dwarf",
- "dwarf.AttrPriority": "debug/dwarf",
- "dwarf.AttrProducer": "debug/dwarf",
- "dwarf.AttrPrototyped": "debug/dwarf",
- "dwarf.AttrRanges": "debug/dwarf",
- "dwarf.AttrReturnAddr": "debug/dwarf",
- "dwarf.AttrSegment": "debug/dwarf",
- "dwarf.AttrSibling": "debug/dwarf",
- "dwarf.AttrSpecification": "debug/dwarf",
- "dwarf.AttrStartScope": "debug/dwarf",
- "dwarf.AttrStaticLink": "debug/dwarf",
- "dwarf.AttrStmtList": "debug/dwarf",
- "dwarf.AttrStride": "debug/dwarf",
- "dwarf.AttrStrideSize": "debug/dwarf",
- "dwarf.AttrStringLength": "debug/dwarf",
- "dwarf.AttrTrampoline": "debug/dwarf",
- "dwarf.AttrType": "debug/dwarf",
- "dwarf.AttrUpperBound": "debug/dwarf",
- "dwarf.AttrUseLocation": "debug/dwarf",
- "dwarf.AttrUseUTF8": "debug/dwarf",
- "dwarf.AttrVarParam": "debug/dwarf",
- "dwarf.AttrVirtuality": "debug/dwarf",
- "dwarf.AttrVisibility": "debug/dwarf",
- "dwarf.AttrVtableElemLoc": "debug/dwarf",
- "dwarf.BasicType": "debug/dwarf",
- "dwarf.BoolType": "debug/dwarf",
- "dwarf.CharType": "debug/dwarf",
- "dwarf.CommonType": "debug/dwarf",
- "dwarf.ComplexType": "debug/dwarf",
- "dwarf.Data": "debug/dwarf",
- "dwarf.DecodeError": "debug/dwarf",
- "dwarf.DotDotDotType": "debug/dwarf",
- "dwarf.Entry": "debug/dwarf",
- "dwarf.EnumType": "debug/dwarf",
- "dwarf.EnumValue": "debug/dwarf",
- "dwarf.Field": "debug/dwarf",
- "dwarf.FloatType": "debug/dwarf",
- "dwarf.FuncType": "debug/dwarf",
- "dwarf.IntType": "debug/dwarf",
- "dwarf.New": "debug/dwarf",
- "dwarf.Offset": "debug/dwarf",
- "dwarf.PtrType": "debug/dwarf",
- "dwarf.QualType": "debug/dwarf",
- "dwarf.Reader": "debug/dwarf",
- "dwarf.StructField": "debug/dwarf",
- "dwarf.StructType": "debug/dwarf",
- "dwarf.Tag": "debug/dwarf",
- "dwarf.TagAccessDeclaration": "debug/dwarf",
- "dwarf.TagArrayType": "debug/dwarf",
- "dwarf.TagBaseType": "debug/dwarf",
- "dwarf.TagCatchDwarfBlock": "debug/dwarf",
- "dwarf.TagClassType": "debug/dwarf",
- "dwarf.TagCommonDwarfBlock": "debug/dwarf",
- "dwarf.TagCommonInclusion": "debug/dwarf",
- "dwarf.TagCompileUnit": "debug/dwarf",
- "dwarf.TagCondition": "debug/dwarf",
- "dwarf.TagConstType": "debug/dwarf",
- "dwarf.TagConstant": "debug/dwarf",
- "dwarf.TagDwarfProcedure": "debug/dwarf",
- "dwarf.TagEntryPoint": "debug/dwarf",
- "dwarf.TagEnumerationType": "debug/dwarf",
- "dwarf.TagEnumerator": "debug/dwarf",
- "dwarf.TagFileType": "debug/dwarf",
- "dwarf.TagFormalParameter": "debug/dwarf",
- "dwarf.TagFriend": "debug/dwarf",
- "dwarf.TagImportedDeclaration": "debug/dwarf",
- "dwarf.TagImportedModule": "debug/dwarf",
- "dwarf.TagImportedUnit": "debug/dwarf",
- "dwarf.TagInheritance": "debug/dwarf",
- "dwarf.TagInlinedSubroutine": "debug/dwarf",
- "dwarf.TagInterfaceType": "debug/dwarf",
- "dwarf.TagLabel": "debug/dwarf",
- "dwarf.TagLexDwarfBlock": "debug/dwarf",
- "dwarf.TagMember": "debug/dwarf",
- "dwarf.TagModule": "debug/dwarf",
- "dwarf.TagMutableType": "debug/dwarf",
- "dwarf.TagNamelist": "debug/dwarf",
- "dwarf.TagNamelistItem": "debug/dwarf",
- "dwarf.TagNamespace": "debug/dwarf",
- "dwarf.TagPackedType": "debug/dwarf",
- "dwarf.TagPartialUnit": "debug/dwarf",
- "dwarf.TagPointerType": "debug/dwarf",
- "dwarf.TagPtrToMemberType": "debug/dwarf",
- "dwarf.TagReferenceType": "debug/dwarf",
- "dwarf.TagRestrictType": "debug/dwarf",
- "dwarf.TagRvalueReferenceType": "debug/dwarf",
- "dwarf.TagSetType": "debug/dwarf",
- "dwarf.TagSharedType": "debug/dwarf",
- "dwarf.TagStringType": "debug/dwarf",
- "dwarf.TagStructType": "debug/dwarf",
- "dwarf.TagSubprogram": "debug/dwarf",
- "dwarf.TagSubrangeType": "debug/dwarf",
- "dwarf.TagSubroutineType": "debug/dwarf",
- "dwarf.TagTemplateAlias": "debug/dwarf",
- "dwarf.TagTemplateTypeParameter": "debug/dwarf",
- "dwarf.TagTemplateValueParameter": "debug/dwarf",
- "dwarf.TagThrownType": "debug/dwarf",
- "dwarf.TagTryDwarfBlock": "debug/dwarf",
- "dwarf.TagTypeUnit": "debug/dwarf",
- "dwarf.TagTypedef": "debug/dwarf",
- "dwarf.TagUnionType": "debug/dwarf",
- "dwarf.TagUnspecifiedParameters": "debug/dwarf",
- "dwarf.TagUnspecifiedType": "debug/dwarf",
- "dwarf.TagVariable": "debug/dwarf",
- "dwarf.TagVariant": "debug/dwarf",
- "dwarf.TagVariantPart": "debug/dwarf",
- "dwarf.TagVolatileType": "debug/dwarf",
- "dwarf.TagWithStmt": "debug/dwarf",
- "dwarf.Type": "debug/dwarf",
- "dwarf.TypedefType": "debug/dwarf",
- "dwarf.UcharType": "debug/dwarf",
- "dwarf.UintType": "debug/dwarf",
- "dwarf.VoidType": "debug/dwarf",
- "ecdsa.GenerateKey": "crypto/ecdsa",
- "ecdsa.PrivateKey": "crypto/ecdsa",
- "ecdsa.PublicKey": "crypto/ecdsa",
- "ecdsa.Sign": "crypto/ecdsa",
- "ecdsa.Verify": "crypto/ecdsa",
- "elf.ARM_MAGIC_TRAMP_NUMBER": "debug/elf",
- "elf.Class": "debug/elf",
- "elf.DF_BIND_NOW": "debug/elf",
- "elf.DF_ORIGIN": "debug/elf",
- "elf.DF_STATIC_TLS": "debug/elf",
- "elf.DF_SYMBOLIC": "debug/elf",
- "elf.DF_TEXTREL": "debug/elf",
- "elf.DT_BIND_NOW": "debug/elf",
- "elf.DT_DEBUG": "debug/elf",
- "elf.DT_ENCODING": "debug/elf",
- "elf.DT_FINI": "debug/elf",
- "elf.DT_FINI_ARRAY": "debug/elf",
- "elf.DT_FINI_ARRAYSZ": "debug/elf",
- "elf.DT_FLAGS": "debug/elf",
- "elf.DT_HASH": "debug/elf",
- "elf.DT_HIOS": "debug/elf",
- "elf.DT_HIPROC": "debug/elf",
- "elf.DT_INIT": "debug/elf",
- "elf.DT_INIT_ARRAY": "debug/elf",
- "elf.DT_INIT_ARRAYSZ": "debug/elf",
- "elf.DT_JMPREL": "debug/elf",
- "elf.DT_LOOS": "debug/elf",
- "elf.DT_LOPROC": "debug/elf",
- "elf.DT_NEEDED": "debug/elf",
- "elf.DT_NULL": "debug/elf",
- "elf.DT_PLTGOT": "debug/elf",
- "elf.DT_PLTREL": "debug/elf",
- "elf.DT_PLTRELSZ": "debug/elf",
- "elf.DT_PREINIT_ARRAY": "debug/elf",
- "elf.DT_PREINIT_ARRAYSZ": "debug/elf",
- "elf.DT_REL": "debug/elf",
- "elf.DT_RELA": "debug/elf",
- "elf.DT_RELAENT": "debug/elf",
- "elf.DT_RELASZ": "debug/elf",
- "elf.DT_RELENT": "debug/elf",
- "elf.DT_RELSZ": "debug/elf",
- "elf.DT_RPATH": "debug/elf",
- "elf.DT_RUNPATH": "debug/elf",
- "elf.DT_SONAME": "debug/elf",
- "elf.DT_STRSZ": "debug/elf",
- "elf.DT_STRTAB": "debug/elf",
- "elf.DT_SYMBOLIC": "debug/elf",
- "elf.DT_SYMENT": "debug/elf",
- "elf.DT_SYMTAB": "debug/elf",
- "elf.DT_TEXTREL": "debug/elf",
- "elf.DT_VERNEED": "debug/elf",
- "elf.DT_VERNEEDNUM": "debug/elf",
- "elf.DT_VERSYM": "debug/elf",
- "elf.Data": "debug/elf",
- "elf.Dyn32": "debug/elf",
- "elf.Dyn64": "debug/elf",
- "elf.DynFlag": "debug/elf",
- "elf.DynTag": "debug/elf",
- "elf.EI_ABIVERSION": "debug/elf",
- "elf.EI_CLASS": "debug/elf",
- "elf.EI_DATA": "debug/elf",
- "elf.EI_NIDENT": "debug/elf",
- "elf.EI_OSABI": "debug/elf",
- "elf.EI_PAD": "debug/elf",
- "elf.EI_VERSION": "debug/elf",
- "elf.ELFCLASS32": "debug/elf",
- "elf.ELFCLASS64": "debug/elf",
- "elf.ELFCLASSNONE": "debug/elf",
- "elf.ELFDATA2LSB": "debug/elf",
- "elf.ELFDATA2MSB": "debug/elf",
- "elf.ELFDATANONE": "debug/elf",
- "elf.ELFMAG": "debug/elf",
- "elf.ELFOSABI_86OPEN": "debug/elf",
- "elf.ELFOSABI_AIX": "debug/elf",
- "elf.ELFOSABI_ARM": "debug/elf",
- "elf.ELFOSABI_FREEBSD": "debug/elf",
- "elf.ELFOSABI_HPUX": "debug/elf",
- "elf.ELFOSABI_HURD": "debug/elf",
- "elf.ELFOSABI_IRIX": "debug/elf",
- "elf.ELFOSABI_LINUX": "debug/elf",
- "elf.ELFOSABI_MODESTO": "debug/elf",
- "elf.ELFOSABI_NETBSD": "debug/elf",
- "elf.ELFOSABI_NONE": "debug/elf",
- "elf.ELFOSABI_NSK": "debug/elf",
- "elf.ELFOSABI_OPENBSD": "debug/elf",
- "elf.ELFOSABI_OPENVMS": "debug/elf",
- "elf.ELFOSABI_SOLARIS": "debug/elf",
- "elf.ELFOSABI_STANDALONE": "debug/elf",
- "elf.ELFOSABI_TRU64": "debug/elf",
- "elf.EM_386": "debug/elf",
- "elf.EM_486": "debug/elf",
- "elf.EM_68HC12": "debug/elf",
- "elf.EM_68K": "debug/elf",
- "elf.EM_860": "debug/elf",
- "elf.EM_88K": "debug/elf",
- "elf.EM_960": "debug/elf",
- "elf.EM_ALPHA": "debug/elf",
- "elf.EM_ALPHA_STD": "debug/elf",
- "elf.EM_ARC": "debug/elf",
- "elf.EM_ARM": "debug/elf",
- "elf.EM_COLDFIRE": "debug/elf",
- "elf.EM_FR20": "debug/elf",
- "elf.EM_H8S": "debug/elf",
- "elf.EM_H8_300": "debug/elf",
- "elf.EM_H8_300H": "debug/elf",
- "elf.EM_H8_500": "debug/elf",
- "elf.EM_IA_64": "debug/elf",
- "elf.EM_M32": "debug/elf",
- "elf.EM_ME16": "debug/elf",
- "elf.EM_MIPS": "debug/elf",
- "elf.EM_MIPS_RS3_LE": "debug/elf",
- "elf.EM_MIPS_RS4_BE": "debug/elf",
- "elf.EM_MIPS_X": "debug/elf",
- "elf.EM_MMA": "debug/elf",
- "elf.EM_NCPU": "debug/elf",
- "elf.EM_NDR1": "debug/elf",
- "elf.EM_NONE": "debug/elf",
- "elf.EM_PARISC": "debug/elf",
- "elf.EM_PCP": "debug/elf",
- "elf.EM_PPC": "debug/elf",
- "elf.EM_PPC64": "debug/elf",
- "elf.EM_RCE": "debug/elf",
- "elf.EM_RH32": "debug/elf",
- "elf.EM_S370": "debug/elf",
- "elf.EM_S390": "debug/elf",
- "elf.EM_SH": "debug/elf",
- "elf.EM_SPARC": "debug/elf",
- "elf.EM_SPARC32PLUS": "debug/elf",
- "elf.EM_SPARCV9": "debug/elf",
- "elf.EM_ST100": "debug/elf",
- "elf.EM_STARCORE": "debug/elf",
- "elf.EM_TINYJ": "debug/elf",
- "elf.EM_TRICORE": "debug/elf",
- "elf.EM_V800": "debug/elf",
- "elf.EM_VPP500": "debug/elf",
- "elf.EM_X86_64": "debug/elf",
- "elf.ET_CORE": "debug/elf",
- "elf.ET_DYN": "debug/elf",
- "elf.ET_EXEC": "debug/elf",
- "elf.ET_HIOS": "debug/elf",
- "elf.ET_HIPROC": "debug/elf",
- "elf.ET_LOOS": "debug/elf",
- "elf.ET_LOPROC": "debug/elf",
- "elf.ET_NONE": "debug/elf",
- "elf.ET_REL": "debug/elf",
- "elf.EV_CURRENT": "debug/elf",
- "elf.EV_NONE": "debug/elf",
- "elf.File": "debug/elf",
- "elf.FileHeader": "debug/elf",
- "elf.FormatError": "debug/elf",
- "elf.Header32": "debug/elf",
- "elf.Header64": "debug/elf",
- "elf.ImportedSymbol": "debug/elf",
- "elf.Machine": "debug/elf",
- "elf.NT_FPREGSET": "debug/elf",
- "elf.NT_PRPSINFO": "debug/elf",
- "elf.NT_PRSTATUS": "debug/elf",
- "elf.NType": "debug/elf",
- "elf.NewFile": "debug/elf",
- "elf.OSABI": "debug/elf",
- "elf.Open": "debug/elf",
- "elf.PF_MASKOS": "debug/elf",
- "elf.PF_MASKPROC": "debug/elf",
- "elf.PF_R": "debug/elf",
- "elf.PF_W": "debug/elf",
- "elf.PF_X": "debug/elf",
- "elf.PT_DYNAMIC": "debug/elf",
- "elf.PT_HIOS": "debug/elf",
- "elf.PT_HIPROC": "debug/elf",
- "elf.PT_INTERP": "debug/elf",
- "elf.PT_LOAD": "debug/elf",
- "elf.PT_LOOS": "debug/elf",
- "elf.PT_LOPROC": "debug/elf",
- "elf.PT_NOTE": "debug/elf",
- "elf.PT_NULL": "debug/elf",
- "elf.PT_PHDR": "debug/elf",
- "elf.PT_SHLIB": "debug/elf",
- "elf.PT_TLS": "debug/elf",
- "elf.Prog": "debug/elf",
- "elf.Prog32": "debug/elf",
- "elf.Prog64": "debug/elf",
- "elf.ProgFlag": "debug/elf",
- "elf.ProgHeader": "debug/elf",
- "elf.ProgType": "debug/elf",
- "elf.R_386": "debug/elf",
- "elf.R_386_32": "debug/elf",
- "elf.R_386_COPY": "debug/elf",
- "elf.R_386_GLOB_DAT": "debug/elf",
- "elf.R_386_GOT32": "debug/elf",
- "elf.R_386_GOTOFF": "debug/elf",
- "elf.R_386_GOTPC": "debug/elf",
- "elf.R_386_JMP_SLOT": "debug/elf",
- "elf.R_386_NONE": "debug/elf",
- "elf.R_386_PC32": "debug/elf",
- "elf.R_386_PLT32": "debug/elf",
- "elf.R_386_RELATIVE": "debug/elf",
- "elf.R_386_TLS_DTPMOD32": "debug/elf",
- "elf.R_386_TLS_DTPOFF32": "debug/elf",
- "elf.R_386_TLS_GD": "debug/elf",
- "elf.R_386_TLS_GD_32": "debug/elf",
- "elf.R_386_TLS_GD_CALL": "debug/elf",
- "elf.R_386_TLS_GD_POP": "debug/elf",
- "elf.R_386_TLS_GD_PUSH": "debug/elf",
- "elf.R_386_TLS_GOTIE": "debug/elf",
- "elf.R_386_TLS_IE": "debug/elf",
- "elf.R_386_TLS_IE_32": "debug/elf",
- "elf.R_386_TLS_LDM": "debug/elf",
- "elf.R_386_TLS_LDM_32": "debug/elf",
- "elf.R_386_TLS_LDM_CALL": "debug/elf",
- "elf.R_386_TLS_LDM_POP": "debug/elf",
- "elf.R_386_TLS_LDM_PUSH": "debug/elf",
- "elf.R_386_TLS_LDO_32": "debug/elf",
- "elf.R_386_TLS_LE": "debug/elf",
- "elf.R_386_TLS_LE_32": "debug/elf",
- "elf.R_386_TLS_TPOFF": "debug/elf",
- "elf.R_386_TLS_TPOFF32": "debug/elf",
- "elf.R_ALPHA": "debug/elf",
- "elf.R_ALPHA_BRADDR": "debug/elf",
- "elf.R_ALPHA_COPY": "debug/elf",
- "elf.R_ALPHA_GLOB_DAT": "debug/elf",
- "elf.R_ALPHA_GPDISP": "debug/elf",
- "elf.R_ALPHA_GPREL32": "debug/elf",
- "elf.R_ALPHA_GPRELHIGH": "debug/elf",
- "elf.R_ALPHA_GPRELLOW": "debug/elf",
- "elf.R_ALPHA_GPVALUE": "debug/elf",
- "elf.R_ALPHA_HINT": "debug/elf",
- "elf.R_ALPHA_IMMED_BR_HI32": "debug/elf",
- "elf.R_ALPHA_IMMED_GP_16": "debug/elf",
- "elf.R_ALPHA_IMMED_GP_HI32": "debug/elf",
- "elf.R_ALPHA_IMMED_LO32": "debug/elf",
- "elf.R_ALPHA_IMMED_SCN_HI32": "debug/elf",
- "elf.R_ALPHA_JMP_SLOT": "debug/elf",
- "elf.R_ALPHA_LITERAL": "debug/elf",
- "elf.R_ALPHA_LITUSE": "debug/elf",
- "elf.R_ALPHA_NONE": "debug/elf",
- "elf.R_ALPHA_OP_PRSHIFT": "debug/elf",
- "elf.R_ALPHA_OP_PSUB": "debug/elf",
- "elf.R_ALPHA_OP_PUSH": "debug/elf",
- "elf.R_ALPHA_OP_STORE": "debug/elf",
- "elf.R_ALPHA_REFLONG": "debug/elf",
- "elf.R_ALPHA_REFQUAD": "debug/elf",
- "elf.R_ALPHA_RELATIVE": "debug/elf",
- "elf.R_ALPHA_SREL16": "debug/elf",
- "elf.R_ALPHA_SREL32": "debug/elf",
- "elf.R_ALPHA_SREL64": "debug/elf",
- "elf.R_ARM": "debug/elf",
- "elf.R_ARM_ABS12": "debug/elf",
- "elf.R_ARM_ABS16": "debug/elf",
- "elf.R_ARM_ABS32": "debug/elf",
- "elf.R_ARM_ABS8": "debug/elf",
- "elf.R_ARM_AMP_VCALL9": "debug/elf",
- "elf.R_ARM_COPY": "debug/elf",
- "elf.R_ARM_GLOB_DAT": "debug/elf",
- "elf.R_ARM_GNU_VTENTRY": "debug/elf",
- "elf.R_ARM_GNU_VTINHERIT": "debug/elf",
- "elf.R_ARM_GOT32": "debug/elf",
- "elf.R_ARM_GOTOFF": "debug/elf",
- "elf.R_ARM_GOTPC": "debug/elf",
- "elf.R_ARM_JUMP_SLOT": "debug/elf",
- "elf.R_ARM_NONE": "debug/elf",
- "elf.R_ARM_PC13": "debug/elf",
- "elf.R_ARM_PC24": "debug/elf",
- "elf.R_ARM_PLT32": "debug/elf",
- "elf.R_ARM_RABS32": "debug/elf",
- "elf.R_ARM_RBASE": "debug/elf",
- "elf.R_ARM_REL32": "debug/elf",
- "elf.R_ARM_RELATIVE": "debug/elf",
- "elf.R_ARM_RPC24": "debug/elf",
- "elf.R_ARM_RREL32": "debug/elf",
- "elf.R_ARM_RSBREL32": "debug/elf",
- "elf.R_ARM_SBREL32": "debug/elf",
- "elf.R_ARM_SWI24": "debug/elf",
- "elf.R_ARM_THM_ABS5": "debug/elf",
- "elf.R_ARM_THM_PC22": "debug/elf",
- "elf.R_ARM_THM_PC8": "debug/elf",
- "elf.R_ARM_THM_RPC22": "debug/elf",
- "elf.R_ARM_THM_SWI8": "debug/elf",
- "elf.R_ARM_THM_XPC22": "debug/elf",
- "elf.R_ARM_XPC25": "debug/elf",
- "elf.R_INFO": "debug/elf",
- "elf.R_INFO32": "debug/elf",
- "elf.R_PPC": "debug/elf",
- "elf.R_PPC_ADDR14": "debug/elf",
- "elf.R_PPC_ADDR14_BRNTAKEN": "debug/elf",
- "elf.R_PPC_ADDR14_BRTAKEN": "debug/elf",
- "elf.R_PPC_ADDR16": "debug/elf",
- "elf.R_PPC_ADDR16_HA": "debug/elf",
- "elf.R_PPC_ADDR16_HI": "debug/elf",
- "elf.R_PPC_ADDR16_LO": "debug/elf",
- "elf.R_PPC_ADDR24": "debug/elf",
- "elf.R_PPC_ADDR32": "debug/elf",
- "elf.R_PPC_COPY": "debug/elf",
- "elf.R_PPC_DTPMOD32": "debug/elf",
- "elf.R_PPC_DTPREL16": "debug/elf",
- "elf.R_PPC_DTPREL16_HA": "debug/elf",
- "elf.R_PPC_DTPREL16_HI": "debug/elf",
- "elf.R_PPC_DTPREL16_LO": "debug/elf",
- "elf.R_PPC_DTPREL32": "debug/elf",
- "elf.R_PPC_EMB_BIT_FLD": "debug/elf",
- "elf.R_PPC_EMB_MRKREF": "debug/elf",
- "elf.R_PPC_EMB_NADDR16": "debug/elf",
- "elf.R_PPC_EMB_NADDR16_HA": "debug/elf",
- "elf.R_PPC_EMB_NADDR16_HI": "debug/elf",
- "elf.R_PPC_EMB_NADDR16_LO": "debug/elf",
- "elf.R_PPC_EMB_NADDR32": "debug/elf",
- "elf.R_PPC_EMB_RELSDA": "debug/elf",
- "elf.R_PPC_EMB_RELSEC16": "debug/elf",
- "elf.R_PPC_EMB_RELST_HA": "debug/elf",
- "elf.R_PPC_EMB_RELST_HI": "debug/elf",
- "elf.R_PPC_EMB_RELST_LO": "debug/elf",
- "elf.R_PPC_EMB_SDA21": "debug/elf",
- "elf.R_PPC_EMB_SDA2I16": "debug/elf",
- "elf.R_PPC_EMB_SDA2REL": "debug/elf",
- "elf.R_PPC_EMB_SDAI16": "debug/elf",
- "elf.R_PPC_GLOB_DAT": "debug/elf",
- "elf.R_PPC_GOT16": "debug/elf",
- "elf.R_PPC_GOT16_HA": "debug/elf",
- "elf.R_PPC_GOT16_HI": "debug/elf",
- "elf.R_PPC_GOT16_LO": "debug/elf",
- "elf.R_PPC_GOT_TLSGD16": "debug/elf",
- "elf.R_PPC_GOT_TLSGD16_HA": "debug/elf",
- "elf.R_PPC_GOT_TLSGD16_HI": "debug/elf",
- "elf.R_PPC_GOT_TLSGD16_LO": "debug/elf",
- "elf.R_PPC_GOT_TLSLD16": "debug/elf",
- "elf.R_PPC_GOT_TLSLD16_HA": "debug/elf",
- "elf.R_PPC_GOT_TLSLD16_HI": "debug/elf",
- "elf.R_PPC_GOT_TLSLD16_LO": "debug/elf",
- "elf.R_PPC_GOT_TPREL16": "debug/elf",
- "elf.R_PPC_GOT_TPREL16_HA": "debug/elf",
- "elf.R_PPC_GOT_TPREL16_HI": "debug/elf",
- "elf.R_PPC_GOT_TPREL16_LO": "debug/elf",
- "elf.R_PPC_JMP_SLOT": "debug/elf",
- "elf.R_PPC_LOCAL24PC": "debug/elf",
- "elf.R_PPC_NONE": "debug/elf",
- "elf.R_PPC_PLT16_HA": "debug/elf",
- "elf.R_PPC_PLT16_HI": "debug/elf",
- "elf.R_PPC_PLT16_LO": "debug/elf",
- "elf.R_PPC_PLT32": "debug/elf",
- "elf.R_PPC_PLTREL24": "debug/elf",
- "elf.R_PPC_PLTREL32": "debug/elf",
- "elf.R_PPC_REL14": "debug/elf",
- "elf.R_PPC_REL14_BRNTAKEN": "debug/elf",
- "elf.R_PPC_REL14_BRTAKEN": "debug/elf",
- "elf.R_PPC_REL24": "debug/elf",
- "elf.R_PPC_REL32": "debug/elf",
- "elf.R_PPC_RELATIVE": "debug/elf",
- "elf.R_PPC_SDAREL16": "debug/elf",
- "elf.R_PPC_SECTOFF": "debug/elf",
- "elf.R_PPC_SECTOFF_HA": "debug/elf",
- "elf.R_PPC_SECTOFF_HI": "debug/elf",
- "elf.R_PPC_SECTOFF_LO": "debug/elf",
- "elf.R_PPC_TLS": "debug/elf",
- "elf.R_PPC_TPREL16": "debug/elf",
- "elf.R_PPC_TPREL16_HA": "debug/elf",
- "elf.R_PPC_TPREL16_HI": "debug/elf",
- "elf.R_PPC_TPREL16_LO": "debug/elf",
- "elf.R_PPC_TPREL32": "debug/elf",
- "elf.R_PPC_UADDR16": "debug/elf",
- "elf.R_PPC_UADDR32": "debug/elf",
- "elf.R_SPARC": "debug/elf",
- "elf.R_SPARC_10": "debug/elf",
- "elf.R_SPARC_11": "debug/elf",
- "elf.R_SPARC_13": "debug/elf",
- "elf.R_SPARC_16": "debug/elf",
- "elf.R_SPARC_22": "debug/elf",
- "elf.R_SPARC_32": "debug/elf",
- "elf.R_SPARC_5": "debug/elf",
- "elf.R_SPARC_6": "debug/elf",
- "elf.R_SPARC_64": "debug/elf",
- "elf.R_SPARC_7": "debug/elf",
- "elf.R_SPARC_8": "debug/elf",
- "elf.R_SPARC_COPY": "debug/elf",
- "elf.R_SPARC_DISP16": "debug/elf",
- "elf.R_SPARC_DISP32": "debug/elf",
- "elf.R_SPARC_DISP64": "debug/elf",
- "elf.R_SPARC_DISP8": "debug/elf",
- "elf.R_SPARC_GLOB_DAT": "debug/elf",
- "elf.R_SPARC_GLOB_JMP": "debug/elf",
- "elf.R_SPARC_GOT10": "debug/elf",
- "elf.R_SPARC_GOT13": "debug/elf",
- "elf.R_SPARC_GOT22": "debug/elf",
- "elf.R_SPARC_H44": "debug/elf",
- "elf.R_SPARC_HH22": "debug/elf",
- "elf.R_SPARC_HI22": "debug/elf",
- "elf.R_SPARC_HIPLT22": "debug/elf",
- "elf.R_SPARC_HIX22": "debug/elf",
- "elf.R_SPARC_HM10": "debug/elf",
- "elf.R_SPARC_JMP_SLOT": "debug/elf",
- "elf.R_SPARC_L44": "debug/elf",
- "elf.R_SPARC_LM22": "debug/elf",
- "elf.R_SPARC_LO10": "debug/elf",
- "elf.R_SPARC_LOPLT10": "debug/elf",
- "elf.R_SPARC_LOX10": "debug/elf",
- "elf.R_SPARC_M44": "debug/elf",
- "elf.R_SPARC_NONE": "debug/elf",
- "elf.R_SPARC_OLO10": "debug/elf",
- "elf.R_SPARC_PC10": "debug/elf",
- "elf.R_SPARC_PC22": "debug/elf",
- "elf.R_SPARC_PCPLT10": "debug/elf",
- "elf.R_SPARC_PCPLT22": "debug/elf",
- "elf.R_SPARC_PCPLT32": "debug/elf",
- "elf.R_SPARC_PC_HH22": "debug/elf",
- "elf.R_SPARC_PC_HM10": "debug/elf",
- "elf.R_SPARC_PC_LM22": "debug/elf",
- "elf.R_SPARC_PLT32": "debug/elf",
- "elf.R_SPARC_PLT64": "debug/elf",
- "elf.R_SPARC_REGISTER": "debug/elf",
- "elf.R_SPARC_RELATIVE": "debug/elf",
- "elf.R_SPARC_UA16": "debug/elf",
- "elf.R_SPARC_UA32": "debug/elf",
- "elf.R_SPARC_UA64": "debug/elf",
- "elf.R_SPARC_WDISP16": "debug/elf",
- "elf.R_SPARC_WDISP19": "debug/elf",
- "elf.R_SPARC_WDISP22": "debug/elf",
- "elf.R_SPARC_WDISP30": "debug/elf",
- "elf.R_SPARC_WPLT30": "debug/elf",
- "elf.R_SYM32": "debug/elf",
- "elf.R_SYM64": "debug/elf",
- "elf.R_TYPE32": "debug/elf",
- "elf.R_TYPE64": "debug/elf",
- "elf.R_X86_64": "debug/elf",
- "elf.R_X86_64_16": "debug/elf",
- "elf.R_X86_64_32": "debug/elf",
- "elf.R_X86_64_32S": "debug/elf",
- "elf.R_X86_64_64": "debug/elf",
- "elf.R_X86_64_8": "debug/elf",
- "elf.R_X86_64_COPY": "debug/elf",
- "elf.R_X86_64_DTPMOD64": "debug/elf",
- "elf.R_X86_64_DTPOFF32": "debug/elf",
- "elf.R_X86_64_DTPOFF64": "debug/elf",
- "elf.R_X86_64_GLOB_DAT": "debug/elf",
- "elf.R_X86_64_GOT32": "debug/elf",
- "elf.R_X86_64_GOTPCREL": "debug/elf",
- "elf.R_X86_64_GOTTPOFF": "debug/elf",
- "elf.R_X86_64_JMP_SLOT": "debug/elf",
- "elf.R_X86_64_NONE": "debug/elf",
- "elf.R_X86_64_PC16": "debug/elf",
- "elf.R_X86_64_PC32": "debug/elf",
- "elf.R_X86_64_PC8": "debug/elf",
- "elf.R_X86_64_PLT32": "debug/elf",
- "elf.R_X86_64_RELATIVE": "debug/elf",
- "elf.R_X86_64_TLSGD": "debug/elf",
- "elf.R_X86_64_TLSLD": "debug/elf",
- "elf.R_X86_64_TPOFF32": "debug/elf",
- "elf.R_X86_64_TPOFF64": "debug/elf",
- "elf.Rel32": "debug/elf",
- "elf.Rel64": "debug/elf",
- "elf.Rela32": "debug/elf",
- "elf.Rela64": "debug/elf",
- "elf.SHF_ALLOC": "debug/elf",
- "elf.SHF_EXECINSTR": "debug/elf",
- "elf.SHF_GROUP": "debug/elf",
- "elf.SHF_INFO_LINK": "debug/elf",
- "elf.SHF_LINK_ORDER": "debug/elf",
- "elf.SHF_MASKOS": "debug/elf",
- "elf.SHF_MASKPROC": "debug/elf",
- "elf.SHF_MERGE": "debug/elf",
- "elf.SHF_OS_NONCONFORMING": "debug/elf",
- "elf.SHF_STRINGS": "debug/elf",
- "elf.SHF_TLS": "debug/elf",
- "elf.SHF_WRITE": "debug/elf",
- "elf.SHN_ABS": "debug/elf",
- "elf.SHN_COMMON": "debug/elf",
- "elf.SHN_HIOS": "debug/elf",
- "elf.SHN_HIPROC": "debug/elf",
- "elf.SHN_HIRESERVE": "debug/elf",
- "elf.SHN_LOOS": "debug/elf",
- "elf.SHN_LOPROC": "debug/elf",
- "elf.SHN_LORESERVE": "debug/elf",
- "elf.SHN_UNDEF": "debug/elf",
- "elf.SHN_XINDEX": "debug/elf",
- "elf.SHT_DYNAMIC": "debug/elf",
- "elf.SHT_DYNSYM": "debug/elf",
- "elf.SHT_FINI_ARRAY": "debug/elf",
- "elf.SHT_GNU_ATTRIBUTES": "debug/elf",
- "elf.SHT_GNU_HASH": "debug/elf",
- "elf.SHT_GNU_LIBLIST": "debug/elf",
- "elf.SHT_GNU_VERDEF": "debug/elf",
- "elf.SHT_GNU_VERNEED": "debug/elf",
- "elf.SHT_GNU_VERSYM": "debug/elf",
- "elf.SHT_GROUP": "debug/elf",
- "elf.SHT_HASH": "debug/elf",
- "elf.SHT_HIOS": "debug/elf",
- "elf.SHT_HIPROC": "debug/elf",
- "elf.SHT_HIUSER": "debug/elf",
- "elf.SHT_INIT_ARRAY": "debug/elf",
- "elf.SHT_LOOS": "debug/elf",
- "elf.SHT_LOPROC": "debug/elf",
- "elf.SHT_LOUSER": "debug/elf",
- "elf.SHT_NOBITS": "debug/elf",
- "elf.SHT_NOTE": "debug/elf",
- "elf.SHT_NULL": "debug/elf",
- "elf.SHT_PREINIT_ARRAY": "debug/elf",
- "elf.SHT_PROGBITS": "debug/elf",
- "elf.SHT_REL": "debug/elf",
- "elf.SHT_RELA": "debug/elf",
- "elf.SHT_SHLIB": "debug/elf",
- "elf.SHT_STRTAB": "debug/elf",
- "elf.SHT_SYMTAB": "debug/elf",
- "elf.SHT_SYMTAB_SHNDX": "debug/elf",
- "elf.STB_GLOBAL": "debug/elf",
- "elf.STB_HIOS": "debug/elf",
- "elf.STB_HIPROC": "debug/elf",
- "elf.STB_LOCAL": "debug/elf",
- "elf.STB_LOOS": "debug/elf",
- "elf.STB_LOPROC": "debug/elf",
- "elf.STB_WEAK": "debug/elf",
- "elf.STT_COMMON": "debug/elf",
- "elf.STT_FILE": "debug/elf",
- "elf.STT_FUNC": "debug/elf",
- "elf.STT_HIOS": "debug/elf",
- "elf.STT_HIPROC": "debug/elf",
- "elf.STT_LOOS": "debug/elf",
- "elf.STT_LOPROC": "debug/elf",
- "elf.STT_NOTYPE": "debug/elf",
- "elf.STT_OBJECT": "debug/elf",
- "elf.STT_SECTION": "debug/elf",
- "elf.STT_TLS": "debug/elf",
- "elf.STV_DEFAULT": "debug/elf",
- "elf.STV_HIDDEN": "debug/elf",
- "elf.STV_INTERNAL": "debug/elf",
- "elf.STV_PROTECTED": "debug/elf",
- "elf.ST_BIND": "debug/elf",
- "elf.ST_INFO": "debug/elf",
- "elf.ST_TYPE": "debug/elf",
- "elf.ST_VISIBILITY": "debug/elf",
- "elf.Section": "debug/elf",
- "elf.Section32": "debug/elf",
- "elf.Section64": "debug/elf",
- "elf.SectionFlag": "debug/elf",
- "elf.SectionHeader": "debug/elf",
- "elf.SectionIndex": "debug/elf",
- "elf.SectionType": "debug/elf",
- "elf.Sym32": "debug/elf",
- "elf.Sym32Size": "debug/elf",
- "elf.Sym64": "debug/elf",
- "elf.Sym64Size": "debug/elf",
- "elf.SymBind": "debug/elf",
- "elf.SymType": "debug/elf",
- "elf.SymVis": "debug/elf",
- "elf.Symbol": "debug/elf",
- "elf.Type": "debug/elf",
- "elf.Version": "debug/elf",
- "elliptic.Curve": "crypto/elliptic",
- "elliptic.CurveParams": "crypto/elliptic",
- "elliptic.GenerateKey": "crypto/elliptic",
- "elliptic.Marshal": "crypto/elliptic",
- "elliptic.P224": "crypto/elliptic",
- "elliptic.P256": "crypto/elliptic",
- "elliptic.P384": "crypto/elliptic",
- "elliptic.P521": "crypto/elliptic",
- "elliptic.Unmarshal": "crypto/elliptic",
- "encoding.BinaryMarshaler": "encoding",
- "encoding.BinaryUnmarshaler": "encoding",
- "encoding.TextMarshaler": "encoding",
- "encoding.TextUnmarshaler": "encoding",
- "errors.New": "errors",
- "exec.Cmd": "os/exec",
- "exec.Command": "os/exec",
- "exec.ErrNotFound": "os/exec",
- "exec.Error": "os/exec",
- "exec.ExitError": "os/exec",
- "exec.LookPath": "os/exec",
- "expvar.Do": "expvar",
- "expvar.Float": "expvar",
- "expvar.Func": "expvar",
- "expvar.Get": "expvar",
- "expvar.Int": "expvar",
- "expvar.KeyValue": "expvar",
- "expvar.Map": "expvar",
- "expvar.NewFloat": "expvar",
- "expvar.NewInt": "expvar",
- "expvar.NewMap": "expvar",
- "expvar.NewString": "expvar",
- "expvar.Publish": "expvar",
- "expvar.String": "expvar",
- "expvar.Var": "expvar",
- "fcgi.Serve": "net/http/fcgi",
- "filepath.Abs": "path/filepath",
- "filepath.Base": "path/filepath",
- "filepath.Clean": "path/filepath",
- "filepath.Dir": "path/filepath",
- "filepath.ErrBadPattern": "path/filepath",
- "filepath.EvalSymlinks": "path/filepath",
- "filepath.Ext": "path/filepath",
- "filepath.FromSlash": "path/filepath",
- "filepath.Glob": "path/filepath",
- "filepath.HasPrefix": "path/filepath",
- "filepath.IsAbs": "path/filepath",
- "filepath.Join": "path/filepath",
- "filepath.ListSeparator": "path/filepath",
- "filepath.Match": "path/filepath",
- "filepath.Rel": "path/filepath",
- "filepath.Separator": "path/filepath",
- "filepath.SkipDir": "path/filepath",
- "filepath.Split": "path/filepath",
- "filepath.SplitList": "path/filepath",
- "filepath.ToSlash": "path/filepath",
- "filepath.VolumeName": "path/filepath",
- "filepath.Walk": "path/filepath",
- "filepath.WalkFunc": "path/filepath",
- "flag.Arg": "flag",
- "flag.Args": "flag",
- "flag.Bool": "flag",
- "flag.BoolVar": "flag",
- "flag.CommandLine": "flag",
- "flag.ContinueOnError": "flag",
- "flag.Duration": "flag",
- "flag.DurationVar": "flag",
- "flag.ErrHelp": "flag",
- "flag.ErrorHandling": "flag",
- "flag.ExitOnError": "flag",
- "flag.Flag": "flag",
- "flag.FlagSet": "flag",
- "flag.Float64": "flag",
- "flag.Float64Var": "flag",
- "flag.Getter": "flag",
- "flag.Int": "flag",
- "flag.Int64": "flag",
- "flag.Int64Var": "flag",
- "flag.IntVar": "flag",
- "flag.Lookup": "flag",
- "flag.NArg": "flag",
- "flag.NFlag": "flag",
- "flag.NewFlagSet": "flag",
- "flag.PanicOnError": "flag",
- "flag.Parse": "flag",
- "flag.Parsed": "flag",
- "flag.PrintDefaults": "flag",
- "flag.Set": "flag",
- "flag.String": "flag",
- "flag.StringVar": "flag",
- "flag.Uint": "flag",
- "flag.Uint64": "flag",
- "flag.Uint64Var": "flag",
- "flag.UintVar": "flag",
- "flag.Usage": "flag",
- "flag.Value": "flag",
- "flag.Var": "flag",
- "flag.Visit": "flag",
- "flag.VisitAll": "flag",
- "flate.BestCompression": "compress/flate",
- "flate.BestSpeed": "compress/flate",
- "flate.CorruptInputError": "compress/flate",
- "flate.DefaultCompression": "compress/flate",
- "flate.InternalError": "compress/flate",
- "flate.NewReader": "compress/flate",
- "flate.NewReaderDict": "compress/flate",
- "flate.NewWriter": "compress/flate",
- "flate.NewWriterDict": "compress/flate",
- "flate.NoCompression": "compress/flate",
- "flate.ReadError": "compress/flate",
- "flate.Reader": "compress/flate",
- "flate.WriteError": "compress/flate",
- "flate.Writer": "compress/flate",
- "fmt.Errorf": "fmt",
- "fmt.Formatter": "fmt",
- "fmt.Fprint": "fmt",
- "fmt.Fprintf": "fmt",
- "fmt.Fprintln": "fmt",
- "fmt.Fscan": "fmt",
- "fmt.Fscanf": "fmt",
- "fmt.Fscanln": "fmt",
- "fmt.GoStringer": "fmt",
- "fmt.Print": "fmt",
- "fmt.Printf": "fmt",
- "fmt.Println": "fmt",
- "fmt.Scan": "fmt",
- "fmt.ScanState": "fmt",
- "fmt.Scanf": "fmt",
- "fmt.Scanln": "fmt",
- "fmt.Scanner": "fmt",
- "fmt.Sprint": "fmt",
- "fmt.Sprintf": "fmt",
- "fmt.Sprintln": "fmt",
- "fmt.Sscan": "fmt",
- "fmt.Sscanf": "fmt",
- "fmt.Sscanln": "fmt",
- "fmt.State": "fmt",
- "fmt.Stringer": "fmt",
- "fnv.New32": "hash/fnv",
- "fnv.New32a": "hash/fnv",
- "fnv.New64": "hash/fnv",
- "fnv.New64a": "hash/fnv",
- "format.Node": "go/format",
- "format.Source": "go/format",
- "gif.Decode": "image/gif",
- "gif.DecodeAll": "image/gif",
- "gif.DecodeConfig": "image/gif",
- "gif.Encode": "image/gif",
- "gif.EncodeAll": "image/gif",
- "gif.GIF": "image/gif",
- "gif.Options": "image/gif",
- "gob.CommonType": "encoding/gob",
- "gob.Decoder": "encoding/gob",
- "gob.Encoder": "encoding/gob",
- "gob.GobDecoder": "encoding/gob",
- "gob.GobEncoder": "encoding/gob",
- "gob.NewDecoder": "encoding/gob",
- "gob.NewEncoder": "encoding/gob",
- "gob.Register": "encoding/gob",
- "gob.RegisterName": "encoding/gob",
- "gosym.DecodingError": "debug/gosym",
- "gosym.Func": "debug/gosym",
- "gosym.LineTable": "debug/gosym",
- "gosym.NewLineTable": "debug/gosym",
- "gosym.NewTable": "debug/gosym",
- "gosym.Obj": "debug/gosym",
- "gosym.Sym": "debug/gosym",
- "gosym.Table": "debug/gosym",
- "gosym.UnknownFileError": "debug/gosym",
- "gosym.UnknownLineError": "debug/gosym",
- "gzip.BestCompression": "compress/gzip",
- "gzip.BestSpeed": "compress/gzip",
- "gzip.DefaultCompression": "compress/gzip",
- "gzip.ErrChecksum": "compress/gzip",
- "gzip.ErrHeader": "compress/gzip",
- "gzip.Header": "compress/gzip",
- "gzip.NewReader": "compress/gzip",
- "gzip.NewWriter": "compress/gzip",
- "gzip.NewWriterLevel": "compress/gzip",
- "gzip.NoCompression": "compress/gzip",
- "gzip.Reader": "compress/gzip",
- "gzip.Writer": "compress/gzip",
- "hash.Hash": "hash",
- "hash.Hash32": "hash",
- "hash.Hash64": "hash",
- "heap.Fix": "container/heap",
- "heap.Init": "container/heap",
- "heap.Interface": "container/heap",
- "heap.Pop": "container/heap",
- "heap.Push": "container/heap",
- "heap.Remove": "container/heap",
- "hex.Decode": "encoding/hex",
- "hex.DecodeString": "encoding/hex",
- "hex.DecodedLen": "encoding/hex",
- "hex.Dump": "encoding/hex",
- "hex.Dumper": "encoding/hex",
- "hex.Encode": "encoding/hex",
- "hex.EncodeToString": "encoding/hex",
- "hex.EncodedLen": "encoding/hex",
- "hex.ErrLength": "encoding/hex",
- "hex.InvalidByteError": "encoding/hex",
- "hmac.Equal": "crypto/hmac",
- "hmac.New": "crypto/hmac",
- "html.EscapeString": "html",
- "html.UnescapeString": "html",
- "http.CanonicalHeaderKey": "net/http",
- "http.Client": "net/http",
- "http.CloseNotifier": "net/http",
- "http.ConnState": "net/http",
- "http.Cookie": "net/http",
- "http.CookieJar": "net/http",
- "http.DefaultClient": "net/http",
- "http.DefaultMaxHeaderBytes": "net/http",
- "http.DefaultMaxIdleConnsPerHost": "net/http",
- "http.DefaultServeMux": "net/http",
- "http.DefaultTransport": "net/http",
- "http.DetectContentType": "net/http",
- "http.Dir": "net/http",
- "http.ErrBodyNotAllowed": "net/http",
- "http.ErrBodyReadAfterClose": "net/http",
- "http.ErrContentLength": "net/http",
- "http.ErrHandlerTimeout": "net/http",
- "http.ErrHeaderTooLong": "net/http",
- "http.ErrHijacked": "net/http",
- "http.ErrLineTooLong": "net/http",
- "http.ErrMissingBoundary": "net/http",
- "http.ErrMissingContentLength": "net/http",
- "http.ErrMissingFile": "net/http",
- "http.ErrNoCookie": "net/http",
- "http.ErrNoLocation": "net/http",
- "http.ErrNotMultipart": "net/http",
- "http.ErrNotSupported": "net/http",
- "http.ErrShortBody": "net/http",
- "http.ErrUnexpectedTrailer": "net/http",
- "http.ErrWriteAfterFlush": "net/http",
- "http.Error": "net/http",
- "http.File": "net/http",
- "http.FileServer": "net/http",
- "http.FileSystem": "net/http",
- "http.Flusher": "net/http",
- "http.Get": "net/http",
- "http.Handle": "net/http",
- "http.HandleFunc": "net/http",
- "http.Handler": "net/http",
- "http.HandlerFunc": "net/http",
- "http.Head": "net/http",
- "http.Header": "net/http",
- "http.Hijacker": "net/http",
- "http.ListenAndServe": "net/http",
- "http.ListenAndServeTLS": "net/http",
- "http.MaxBytesReader": "net/http",
- "http.NewFileTransport": "net/http",
- "http.NewRequest": "net/http",
- "http.NewServeMux": "net/http",
- "http.NotFound": "net/http",
- "http.NotFoundHandler": "net/http",
- "http.ParseHTTPVersion": "net/http",
- "http.ParseTime": "net/http",
- "http.Post": "net/http",
- "http.PostForm": "net/http",
- "http.ProtocolError": "net/http",
- "http.ProxyFromEnvironment": "net/http",
- "http.ProxyURL": "net/http",
- "http.ReadRequest": "net/http",
- "http.ReadResponse": "net/http",
- "http.Redirect": "net/http",
- "http.RedirectHandler": "net/http",
- "http.Request": "net/http",
- "http.Response": "net/http",
- "http.ResponseWriter": "net/http",
- "http.RoundTripper": "net/http",
- "http.Serve": "net/http",
- "http.ServeContent": "net/http",
- "http.ServeFile": "net/http",
- "http.ServeMux": "net/http",
- "http.Server": "net/http",
- "http.SetCookie": "net/http",
- "http.StateActive": "net/http",
- "http.StateClosed": "net/http",
- "http.StateHijacked": "net/http",
- "http.StateIdle": "net/http",
- "http.StateNew": "net/http",
- "http.StatusAccepted": "net/http",
- "http.StatusBadGateway": "net/http",
- "http.StatusBadRequest": "net/http",
- "http.StatusConflict": "net/http",
- "http.StatusContinue": "net/http",
- "http.StatusCreated": "net/http",
- "http.StatusExpectationFailed": "net/http",
- "http.StatusForbidden": "net/http",
- "http.StatusFound": "net/http",
- "http.StatusGatewayTimeout": "net/http",
- "http.StatusGone": "net/http",
- "http.StatusHTTPVersionNotSupported": "net/http",
- "http.StatusInternalServerError": "net/http",
- "http.StatusLengthRequired": "net/http",
- "http.StatusMethodNotAllowed": "net/http",
- "http.StatusMovedPermanently": "net/http",
- "http.StatusMultipleChoices": "net/http",
- "http.StatusNoContent": "net/http",
- "http.StatusNonAuthoritativeInfo": "net/http",
- "http.StatusNotAcceptable": "net/http",
- "http.StatusNotFound": "net/http",
- "http.StatusNotImplemented": "net/http",
- "http.StatusNotModified": "net/http",
- "http.StatusOK": "net/http",
- "http.StatusPartialContent": "net/http",
- "http.StatusPaymentRequired": "net/http",
- "http.StatusPreconditionFailed": "net/http",
- "http.StatusProxyAuthRequired": "net/http",
- "http.StatusRequestEntityTooLarge": "net/http",
- "http.StatusRequestTimeout": "net/http",
- "http.StatusRequestURITooLong": "net/http",
- "http.StatusRequestedRangeNotSatisfiable": "net/http",
- "http.StatusResetContent": "net/http",
- "http.StatusSeeOther": "net/http",
- "http.StatusServiceUnavailable": "net/http",
- "http.StatusSwitchingProtocols": "net/http",
- "http.StatusTeapot": "net/http",
- "http.StatusTemporaryRedirect": "net/http",
- "http.StatusText": "net/http",
- "http.StatusUnauthorized": "net/http",
- "http.StatusUnsupportedMediaType": "net/http",
- "http.StatusUseProxy": "net/http",
- "http.StripPrefix": "net/http",
- "http.TimeFormat": "net/http",
- "http.TimeoutHandler": "net/http",
- "http.Transport": "net/http",
- "httptest.DefaultRemoteAddr": "net/http/httptest",
- "httptest.NewRecorder": "net/http/httptest",
- "httptest.NewServer": "net/http/httptest",
- "httptest.NewTLSServer": "net/http/httptest",
- "httptest.NewUnstartedServer": "net/http/httptest",
- "httptest.ResponseRecorder": "net/http/httptest",
- "httptest.Server": "net/http/httptest",
- "httputil.ClientConn": "net/http/httputil",
- "httputil.DumpRequest": "net/http/httputil",
- "httputil.DumpRequestOut": "net/http/httputil",
- "httputil.DumpResponse": "net/http/httputil",
- "httputil.ErrClosed": "net/http/httputil",
- "httputil.ErrLineTooLong": "net/http/httputil",
- "httputil.ErrPersistEOF": "net/http/httputil",
- "httputil.ErrPipeline": "net/http/httputil",
- "httputil.NewChunkedReader": "net/http/httputil",
- "httputil.NewChunkedWriter": "net/http/httputil",
- "httputil.NewClientConn": "net/http/httputil",
- "httputil.NewProxyClientConn": "net/http/httputil",
- "httputil.NewServerConn": "net/http/httputil",
- "httputil.NewSingleHostReverseProxy": "net/http/httputil",
- "httputil.ReverseProxy": "net/http/httputil",
- "httputil.ServerConn": "net/http/httputil",
- "image.Alpha": "image",
- "image.Alpha16": "image",
- "image.Black": "image",
- "image.Config": "image",
- "image.Decode": "image",
- "image.DecodeConfig": "image",
- "image.ErrFormat": "image",
- "image.Gray": "image",
- "image.Gray16": "image",
- "image.Image": "image",
- "image.NRGBA": "image",
- "image.NRGBA64": "image",
- "image.NewAlpha": "image",
- "image.NewAlpha16": "image",
- "image.NewGray": "image",
- "image.NewGray16": "image",
- "image.NewNRGBA": "image",
- "image.NewNRGBA64": "image",
- "image.NewPaletted": "image",
- "image.NewRGBA": "image",
- "image.NewRGBA64": "image",
- "image.NewUniform": "image",
- "image.NewYCbCr": "image",
- "image.Opaque": "image",
- "image.Paletted": "image",
- "image.PalettedImage": "image",
- "image.Point": "image",
- "image.Pt": "image",
- "image.RGBA": "image",
- "image.RGBA64": "image",
- "image.Rect": "image",
- "image.Rectangle": "image",
- "image.RegisterFormat": "image",
- "image.Transparent": "image",
- "image.Uniform": "image",
- "image.White": "image",
- "image.YCbCr": "image",
- "image.YCbCrSubsampleRatio": "image",
- "image.YCbCrSubsampleRatio420": "image",
- "image.YCbCrSubsampleRatio422": "image",
- "image.YCbCrSubsampleRatio440": "image",
- "image.YCbCrSubsampleRatio444": "image",
- "image.ZP": "image",
- "image.ZR": "image",
- "io.ByteReader": "io",
- "io.ByteScanner": "io",
- "io.ByteWriter": "io",
- "io.Closer": "io",
- "io.Copy": "io",
- "io.CopyN": "io",
- "io.EOF": "io",
- "io.ErrClosedPipe": "io",
- "io.ErrNoProgress": "io",
- "io.ErrShortBuffer": "io",
- "io.ErrShortWrite": "io",
- "io.ErrUnexpectedEOF": "io",
- "io.LimitReader": "io",
- "io.LimitedReader": "io",
- "io.MultiReader": "io",
- "io.MultiWriter": "io",
- "io.NewSectionReader": "io",
- "io.Pipe": "io",
- "io.PipeReader": "io",
- "io.PipeWriter": "io",
- "io.ReadAtLeast": "io",
- "io.ReadCloser": "io",
- "io.ReadFull": "io",
- "io.ReadSeeker": "io",
- "io.ReadWriteCloser": "io",
- "io.ReadWriteSeeker": "io",
- "io.ReadWriter": "io",
- "io.Reader": "io",
- "io.ReaderAt": "io",
- "io.ReaderFrom": "io",
- "io.RuneReader": "io",
- "io.RuneScanner": "io",
- "io.SectionReader": "io",
- "io.Seeker": "io",
- "io.TeeReader": "io",
- "io.WriteCloser": "io",
- "io.WriteSeeker": "io",
- "io.WriteString": "io",
- "io.Writer": "io",
- "io.WriterAt": "io",
- "io.WriterTo": "io",
- "iotest.DataErrReader": "testing/iotest",
- "iotest.ErrTimeout": "testing/iotest",
- "iotest.HalfReader": "testing/iotest",
- "iotest.NewReadLogger": "testing/iotest",
- "iotest.NewWriteLogger": "testing/iotest",
- "iotest.OneByteReader": "testing/iotest",
- "iotest.TimeoutReader": "testing/iotest",
- "iotest.TruncateWriter": "testing/iotest",
- "ioutil.Discard": "io/ioutil",
- "ioutil.NopCloser": "io/ioutil",
- "ioutil.ReadAll": "io/ioutil",
- "ioutil.ReadDir": "io/ioutil",
- "ioutil.ReadFile": "io/ioutil",
- "ioutil.TempDir": "io/ioutil",
- "ioutil.TempFile": "io/ioutil",
- "ioutil.WriteFile": "io/ioutil",
- "jpeg.Decode": "image/jpeg",
- "jpeg.DecodeConfig": "image/jpeg",
- "jpeg.DefaultQuality": "image/jpeg",
- "jpeg.Encode": "image/jpeg",
- "jpeg.FormatError": "image/jpeg",
- "jpeg.Options": "image/jpeg",
- "jpeg.Reader": "image/jpeg",
- "jpeg.UnsupportedError": "image/jpeg",
- "json.Compact": "encoding/json",
- "json.Decoder": "encoding/json",
- "json.Encoder": "encoding/json",
- "json.HTMLEscape": "encoding/json",
- "json.Indent": "encoding/json",
- "json.InvalidUTF8Error": "encoding/json",
- "json.InvalidUnmarshalError": "encoding/json",
- "json.Marshal": "encoding/json",
- "json.MarshalIndent": "encoding/json",
- "json.Marshaler": "encoding/json",
- "json.MarshalerError": "encoding/json",
- "json.NewDecoder": "encoding/json",
- "json.NewEncoder": "encoding/json",
- "json.Number": "encoding/json",
- "json.RawMessage": "encoding/json",
- "json.SyntaxError": "encoding/json",
- "json.Unmarshal": "encoding/json",
- "json.UnmarshalFieldError": "encoding/json",
- "json.UnmarshalTypeError": "encoding/json",
- "json.Unmarshaler": "encoding/json",
- "json.UnsupportedTypeError": "encoding/json",
- "json.UnsupportedValueError": "encoding/json",
- "jsonrpc.Dial": "net/rpc/jsonrpc",
- "jsonrpc.NewClient": "net/rpc/jsonrpc",
- "jsonrpc.NewClientCodec": "net/rpc/jsonrpc",
- "jsonrpc.NewServerCodec": "net/rpc/jsonrpc",
- "jsonrpc.ServeConn": "net/rpc/jsonrpc",
- "list.Element": "container/list",
- "list.List": "container/list",
- "list.New": "container/list",
- "log.Fatal": "log",
- "log.Fatalf": "log",
- "log.Fatalln": "log",
- "log.Flags": "log",
- "log.Ldate": "log",
- "log.Llongfile": "log",
- "log.Lmicroseconds": "log",
- "log.Logger": "log",
- "log.Lshortfile": "log",
- "log.LstdFlags": "log",
- "log.Ltime": "log",
- "log.New": "log",
- "log.Panic": "log",
- "log.Panicf": "log",
- "log.Panicln": "log",
- "log.Prefix": "log",
- "log.Print": "log",
- "log.Printf": "log",
- "log.Println": "log",
- "log.SetFlags": "log",
- "log.SetOutput": "log",
- "log.SetPrefix": "log",
- "lzw.LSB": "compress/lzw",
- "lzw.MSB": "compress/lzw",
- "lzw.NewReader": "compress/lzw",
- "lzw.NewWriter": "compress/lzw",
- "lzw.Order": "compress/lzw",
- "macho.Cpu": "debug/macho",
- "macho.Cpu386": "debug/macho",
- "macho.CpuAmd64": "debug/macho",
- "macho.CpuArm": "debug/macho",
- "macho.CpuPpc": "debug/macho",
- "macho.CpuPpc64": "debug/macho",
- "macho.Dylib": "debug/macho",
- "macho.DylibCmd": "debug/macho",
- "macho.Dysymtab": "debug/macho",
- "macho.DysymtabCmd": "debug/macho",
- "macho.ErrNotFat": "debug/macho",
- "macho.FatArch": "debug/macho",
- "macho.FatArchHeader": "debug/macho",
- "macho.FatFile": "debug/macho",
- "macho.File": "debug/macho",
- "macho.FileHeader": "debug/macho",
- "macho.FormatError": "debug/macho",
- "macho.Load": "debug/macho",
- "macho.LoadBytes": "debug/macho",
- "macho.LoadCmd": "debug/macho",
- "macho.LoadCmdDylib": "debug/macho",
- "macho.LoadCmdDylinker": "debug/macho",
- "macho.LoadCmdDysymtab": "debug/macho",
- "macho.LoadCmdSegment": "debug/macho",
- "macho.LoadCmdSegment64": "debug/macho",
- "macho.LoadCmdSymtab": "debug/macho",
- "macho.LoadCmdThread": "debug/macho",
- "macho.LoadCmdUnixThread": "debug/macho",
- "macho.Magic32": "debug/macho",
- "macho.Magic64": "debug/macho",
- "macho.MagicFat": "debug/macho",
- "macho.NewFatFile": "debug/macho",
- "macho.NewFile": "debug/macho",
- "macho.Nlist32": "debug/macho",
- "macho.Nlist64": "debug/macho",
- "macho.Open": "debug/macho",
- "macho.OpenFat": "debug/macho",
- "macho.Regs386": "debug/macho",
- "macho.RegsAMD64": "debug/macho",
- "macho.Section": "debug/macho",
- "macho.Section32": "debug/macho",
- "macho.Section64": "debug/macho",
- "macho.SectionHeader": "debug/macho",
- "macho.Segment": "debug/macho",
- "macho.Segment32": "debug/macho",
- "macho.Segment64": "debug/macho",
- "macho.SegmentHeader": "debug/macho",
- "macho.Symbol": "debug/macho",
- "macho.Symtab": "debug/macho",
- "macho.SymtabCmd": "debug/macho",
- "macho.Thread": "debug/macho",
- "macho.Type": "debug/macho",
- "macho.TypeBundle": "debug/macho",
- "macho.TypeDylib": "debug/macho",
- "macho.TypeExec": "debug/macho",
- "macho.TypeObj": "debug/macho",
- "mail.Address": "net/mail",
- "mail.ErrHeaderNotPresent": "net/mail",
- "mail.Header": "net/mail",
- "mail.Message": "net/mail",
- "mail.ParseAddress": "net/mail",
- "mail.ParseAddressList": "net/mail",
- "mail.ReadMessage": "net/mail",
- "math.Abs": "math",
- "math.Acos": "math",
- "math.Acosh": "math",
- "math.Asin": "math",
- "math.Asinh": "math",
- "math.Atan": "math",
- "math.Atan2": "math",
- "math.Atanh": "math",
- "math.Cbrt": "math",
- "math.Ceil": "math",
- "math.Copysign": "math",
- "math.Cos": "math",
- "math.Cosh": "math",
- "math.Dim": "math",
- "math.E": "math",
- "math.Erf": "math",
- "math.Erfc": "math",
- "math.Exp": "math",
- "math.Exp2": "math",
- "math.Expm1": "math",
- "math.Float32bits": "math",
- "math.Float32frombits": "math",
- "math.Float64bits": "math",
- "math.Float64frombits": "math",
- "math.Floor": "math",
- "math.Frexp": "math",
- "math.Gamma": "math",
- "math.Hypot": "math",
- "math.Ilogb": "math",
- "math.Inf": "math",
- "math.IsInf": "math",
- "math.IsNaN": "math",
- "math.J0": "math",
- "math.J1": "math",
- "math.Jn": "math",
- "math.Ldexp": "math",
- "math.Lgamma": "math",
- "math.Ln10": "math",
- "math.Ln2": "math",
- "math.Log": "math",
- "math.Log10": "math",
- "math.Log10E": "math",
- "math.Log1p": "math",
- "math.Log2": "math",
- "math.Log2E": "math",
- "math.Logb": "math",
- "math.Max": "math",
- "math.MaxFloat32": "math",
- "math.MaxFloat64": "math",
- "math.MaxInt16": "math",
- "math.MaxInt32": "math",
- "math.MaxInt64": "math",
- "math.MaxInt8": "math",
- "math.MaxUint16": "math",
- "math.MaxUint32": "math",
- "math.MaxUint64": "math",
- "math.MaxUint8": "math",
- "math.Min": "math",
- "math.MinInt16": "math",
- "math.MinInt32": "math",
- "math.MinInt64": "math",
- "math.MinInt8": "math",
- "math.Mod": "math",
- "math.Modf": "math",
- "math.NaN": "math",
- "math.Nextafter": "math",
- "math.Phi": "math",
- "math.Pi": "math",
- "math.Pow": "math",
- "math.Pow10": "math",
- "math.Remainder": "math",
- "math.Signbit": "math",
- "math.Sin": "math",
- "math.Sincos": "math",
- "math.Sinh": "math",
- "math.SmallestNonzeroFloat32": "math",
- "math.SmallestNonzeroFloat64": "math",
- "math.Sqrt": "math",
- "math.Sqrt2": "math",
- "math.SqrtE": "math",
- "math.SqrtPhi": "math",
- "math.SqrtPi": "math",
- "math.Tan": "math",
- "math.Tanh": "math",
- "math.Trunc": "math",
- "math.Y0": "math",
- "math.Y1": "math",
- "math.Yn": "math",
- "md5.BlockSize": "crypto/md5",
- "md5.New": "crypto/md5",
- "md5.Size": "crypto/md5",
- "md5.Sum": "crypto/md5",
- "mime.AddExtensionType": "mime",
- "mime.FormatMediaType": "mime",
- "mime.ParseMediaType": "mime",
- "mime.TypeByExtension": "mime",
- "multipart.File": "mime/multipart",
- "multipart.FileHeader": "mime/multipart",
- "multipart.Form": "mime/multipart",
- "multipart.NewReader": "mime/multipart",
- "multipart.NewWriter": "mime/multipart",
- "multipart.Part": "mime/multipart",
- "multipart.Reader": "mime/multipart",
- "multipart.Writer": "mime/multipart",
- "net.Addr": "net",
- "net.AddrError": "net",
- "net.CIDRMask": "net",
- "net.Conn": "net",
- "net.DNSConfigError": "net",
- "net.DNSError": "net",
- "net.Dial": "net",
- "net.DialIP": "net",
- "net.DialTCP": "net",
- "net.DialTimeout": "net",
- "net.DialUDP": "net",
- "net.DialUnix": "net",
- "net.Dialer": "net",
- "net.ErrWriteToConnected": "net",
- "net.Error": "net",
- "net.FileConn": "net",
- "net.FileListener": "net",
- "net.FilePacketConn": "net",
- "net.FlagBroadcast": "net",
- "net.FlagLoopback": "net",
- "net.FlagMulticast": "net",
- "net.FlagPointToPoint": "net",
- "net.FlagUp": "net",
- "net.Flags": "net",
- "net.HardwareAddr": "net",
- "net.IP": "net",
- "net.IPAddr": "net",
- "net.IPConn": "net",
- "net.IPMask": "net",
- "net.IPNet": "net",
- "net.IPv4": "net",
- "net.IPv4Mask": "net",
- "net.IPv4allrouter": "net",
- "net.IPv4allsys": "net",
- "net.IPv4bcast": "net",
- "net.IPv4len": "net",
- "net.IPv4zero": "net",
- "net.IPv6interfacelocalallnodes": "net",
- "net.IPv6len": "net",
- "net.IPv6linklocalallnodes": "net",
- "net.IPv6linklocalallrouters": "net",
- "net.IPv6loopback": "net",
- "net.IPv6unspecified": "net",
- "net.IPv6zero": "net",
- "net.Interface": "net",
- "net.InterfaceAddrs": "net",
- "net.InterfaceByIndex": "net",
- "net.InterfaceByName": "net",
- "net.Interfaces": "net",
- "net.InvalidAddrError": "net",
- "net.JoinHostPort": "net",
- "net.Listen": "net",
- "net.ListenIP": "net",
- "net.ListenMulticastUDP": "net",
- "net.ListenPacket": "net",
- "net.ListenTCP": "net",
- "net.ListenUDP": "net",
- "net.ListenUnix": "net",
- "net.ListenUnixgram": "net",
- "net.Listener": "net",
- "net.LookupAddr": "net",
- "net.LookupCNAME": "net",
- "net.LookupHost": "net",
- "net.LookupIP": "net",
- "net.LookupMX": "net",
- "net.LookupNS": "net",
- "net.LookupPort": "net",
- "net.LookupSRV": "net",
- "net.LookupTXT": "net",
- "net.MX": "net",
- "net.NS": "net",
- "net.OpError": "net",
- "net.PacketConn": "net",
- "net.ParseCIDR": "net",
- "net.ParseError": "net",
- "net.ParseIP": "net",
- "net.ParseMAC": "net",
- "net.Pipe": "net",
- "net.ResolveIPAddr": "net",
- "net.ResolveTCPAddr": "net",
- "net.ResolveUDPAddr": "net",
- "net.ResolveUnixAddr": "net",
- "net.SRV": "net",
- "net.SplitHostPort": "net",
- "net.TCPAddr": "net",
- "net.TCPConn": "net",
- "net.TCPListener": "net",
- "net.UDPAddr": "net",
- "net.UDPConn": "net",
- "net.UnixAddr": "net",
- "net.UnixConn": "net",
- "net.UnixListener": "net",
- "net.UnknownNetworkError": "net",
- "os.Args": "os",
- "os.Chdir": "os",
- "os.Chmod": "os",
- "os.Chown": "os",
- "os.Chtimes": "os",
- "os.Clearenv": "os",
- "os.Create": "os",
- "os.DevNull": "os",
- "os.Environ": "os",
- "os.ErrExist": "os",
- "os.ErrInvalid": "os",
- "os.ErrNotExist": "os",
- "os.ErrPermission": "os",
- "os.Exit": "os",
- "os.Expand": "os",
- "os.ExpandEnv": "os",
- "os.File": "os",
- "os.FileInfo": "os",
- "os.FileMode": "os",
- "os.FindProcess": "os",
- "os.Getegid": "os",
- "os.Getenv": "os",
- "os.Geteuid": "os",
- "os.Getgid": "os",
- "os.Getgroups": "os",
- "os.Getpagesize": "os",
- "os.Getpid": "os",
- "os.Getppid": "os",
- "os.Getuid": "os",
- "os.Getwd": "os",
- "os.Hostname": "os",
- "os.Interrupt": "os",
- "os.IsExist": "os",
- "os.IsNotExist": "os",
- "os.IsPathSeparator": "os",
- "os.IsPermission": "os",
- "os.Kill": "os",
- "os.Lchown": "os",
- "os.Link": "os",
- "os.LinkError": "os",
- "os.Lstat": "os",
- "os.Mkdir": "os",
- "os.MkdirAll": "os",
- "os.ModeAppend": "os",
- "os.ModeCharDevice": "os",
- "os.ModeDevice": "os",
- "os.ModeDir": "os",
- "os.ModeExclusive": "os",
- "os.ModeNamedPipe": "os",
- "os.ModePerm": "os",
- "os.ModeSetgid": "os",
- "os.ModeSetuid": "os",
- "os.ModeSocket": "os",
- "os.ModeSticky": "os",
- "os.ModeSymlink": "os",
- "os.ModeTemporary": "os",
- "os.ModeType": "os",
- "os.NewFile": "os",
- "os.NewSyscallError": "os",
- "os.O_APPEND": "os",
- "os.O_CREATE": "os",
- "os.O_EXCL": "os",
- "os.O_RDONLY": "os",
- "os.O_RDWR": "os",
- "os.O_SYNC": "os",
- "os.O_TRUNC": "os",
- "os.O_WRONLY": "os",
- "os.Open": "os",
- "os.OpenFile": "os",
- "os.PathError": "os",
- "os.PathListSeparator": "os",
- "os.PathSeparator": "os",
- "os.Pipe": "os",
- "os.ProcAttr": "os",
- "os.Process": "os",
- "os.ProcessState": "os",
- "os.Readlink": "os",
- "os.Remove": "os",
- "os.RemoveAll": "os",
- "os.Rename": "os",
- "os.SEEK_CUR": "os",
- "os.SEEK_END": "os",
- "os.SEEK_SET": "os",
- "os.SameFile": "os",
- "os.Setenv": "os",
- "os.Signal": "os",
- "os.StartProcess": "os",
- "os.Stat": "os",
- "os.Stderr": "os",
- "os.Stdin": "os",
- "os.Stdout": "os",
- "os.Symlink": "os",
- "os.SyscallError": "os",
- "os.TempDir": "os",
- "os.Truncate": "os",
- "palette.Plan9": "image/color/palette",
- "palette.WebSafe": "image/color/palette",
- "parse.ActionNode": "text/template/parse",
- "parse.BoolNode": "text/template/parse",
- "parse.BranchNode": "text/template/parse",
- "parse.ChainNode": "text/template/parse",
- "parse.CommandNode": "text/template/parse",
- "parse.DotNode": "text/template/parse",
- "parse.FieldNode": "text/template/parse",
- "parse.IdentifierNode": "text/template/parse",
- "parse.IfNode": "text/template/parse",
- "parse.IsEmptyTree": "text/template/parse",
- "parse.ListNode": "text/template/parse",
- "parse.New": "text/template/parse",
- "parse.NewIdentifier": "text/template/parse",
- "parse.NilNode": "text/template/parse",
- "parse.Node": "text/template/parse",
- "parse.NodeAction": "text/template/parse",
- "parse.NodeBool": "text/template/parse",
- "parse.NodeChain": "text/template/parse",
- "parse.NodeCommand": "text/template/parse",
- "parse.NodeDot": "text/template/parse",
- "parse.NodeField": "text/template/parse",
- "parse.NodeIdentifier": "text/template/parse",
- "parse.NodeIf": "text/template/parse",
- "parse.NodeList": "text/template/parse",
- "parse.NodeNil": "text/template/parse",
- "parse.NodeNumber": "text/template/parse",
- "parse.NodePipe": "text/template/parse",
- "parse.NodeRange": "text/template/parse",
- "parse.NodeString": "text/template/parse",
- "parse.NodeTemplate": "text/template/parse",
- "parse.NodeText": "text/template/parse",
- "parse.NodeType": "text/template/parse",
- "parse.NodeVariable": "text/template/parse",
- "parse.NodeWith": "text/template/parse",
- "parse.NumberNode": "text/template/parse",
- "parse.Parse": "text/template/parse",
- "parse.PipeNode": "text/template/parse",
- "parse.Pos": "text/template/parse",
- "parse.RangeNode": "text/template/parse",
- "parse.StringNode": "text/template/parse",
- "parse.TemplateNode": "text/template/parse",
- "parse.TextNode": "text/template/parse",
- "parse.Tree": "text/template/parse",
- "parse.VariableNode": "text/template/parse",
- "parse.WithNode": "text/template/parse",
- "parser.AllErrors": "go/parser",
- "parser.DeclarationErrors": "go/parser",
- "parser.ImportsOnly": "go/parser",
- "parser.Mode": "go/parser",
- "parser.PackageClauseOnly": "go/parser",
- "parser.ParseComments": "go/parser",
- "parser.ParseDir": "go/parser",
- "parser.ParseExpr": "go/parser",
- "parser.ParseFile": "go/parser",
- "parser.SpuriousErrors": "go/parser",
- "parser.Trace": "go/parser",
- "path.Base": "path",
- "path.Clean": "path",
- "path.Dir": "path",
- "path.ErrBadPattern": "path",
- "path.Ext": "path",
- "path.IsAbs": "path",
- "path.Join": "path",
- "path.Match": "path",
- "path.Split": "path",
- "pe.COFFSymbol": "debug/pe",
- "pe.COFFSymbolSize": "debug/pe",
- "pe.DataDirectory": "debug/pe",
- "pe.File": "debug/pe",
- "pe.FileHeader": "debug/pe",
- "pe.FormatError": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_AM33": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_AMD64": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_ARM": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_EBC": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_I386": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_IA64": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_M32R": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_MIPS16": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_MIPSFPU": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_MIPSFPU16": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_POWERPC": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_POWERPCFP": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_R4000": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_SH3": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_SH3DSP": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_SH4": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_SH5": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_THUMB": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_UNKNOWN": "debug/pe",
- "pe.IMAGE_FILE_MACHINE_WCEMIPSV2": "debug/pe",
- "pe.ImportDirectory": "debug/pe",
- "pe.NewFile": "debug/pe",
- "pe.Open": "debug/pe",
- "pe.OptionalHeader32": "debug/pe",
- "pe.OptionalHeader64": "debug/pe",
- "pe.Section": "debug/pe",
- "pe.SectionHeader": "debug/pe",
- "pe.SectionHeader32": "debug/pe",
- "pe.Symbol": "debug/pe",
- "pem.Block": "encoding/pem",
- "pem.Decode": "encoding/pem",
- "pem.Encode": "encoding/pem",
- "pem.EncodeToMemory": "encoding/pem",
- "pkix.AlgorithmIdentifier": "crypto/x509/pkix",
- "pkix.AttributeTypeAndValue": "crypto/x509/pkix",
- "pkix.AttributeTypeAndValueSET": "crypto/x509/pkix",
- "pkix.CertificateList": "crypto/x509/pkix",
- "pkix.Extension": "crypto/x509/pkix",
- "pkix.Name": "crypto/x509/pkix",
- "pkix.RDNSequence": "crypto/x509/pkix",
- "pkix.RelativeDistinguishedNameSET": "crypto/x509/pkix",
- "pkix.RevokedCertificate": "crypto/x509/pkix",
- "pkix.TBSCertificateList": "crypto/x509/pkix",
- "plan9obj.File": "debug/plan9obj",
- "plan9obj.FileHeader": "debug/plan9obj",
- "plan9obj.Magic386": "debug/plan9obj",
- "plan9obj.Magic64": "debug/plan9obj",
- "plan9obj.MagicAMD64": "debug/plan9obj",
- "plan9obj.MagicARM": "debug/plan9obj",
- "plan9obj.NewFile": "debug/plan9obj",
- "plan9obj.Open": "debug/plan9obj",
- "plan9obj.Section": "debug/plan9obj",
- "plan9obj.SectionHeader": "debug/plan9obj",
- "plan9obj.Sym": "debug/plan9obj",
- "png.Decode": "image/png",
- "png.DecodeConfig": "image/png",
- "png.Encode": "image/png",
- "png.FormatError": "image/png",
- "png.UnsupportedError": "image/png",
- "pprof.Cmdline": "net/http/pprof",
- "pprof.Handler": "net/http/pprof",
- "pprof.Index": "net/http/pprof",
- "pprof.Lookup": "runtime/pprof",
- "pprof.NewProfile": "runtime/pprof",
- // "pprof.Profile" is ambiguous
- "pprof.Profiles": "runtime/pprof",
- "pprof.StartCPUProfile": "runtime/pprof",
- "pprof.StopCPUProfile": "runtime/pprof",
- "pprof.Symbol": "net/http/pprof",
- "pprof.WriteHeapProfile": "runtime/pprof",
- "printer.CommentedNode": "go/printer",
- "printer.Config": "go/printer",
- "printer.Fprint": "go/printer",
- "printer.Mode": "go/printer",
- "printer.RawFormat": "go/printer",
- "printer.SourcePos": "go/printer",
- "printer.TabIndent": "go/printer",
- "printer.UseSpaces": "go/printer",
- "quick.Check": "testing/quick",
- "quick.CheckEqual": "testing/quick",
- "quick.CheckEqualError": "testing/quick",
- "quick.CheckError": "testing/quick",
- "quick.Config": "testing/quick",
- "quick.Generator": "testing/quick",
- "quick.SetupError": "testing/quick",
- "quick.Value": "testing/quick",
- "rand.ExpFloat64": "math/rand",
- "rand.Float32": "math/rand",
- "rand.Float64": "math/rand",
- // "rand.Int" is ambiguous
- "rand.Int31": "math/rand",
- "rand.Int31n": "math/rand",
- "rand.Int63": "math/rand",
- "rand.Int63n": "math/rand",
- "rand.Intn": "math/rand",
- "rand.New": "math/rand",
- "rand.NewSource": "math/rand",
- "rand.NewZipf": "math/rand",
- "rand.NormFloat64": "math/rand",
- "rand.Perm": "math/rand",
- "rand.Prime": "crypto/rand",
- "rand.Rand": "math/rand",
- "rand.Read": "crypto/rand",
- "rand.Reader": "crypto/rand",
- "rand.Seed": "math/rand",
- "rand.Source": "math/rand",
- "rand.Uint32": "math/rand",
- "rand.Zipf": "math/rand",
- "rc4.Cipher": "crypto/rc4",
- "rc4.KeySizeError": "crypto/rc4",
- "rc4.NewCipher": "crypto/rc4",
- "reflect.Append": "reflect",
- "reflect.AppendSlice": "reflect",
- "reflect.Array": "reflect",
- "reflect.Bool": "reflect",
- "reflect.BothDir": "reflect",
- "reflect.Chan": "reflect",
- "reflect.ChanDir": "reflect",
- "reflect.ChanOf": "reflect",
- "reflect.Complex128": "reflect",
- "reflect.Complex64": "reflect",
- "reflect.Copy": "reflect",
- "reflect.DeepEqual": "reflect",
- "reflect.Float32": "reflect",
- "reflect.Float64": "reflect",
- "reflect.Func": "reflect",
- "reflect.Indirect": "reflect",
- "reflect.Int": "reflect",
- "reflect.Int16": "reflect",
- "reflect.Int32": "reflect",
- "reflect.Int64": "reflect",
- "reflect.Int8": "reflect",
- "reflect.Interface": "reflect",
- "reflect.Invalid": "reflect",
- "reflect.Kind": "reflect",
- "reflect.MakeChan": "reflect",
- "reflect.MakeFunc": "reflect",
- "reflect.MakeMap": "reflect",
- "reflect.MakeSlice": "reflect",
- "reflect.Map": "reflect",
- "reflect.MapOf": "reflect",
- "reflect.Method": "reflect",
- "reflect.New": "reflect",
- "reflect.NewAt": "reflect",
- "reflect.Ptr": "reflect",
- "reflect.PtrTo": "reflect",
- "reflect.RecvDir": "reflect",
- "reflect.Select": "reflect",
- "reflect.SelectCase": "reflect",
- "reflect.SelectDefault": "reflect",
- "reflect.SelectDir": "reflect",
- "reflect.SelectRecv": "reflect",
- "reflect.SelectSend": "reflect",
- "reflect.SendDir": "reflect",
- "reflect.Slice": "reflect",
- "reflect.SliceHeader": "reflect",
- "reflect.SliceOf": "reflect",
- "reflect.String": "reflect",
- "reflect.StringHeader": "reflect",
- "reflect.Struct": "reflect",
- "reflect.StructField": "reflect",
- "reflect.StructTag": "reflect",
- "reflect.TypeOf": "reflect",
- "reflect.Uint": "reflect",
- "reflect.Uint16": "reflect",
- "reflect.Uint32": "reflect",
- "reflect.Uint64": "reflect",
- "reflect.Uint8": "reflect",
- "reflect.Uintptr": "reflect",
- "reflect.UnsafePointer": "reflect",
- "reflect.Value": "reflect",
- "reflect.ValueError": "reflect",
- "reflect.ValueOf": "reflect",
- "reflect.Zero": "reflect",
- "regexp.Compile": "regexp",
- "regexp.CompilePOSIX": "regexp",
- "regexp.Match": "regexp",
- "regexp.MatchReader": "regexp",
- "regexp.MatchString": "regexp",
- "regexp.MustCompile": "regexp",
- "regexp.MustCompilePOSIX": "regexp",
- "regexp.QuoteMeta": "regexp",
- "regexp.Regexp": "regexp",
- "ring.New": "container/ring",
- "ring.Ring": "container/ring",
- "rpc.Accept": "net/rpc",
- "rpc.Call": "net/rpc",
- "rpc.Client": "net/rpc",
- "rpc.ClientCodec": "net/rpc",
- "rpc.DefaultDebugPath": "net/rpc",
- "rpc.DefaultRPCPath": "net/rpc",
- "rpc.DefaultServer": "net/rpc",
- "rpc.Dial": "net/rpc",
- "rpc.DialHTTP": "net/rpc",
- "rpc.DialHTTPPath": "net/rpc",
- "rpc.ErrShutdown": "net/rpc",
- "rpc.HandleHTTP": "net/rpc",
- "rpc.NewClient": "net/rpc",
- "rpc.NewClientWithCodec": "net/rpc",
- "rpc.NewServer": "net/rpc",
- "rpc.Register": "net/rpc",
- "rpc.RegisterName": "net/rpc",
- "rpc.Request": "net/rpc",
- "rpc.Response": "net/rpc",
- "rpc.ServeCodec": "net/rpc",
- "rpc.ServeConn": "net/rpc",
- "rpc.ServeRequest": "net/rpc",
- "rpc.Server": "net/rpc",
- "rpc.ServerCodec": "net/rpc",
- "rpc.ServerError": "net/rpc",
- "rsa.CRTValue": "crypto/rsa",
- "rsa.DecryptOAEP": "crypto/rsa",
- "rsa.DecryptPKCS1v15": "crypto/rsa",
- "rsa.DecryptPKCS1v15SessionKey": "crypto/rsa",
- "rsa.EncryptOAEP": "crypto/rsa",
- "rsa.EncryptPKCS1v15": "crypto/rsa",
- "rsa.ErrDecryption": "crypto/rsa",
- "rsa.ErrMessageTooLong": "crypto/rsa",
- "rsa.ErrVerification": "crypto/rsa",
- "rsa.GenerateKey": "crypto/rsa",
- "rsa.GenerateMultiPrimeKey": "crypto/rsa",
- "rsa.PSSOptions": "crypto/rsa",
- "rsa.PSSSaltLengthAuto": "crypto/rsa",
- "rsa.PSSSaltLengthEqualsHash": "crypto/rsa",
- "rsa.PrecomputedValues": "crypto/rsa",
- "rsa.PrivateKey": "crypto/rsa",
- "rsa.PublicKey": "crypto/rsa",
- "rsa.SignPKCS1v15": "crypto/rsa",
- "rsa.SignPSS": "crypto/rsa",
- "rsa.VerifyPKCS1v15": "crypto/rsa",
- "rsa.VerifyPSS": "crypto/rsa",
- "runtime.BlockProfile": "runtime",
- "runtime.BlockProfileRecord": "runtime",
- "runtime.Breakpoint": "runtime",
- "runtime.CPUProfile": "runtime",
- "runtime.Caller": "runtime",
- "runtime.Callers": "runtime",
- "runtime.Compiler": "runtime",
- "runtime.Error": "runtime",
- "runtime.Func": "runtime",
- "runtime.FuncForPC": "runtime",
- "runtime.GC": "runtime",
- "runtime.GOARCH": "runtime",
- "runtime.GOMAXPROCS": "runtime",
- "runtime.GOOS": "runtime",
- "runtime.GOROOT": "runtime",
- "runtime.Goexit": "runtime",
- "runtime.GoroutineProfile": "runtime",
- "runtime.Gosched": "runtime",
- "runtime.LockOSThread": "runtime",
- "runtime.MemProfile": "runtime",
- "runtime.MemProfileRate": "runtime",
- "runtime.MemProfileRecord": "runtime",
- "runtime.MemStats": "runtime",
- "runtime.NumCPU": "runtime",
- "runtime.NumCgoCall": "runtime",
- "runtime.NumGoroutine": "runtime",
- "runtime.ReadMemStats": "runtime",
- "runtime.SetBlockProfileRate": "runtime",
- "runtime.SetCPUProfileRate": "runtime",
- "runtime.SetFinalizer": "runtime",
- "runtime.Stack": "runtime",
- "runtime.StackRecord": "runtime",
- "runtime.ThreadCreateProfile": "runtime",
- "runtime.TypeAssertionError": "runtime",
- "runtime.UnlockOSThread": "runtime",
- "runtime.Version": "runtime",
- "scanner.Char": "text/scanner",
- "scanner.Comment": "text/scanner",
- "scanner.EOF": "text/scanner",
- "scanner.Error": "go/scanner",
- "scanner.ErrorHandler": "go/scanner",
- "scanner.ErrorList": "go/scanner",
- "scanner.Float": "text/scanner",
- "scanner.GoTokens": "text/scanner",
- "scanner.GoWhitespace": "text/scanner",
- "scanner.Ident": "text/scanner",
- "scanner.Int": "text/scanner",
- "scanner.Mode": "go/scanner",
- "scanner.Position": "text/scanner",
- "scanner.PrintError": "go/scanner",
- "scanner.RawString": "text/scanner",
- "scanner.ScanChars": "text/scanner",
- // "scanner.ScanComments" is ambiguous
- "scanner.ScanFloats": "text/scanner",
- "scanner.ScanIdents": "text/scanner",
- "scanner.ScanInts": "text/scanner",
- "scanner.ScanRawStrings": "text/scanner",
- "scanner.ScanStrings": "text/scanner",
- // "scanner.Scanner" is ambiguous
- "scanner.SkipComments": "text/scanner",
- "scanner.String": "text/scanner",
- "scanner.TokenString": "text/scanner",
- "sha1.BlockSize": "crypto/sha1",
- "sha1.New": "crypto/sha1",
- "sha1.Size": "crypto/sha1",
- "sha1.Sum": "crypto/sha1",
- "sha256.BlockSize": "crypto/sha256",
- "sha256.New": "crypto/sha256",
- "sha256.New224": "crypto/sha256",
- "sha256.Size": "crypto/sha256",
- "sha256.Size224": "crypto/sha256",
- "sha256.Sum224": "crypto/sha256",
- "sha256.Sum256": "crypto/sha256",
- "sha512.BlockSize": "crypto/sha512",
- "sha512.New": "crypto/sha512",
- "sha512.New384": "crypto/sha512",
- "sha512.Size": "crypto/sha512",
- "sha512.Size384": "crypto/sha512",
- "sha512.Sum384": "crypto/sha512",
- "sha512.Sum512": "crypto/sha512",
- "signal.Notify": "os/signal",
- "signal.Stop": "os/signal",
- "smtp.Auth": "net/smtp",
- "smtp.CRAMMD5Auth": "net/smtp",
- "smtp.Client": "net/smtp",
- "smtp.Dial": "net/smtp",
- "smtp.NewClient": "net/smtp",
- "smtp.PlainAuth": "net/smtp",
- "smtp.SendMail": "net/smtp",
- "smtp.ServerInfo": "net/smtp",
- "sort.Float64Slice": "sort",
- "sort.Float64s": "sort",
- "sort.Float64sAreSorted": "sort",
- "sort.IntSlice": "sort",
- "sort.Interface": "sort",
- "sort.Ints": "sort",
- "sort.IntsAreSorted": "sort",
- "sort.IsSorted": "sort",
- "sort.Reverse": "sort",
- "sort.Search": "sort",
- "sort.SearchFloat64s": "sort",
- "sort.SearchInts": "sort",
- "sort.SearchStrings": "sort",
- "sort.Sort": "sort",
- "sort.Stable": "sort",
- "sort.StringSlice": "sort",
- "sort.Strings": "sort",
- "sort.StringsAreSorted": "sort",
- "sql.DB": "database/sql",
- "sql.ErrNoRows": "database/sql",
- "sql.ErrTxDone": "database/sql",
- "sql.NullBool": "database/sql",
- "sql.NullFloat64": "database/sql",
- "sql.NullInt64": "database/sql",
- "sql.NullString": "database/sql",
- "sql.Open": "database/sql",
- "sql.RawBytes": "database/sql",
- "sql.Register": "database/sql",
- "sql.Result": "database/sql",
- "sql.Row": "database/sql",
- "sql.Rows": "database/sql",
- "sql.Scanner": "database/sql",
- "sql.Stmt": "database/sql",
- "sql.Tx": "database/sql",
- "strconv.AppendBool": "strconv",
- "strconv.AppendFloat": "strconv",
- "strconv.AppendInt": "strconv",
- "strconv.AppendQuote": "strconv",
- "strconv.AppendQuoteRune": "strconv",
- "strconv.AppendQuoteRuneToASCII": "strconv",
- "strconv.AppendQuoteToASCII": "strconv",
- "strconv.AppendUint": "strconv",
- "strconv.Atoi": "strconv",
- "strconv.CanBackquote": "strconv",
- "strconv.ErrRange": "strconv",
- "strconv.ErrSyntax": "strconv",
- "strconv.FormatBool": "strconv",
- "strconv.FormatFloat": "strconv",
- "strconv.FormatInt": "strconv",
- "strconv.FormatUint": "strconv",
- "strconv.IntSize": "strconv",
- "strconv.IsPrint": "strconv",
- "strconv.Itoa": "strconv",
- "strconv.NumError": "strconv",
- "strconv.ParseBool": "strconv",
- "strconv.ParseFloat": "strconv",
- "strconv.ParseInt": "strconv",
- "strconv.ParseUint": "strconv",
- "strconv.Quote": "strconv",
- "strconv.QuoteRune": "strconv",
- "strconv.QuoteRuneToASCII": "strconv",
- "strconv.QuoteToASCII": "strconv",
- "strconv.Unquote": "strconv",
- "strconv.UnquoteChar": "strconv",
- "strings.Contains": "strings",
- "strings.ContainsAny": "strings",
- "strings.ContainsRune": "strings",
- "strings.Count": "strings",
- "strings.EqualFold": "strings",
- "strings.Fields": "strings",
- "strings.FieldsFunc": "strings",
- "strings.HasPrefix": "strings",
- "strings.HasSuffix": "strings",
- "strings.Index": "strings",
- "strings.IndexAny": "strings",
- "strings.IndexByte": "strings",
- "strings.IndexFunc": "strings",
- "strings.IndexRune": "strings",
- "strings.Join": "strings",
- "strings.LastIndex": "strings",
- "strings.LastIndexAny": "strings",
- "strings.LastIndexFunc": "strings",
- "strings.Map": "strings",
- "strings.NewReader": "strings",
- "strings.NewReplacer": "strings",
- "strings.Reader": "strings",
- "strings.Repeat": "strings",
- "strings.Replace": "strings",
- "strings.Replacer": "strings",
- "strings.Split": "strings",
- "strings.SplitAfter": "strings",
- "strings.SplitAfterN": "strings",
- "strings.SplitN": "strings",
- "strings.Title": "strings",
- "strings.ToLower": "strings",
- "strings.ToLowerSpecial": "strings",
- "strings.ToTitle": "strings",
- "strings.ToTitleSpecial": "strings",
- "strings.ToUpper": "strings",
- "strings.ToUpperSpecial": "strings",
- "strings.Trim": "strings",
- "strings.TrimFunc": "strings",
- "strings.TrimLeft": "strings",
- "strings.TrimLeftFunc": "strings",
- "strings.TrimPrefix": "strings",
- "strings.TrimRight": "strings",
- "strings.TrimRightFunc": "strings",
- "strings.TrimSpace": "strings",
- "strings.TrimSuffix": "strings",
- "subtle.ConstantTimeByteEq": "crypto/subtle",
- "subtle.ConstantTimeCompare": "crypto/subtle",
- "subtle.ConstantTimeCopy": "crypto/subtle",
- "subtle.ConstantTimeEq": "crypto/subtle",
- "subtle.ConstantTimeLessOrEq": "crypto/subtle",
- "subtle.ConstantTimeSelect": "crypto/subtle",
- "suffixarray.Index": "index/suffixarray",
- "suffixarray.New": "index/suffixarray",
- "sync.Cond": "sync",
- "sync.Locker": "sync",
- "sync.Mutex": "sync",
- "sync.NewCond": "sync",
- "sync.Once": "sync",
- "sync.Pool": "sync",
- "sync.RWMutex": "sync",
- "sync.WaitGroup": "sync",
- "syntax.ClassNL": "regexp/syntax",
- "syntax.Compile": "regexp/syntax",
- "syntax.DotNL": "regexp/syntax",
- "syntax.EmptyBeginLine": "regexp/syntax",
- "syntax.EmptyBeginText": "regexp/syntax",
- "syntax.EmptyEndLine": "regexp/syntax",
- "syntax.EmptyEndText": "regexp/syntax",
- "syntax.EmptyNoWordBoundary": "regexp/syntax",
- "syntax.EmptyOp": "regexp/syntax",
- "syntax.EmptyOpContext": "regexp/syntax",
- "syntax.EmptyWordBoundary": "regexp/syntax",
- "syntax.ErrInternalError": "regexp/syntax",
- "syntax.ErrInvalidCharClass": "regexp/syntax",
- "syntax.ErrInvalidCharRange": "regexp/syntax",
- "syntax.ErrInvalidEscape": "regexp/syntax",
- "syntax.ErrInvalidNamedCapture": "regexp/syntax",
- "syntax.ErrInvalidPerlOp": "regexp/syntax",
- "syntax.ErrInvalidRepeatOp": "regexp/syntax",
- "syntax.ErrInvalidRepeatSize": "regexp/syntax",
- "syntax.ErrInvalidUTF8": "regexp/syntax",
- "syntax.ErrMissingBracket": "regexp/syntax",
- "syntax.ErrMissingParen": "regexp/syntax",
- "syntax.ErrMissingRepeatArgument": "regexp/syntax",
- "syntax.ErrTrailingBackslash": "regexp/syntax",
- "syntax.ErrUnexpectedParen": "regexp/syntax",
- "syntax.Error": "regexp/syntax",
- "syntax.ErrorCode": "regexp/syntax",
- "syntax.Flags": "regexp/syntax",
- "syntax.FoldCase": "regexp/syntax",
- "syntax.Inst": "regexp/syntax",
- "syntax.InstAlt": "regexp/syntax",
- "syntax.InstAltMatch": "regexp/syntax",
- "syntax.InstCapture": "regexp/syntax",
- "syntax.InstEmptyWidth": "regexp/syntax",
- "syntax.InstFail": "regexp/syntax",
- "syntax.InstMatch": "regexp/syntax",
- "syntax.InstNop": "regexp/syntax",
- "syntax.InstOp": "regexp/syntax",
- "syntax.InstRune": "regexp/syntax",
- "syntax.InstRune1": "regexp/syntax",
- "syntax.InstRuneAny": "regexp/syntax",
- "syntax.InstRuneAnyNotNL": "regexp/syntax",
- "syntax.IsWordChar": "regexp/syntax",
- "syntax.Literal": "regexp/syntax",
- "syntax.MatchNL": "regexp/syntax",
- "syntax.NonGreedy": "regexp/syntax",
- "syntax.OneLine": "regexp/syntax",
- "syntax.Op": "regexp/syntax",
- "syntax.OpAlternate": "regexp/syntax",
- "syntax.OpAnyChar": "regexp/syntax",
- "syntax.OpAnyCharNotNL": "regexp/syntax",
- "syntax.OpBeginLine": "regexp/syntax",
- "syntax.OpBeginText": "regexp/syntax",
- "syntax.OpCapture": "regexp/syntax",
- "syntax.OpCharClass": "regexp/syntax",
- "syntax.OpConcat": "regexp/syntax",
- "syntax.OpEmptyMatch": "regexp/syntax",
- "syntax.OpEndLine": "regexp/syntax",
- "syntax.OpEndText": "regexp/syntax",
- "syntax.OpLiteral": "regexp/syntax",
- "syntax.OpNoMatch": "regexp/syntax",
- "syntax.OpNoWordBoundary": "regexp/syntax",
- "syntax.OpPlus": "regexp/syntax",
- "syntax.OpQuest": "regexp/syntax",
- "syntax.OpRepeat": "regexp/syntax",
- "syntax.OpStar": "regexp/syntax",
- "syntax.OpWordBoundary": "regexp/syntax",
- "syntax.POSIX": "regexp/syntax",
- "syntax.Parse": "regexp/syntax",
- "syntax.Perl": "regexp/syntax",
- "syntax.PerlX": "regexp/syntax",
- "syntax.Prog": "regexp/syntax",
- "syntax.Regexp": "regexp/syntax",
- "syntax.Simple": "regexp/syntax",
- "syntax.UnicodeGroups": "regexp/syntax",
- "syntax.WasDollar": "regexp/syntax",
- "syscall.AF_ALG": "syscall",
- "syscall.AF_APPLETALK": "syscall",
- "syscall.AF_ARP": "syscall",
- "syscall.AF_ASH": "syscall",
- "syscall.AF_ATM": "syscall",
- "syscall.AF_ATMPVC": "syscall",
- "syscall.AF_ATMSVC": "syscall",
- "syscall.AF_AX25": "syscall",
- "syscall.AF_BLUETOOTH": "syscall",
- "syscall.AF_BRIDGE": "syscall",
- "syscall.AF_CAIF": "syscall",
- "syscall.AF_CAN": "syscall",
- "syscall.AF_CCITT": "syscall",
- "syscall.AF_CHAOS": "syscall",
- "syscall.AF_CNT": "syscall",
- "syscall.AF_COIP": "syscall",
- "syscall.AF_DATAKIT": "syscall",
- "syscall.AF_DECnet": "syscall",
- "syscall.AF_DLI": "syscall",
- "syscall.AF_E164": "syscall",
- "syscall.AF_ECMA": "syscall",
- "syscall.AF_ECONET": "syscall",
- "syscall.AF_ENCAP": "syscall",
- "syscall.AF_FILE": "syscall",
- "syscall.AF_HYLINK": "syscall",
- "syscall.AF_IEEE80211": "syscall",
- "syscall.AF_IEEE802154": "syscall",
- "syscall.AF_IMPLINK": "syscall",
- "syscall.AF_INET": "syscall",
- "syscall.AF_INET6": "syscall",
- "syscall.AF_INET6_SDP": "syscall",
- "syscall.AF_INET_SDP": "syscall",
- "syscall.AF_IPX": "syscall",
- "syscall.AF_IRDA": "syscall",
- "syscall.AF_ISDN": "syscall",
- "syscall.AF_ISO": "syscall",
- "syscall.AF_IUCV": "syscall",
- "syscall.AF_KEY": "syscall",
- "syscall.AF_LAT": "syscall",
- "syscall.AF_LINK": "syscall",
- "syscall.AF_LLC": "syscall",
- "syscall.AF_LOCAL": "syscall",
- "syscall.AF_MAX": "syscall",
- "syscall.AF_MPLS": "syscall",
- "syscall.AF_NATM": "syscall",
- "syscall.AF_NDRV": "syscall",
- "syscall.AF_NETBEUI": "syscall",
- "syscall.AF_NETBIOS": "syscall",
- "syscall.AF_NETGRAPH": "syscall",
- "syscall.AF_NETLINK": "syscall",
- "syscall.AF_NETROM": "syscall",
- "syscall.AF_NS": "syscall",
- "syscall.AF_OROUTE": "syscall",
- "syscall.AF_OSI": "syscall",
- "syscall.AF_PACKET": "syscall",
- "syscall.AF_PHONET": "syscall",
- "syscall.AF_PPP": "syscall",
- "syscall.AF_PPPOX": "syscall",
- "syscall.AF_PUP": "syscall",
- "syscall.AF_RDS": "syscall",
- "syscall.AF_RESERVED_36": "syscall",
- "syscall.AF_ROSE": "syscall",
- "syscall.AF_ROUTE": "syscall",
- "syscall.AF_RXRPC": "syscall",
- "syscall.AF_SCLUSTER": "syscall",
- "syscall.AF_SECURITY": "syscall",
- "syscall.AF_SIP": "syscall",
- "syscall.AF_SLOW": "syscall",
- "syscall.AF_SNA": "syscall",
- "syscall.AF_SYSTEM": "syscall",
- "syscall.AF_TIPC": "syscall",
- "syscall.AF_UNIX": "syscall",
- "syscall.AF_UNSPEC": "syscall",
- "syscall.AF_VENDOR00": "syscall",
- "syscall.AF_VENDOR01": "syscall",
- "syscall.AF_VENDOR02": "syscall",
- "syscall.AF_VENDOR03": "syscall",
- "syscall.AF_VENDOR04": "syscall",
- "syscall.AF_VENDOR05": "syscall",
- "syscall.AF_VENDOR06": "syscall",
- "syscall.AF_VENDOR07": "syscall",
- "syscall.AF_VENDOR08": "syscall",
- "syscall.AF_VENDOR09": "syscall",
- "syscall.AF_VENDOR10": "syscall",
- "syscall.AF_VENDOR11": "syscall",
- "syscall.AF_VENDOR12": "syscall",
- "syscall.AF_VENDOR13": "syscall",
- "syscall.AF_VENDOR14": "syscall",
- "syscall.AF_VENDOR15": "syscall",
- "syscall.AF_VENDOR16": "syscall",
- "syscall.AF_VENDOR17": "syscall",
- "syscall.AF_VENDOR18": "syscall",
- "syscall.AF_VENDOR19": "syscall",
- "syscall.AF_VENDOR20": "syscall",
- "syscall.AF_VENDOR21": "syscall",
- "syscall.AF_VENDOR22": "syscall",
- "syscall.AF_VENDOR23": "syscall",
- "syscall.AF_VENDOR24": "syscall",
- "syscall.AF_VENDOR25": "syscall",
- "syscall.AF_VENDOR26": "syscall",
- "syscall.AF_VENDOR27": "syscall",
- "syscall.AF_VENDOR28": "syscall",
- "syscall.AF_VENDOR29": "syscall",
- "syscall.AF_VENDOR30": "syscall",
- "syscall.AF_VENDOR31": "syscall",
- "syscall.AF_VENDOR32": "syscall",
- "syscall.AF_VENDOR33": "syscall",
- "syscall.AF_VENDOR34": "syscall",
- "syscall.AF_VENDOR35": "syscall",
- "syscall.AF_VENDOR36": "syscall",
- "syscall.AF_VENDOR37": "syscall",
- "syscall.AF_VENDOR38": "syscall",
- "syscall.AF_VENDOR39": "syscall",
- "syscall.AF_VENDOR40": "syscall",
- "syscall.AF_VENDOR41": "syscall",
- "syscall.AF_VENDOR42": "syscall",
- "syscall.AF_VENDOR43": "syscall",
- "syscall.AF_VENDOR44": "syscall",
- "syscall.AF_VENDOR45": "syscall",
- "syscall.AF_VENDOR46": "syscall",
- "syscall.AF_VENDOR47": "syscall",
- "syscall.AF_WANPIPE": "syscall",
- "syscall.AF_X25": "syscall",
- "syscall.AI_CANONNAME": "syscall",
- "syscall.AI_NUMERICHOST": "syscall",
- "syscall.AI_PASSIVE": "syscall",
- "syscall.APPLICATION_ERROR": "syscall",
- "syscall.ARPHRD_ADAPT": "syscall",
- "syscall.ARPHRD_APPLETLK": "syscall",
- "syscall.ARPHRD_ARCNET": "syscall",
- "syscall.ARPHRD_ASH": "syscall",
- "syscall.ARPHRD_ATM": "syscall",
- "syscall.ARPHRD_AX25": "syscall",
- "syscall.ARPHRD_BIF": "syscall",
- "syscall.ARPHRD_CHAOS": "syscall",
- "syscall.ARPHRD_CISCO": "syscall",
- "syscall.ARPHRD_CSLIP": "syscall",
- "syscall.ARPHRD_CSLIP6": "syscall",
- "syscall.ARPHRD_DDCMP": "syscall",
- "syscall.ARPHRD_DLCI": "syscall",
- "syscall.ARPHRD_ECONET": "syscall",
- "syscall.ARPHRD_EETHER": "syscall",
- "syscall.ARPHRD_ETHER": "syscall",
- "syscall.ARPHRD_EUI64": "syscall",
- "syscall.ARPHRD_FCAL": "syscall",
- "syscall.ARPHRD_FCFABRIC": "syscall",
- "syscall.ARPHRD_FCPL": "syscall",
- "syscall.ARPHRD_FCPP": "syscall",
- "syscall.ARPHRD_FDDI": "syscall",
- "syscall.ARPHRD_FRAD": "syscall",
- "syscall.ARPHRD_FRELAY": "syscall",
- "syscall.ARPHRD_HDLC": "syscall",
- "syscall.ARPHRD_HIPPI": "syscall",
- "syscall.ARPHRD_HWX25": "syscall",
- "syscall.ARPHRD_IEEE1394": "syscall",
- "syscall.ARPHRD_IEEE802": "syscall",
- "syscall.ARPHRD_IEEE80211": "syscall",
- "syscall.ARPHRD_IEEE80211_PRISM": "syscall",
- "syscall.ARPHRD_IEEE80211_RADIOTAP": "syscall",
- "syscall.ARPHRD_IEEE802154": "syscall",
- "syscall.ARPHRD_IEEE802154_PHY": "syscall",
- "syscall.ARPHRD_IEEE802_TR": "syscall",
- "syscall.ARPHRD_INFINIBAND": "syscall",
- "syscall.ARPHRD_IPDDP": "syscall",
- "syscall.ARPHRD_IPGRE": "syscall",
- "syscall.ARPHRD_IRDA": "syscall",
- "syscall.ARPHRD_LAPB": "syscall",
- "syscall.ARPHRD_LOCALTLK": "syscall",
- "syscall.ARPHRD_LOOPBACK": "syscall",
- "syscall.ARPHRD_METRICOM": "syscall",
- "syscall.ARPHRD_NETROM": "syscall",
- "syscall.ARPHRD_NONE": "syscall",
- "syscall.ARPHRD_PIMREG": "syscall",
- "syscall.ARPHRD_PPP": "syscall",
- "syscall.ARPHRD_PRONET": "syscall",
- "syscall.ARPHRD_RAWHDLC": "syscall",
- "syscall.ARPHRD_ROSE": "syscall",
- "syscall.ARPHRD_RSRVD": "syscall",
- "syscall.ARPHRD_SIT": "syscall",
- "syscall.ARPHRD_SKIP": "syscall",
- "syscall.ARPHRD_SLIP": "syscall",
- "syscall.ARPHRD_SLIP6": "syscall",
- "syscall.ARPHRD_STRIP": "syscall",
- "syscall.ARPHRD_TUNNEL": "syscall",
- "syscall.ARPHRD_TUNNEL6": "syscall",
- "syscall.ARPHRD_VOID": "syscall",
- "syscall.ARPHRD_X25": "syscall",
- "syscall.AUTHTYPE_CLIENT": "syscall",
- "syscall.AUTHTYPE_SERVER": "syscall",
- "syscall.Accept": "syscall",
- "syscall.Accept4": "syscall",
- "syscall.AcceptEx": "syscall",
- "syscall.Access": "syscall",
- "syscall.Acct": "syscall",
- "syscall.AddrinfoW": "syscall",
- "syscall.Adjtime": "syscall",
- "syscall.Adjtimex": "syscall",
- "syscall.AttachLsf": "syscall",
- "syscall.B0": "syscall",
- "syscall.B1000000": "syscall",
- "syscall.B110": "syscall",
- "syscall.B115200": "syscall",
- "syscall.B1152000": "syscall",
- "syscall.B1200": "syscall",
- "syscall.B134": "syscall",
- "syscall.B14400": "syscall",
- "syscall.B150": "syscall",
- "syscall.B1500000": "syscall",
- "syscall.B1800": "syscall",
- "syscall.B19200": "syscall",
- "syscall.B200": "syscall",
- "syscall.B2000000": "syscall",
- "syscall.B230400": "syscall",
- "syscall.B2400": "syscall",
- "syscall.B2500000": "syscall",
- "syscall.B28800": "syscall",
- "syscall.B300": "syscall",
- "syscall.B3000000": "syscall",
- "syscall.B3500000": "syscall",
- "syscall.B38400": "syscall",
- "syscall.B4000000": "syscall",
- "syscall.B460800": "syscall",
- "syscall.B4800": "syscall",
- "syscall.B50": "syscall",
- "syscall.B500000": "syscall",
- "syscall.B57600": "syscall",
- "syscall.B576000": "syscall",
- "syscall.B600": "syscall",
- "syscall.B7200": "syscall",
- "syscall.B75": "syscall",
- "syscall.B76800": "syscall",
- "syscall.B921600": "syscall",
- "syscall.B9600": "syscall",
- "syscall.BASE_PROTOCOL": "syscall",
- "syscall.BIOCFEEDBACK": "syscall",
- "syscall.BIOCFLUSH": "syscall",
- "syscall.BIOCGBLEN": "syscall",
- "syscall.BIOCGDIRECTION": "syscall",
- "syscall.BIOCGDIRFILT": "syscall",
- "syscall.BIOCGDLT": "syscall",
- "syscall.BIOCGDLTLIST": "syscall",
- "syscall.BIOCGETBUFMODE": "syscall",
- "syscall.BIOCGETIF": "syscall",
- "syscall.BIOCGETZMAX": "syscall",
- "syscall.BIOCGFEEDBACK": "syscall",
- "syscall.BIOCGFILDROP": "syscall",
- "syscall.BIOCGHDRCMPLT": "syscall",
- "syscall.BIOCGRSIG": "syscall",
- "syscall.BIOCGRTIMEOUT": "syscall",
- "syscall.BIOCGSEESENT": "syscall",
- "syscall.BIOCGSTATS": "syscall",
- "syscall.BIOCGSTATSOLD": "syscall",
- "syscall.BIOCGTSTAMP": "syscall",
- "syscall.BIOCIMMEDIATE": "syscall",
- "syscall.BIOCLOCK": "syscall",
- "syscall.BIOCPROMISC": "syscall",
- "syscall.BIOCROTZBUF": "syscall",
- "syscall.BIOCSBLEN": "syscall",
- "syscall.BIOCSDIRECTION": "syscall",
- "syscall.BIOCSDIRFILT": "syscall",
- "syscall.BIOCSDLT": "syscall",
- "syscall.BIOCSETBUFMODE": "syscall",
- "syscall.BIOCSETF": "syscall",
- "syscall.BIOCSETFNR": "syscall",
- "syscall.BIOCSETIF": "syscall",
- "syscall.BIOCSETWF": "syscall",
- "syscall.BIOCSETZBUF": "syscall",
- "syscall.BIOCSFEEDBACK": "syscall",
- "syscall.BIOCSFILDROP": "syscall",
- "syscall.BIOCSHDRCMPLT": "syscall",
- "syscall.BIOCSRSIG": "syscall",
- "syscall.BIOCSRTIMEOUT": "syscall",
- "syscall.BIOCSSEESENT": "syscall",
- "syscall.BIOCSTCPF": "syscall",
- "syscall.BIOCSTSTAMP": "syscall",
- "syscall.BIOCSUDPF": "syscall",
- "syscall.BIOCVERSION": "syscall",
- "syscall.BPF_A": "syscall",
- "syscall.BPF_ABS": "syscall",
- "syscall.BPF_ADD": "syscall",
- "syscall.BPF_ALIGNMENT": "syscall",
- "syscall.BPF_ALIGNMENT32": "syscall",
- "syscall.BPF_ALU": "syscall",
- "syscall.BPF_AND": "syscall",
- "syscall.BPF_B": "syscall",
- "syscall.BPF_BUFMODE_BUFFER": "syscall",
- "syscall.BPF_BUFMODE_ZBUF": "syscall",
- "syscall.BPF_DFLTBUFSIZE": "syscall",
- "syscall.BPF_DIRECTION_IN": "syscall",
- "syscall.BPF_DIRECTION_OUT": "syscall",
- "syscall.BPF_DIV": "syscall",
- "syscall.BPF_H": "syscall",
- "syscall.BPF_IMM": "syscall",
- "syscall.BPF_IND": "syscall",
- "syscall.BPF_JA": "syscall",
- "syscall.BPF_JEQ": "syscall",
- "syscall.BPF_JGE": "syscall",
- "syscall.BPF_JGT": "syscall",
- "syscall.BPF_JMP": "syscall",
- "syscall.BPF_JSET": "syscall",
- "syscall.BPF_K": "syscall",
- "syscall.BPF_LD": "syscall",
- "syscall.BPF_LDX": "syscall",
- "syscall.BPF_LEN": "syscall",
- "syscall.BPF_LSH": "syscall",
- "syscall.BPF_MAJOR_VERSION": "syscall",
- "syscall.BPF_MAXBUFSIZE": "syscall",
- "syscall.BPF_MAXINSNS": "syscall",
- "syscall.BPF_MEM": "syscall",
- "syscall.BPF_MEMWORDS": "syscall",
- "syscall.BPF_MINBUFSIZE": "syscall",
- "syscall.BPF_MINOR_VERSION": "syscall",
- "syscall.BPF_MISC": "syscall",
- "syscall.BPF_MSH": "syscall",
- "syscall.BPF_MUL": "syscall",
- "syscall.BPF_NEG": "syscall",
- "syscall.BPF_OR": "syscall",
- "syscall.BPF_RELEASE": "syscall",
- "syscall.BPF_RET": "syscall",
- "syscall.BPF_RSH": "syscall",
- "syscall.BPF_ST": "syscall",
- "syscall.BPF_STX": "syscall",
- "syscall.BPF_SUB": "syscall",
- "syscall.BPF_TAX": "syscall",
- "syscall.BPF_TXA": "syscall",
- "syscall.BPF_T_BINTIME": "syscall",
- "syscall.BPF_T_BINTIME_FAST": "syscall",
- "syscall.BPF_T_BINTIME_MONOTONIC": "syscall",
- "syscall.BPF_T_BINTIME_MONOTONIC_FAST": "syscall",
- "syscall.BPF_T_FAST": "syscall",
- "syscall.BPF_T_FLAG_MASK": "syscall",
- "syscall.BPF_T_FORMAT_MASK": "syscall",
- "syscall.BPF_T_MICROTIME": "syscall",
- "syscall.BPF_T_MICROTIME_FAST": "syscall",
- "syscall.BPF_T_MICROTIME_MONOTONIC": "syscall",
- "syscall.BPF_T_MICROTIME_MONOTONIC_FAST": "syscall",
- "syscall.BPF_T_MONOTONIC": "syscall",
- "syscall.BPF_T_MONOTONIC_FAST": "syscall",
- "syscall.BPF_T_NANOTIME": "syscall",
- "syscall.BPF_T_NANOTIME_FAST": "syscall",
- "syscall.BPF_T_NANOTIME_MONOTONIC": "syscall",
- "syscall.BPF_T_NANOTIME_MONOTONIC_FAST": "syscall",
- "syscall.BPF_T_NONE": "syscall",
- "syscall.BPF_T_NORMAL": "syscall",
- "syscall.BPF_W": "syscall",
- "syscall.BPF_X": "syscall",
- "syscall.BRKINT": "syscall",
- "syscall.Bind": "syscall",
- "syscall.BindToDevice": "syscall",
- "syscall.BpfBuflen": "syscall",
- "syscall.BpfDatalink": "syscall",
- "syscall.BpfHdr": "syscall",
- "syscall.BpfHeadercmpl": "syscall",
- "syscall.BpfInsn": "syscall",
- "syscall.BpfInterface": "syscall",
- "syscall.BpfJump": "syscall",
- "syscall.BpfProgram": "syscall",
- "syscall.BpfStat": "syscall",
- "syscall.BpfStats": "syscall",
- "syscall.BpfStmt": "syscall",
- "syscall.BpfTimeout": "syscall",
- "syscall.BpfTimeval": "syscall",
- "syscall.BpfVersion": "syscall",
- "syscall.BpfZbuf": "syscall",
- "syscall.BpfZbufHeader": "syscall",
- "syscall.ByHandleFileInformation": "syscall",
- "syscall.BytePtrFromString": "syscall",
- "syscall.ByteSliceFromString": "syscall",
- "syscall.CCR0_FLUSH": "syscall",
- "syscall.CERT_CHAIN_POLICY_AUTHENTICODE": "syscall",
- "syscall.CERT_CHAIN_POLICY_AUTHENTICODE_TS": "syscall",
- "syscall.CERT_CHAIN_POLICY_BASE": "syscall",
- "syscall.CERT_CHAIN_POLICY_BASIC_CONSTRAINTS": "syscall",
- "syscall.CERT_CHAIN_POLICY_EV": "syscall",
- "syscall.CERT_CHAIN_POLICY_MICROSOFT_ROOT": "syscall",
- "syscall.CERT_CHAIN_POLICY_NT_AUTH": "syscall",
- "syscall.CERT_CHAIN_POLICY_SSL": "syscall",
- "syscall.CERT_E_CN_NO_MATCH": "syscall",
- "syscall.CERT_E_EXPIRED": "syscall",
- "syscall.CERT_E_PURPOSE": "syscall",
- "syscall.CERT_E_ROLE": "syscall",
- "syscall.CERT_E_UNTRUSTEDROOT": "syscall",
- "syscall.CERT_STORE_ADD_ALWAYS": "syscall",
- "syscall.CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG": "syscall",
- "syscall.CERT_STORE_PROV_MEMORY": "syscall",
- "syscall.CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT": "syscall",
- "syscall.CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT": "syscall",
- "syscall.CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT": "syscall",
- "syscall.CERT_TRUST_HAS_NOT_SUPPORTED_CRITICAL_EXT": "syscall",
- "syscall.CERT_TRUST_HAS_NOT_SUPPORTED_NAME_CONSTRAINT": "syscall",
- "syscall.CERT_TRUST_INVALID_BASIC_CONSTRAINTS": "syscall",
- "syscall.CERT_TRUST_INVALID_EXTENSION": "syscall",
- "syscall.CERT_TRUST_INVALID_NAME_CONSTRAINTS": "syscall",
- "syscall.CERT_TRUST_INVALID_POLICY_CONSTRAINTS": "syscall",
- "syscall.CERT_TRUST_IS_CYCLIC": "syscall",
- "syscall.CERT_TRUST_IS_EXPLICIT_DISTRUST": "syscall",
- "syscall.CERT_TRUST_IS_NOT_SIGNATURE_VALID": "syscall",
- "syscall.CERT_TRUST_IS_NOT_TIME_VALID": "syscall",
- "syscall.CERT_TRUST_IS_NOT_VALID_FOR_USAGE": "syscall",
- "syscall.CERT_TRUST_IS_OFFLINE_REVOCATION": "syscall",
- "syscall.CERT_TRUST_IS_REVOKED": "syscall",
- "syscall.CERT_TRUST_IS_UNTRUSTED_ROOT": "syscall",
- "syscall.CERT_TRUST_NO_ERROR": "syscall",
- "syscall.CERT_TRUST_NO_ISSUANCE_CHAIN_POLICY": "syscall",
- "syscall.CERT_TRUST_REVOCATION_STATUS_UNKNOWN": "syscall",
- "syscall.CFLUSH": "syscall",
- "syscall.CLOCAL": "syscall",
- "syscall.CLONE_CHILD_CLEARTID": "syscall",
- "syscall.CLONE_CHILD_SETTID": "syscall",
- "syscall.CLONE_CSIGNAL": "syscall",
- "syscall.CLONE_DETACHED": "syscall",
- "syscall.CLONE_FILES": "syscall",
- "syscall.CLONE_FS": "syscall",
- "syscall.CLONE_IO": "syscall",
- "syscall.CLONE_NEWIPC": "syscall",
- "syscall.CLONE_NEWNET": "syscall",
- "syscall.CLONE_NEWNS": "syscall",
- "syscall.CLONE_NEWPID": "syscall",
- "syscall.CLONE_NEWUSER": "syscall",
- "syscall.CLONE_NEWUTS": "syscall",
- "syscall.CLONE_PARENT": "syscall",
- "syscall.CLONE_PARENT_SETTID": "syscall",
- "syscall.CLONE_PID": "syscall",
- "syscall.CLONE_PTRACE": "syscall",
- "syscall.CLONE_SETTLS": "syscall",
- "syscall.CLONE_SIGHAND": "syscall",
- "syscall.CLONE_SYSVSEM": "syscall",
- "syscall.CLONE_THREAD": "syscall",
- "syscall.CLONE_UNTRACED": "syscall",
- "syscall.CLONE_VFORK": "syscall",
- "syscall.CLONE_VM": "syscall",
- "syscall.CPUID_CFLUSH": "syscall",
- "syscall.CREAD": "syscall",
- "syscall.CREATE_ALWAYS": "syscall",
- "syscall.CREATE_NEW": "syscall",
- "syscall.CREATE_NEW_PROCESS_GROUP": "syscall",
- "syscall.CREATE_UNICODE_ENVIRONMENT": "syscall",
- "syscall.CRYPT_DEFAULT_CONTAINER_OPTIONAL": "syscall",
- "syscall.CRYPT_DELETEKEYSET": "syscall",
- "syscall.CRYPT_MACHINE_KEYSET": "syscall",
- "syscall.CRYPT_NEWKEYSET": "syscall",
- "syscall.CRYPT_SILENT": "syscall",
- "syscall.CRYPT_VERIFYCONTEXT": "syscall",
- "syscall.CS5": "syscall",
- "syscall.CS6": "syscall",
- "syscall.CS7": "syscall",
- "syscall.CS8": "syscall",
- "syscall.CSIZE": "syscall",
- "syscall.CSTART": "syscall",
- "syscall.CSTATUS": "syscall",
- "syscall.CSTOP": "syscall",
- "syscall.CSTOPB": "syscall",
- "syscall.CSUSP": "syscall",
- "syscall.CTL_MAXNAME": "syscall",
- "syscall.CTL_NET": "syscall",
- "syscall.CTL_QUERY": "syscall",
- "syscall.CTRL_BREAK_EVENT": "syscall",
- "syscall.CTRL_C_EVENT": "syscall",
- "syscall.CancelIo": "syscall",
- "syscall.CancelIoEx": "syscall",
- "syscall.CertAddCertificateContextToStore": "syscall",
- "syscall.CertChainContext": "syscall",
- "syscall.CertChainElement": "syscall",
- "syscall.CertChainPara": "syscall",
- "syscall.CertChainPolicyPara": "syscall",
- "syscall.CertChainPolicyStatus": "syscall",
- "syscall.CertCloseStore": "syscall",
- "syscall.CertContext": "syscall",
- "syscall.CertCreateCertificateContext": "syscall",
- "syscall.CertEnhKeyUsage": "syscall",
- "syscall.CertEnumCertificatesInStore": "syscall",
- "syscall.CertFreeCertificateChain": "syscall",
- "syscall.CertFreeCertificateContext": "syscall",
- "syscall.CertGetCertificateChain": "syscall",
- "syscall.CertOpenStore": "syscall",
- "syscall.CertOpenSystemStore": "syscall",
- "syscall.CertRevocationInfo": "syscall",
- "syscall.CertSimpleChain": "syscall",
- "syscall.CertTrustStatus": "syscall",
- "syscall.CertUsageMatch": "syscall",
- "syscall.CertVerifyCertificateChainPolicy": "syscall",
- "syscall.Chdir": "syscall",
- "syscall.CheckBpfVersion": "syscall",
- "syscall.Chflags": "syscall",
- "syscall.Chmod": "syscall",
- "syscall.Chown": "syscall",
- "syscall.Chroot": "syscall",
- "syscall.Clearenv": "syscall",
- "syscall.Close": "syscall",
- "syscall.CloseHandle": "syscall",
- "syscall.CloseOnExec": "syscall",
- "syscall.Closesocket": "syscall",
- "syscall.CmsgLen": "syscall",
- "syscall.CmsgSpace": "syscall",
- "syscall.Cmsghdr": "syscall",
- "syscall.CommandLineToArgv": "syscall",
- "syscall.ComputerName": "syscall",
- "syscall.Connect": "syscall",
- "syscall.ConnectEx": "syscall",
- "syscall.ConvertSidToStringSid": "syscall",
- "syscall.ConvertStringSidToSid": "syscall",
- "syscall.CopySid": "syscall",
- "syscall.Creat": "syscall",
- "syscall.CreateDirectory": "syscall",
- "syscall.CreateFile": "syscall",
- "syscall.CreateFileMapping": "syscall",
- "syscall.CreateIoCompletionPort": "syscall",
- "syscall.CreatePipe": "syscall",
- "syscall.CreateProcess": "syscall",
- "syscall.Credential": "syscall",
- "syscall.CryptAcquireContext": "syscall",
- "syscall.CryptGenRandom": "syscall",
- "syscall.CryptReleaseContext": "syscall",
- "syscall.DIOCBSFLUSH": "syscall",
- "syscall.DIOCOSFPFLUSH": "syscall",
- "syscall.DLL": "syscall",
- "syscall.DLLError": "syscall",
- "syscall.DLT_A429": "syscall",
- "syscall.DLT_A653_ICM": "syscall",
- "syscall.DLT_AIRONET_HEADER": "syscall",
- "syscall.DLT_AOS": "syscall",
- "syscall.DLT_APPLE_IP_OVER_IEEE1394": "syscall",
- "syscall.DLT_ARCNET": "syscall",
- "syscall.DLT_ARCNET_LINUX": "syscall",
- "syscall.DLT_ATM_CLIP": "syscall",
- "syscall.DLT_ATM_RFC1483": "syscall",
- "syscall.DLT_AURORA": "syscall",
- "syscall.DLT_AX25": "syscall",
- "syscall.DLT_AX25_KISS": "syscall",
- "syscall.DLT_BACNET_MS_TP": "syscall",
- "syscall.DLT_BLUETOOTH_HCI_H4": "syscall",
- "syscall.DLT_BLUETOOTH_HCI_H4_WITH_PHDR": "syscall",
- "syscall.DLT_CAN20B": "syscall",
- "syscall.DLT_CAN_SOCKETCAN": "syscall",
- "syscall.DLT_CHAOS": "syscall",
- "syscall.DLT_CHDLC": "syscall",
- "syscall.DLT_CISCO_IOS": "syscall",
- "syscall.DLT_C_HDLC": "syscall",
- "syscall.DLT_C_HDLC_WITH_DIR": "syscall",
- "syscall.DLT_DBUS": "syscall",
- "syscall.DLT_DECT": "syscall",
- "syscall.DLT_DOCSIS": "syscall",
- "syscall.DLT_DVB_CI": "syscall",
- "syscall.DLT_ECONET": "syscall",
- "syscall.DLT_EN10MB": "syscall",
- "syscall.DLT_EN3MB": "syscall",
- "syscall.DLT_ENC": "syscall",
- "syscall.DLT_ERF": "syscall",
- "syscall.DLT_ERF_ETH": "syscall",
- "syscall.DLT_ERF_POS": "syscall",
- "syscall.DLT_FC_2": "syscall",
- "syscall.DLT_FC_2_WITH_FRAME_DELIMS": "syscall",
- "syscall.DLT_FDDI": "syscall",
- "syscall.DLT_FLEXRAY": "syscall",
- "syscall.DLT_FRELAY": "syscall",
- "syscall.DLT_FRELAY_WITH_DIR": "syscall",
- "syscall.DLT_GCOM_SERIAL": "syscall",
- "syscall.DLT_GCOM_T1E1": "syscall",
- "syscall.DLT_GPF_F": "syscall",
- "syscall.DLT_GPF_T": "syscall",
- "syscall.DLT_GPRS_LLC": "syscall",
- "syscall.DLT_GSMTAP_ABIS": "syscall",
- "syscall.DLT_GSMTAP_UM": "syscall",
- "syscall.DLT_HDLC": "syscall",
- "syscall.DLT_HHDLC": "syscall",
- "syscall.DLT_HIPPI": "syscall",
- "syscall.DLT_IBM_SN": "syscall",
- "syscall.DLT_IBM_SP": "syscall",
- "syscall.DLT_IEEE802": "syscall",
- "syscall.DLT_IEEE802_11": "syscall",
- "syscall.DLT_IEEE802_11_RADIO": "syscall",
- "syscall.DLT_IEEE802_11_RADIO_AVS": "syscall",
- "syscall.DLT_IEEE802_15_4": "syscall",
- "syscall.DLT_IEEE802_15_4_LINUX": "syscall",
- "syscall.DLT_IEEE802_15_4_NOFCS": "syscall",
- "syscall.DLT_IEEE802_15_4_NONASK_PHY": "syscall",
- "syscall.DLT_IEEE802_16_MAC_CPS": "syscall",
- "syscall.DLT_IEEE802_16_MAC_CPS_RADIO": "syscall",
- "syscall.DLT_IPFILTER": "syscall",
- "syscall.DLT_IPMB": "syscall",
- "syscall.DLT_IPMB_LINUX": "syscall",
- "syscall.DLT_IPNET": "syscall",
- "syscall.DLT_IPOIB": "syscall",
- "syscall.DLT_IPV4": "syscall",
- "syscall.DLT_IPV6": "syscall",
- "syscall.DLT_IP_OVER_FC": "syscall",
- "syscall.DLT_JUNIPER_ATM1": "syscall",
- "syscall.DLT_JUNIPER_ATM2": "syscall",
- "syscall.DLT_JUNIPER_ATM_CEMIC": "syscall",
- "syscall.DLT_JUNIPER_CHDLC": "syscall",
- "syscall.DLT_JUNIPER_ES": "syscall",
- "syscall.DLT_JUNIPER_ETHER": "syscall",
- "syscall.DLT_JUNIPER_FIBRECHANNEL": "syscall",
- "syscall.DLT_JUNIPER_FRELAY": "syscall",
- "syscall.DLT_JUNIPER_GGSN": "syscall",
- "syscall.DLT_JUNIPER_ISM": "syscall",
- "syscall.DLT_JUNIPER_MFR": "syscall",
- "syscall.DLT_JUNIPER_MLFR": "syscall",
- "syscall.DLT_JUNIPER_MLPPP": "syscall",
- "syscall.DLT_JUNIPER_MONITOR": "syscall",
- "syscall.DLT_JUNIPER_PIC_PEER": "syscall",
- "syscall.DLT_JUNIPER_PPP": "syscall",
- "syscall.DLT_JUNIPER_PPPOE": "syscall",
- "syscall.DLT_JUNIPER_PPPOE_ATM": "syscall",
- "syscall.DLT_JUNIPER_SERVICES": "syscall",
- "syscall.DLT_JUNIPER_SRX_E2E": "syscall",
- "syscall.DLT_JUNIPER_ST": "syscall",
- "syscall.DLT_JUNIPER_VP": "syscall",
- "syscall.DLT_JUNIPER_VS": "syscall",
- "syscall.DLT_LAPB_WITH_DIR": "syscall",
- "syscall.DLT_LAPD": "syscall",
- "syscall.DLT_LIN": "syscall",
- "syscall.DLT_LINUX_EVDEV": "syscall",
- "syscall.DLT_LINUX_IRDA": "syscall",
- "syscall.DLT_LINUX_LAPD": "syscall",
- "syscall.DLT_LINUX_PPP_WITHDIRECTION": "syscall",
- "syscall.DLT_LINUX_SLL": "syscall",
- "syscall.DLT_LOOP": "syscall",
- "syscall.DLT_LTALK": "syscall",
- "syscall.DLT_MATCHING_MAX": "syscall",
- "syscall.DLT_MATCHING_MIN": "syscall",
- "syscall.DLT_MFR": "syscall",
- "syscall.DLT_MOST": "syscall",
- "syscall.DLT_MPEG_2_TS": "syscall",
- "syscall.DLT_MPLS": "syscall",
- "syscall.DLT_MTP2": "syscall",
- "syscall.DLT_MTP2_WITH_PHDR": "syscall",
- "syscall.DLT_MTP3": "syscall",
- "syscall.DLT_MUX27010": "syscall",
- "syscall.DLT_NETANALYZER": "syscall",
- "syscall.DLT_NETANALYZER_TRANSPARENT": "syscall",
- "syscall.DLT_NFC_LLCP": "syscall",
- "syscall.DLT_NFLOG": "syscall",
- "syscall.DLT_NG40": "syscall",
- "syscall.DLT_NULL": "syscall",
- "syscall.DLT_PCI_EXP": "syscall",
- "syscall.DLT_PFLOG": "syscall",
- "syscall.DLT_PFSYNC": "syscall",
- "syscall.DLT_PPI": "syscall",
- "syscall.DLT_PPP": "syscall",
- "syscall.DLT_PPP_BSDOS": "syscall",
- "syscall.DLT_PPP_ETHER": "syscall",
- "syscall.DLT_PPP_PPPD": "syscall",
- "syscall.DLT_PPP_SERIAL": "syscall",
- "syscall.DLT_PPP_WITH_DIR": "syscall",
- "syscall.DLT_PPP_WITH_DIRECTION": "syscall",
- "syscall.DLT_PRISM_HEADER": "syscall",
- "syscall.DLT_PRONET": "syscall",
- "syscall.DLT_RAIF1": "syscall",
- "syscall.DLT_RAW": "syscall",
- "syscall.DLT_RAWAF_MASK": "syscall",
- "syscall.DLT_RIO": "syscall",
- "syscall.DLT_SCCP": "syscall",
- "syscall.DLT_SITA": "syscall",
- "syscall.DLT_SLIP": "syscall",
- "syscall.DLT_SLIP_BSDOS": "syscall",
- "syscall.DLT_STANAG_5066_D_PDU": "syscall",
- "syscall.DLT_SUNATM": "syscall",
- "syscall.DLT_SYMANTEC_FIREWALL": "syscall",
- "syscall.DLT_TZSP": "syscall",
- "syscall.DLT_USB": "syscall",
- "syscall.DLT_USB_LINUX": "syscall",
- "syscall.DLT_USB_LINUX_MMAPPED": "syscall",
- "syscall.DLT_USER0": "syscall",
- "syscall.DLT_USER1": "syscall",
- "syscall.DLT_USER10": "syscall",
- "syscall.DLT_USER11": "syscall",
- "syscall.DLT_USER12": "syscall",
- "syscall.DLT_USER13": "syscall",
- "syscall.DLT_USER14": "syscall",
- "syscall.DLT_USER15": "syscall",
- "syscall.DLT_USER2": "syscall",
- "syscall.DLT_USER3": "syscall",
- "syscall.DLT_USER4": "syscall",
- "syscall.DLT_USER5": "syscall",
- "syscall.DLT_USER6": "syscall",
- "syscall.DLT_USER7": "syscall",
- "syscall.DLT_USER8": "syscall",
- "syscall.DLT_USER9": "syscall",
- "syscall.DLT_WIHART": "syscall",
- "syscall.DLT_X2E_SERIAL": "syscall",
- "syscall.DLT_X2E_XORAYA": "syscall",
- "syscall.DNSMXData": "syscall",
- "syscall.DNSPTRData": "syscall",
- "syscall.DNSRecord": "syscall",
- "syscall.DNSSRVData": "syscall",
- "syscall.DNSTXTData": "syscall",
- "syscall.DNS_TYPE_A": "syscall",
- "syscall.DNS_TYPE_A6": "syscall",
- "syscall.DNS_TYPE_AAAA": "syscall",
- "syscall.DNS_TYPE_ADDRS": "syscall",
- "syscall.DNS_TYPE_AFSDB": "syscall",
- "syscall.DNS_TYPE_ALL": "syscall",
- "syscall.DNS_TYPE_ANY": "syscall",
- "syscall.DNS_TYPE_ATMA": "syscall",
- "syscall.DNS_TYPE_AXFR": "syscall",
- "syscall.DNS_TYPE_CERT": "syscall",
- "syscall.DNS_TYPE_CNAME": "syscall",
- "syscall.DNS_TYPE_DHCID": "syscall",
- "syscall.DNS_TYPE_DNAME": "syscall",
- "syscall.DNS_TYPE_DNSKEY": "syscall",
- "syscall.DNS_TYPE_DS": "syscall",
- "syscall.DNS_TYPE_EID": "syscall",
- "syscall.DNS_TYPE_GID": "syscall",
- "syscall.DNS_TYPE_GPOS": "syscall",
- "syscall.DNS_TYPE_HINFO": "syscall",
- "syscall.DNS_TYPE_ISDN": "syscall",
- "syscall.DNS_TYPE_IXFR": "syscall",
- "syscall.DNS_TYPE_KEY": "syscall",
- "syscall.DNS_TYPE_KX": "syscall",
- "syscall.DNS_TYPE_LOC": "syscall",
- "syscall.DNS_TYPE_MAILA": "syscall",
- "syscall.DNS_TYPE_MAILB": "syscall",
- "syscall.DNS_TYPE_MB": "syscall",
- "syscall.DNS_TYPE_MD": "syscall",
- "syscall.DNS_TYPE_MF": "syscall",
- "syscall.DNS_TYPE_MG": "syscall",
- "syscall.DNS_TYPE_MINFO": "syscall",
- "syscall.DNS_TYPE_MR": "syscall",
- "syscall.DNS_TYPE_MX": "syscall",
- "syscall.DNS_TYPE_NAPTR": "syscall",
- "syscall.DNS_TYPE_NBSTAT": "syscall",
- "syscall.DNS_TYPE_NIMLOC": "syscall",
- "syscall.DNS_TYPE_NS": "syscall",
- "syscall.DNS_TYPE_NSAP": "syscall",
- "syscall.DNS_TYPE_NSAPPTR": "syscall",
- "syscall.DNS_TYPE_NSEC": "syscall",
- "syscall.DNS_TYPE_NULL": "syscall",
- "syscall.DNS_TYPE_NXT": "syscall",
- "syscall.DNS_TYPE_OPT": "syscall",
- "syscall.DNS_TYPE_PTR": "syscall",
- "syscall.DNS_TYPE_PX": "syscall",
- "syscall.DNS_TYPE_RP": "syscall",
- "syscall.DNS_TYPE_RRSIG": "syscall",
- "syscall.DNS_TYPE_RT": "syscall",
- "syscall.DNS_TYPE_SIG": "syscall",
- "syscall.DNS_TYPE_SINK": "syscall",
- "syscall.DNS_TYPE_SOA": "syscall",
- "syscall.DNS_TYPE_SRV": "syscall",
- "syscall.DNS_TYPE_TEXT": "syscall",
- "syscall.DNS_TYPE_TKEY": "syscall",
- "syscall.DNS_TYPE_TSIG": "syscall",
- "syscall.DNS_TYPE_UID": "syscall",
- "syscall.DNS_TYPE_UINFO": "syscall",
- "syscall.DNS_TYPE_UNSPEC": "syscall",
- "syscall.DNS_TYPE_WINS": "syscall",
- "syscall.DNS_TYPE_WINSR": "syscall",
- "syscall.DNS_TYPE_WKS": "syscall",
- "syscall.DNS_TYPE_X25": "syscall",
- "syscall.DT_BLK": "syscall",
- "syscall.DT_CHR": "syscall",
- "syscall.DT_DIR": "syscall",
- "syscall.DT_FIFO": "syscall",
- "syscall.DT_LNK": "syscall",
- "syscall.DT_REG": "syscall",
- "syscall.DT_SOCK": "syscall",
- "syscall.DT_UNKNOWN": "syscall",
- "syscall.DT_WHT": "syscall",
- "syscall.DUPLICATE_CLOSE_SOURCE": "syscall",
- "syscall.DUPLICATE_SAME_ACCESS": "syscall",
- "syscall.DeleteFile": "syscall",
- "syscall.DetachLsf": "syscall",
- "syscall.Dirent": "syscall",
- "syscall.DnsQuery": "syscall",
- "syscall.DnsRecordListFree": "syscall",
- "syscall.Dup": "syscall",
- "syscall.Dup2": "syscall",
- "syscall.Dup3": "syscall",
- "syscall.DuplicateHandle": "syscall",
- "syscall.E2BIG": "syscall",
- "syscall.EACCES": "syscall",
- "syscall.EADDRINUSE": "syscall",
- "syscall.EADDRNOTAVAIL": "syscall",
- "syscall.EADV": "syscall",
- "syscall.EAFNOSUPPORT": "syscall",
- "syscall.EAGAIN": "syscall",
- "syscall.EALREADY": "syscall",
- "syscall.EAUTH": "syscall",
- "syscall.EBADARCH": "syscall",
- "syscall.EBADE": "syscall",
- "syscall.EBADEXEC": "syscall",
- "syscall.EBADF": "syscall",
- "syscall.EBADFD": "syscall",
- "syscall.EBADMACHO": "syscall",
- "syscall.EBADMSG": "syscall",
- "syscall.EBADR": "syscall",
- "syscall.EBADRPC": "syscall",
- "syscall.EBADRQC": "syscall",
- "syscall.EBADSLT": "syscall",
- "syscall.EBFONT": "syscall",
- "syscall.EBUSY": "syscall",
- "syscall.ECANCELED": "syscall",
- "syscall.ECAPMODE": "syscall",
- "syscall.ECHILD": "syscall",
- "syscall.ECHO": "syscall",
- "syscall.ECHOCTL": "syscall",
- "syscall.ECHOE": "syscall",
- "syscall.ECHOK": "syscall",
- "syscall.ECHOKE": "syscall",
- "syscall.ECHONL": "syscall",
- "syscall.ECHOPRT": "syscall",
- "syscall.ECHRNG": "syscall",
- "syscall.ECOMM": "syscall",
- "syscall.ECONNABORTED": "syscall",
- "syscall.ECONNREFUSED": "syscall",
- "syscall.ECONNRESET": "syscall",
- "syscall.EDEADLK": "syscall",
- "syscall.EDEADLOCK": "syscall",
- "syscall.EDESTADDRREQ": "syscall",
- "syscall.EDEVERR": "syscall",
- "syscall.EDOM": "syscall",
- "syscall.EDOOFUS": "syscall",
- "syscall.EDOTDOT": "syscall",
- "syscall.EDQUOT": "syscall",
- "syscall.EEXIST": "syscall",
- "syscall.EFAULT": "syscall",
- "syscall.EFBIG": "syscall",
- "syscall.EFER_LMA": "syscall",
- "syscall.EFER_LME": "syscall",
- "syscall.EFER_NXE": "syscall",
- "syscall.EFER_SCE": "syscall",
- "syscall.EFTYPE": "syscall",
- "syscall.EHOSTDOWN": "syscall",
- "syscall.EHOSTUNREACH": "syscall",
- "syscall.EHWPOISON": "syscall",
- "syscall.EIDRM": "syscall",
- "syscall.EILSEQ": "syscall",
- "syscall.EINPROGRESS": "syscall",
- "syscall.EINTR": "syscall",
- "syscall.EINVAL": "syscall",
- "syscall.EIO": "syscall",
- "syscall.EIPSEC": "syscall",
- "syscall.EISCONN": "syscall",
- "syscall.EISDIR": "syscall",
- "syscall.EISNAM": "syscall",
- "syscall.EKEYEXPIRED": "syscall",
- "syscall.EKEYREJECTED": "syscall",
- "syscall.EKEYREVOKED": "syscall",
- "syscall.EL2HLT": "syscall",
- "syscall.EL2NSYNC": "syscall",
- "syscall.EL3HLT": "syscall",
- "syscall.EL3RST": "syscall",
- "syscall.ELAST": "syscall",
- "syscall.ELF_NGREG": "syscall",
- "syscall.ELF_PRARGSZ": "syscall",
- "syscall.ELIBACC": "syscall",
- "syscall.ELIBBAD": "syscall",
- "syscall.ELIBEXEC": "syscall",
- "syscall.ELIBMAX": "syscall",
- "syscall.ELIBSCN": "syscall",
- "syscall.ELNRNG": "syscall",
- "syscall.ELOOP": "syscall",
- "syscall.EMEDIUMTYPE": "syscall",
- "syscall.EMFILE": "syscall",
- "syscall.EMLINK": "syscall",
- "syscall.EMSGSIZE": "syscall",
- "syscall.EMT_TAGOVF": "syscall",
- "syscall.EMULTIHOP": "syscall",
- "syscall.EMUL_ENABLED": "syscall",
- "syscall.EMUL_LINUX": "syscall",
- "syscall.EMUL_LINUX32": "syscall",
- "syscall.EMUL_MAXID": "syscall",
- "syscall.EMUL_NATIVE": "syscall",
- "syscall.ENAMETOOLONG": "syscall",
- "syscall.ENAVAIL": "syscall",
- "syscall.ENDRUNDISC": "syscall",
- "syscall.ENEEDAUTH": "syscall",
- "syscall.ENETDOWN": "syscall",
- "syscall.ENETRESET": "syscall",
- "syscall.ENETUNREACH": "syscall",
- "syscall.ENFILE": "syscall",
- "syscall.ENOANO": "syscall",
- "syscall.ENOATTR": "syscall",
- "syscall.ENOBUFS": "syscall",
- "syscall.ENOCSI": "syscall",
- "syscall.ENODATA": "syscall",
- "syscall.ENODEV": "syscall",
- "syscall.ENOENT": "syscall",
- "syscall.ENOEXEC": "syscall",
- "syscall.ENOKEY": "syscall",
- "syscall.ENOLCK": "syscall",
- "syscall.ENOLINK": "syscall",
- "syscall.ENOMEDIUM": "syscall",
- "syscall.ENOMEM": "syscall",
- "syscall.ENOMSG": "syscall",
- "syscall.ENONET": "syscall",
- "syscall.ENOPKG": "syscall",
- "syscall.ENOPOLICY": "syscall",
- "syscall.ENOPROTOOPT": "syscall",
- "syscall.ENOSPC": "syscall",
- "syscall.ENOSR": "syscall",
- "syscall.ENOSTR": "syscall",
- "syscall.ENOSYS": "syscall",
- "syscall.ENOTBLK": "syscall",
- "syscall.ENOTCAPABLE": "syscall",
- "syscall.ENOTCONN": "syscall",
- "syscall.ENOTDIR": "syscall",
- "syscall.ENOTEMPTY": "syscall",
- "syscall.ENOTNAM": "syscall",
- "syscall.ENOTRECOVERABLE": "syscall",
- "syscall.ENOTSOCK": "syscall",
- "syscall.ENOTSUP": "syscall",
- "syscall.ENOTTY": "syscall",
- "syscall.ENOTUNIQ": "syscall",
- "syscall.ENXIO": "syscall",
- "syscall.EN_SW_CTL_INF": "syscall",
- "syscall.EN_SW_CTL_PREC": "syscall",
- "syscall.EN_SW_CTL_ROUND": "syscall",
- "syscall.EN_SW_DATACHAIN": "syscall",
- "syscall.EN_SW_DENORM": "syscall",
- "syscall.EN_SW_INVOP": "syscall",
- "syscall.EN_SW_OVERFLOW": "syscall",
- "syscall.EN_SW_PRECLOSS": "syscall",
- "syscall.EN_SW_UNDERFLOW": "syscall",
- "syscall.EN_SW_ZERODIV": "syscall",
- "syscall.EOPNOTSUPP": "syscall",
- "syscall.EOVERFLOW": "syscall",
- "syscall.EOWNERDEAD": "syscall",
- "syscall.EPERM": "syscall",
- "syscall.EPFNOSUPPORT": "syscall",
- "syscall.EPIPE": "syscall",
- "syscall.EPOLLERR": "syscall",
- "syscall.EPOLLET": "syscall",
- "syscall.EPOLLHUP": "syscall",
- "syscall.EPOLLIN": "syscall",
- "syscall.EPOLLMSG": "syscall",
- "syscall.EPOLLONESHOT": "syscall",
- "syscall.EPOLLOUT": "syscall",
- "syscall.EPOLLPRI": "syscall",
- "syscall.EPOLLRDBAND": "syscall",
- "syscall.EPOLLRDHUP": "syscall",
- "syscall.EPOLLRDNORM": "syscall",
- "syscall.EPOLLWRBAND": "syscall",
- "syscall.EPOLLWRNORM": "syscall",
- "syscall.EPOLL_CLOEXEC": "syscall",
- "syscall.EPOLL_CTL_ADD": "syscall",
- "syscall.EPOLL_CTL_DEL": "syscall",
- "syscall.EPOLL_CTL_MOD": "syscall",
- "syscall.EPOLL_NONBLOCK": "syscall",
- "syscall.EPROCLIM": "syscall",
- "syscall.EPROCUNAVAIL": "syscall",
- "syscall.EPROGMISMATCH": "syscall",
- "syscall.EPROGUNAVAIL": "syscall",
- "syscall.EPROTO": "syscall",
- "syscall.EPROTONOSUPPORT": "syscall",
- "syscall.EPROTOTYPE": "syscall",
- "syscall.EPWROFF": "syscall",
- "syscall.ERANGE": "syscall",
- "syscall.EREMCHG": "syscall",
- "syscall.EREMOTE": "syscall",
- "syscall.EREMOTEIO": "syscall",
- "syscall.ERESTART": "syscall",
- "syscall.ERFKILL": "syscall",
- "syscall.EROFS": "syscall",
- "syscall.ERPCMISMATCH": "syscall",
- "syscall.ERROR_ACCESS_DENIED": "syscall",
- "syscall.ERROR_ALREADY_EXISTS": "syscall",
- "syscall.ERROR_BROKEN_PIPE": "syscall",
- "syscall.ERROR_BUFFER_OVERFLOW": "syscall",
- "syscall.ERROR_ENVVAR_NOT_FOUND": "syscall",
- "syscall.ERROR_FILE_EXISTS": "syscall",
- "syscall.ERROR_FILE_NOT_FOUND": "syscall",
- "syscall.ERROR_HANDLE_EOF": "syscall",
- "syscall.ERROR_INSUFFICIENT_BUFFER": "syscall",
- "syscall.ERROR_IO_PENDING": "syscall",
- "syscall.ERROR_MOD_NOT_FOUND": "syscall",
- "syscall.ERROR_MORE_DATA": "syscall",
- "syscall.ERROR_NETNAME_DELETED": "syscall",
- "syscall.ERROR_NOT_FOUND": "syscall",
- "syscall.ERROR_NO_MORE_FILES": "syscall",
- "syscall.ERROR_OPERATION_ABORTED": "syscall",
- "syscall.ERROR_PATH_NOT_FOUND": "syscall",
- "syscall.ERROR_PROC_NOT_FOUND": "syscall",
- "syscall.ESHLIBVERS": "syscall",
- "syscall.ESHUTDOWN": "syscall",
- "syscall.ESOCKTNOSUPPORT": "syscall",
- "syscall.ESPIPE": "syscall",
- "syscall.ESRCH": "syscall",
- "syscall.ESRMNT": "syscall",
- "syscall.ESTALE": "syscall",
- "syscall.ESTRPIPE": "syscall",
- "syscall.ETHERCAP_JUMBO_MTU": "syscall",
- "syscall.ETHERCAP_VLAN_HWTAGGING": "syscall",
- "syscall.ETHERCAP_VLAN_MTU": "syscall",
- "syscall.ETHERMIN": "syscall",
- "syscall.ETHERMTU": "syscall",
- "syscall.ETHERMTU_JUMBO": "syscall",
- "syscall.ETHERTYPE_8023": "syscall",
- "syscall.ETHERTYPE_AARP": "syscall",
- "syscall.ETHERTYPE_ACCTON": "syscall",
- "syscall.ETHERTYPE_AEONIC": "syscall",
- "syscall.ETHERTYPE_ALPHA": "syscall",
- "syscall.ETHERTYPE_AMBER": "syscall",
- "syscall.ETHERTYPE_AMOEBA": "syscall",
- "syscall.ETHERTYPE_AOE": "syscall",
- "syscall.ETHERTYPE_APOLLO": "syscall",
- "syscall.ETHERTYPE_APOLLODOMAIN": "syscall",
- "syscall.ETHERTYPE_APPLETALK": "syscall",
- "syscall.ETHERTYPE_APPLITEK": "syscall",
- "syscall.ETHERTYPE_ARGONAUT": "syscall",
- "syscall.ETHERTYPE_ARP": "syscall",
- "syscall.ETHERTYPE_AT": "syscall",
- "syscall.ETHERTYPE_ATALK": "syscall",
- "syscall.ETHERTYPE_ATOMIC": "syscall",
- "syscall.ETHERTYPE_ATT": "syscall",
- "syscall.ETHERTYPE_ATTSTANFORD": "syscall",
- "syscall.ETHERTYPE_AUTOPHON": "syscall",
- "syscall.ETHERTYPE_AXIS": "syscall",
- "syscall.ETHERTYPE_BCLOOP": "syscall",
- "syscall.ETHERTYPE_BOFL": "syscall",
- "syscall.ETHERTYPE_CABLETRON": "syscall",
- "syscall.ETHERTYPE_CHAOS": "syscall",
- "syscall.ETHERTYPE_COMDESIGN": "syscall",
- "syscall.ETHERTYPE_COMPUGRAPHIC": "syscall",
- "syscall.ETHERTYPE_COUNTERPOINT": "syscall",
- "syscall.ETHERTYPE_CRONUS": "syscall",
- "syscall.ETHERTYPE_CRONUSVLN": "syscall",
- "syscall.ETHERTYPE_DCA": "syscall",
- "syscall.ETHERTYPE_DDE": "syscall",
- "syscall.ETHERTYPE_DEBNI": "syscall",
- "syscall.ETHERTYPE_DECAM": "syscall",
- "syscall.ETHERTYPE_DECCUST": "syscall",
- "syscall.ETHERTYPE_DECDIAG": "syscall",
- "syscall.ETHERTYPE_DECDNS": "syscall",
- "syscall.ETHERTYPE_DECDTS": "syscall",
- "syscall.ETHERTYPE_DECEXPER": "syscall",
- "syscall.ETHERTYPE_DECLAST": "syscall",
- "syscall.ETHERTYPE_DECLTM": "syscall",
- "syscall.ETHERTYPE_DECMUMPS": "syscall",
- "syscall.ETHERTYPE_DECNETBIOS": "syscall",
- "syscall.ETHERTYPE_DELTACON": "syscall",
- "syscall.ETHERTYPE_DIDDLE": "syscall",
- "syscall.ETHERTYPE_DLOG1": "syscall",
- "syscall.ETHERTYPE_DLOG2": "syscall",
- "syscall.ETHERTYPE_DN": "syscall",
- "syscall.ETHERTYPE_DOGFIGHT": "syscall",
- "syscall.ETHERTYPE_DSMD": "syscall",
- "syscall.ETHERTYPE_ECMA": "syscall",
- "syscall.ETHERTYPE_ENCRYPT": "syscall",
- "syscall.ETHERTYPE_ES": "syscall",
- "syscall.ETHERTYPE_EXCELAN": "syscall",
- "syscall.ETHERTYPE_EXPERDATA": "syscall",
- "syscall.ETHERTYPE_FLIP": "syscall",
- "syscall.ETHERTYPE_FLOWCONTROL": "syscall",
- "syscall.ETHERTYPE_FRARP": "syscall",
- "syscall.ETHERTYPE_GENDYN": "syscall",
- "syscall.ETHERTYPE_HAYES": "syscall",
- "syscall.ETHERTYPE_HIPPI_FP": "syscall",
- "syscall.ETHERTYPE_HITACHI": "syscall",
- "syscall.ETHERTYPE_HP": "syscall",
- "syscall.ETHERTYPE_IEEEPUP": "syscall",
- "syscall.ETHERTYPE_IEEEPUPAT": "syscall",
- "syscall.ETHERTYPE_IMLBL": "syscall",
- "syscall.ETHERTYPE_IMLBLDIAG": "syscall",
- "syscall.ETHERTYPE_IP": "syscall",
- "syscall.ETHERTYPE_IPAS": "syscall",
- "syscall.ETHERTYPE_IPV6": "syscall",
- "syscall.ETHERTYPE_IPX": "syscall",
- "syscall.ETHERTYPE_IPXNEW": "syscall",
- "syscall.ETHERTYPE_KALPANA": "syscall",
- "syscall.ETHERTYPE_LANBRIDGE": "syscall",
- "syscall.ETHERTYPE_LANPROBE": "syscall",
- "syscall.ETHERTYPE_LAT": "syscall",
- "syscall.ETHERTYPE_LBACK": "syscall",
- "syscall.ETHERTYPE_LITTLE": "syscall",
- "syscall.ETHERTYPE_LLDP": "syscall",
- "syscall.ETHERTYPE_LOGICRAFT": "syscall",
- "syscall.ETHERTYPE_LOOPBACK": "syscall",
- "syscall.ETHERTYPE_MATRA": "syscall",
- "syscall.ETHERTYPE_MAX": "syscall",
- "syscall.ETHERTYPE_MERIT": "syscall",
- "syscall.ETHERTYPE_MICP": "syscall",
- "syscall.ETHERTYPE_MOPDL": "syscall",
- "syscall.ETHERTYPE_MOPRC": "syscall",
- "syscall.ETHERTYPE_MOTOROLA": "syscall",
- "syscall.ETHERTYPE_MPLS": "syscall",
- "syscall.ETHERTYPE_MPLS_MCAST": "syscall",
- "syscall.ETHERTYPE_MUMPS": "syscall",
- "syscall.ETHERTYPE_NBPCC": "syscall",
- "syscall.ETHERTYPE_NBPCLAIM": "syscall",
- "syscall.ETHERTYPE_NBPCLREQ": "syscall",
- "syscall.ETHERTYPE_NBPCLRSP": "syscall",
- "syscall.ETHERTYPE_NBPCREQ": "syscall",
- "syscall.ETHERTYPE_NBPCRSP": "syscall",
- "syscall.ETHERTYPE_NBPDG": "syscall",
- "syscall.ETHERTYPE_NBPDGB": "syscall",
- "syscall.ETHERTYPE_NBPDLTE": "syscall",
- "syscall.ETHERTYPE_NBPRAR": "syscall",
- "syscall.ETHERTYPE_NBPRAS": "syscall",
- "syscall.ETHERTYPE_NBPRST": "syscall",
- "syscall.ETHERTYPE_NBPSCD": "syscall",
- "syscall.ETHERTYPE_NBPVCD": "syscall",
- "syscall.ETHERTYPE_NBS": "syscall",
- "syscall.ETHERTYPE_NCD": "syscall",
- "syscall.ETHERTYPE_NESTAR": "syscall",
- "syscall.ETHERTYPE_NETBEUI": "syscall",
- "syscall.ETHERTYPE_NOVELL": "syscall",
- "syscall.ETHERTYPE_NS": "syscall",
- "syscall.ETHERTYPE_NSAT": "syscall",
- "syscall.ETHERTYPE_NSCOMPAT": "syscall",
- "syscall.ETHERTYPE_NTRAILER": "syscall",
- "syscall.ETHERTYPE_OS9": "syscall",
- "syscall.ETHERTYPE_OS9NET": "syscall",
- "syscall.ETHERTYPE_PACER": "syscall",
- "syscall.ETHERTYPE_PAE": "syscall",
- "syscall.ETHERTYPE_PCS": "syscall",
- "syscall.ETHERTYPE_PLANNING": "syscall",
- "syscall.ETHERTYPE_PPP": "syscall",
- "syscall.ETHERTYPE_PPPOE": "syscall",
- "syscall.ETHERTYPE_PPPOEDISC": "syscall",
- "syscall.ETHERTYPE_PRIMENTS": "syscall",
- "syscall.ETHERTYPE_PUP": "syscall",
- "syscall.ETHERTYPE_PUPAT": "syscall",
- "syscall.ETHERTYPE_QINQ": "syscall",
- "syscall.ETHERTYPE_RACAL": "syscall",
- "syscall.ETHERTYPE_RATIONAL": "syscall",
- "syscall.ETHERTYPE_RAWFR": "syscall",
- "syscall.ETHERTYPE_RCL": "syscall",
- "syscall.ETHERTYPE_RDP": "syscall",
- "syscall.ETHERTYPE_RETIX": "syscall",
- "syscall.ETHERTYPE_REVARP": "syscall",
- "syscall.ETHERTYPE_SCA": "syscall",
- "syscall.ETHERTYPE_SECTRA": "syscall",
- "syscall.ETHERTYPE_SECUREDATA": "syscall",
- "syscall.ETHERTYPE_SGITW": "syscall",
- "syscall.ETHERTYPE_SG_BOUNCE": "syscall",
- "syscall.ETHERTYPE_SG_DIAG": "syscall",
- "syscall.ETHERTYPE_SG_NETGAMES": "syscall",
- "syscall.ETHERTYPE_SG_RESV": "syscall",
- "syscall.ETHERTYPE_SIMNET": "syscall",
- "syscall.ETHERTYPE_SLOW": "syscall",
- "syscall.ETHERTYPE_SLOWPROTOCOLS": "syscall",
- "syscall.ETHERTYPE_SNA": "syscall",
- "syscall.ETHERTYPE_SNMP": "syscall",
- "syscall.ETHERTYPE_SONIX": "syscall",
- "syscall.ETHERTYPE_SPIDER": "syscall",
- "syscall.ETHERTYPE_SPRITE": "syscall",
- "syscall.ETHERTYPE_STP": "syscall",
- "syscall.ETHERTYPE_TALARIS": "syscall",
- "syscall.ETHERTYPE_TALARISMC": "syscall",
- "syscall.ETHERTYPE_TCPCOMP": "syscall",
- "syscall.ETHERTYPE_TCPSM": "syscall",
- "syscall.ETHERTYPE_TEC": "syscall",
- "syscall.ETHERTYPE_TIGAN": "syscall",
- "syscall.ETHERTYPE_TRAIL": "syscall",
- "syscall.ETHERTYPE_TRANSETHER": "syscall",
- "syscall.ETHERTYPE_TYMSHARE": "syscall",
- "syscall.ETHERTYPE_UBBST": "syscall",
- "syscall.ETHERTYPE_UBDEBUG": "syscall",
- "syscall.ETHERTYPE_UBDIAGLOOP": "syscall",
- "syscall.ETHERTYPE_UBDL": "syscall",
- "syscall.ETHERTYPE_UBNIU": "syscall",
- "syscall.ETHERTYPE_UBNMC": "syscall",
- "syscall.ETHERTYPE_VALID": "syscall",
- "syscall.ETHERTYPE_VARIAN": "syscall",
- "syscall.ETHERTYPE_VAXELN": "syscall",
- "syscall.ETHERTYPE_VEECO": "syscall",
- "syscall.ETHERTYPE_VEXP": "syscall",
- "syscall.ETHERTYPE_VGLAB": "syscall",
- "syscall.ETHERTYPE_VINES": "syscall",
- "syscall.ETHERTYPE_VINESECHO": "syscall",
- "syscall.ETHERTYPE_VINESLOOP": "syscall",
- "syscall.ETHERTYPE_VITAL": "syscall",
- "syscall.ETHERTYPE_VLAN": "syscall",
- "syscall.ETHERTYPE_VLTLMAN": "syscall",
- "syscall.ETHERTYPE_VPROD": "syscall",
- "syscall.ETHERTYPE_VURESERVED": "syscall",
- "syscall.ETHERTYPE_WATERLOO": "syscall",
- "syscall.ETHERTYPE_WELLFLEET": "syscall",
- "syscall.ETHERTYPE_X25": "syscall",
- "syscall.ETHERTYPE_X75": "syscall",
- "syscall.ETHERTYPE_XNSSM": "syscall",
- "syscall.ETHERTYPE_XTP": "syscall",
- "syscall.ETHER_ADDR_LEN": "syscall",
- "syscall.ETHER_ALIGN": "syscall",
- "syscall.ETHER_CRC_LEN": "syscall",
- "syscall.ETHER_CRC_POLY_BE": "syscall",
- "syscall.ETHER_CRC_POLY_LE": "syscall",
- "syscall.ETHER_HDR_LEN": "syscall",
- "syscall.ETHER_MAX_DIX_LEN": "syscall",
- "syscall.ETHER_MAX_LEN": "syscall",
- "syscall.ETHER_MAX_LEN_JUMBO": "syscall",
- "syscall.ETHER_MIN_LEN": "syscall",
- "syscall.ETHER_PPPOE_ENCAP_LEN": "syscall",
- "syscall.ETHER_TYPE_LEN": "syscall",
- "syscall.ETHER_VLAN_ENCAP_LEN": "syscall",
- "syscall.ETH_P_1588": "syscall",
- "syscall.ETH_P_8021Q": "syscall",
- "syscall.ETH_P_802_2": "syscall",
- "syscall.ETH_P_802_3": "syscall",
- "syscall.ETH_P_AARP": "syscall",
- "syscall.ETH_P_ALL": "syscall",
- "syscall.ETH_P_AOE": "syscall",
- "syscall.ETH_P_ARCNET": "syscall",
- "syscall.ETH_P_ARP": "syscall",
- "syscall.ETH_P_ATALK": "syscall",
- "syscall.ETH_P_ATMFATE": "syscall",
- "syscall.ETH_P_ATMMPOA": "syscall",
- "syscall.ETH_P_AX25": "syscall",
- "syscall.ETH_P_BPQ": "syscall",
- "syscall.ETH_P_CAIF": "syscall",
- "syscall.ETH_P_CAN": "syscall",
- "syscall.ETH_P_CONTROL": "syscall",
- "syscall.ETH_P_CUST": "syscall",
- "syscall.ETH_P_DDCMP": "syscall",
- "syscall.ETH_P_DEC": "syscall",
- "syscall.ETH_P_DIAG": "syscall",
- "syscall.ETH_P_DNA_DL": "syscall",
- "syscall.ETH_P_DNA_RC": "syscall",
- "syscall.ETH_P_DNA_RT": "syscall",
- "syscall.ETH_P_DSA": "syscall",
- "syscall.ETH_P_ECONET": "syscall",
- "syscall.ETH_P_EDSA": "syscall",
- "syscall.ETH_P_FCOE": "syscall",
- "syscall.ETH_P_FIP": "syscall",
- "syscall.ETH_P_HDLC": "syscall",
- "syscall.ETH_P_IEEE802154": "syscall",
- "syscall.ETH_P_IEEEPUP": "syscall",
- "syscall.ETH_P_IEEEPUPAT": "syscall",
- "syscall.ETH_P_IP": "syscall",
- "syscall.ETH_P_IPV6": "syscall",
- "syscall.ETH_P_IPX": "syscall",
- "syscall.ETH_P_IRDA": "syscall",
- "syscall.ETH_P_LAT": "syscall",
- "syscall.ETH_P_LINK_CTL": "syscall",
- "syscall.ETH_P_LOCALTALK": "syscall",
- "syscall.ETH_P_LOOP": "syscall",
- "syscall.ETH_P_MOBITEX": "syscall",
- "syscall.ETH_P_MPLS_MC": "syscall",
- "syscall.ETH_P_MPLS_UC": "syscall",
- "syscall.ETH_P_PAE": "syscall",
- "syscall.ETH_P_PAUSE": "syscall",
- "syscall.ETH_P_PHONET": "syscall",
- "syscall.ETH_P_PPPTALK": "syscall",
- "syscall.ETH_P_PPP_DISC": "syscall",
- "syscall.ETH_P_PPP_MP": "syscall",
- "syscall.ETH_P_PPP_SES": "syscall",
- "syscall.ETH_P_PUP": "syscall",
- "syscall.ETH_P_PUPAT": "syscall",
- "syscall.ETH_P_RARP": "syscall",
- "syscall.ETH_P_SCA": "syscall",
- "syscall.ETH_P_SLOW": "syscall",
- "syscall.ETH_P_SNAP": "syscall",
- "syscall.ETH_P_TEB": "syscall",
- "syscall.ETH_P_TIPC": "syscall",
- "syscall.ETH_P_TRAILER": "syscall",
- "syscall.ETH_P_TR_802_2": "syscall",
- "syscall.ETH_P_WAN_PPP": "syscall",
- "syscall.ETH_P_WCCP": "syscall",
- "syscall.ETH_P_X25": "syscall",
- "syscall.ETIME": "syscall",
- "syscall.ETIMEDOUT": "syscall",
- "syscall.ETOOMANYREFS": "syscall",
- "syscall.ETXTBSY": "syscall",
- "syscall.EUCLEAN": "syscall",
- "syscall.EUNATCH": "syscall",
- "syscall.EUSERS": "syscall",
- "syscall.EVFILT_AIO": "syscall",
- "syscall.EVFILT_FS": "syscall",
- "syscall.EVFILT_LIO": "syscall",
- "syscall.EVFILT_MACHPORT": "syscall",
- "syscall.EVFILT_PROC": "syscall",
- "syscall.EVFILT_READ": "syscall",
- "syscall.EVFILT_SIGNAL": "syscall",
- "syscall.EVFILT_SYSCOUNT": "syscall",
- "syscall.EVFILT_THREADMARKER": "syscall",
- "syscall.EVFILT_TIMER": "syscall",
- "syscall.EVFILT_USER": "syscall",
- "syscall.EVFILT_VM": "syscall",
- "syscall.EVFILT_VNODE": "syscall",
- "syscall.EVFILT_WRITE": "syscall",
- "syscall.EV_ADD": "syscall",
- "syscall.EV_CLEAR": "syscall",
- "syscall.EV_DELETE": "syscall",
- "syscall.EV_DISABLE": "syscall",
- "syscall.EV_DISPATCH": "syscall",
- "syscall.EV_DROP": "syscall",
- "syscall.EV_ENABLE": "syscall",
- "syscall.EV_EOF": "syscall",
- "syscall.EV_ERROR": "syscall",
- "syscall.EV_FLAG0": "syscall",
- "syscall.EV_FLAG1": "syscall",
- "syscall.EV_ONESHOT": "syscall",
- "syscall.EV_OOBAND": "syscall",
- "syscall.EV_POLL": "syscall",
- "syscall.EV_RECEIPT": "syscall",
- "syscall.EV_SYSFLAGS": "syscall",
- "syscall.EWINDOWS": "syscall",
- "syscall.EWOULDBLOCK": "syscall",
- "syscall.EXDEV": "syscall",
- "syscall.EXFULL": "syscall",
- "syscall.EXTA": "syscall",
- "syscall.EXTB": "syscall",
- "syscall.EXTPROC": "syscall",
- "syscall.Environ": "syscall",
- "syscall.EpollCreate": "syscall",
- "syscall.EpollCreate1": "syscall",
- "syscall.EpollCtl": "syscall",
- "syscall.EpollEvent": "syscall",
- "syscall.EpollWait": "syscall",
- "syscall.Errno": "syscall",
- "syscall.EscapeArg": "syscall",
- "syscall.Exchangedata": "syscall",
- "syscall.Exec": "syscall",
- "syscall.Exit": "syscall",
- "syscall.ExitProcess": "syscall",
- "syscall.FD_CLOEXEC": "syscall",
- "syscall.FD_SETSIZE": "syscall",
- "syscall.FILE_ACTION_ADDED": "syscall",
- "syscall.FILE_ACTION_MODIFIED": "syscall",
- "syscall.FILE_ACTION_REMOVED": "syscall",
- "syscall.FILE_ACTION_RENAMED_NEW_NAME": "syscall",
- "syscall.FILE_ACTION_RENAMED_OLD_NAME": "syscall",
- "syscall.FILE_APPEND_DATA": "syscall",
- "syscall.FILE_ATTRIBUTE_ARCHIVE": "syscall",
- "syscall.FILE_ATTRIBUTE_DIRECTORY": "syscall",
- "syscall.FILE_ATTRIBUTE_HIDDEN": "syscall",
- "syscall.FILE_ATTRIBUTE_NORMAL": "syscall",
- "syscall.FILE_ATTRIBUTE_READONLY": "syscall",
- "syscall.FILE_ATTRIBUTE_SYSTEM": "syscall",
- "syscall.FILE_BEGIN": "syscall",
- "syscall.FILE_CURRENT": "syscall",
- "syscall.FILE_END": "syscall",
- "syscall.FILE_FLAG_BACKUP_SEMANTICS": "syscall",
- "syscall.FILE_FLAG_OVERLAPPED": "syscall",
- "syscall.FILE_LIST_DIRECTORY": "syscall",
- "syscall.FILE_MAP_COPY": "syscall",
- "syscall.FILE_MAP_EXECUTE": "syscall",
- "syscall.FILE_MAP_READ": "syscall",
- "syscall.FILE_MAP_WRITE": "syscall",
- "syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES": "syscall",
- "syscall.FILE_NOTIFY_CHANGE_CREATION": "syscall",
- "syscall.FILE_NOTIFY_CHANGE_DIR_NAME": "syscall",
- "syscall.FILE_NOTIFY_CHANGE_FILE_NAME": "syscall",
- "syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS": "syscall",
- "syscall.FILE_NOTIFY_CHANGE_LAST_WRITE": "syscall",
- "syscall.FILE_NOTIFY_CHANGE_SIZE": "syscall",
- "syscall.FILE_SHARE_DELETE": "syscall",
- "syscall.FILE_SHARE_READ": "syscall",
- "syscall.FILE_SHARE_WRITE": "syscall",
- "syscall.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS": "syscall",
- "syscall.FILE_SKIP_SET_EVENT_ON_HANDLE": "syscall",
- "syscall.FILE_TYPE_CHAR": "syscall",
- "syscall.FILE_TYPE_DISK": "syscall",
- "syscall.FILE_TYPE_PIPE": "syscall",
- "syscall.FILE_TYPE_REMOTE": "syscall",
- "syscall.FILE_TYPE_UNKNOWN": "syscall",
- "syscall.FILE_WRITE_ATTRIBUTES": "syscall",
- "syscall.FLUSHO": "syscall",
- "syscall.FORMAT_MESSAGE_ALLOCATE_BUFFER": "syscall",
- "syscall.FORMAT_MESSAGE_ARGUMENT_ARRAY": "syscall",
- "syscall.FORMAT_MESSAGE_FROM_HMODULE": "syscall",
- "syscall.FORMAT_MESSAGE_FROM_STRING": "syscall",
- "syscall.FORMAT_MESSAGE_FROM_SYSTEM": "syscall",
- "syscall.FORMAT_MESSAGE_IGNORE_INSERTS": "syscall",
- "syscall.FORMAT_MESSAGE_MAX_WIDTH_MASK": "syscall",
- "syscall.F_ADDFILESIGS": "syscall",
- "syscall.F_ADDSIGS": "syscall",
- "syscall.F_ALLOCATEALL": "syscall",
- "syscall.F_ALLOCATECONTIG": "syscall",
- "syscall.F_CANCEL": "syscall",
- "syscall.F_CHKCLEAN": "syscall",
- "syscall.F_CLOSEM": "syscall",
- "syscall.F_DUP2FD": "syscall",
- "syscall.F_DUP2FD_CLOEXEC": "syscall",
- "syscall.F_DUPFD": "syscall",
- "syscall.F_DUPFD_CLOEXEC": "syscall",
- "syscall.F_EXLCK": "syscall",
- "syscall.F_FLUSH_DATA": "syscall",
- "syscall.F_FREEZE_FS": "syscall",
- "syscall.F_FSCTL": "syscall",
- "syscall.F_FSDIRMASK": "syscall",
- "syscall.F_FSIN": "syscall",
- "syscall.F_FSINOUT": "syscall",
- "syscall.F_FSOUT": "syscall",
- "syscall.F_FSPRIV": "syscall",
- "syscall.F_FSVOID": "syscall",
- "syscall.F_FULLFSYNC": "syscall",
- "syscall.F_GETFD": "syscall",
- "syscall.F_GETFL": "syscall",
- "syscall.F_GETLEASE": "syscall",
- "syscall.F_GETLK": "syscall",
- "syscall.F_GETLK64": "syscall",
- "syscall.F_GETLKPID": "syscall",
- "syscall.F_GETNOSIGPIPE": "syscall",
- "syscall.F_GETOWN": "syscall",
- "syscall.F_GETOWN_EX": "syscall",
- "syscall.F_GETPATH": "syscall",
- "syscall.F_GETPATH_MTMINFO": "syscall",
- "syscall.F_GETPIPE_SZ": "syscall",
- "syscall.F_GETPROTECTIONCLASS": "syscall",
- "syscall.F_GETSIG": "syscall",
- "syscall.F_GLOBAL_NOCACHE": "syscall",
- "syscall.F_LOCK": "syscall",
- "syscall.F_LOG2PHYS": "syscall",
- "syscall.F_LOG2PHYS_EXT": "syscall",
- "syscall.F_MARKDEPENDENCY": "syscall",
- "syscall.F_MAXFD": "syscall",
- "syscall.F_NOCACHE": "syscall",
- "syscall.F_NODIRECT": "syscall",
- "syscall.F_NOTIFY": "syscall",
- "syscall.F_OGETLK": "syscall",
- "syscall.F_OK": "syscall",
- "syscall.F_OSETLK": "syscall",
- "syscall.F_OSETLKW": "syscall",
- "syscall.F_PARAM_MASK": "syscall",
- "syscall.F_PARAM_MAX": "syscall",
- "syscall.F_PATHPKG_CHECK": "syscall",
- "syscall.F_PEOFPOSMODE": "syscall",
- "syscall.F_PREALLOCATE": "syscall",
- "syscall.F_RDADVISE": "syscall",
- "syscall.F_RDAHEAD": "syscall",
- "syscall.F_RDLCK": "syscall",
- "syscall.F_READAHEAD": "syscall",
- "syscall.F_READBOOTSTRAP": "syscall",
- "syscall.F_SETBACKINGSTORE": "syscall",
- "syscall.F_SETFD": "syscall",
- "syscall.F_SETFL": "syscall",
- "syscall.F_SETLEASE": "syscall",
- "syscall.F_SETLK": "syscall",
- "syscall.F_SETLK64": "syscall",
- "syscall.F_SETLKW": "syscall",
- "syscall.F_SETLKW64": "syscall",
- "syscall.F_SETLK_REMOTE": "syscall",
- "syscall.F_SETNOSIGPIPE": "syscall",
- "syscall.F_SETOWN": "syscall",
- "syscall.F_SETOWN_EX": "syscall",
- "syscall.F_SETPIPE_SZ": "syscall",
- "syscall.F_SETPROTECTIONCLASS": "syscall",
- "syscall.F_SETSIG": "syscall",
- "syscall.F_SETSIZE": "syscall",
- "syscall.F_SHLCK": "syscall",
- "syscall.F_TEST": "syscall",
- "syscall.F_THAW_FS": "syscall",
- "syscall.F_TLOCK": "syscall",
- "syscall.F_ULOCK": "syscall",
- "syscall.F_UNLCK": "syscall",
- "syscall.F_UNLCKSYS": "syscall",
- "syscall.F_VOLPOSMODE": "syscall",
- "syscall.F_WRITEBOOTSTRAP": "syscall",
- "syscall.F_WRLCK": "syscall",
- "syscall.Faccessat": "syscall",
- "syscall.Fallocate": "syscall",
- "syscall.Fbootstraptransfer_t": "syscall",
- "syscall.Fchdir": "syscall",
- "syscall.Fchflags": "syscall",
- "syscall.Fchmod": "syscall",
- "syscall.Fchmodat": "syscall",
- "syscall.Fchown": "syscall",
- "syscall.Fchownat": "syscall",
- "syscall.FcntlFlock": "syscall",
- "syscall.FdSet": "syscall",
- "syscall.Fdatasync": "syscall",
- "syscall.FileNotifyInformation": "syscall",
- "syscall.Filetime": "syscall",
- "syscall.FindClose": "syscall",
- "syscall.FindFirstFile": "syscall",
- "syscall.FindNextFile": "syscall",
- "syscall.Flock": "syscall",
- "syscall.Flock_t": "syscall",
- "syscall.FlushBpf": "syscall",
- "syscall.FlushFileBuffers": "syscall",
- "syscall.FlushViewOfFile": "syscall",
- "syscall.ForkExec": "syscall",
- "syscall.ForkLock": "syscall",
- "syscall.FormatMessage": "syscall",
- "syscall.Fpathconf": "syscall",
- "syscall.FreeAddrInfoW": "syscall",
- "syscall.FreeEnvironmentStrings": "syscall",
- "syscall.FreeLibrary": "syscall",
- "syscall.Fsid": "syscall",
- "syscall.Fstat": "syscall",
- "syscall.Fstatfs": "syscall",
- "syscall.Fstore_t": "syscall",
- "syscall.Fsync": "syscall",
- "syscall.Ftruncate": "syscall",
- "syscall.Futimes": "syscall",
- "syscall.Futimesat": "syscall",
- "syscall.GENERIC_ALL": "syscall",
- "syscall.GENERIC_EXECUTE": "syscall",
- "syscall.GENERIC_READ": "syscall",
- "syscall.GENERIC_WRITE": "syscall",
- "syscall.GUID": "syscall",
- "syscall.GetAcceptExSockaddrs": "syscall",
- "syscall.GetAdaptersInfo": "syscall",
- "syscall.GetAddrInfoW": "syscall",
- "syscall.GetCommandLine": "syscall",
- "syscall.GetComputerName": "syscall",
- "syscall.GetConsoleMode": "syscall",
- "syscall.GetCurrentDirectory": "syscall",
- "syscall.GetCurrentProcess": "syscall",
- "syscall.GetEnvironmentStrings": "syscall",
- "syscall.GetEnvironmentVariable": "syscall",
- "syscall.GetExitCodeProcess": "syscall",
- "syscall.GetFileAttributes": "syscall",
- "syscall.GetFileAttributesEx": "syscall",
- "syscall.GetFileExInfoStandard": "syscall",
- "syscall.GetFileExMaxInfoLevel": "syscall",
- "syscall.GetFileInformationByHandle": "syscall",
- "syscall.GetFileType": "syscall",
- "syscall.GetFullPathName": "syscall",
- "syscall.GetHostByName": "syscall",
- "syscall.GetIfEntry": "syscall",
- "syscall.GetLastError": "syscall",
- "syscall.GetLengthSid": "syscall",
- "syscall.GetLongPathName": "syscall",
- "syscall.GetProcAddress": "syscall",
- "syscall.GetProcessTimes": "syscall",
- "syscall.GetProtoByName": "syscall",
- "syscall.GetQueuedCompletionStatus": "syscall",
- "syscall.GetServByName": "syscall",
- "syscall.GetShortPathName": "syscall",
- "syscall.GetStartupInfo": "syscall",
- "syscall.GetStdHandle": "syscall",
- "syscall.GetSystemTimeAsFileTime": "syscall",
- "syscall.GetTempPath": "syscall",
- "syscall.GetTimeZoneInformation": "syscall",
- "syscall.GetTokenInformation": "syscall",
- "syscall.GetUserNameEx": "syscall",
- "syscall.GetUserProfileDirectory": "syscall",
- "syscall.GetVersion": "syscall",
- "syscall.Getcwd": "syscall",
- "syscall.Getdents": "syscall",
- "syscall.Getdirentries": "syscall",
- "syscall.Getdtablesize": "syscall",
- "syscall.Getegid": "syscall",
- "syscall.Getenv": "syscall",
- "syscall.Geteuid": "syscall",
- "syscall.Getfsstat": "syscall",
- "syscall.Getgid": "syscall",
- "syscall.Getgroups": "syscall",
- "syscall.Getpagesize": "syscall",
- "syscall.Getpeername": "syscall",
- "syscall.Getpgid": "syscall",
- "syscall.Getpgrp": "syscall",
- "syscall.Getpid": "syscall",
- "syscall.Getppid": "syscall",
- "syscall.Getpriority": "syscall",
- "syscall.Getrlimit": "syscall",
- "syscall.Getrusage": "syscall",
- "syscall.Getsid": "syscall",
- "syscall.Getsockname": "syscall",
- "syscall.Getsockopt": "syscall",
- "syscall.GetsockoptByte": "syscall",
- "syscall.GetsockoptICMPv6Filter": "syscall",
- "syscall.GetsockoptIPMreq": "syscall",
- "syscall.GetsockoptIPMreqn": "syscall",
- "syscall.GetsockoptIPv6MTUInfo": "syscall",
- "syscall.GetsockoptIPv6Mreq": "syscall",
- "syscall.GetsockoptInet4Addr": "syscall",
- "syscall.GetsockoptInt": "syscall",
- "syscall.GetsockoptUcred": "syscall",
- "syscall.Gettid": "syscall",
- "syscall.Gettimeofday": "syscall",
- "syscall.Getuid": "syscall",
- "syscall.Getwd": "syscall",
- "syscall.Getxattr": "syscall",
- "syscall.HANDLE_FLAG_INHERIT": "syscall",
- "syscall.HKEY_CLASSES_ROOT": "syscall",
- "syscall.HKEY_CURRENT_CONFIG": "syscall",
- "syscall.HKEY_CURRENT_USER": "syscall",
- "syscall.HKEY_DYN_DATA": "syscall",
- "syscall.HKEY_LOCAL_MACHINE": "syscall",
- "syscall.HKEY_PERFORMANCE_DATA": "syscall",
- "syscall.HKEY_USERS": "syscall",
- "syscall.HUPCL": "syscall",
- "syscall.Handle": "syscall",
- "syscall.Hostent": "syscall",
- "syscall.ICANON": "syscall",
- "syscall.ICMP6_FILTER": "syscall",
- "syscall.ICMPV6_FILTER": "syscall",
- "syscall.ICMPv6Filter": "syscall",
- "syscall.ICRNL": "syscall",
- "syscall.IEXTEN": "syscall",
- "syscall.IFAN_ARRIVAL": "syscall",
- "syscall.IFAN_DEPARTURE": "syscall",
- "syscall.IFA_ADDRESS": "syscall",
- "syscall.IFA_ANYCAST": "syscall",
- "syscall.IFA_BROADCAST": "syscall",
- "syscall.IFA_CACHEINFO": "syscall",
- "syscall.IFA_F_DADFAILED": "syscall",
- "syscall.IFA_F_DEPRECATED": "syscall",
- "syscall.IFA_F_HOMEADDRESS": "syscall",
- "syscall.IFA_F_NODAD": "syscall",
- "syscall.IFA_F_OPTIMISTIC": "syscall",
- "syscall.IFA_F_PERMANENT": "syscall",
- "syscall.IFA_F_SECONDARY": "syscall",
- "syscall.IFA_F_TEMPORARY": "syscall",
- "syscall.IFA_F_TENTATIVE": "syscall",
- "syscall.IFA_LABEL": "syscall",
- "syscall.IFA_LOCAL": "syscall",
- "syscall.IFA_MAX": "syscall",
- "syscall.IFA_MULTICAST": "syscall",
- "syscall.IFA_ROUTE": "syscall",
- "syscall.IFA_UNSPEC": "syscall",
- "syscall.IFF_ALLMULTI": "syscall",
- "syscall.IFF_ALTPHYS": "syscall",
- "syscall.IFF_AUTOMEDIA": "syscall",
- "syscall.IFF_BROADCAST": "syscall",
- "syscall.IFF_CANTCHANGE": "syscall",
- "syscall.IFF_CANTCONFIG": "syscall",
- "syscall.IFF_DEBUG": "syscall",
- "syscall.IFF_DRV_OACTIVE": "syscall",
- "syscall.IFF_DRV_RUNNING": "syscall",
- "syscall.IFF_DYING": "syscall",
- "syscall.IFF_DYNAMIC": "syscall",
- "syscall.IFF_LINK0": "syscall",
- "syscall.IFF_LINK1": "syscall",
- "syscall.IFF_LINK2": "syscall",
- "syscall.IFF_LOOPBACK": "syscall",
- "syscall.IFF_MASTER": "syscall",
- "syscall.IFF_MONITOR": "syscall",
- "syscall.IFF_MULTICAST": "syscall",
- "syscall.IFF_NOARP": "syscall",
- "syscall.IFF_NOTRAILERS": "syscall",
- "syscall.IFF_NO_PI": "syscall",
- "syscall.IFF_OACTIVE": "syscall",
- "syscall.IFF_ONE_QUEUE": "syscall",
- "syscall.IFF_POINTOPOINT": "syscall",
- "syscall.IFF_POINTTOPOINT": "syscall",
- "syscall.IFF_PORTSEL": "syscall",
- "syscall.IFF_PPROMISC": "syscall",
- "syscall.IFF_PROMISC": "syscall",
- "syscall.IFF_RENAMING": "syscall",
- "syscall.IFF_RUNNING": "syscall",
- "syscall.IFF_SIMPLEX": "syscall",
- "syscall.IFF_SLAVE": "syscall",
- "syscall.IFF_SMART": "syscall",
- "syscall.IFF_STATICARP": "syscall",
- "syscall.IFF_TAP": "syscall",
- "syscall.IFF_TUN": "syscall",
- "syscall.IFF_TUN_EXCL": "syscall",
- "syscall.IFF_UP": "syscall",
- "syscall.IFF_VNET_HDR": "syscall",
- "syscall.IFLA_ADDRESS": "syscall",
- "syscall.IFLA_BROADCAST": "syscall",
- "syscall.IFLA_COST": "syscall",
- "syscall.IFLA_IFALIAS": "syscall",
- "syscall.IFLA_IFNAME": "syscall",
- "syscall.IFLA_LINK": "syscall",
- "syscall.IFLA_LINKINFO": "syscall",
- "syscall.IFLA_LINKMODE": "syscall",
- "syscall.IFLA_MAP": "syscall",
- "syscall.IFLA_MASTER": "syscall",
- "syscall.IFLA_MAX": "syscall",
- "syscall.IFLA_MTU": "syscall",
- "syscall.IFLA_NET_NS_PID": "syscall",
- "syscall.IFLA_OPERSTATE": "syscall",
- "syscall.IFLA_PRIORITY": "syscall",
- "syscall.IFLA_PROTINFO": "syscall",
- "syscall.IFLA_QDISC": "syscall",
- "syscall.IFLA_STATS": "syscall",
- "syscall.IFLA_TXQLEN": "syscall",
- "syscall.IFLA_UNSPEC": "syscall",
- "syscall.IFLA_WEIGHT": "syscall",
- "syscall.IFLA_WIRELESS": "syscall",
- "syscall.IFNAMSIZ": "syscall",
- "syscall.IFT_1822": "syscall",
- "syscall.IFT_A12MPPSWITCH": "syscall",
- "syscall.IFT_AAL2": "syscall",
- "syscall.IFT_AAL5": "syscall",
- "syscall.IFT_ADSL": "syscall",
- "syscall.IFT_AFLANE8023": "syscall",
- "syscall.IFT_AFLANE8025": "syscall",
- "syscall.IFT_ARAP": "syscall",
- "syscall.IFT_ARCNET": "syscall",
- "syscall.IFT_ARCNETPLUS": "syscall",
- "syscall.IFT_ASYNC": "syscall",
- "syscall.IFT_ATM": "syscall",
- "syscall.IFT_ATMDXI": "syscall",
- "syscall.IFT_ATMFUNI": "syscall",
- "syscall.IFT_ATMIMA": "syscall",
- "syscall.IFT_ATMLOGICAL": "syscall",
- "syscall.IFT_ATMRADIO": "syscall",
- "syscall.IFT_ATMSUBINTERFACE": "syscall",
- "syscall.IFT_ATMVCIENDPT": "syscall",
- "syscall.IFT_ATMVIRTUAL": "syscall",
- "syscall.IFT_BGPPOLICYACCOUNTING": "syscall",
- "syscall.IFT_BLUETOOTH": "syscall",
- "syscall.IFT_BRIDGE": "syscall",
- "syscall.IFT_BSC": "syscall",
- "syscall.IFT_CARP": "syscall",
- "syscall.IFT_CCTEMUL": "syscall",
- "syscall.IFT_CELLULAR": "syscall",
- "syscall.IFT_CEPT": "syscall",
- "syscall.IFT_CES": "syscall",
- "syscall.IFT_CHANNEL": "syscall",
- "syscall.IFT_CNR": "syscall",
- "syscall.IFT_COFFEE": "syscall",
- "syscall.IFT_COMPOSITELINK": "syscall",
- "syscall.IFT_DCN": "syscall",
- "syscall.IFT_DIGITALPOWERLINE": "syscall",
- "syscall.IFT_DIGITALWRAPPEROVERHEADCHANNEL": "syscall",
- "syscall.IFT_DLSW": "syscall",
- "syscall.IFT_DOCSCABLEDOWNSTREAM": "syscall",
- "syscall.IFT_DOCSCABLEMACLAYER": "syscall",
- "syscall.IFT_DOCSCABLEUPSTREAM": "syscall",
- "syscall.IFT_DOCSCABLEUPSTREAMCHANNEL": "syscall",
- "syscall.IFT_DS0": "syscall",
- "syscall.IFT_DS0BUNDLE": "syscall",
- "syscall.IFT_DS1FDL": "syscall",
- "syscall.IFT_DS3": "syscall",
- "syscall.IFT_DTM": "syscall",
- "syscall.IFT_DUMMY": "syscall",
- "syscall.IFT_DVBASILN": "syscall",
- "syscall.IFT_DVBASIOUT": "syscall",
- "syscall.IFT_DVBRCCDOWNSTREAM": "syscall",
- "syscall.IFT_DVBRCCMACLAYER": "syscall",
- "syscall.IFT_DVBRCCUPSTREAM": "syscall",
- "syscall.IFT_ECONET": "syscall",
- "syscall.IFT_ENC": "syscall",
- "syscall.IFT_EON": "syscall",
- "syscall.IFT_EPLRS": "syscall",
- "syscall.IFT_ESCON": "syscall",
- "syscall.IFT_ETHER": "syscall",
- "syscall.IFT_FAITH": "syscall",
- "syscall.IFT_FAST": "syscall",
- "syscall.IFT_FASTETHER": "syscall",
- "syscall.IFT_FASTETHERFX": "syscall",
- "syscall.IFT_FDDI": "syscall",
- "syscall.IFT_FIBRECHANNEL": "syscall",
- "syscall.IFT_FRAMERELAYINTERCONNECT": "syscall",
- "syscall.IFT_FRAMERELAYMPI": "syscall",
- "syscall.IFT_FRDLCIENDPT": "syscall",
- "syscall.IFT_FRELAY": "syscall",
- "syscall.IFT_FRELAYDCE": "syscall",
- "syscall.IFT_FRF16MFRBUNDLE": "syscall",
- "syscall.IFT_FRFORWARD": "syscall",
- "syscall.IFT_G703AT2MB": "syscall",
- "syscall.IFT_G703AT64K": "syscall",
- "syscall.IFT_GIF": "syscall",
- "syscall.IFT_GIGABITETHERNET": "syscall",
- "syscall.IFT_GR303IDT": "syscall",
- "syscall.IFT_GR303RDT": "syscall",
- "syscall.IFT_H323GATEKEEPER": "syscall",
- "syscall.IFT_H323PROXY": "syscall",
- "syscall.IFT_HDH1822": "syscall",
- "syscall.IFT_HDLC": "syscall",
- "syscall.IFT_HDSL2": "syscall",
- "syscall.IFT_HIPERLAN2": "syscall",
- "syscall.IFT_HIPPI": "syscall",
- "syscall.IFT_HIPPIINTERFACE": "syscall",
- "syscall.IFT_HOSTPAD": "syscall",
- "syscall.IFT_HSSI": "syscall",
- "syscall.IFT_HY": "syscall",
- "syscall.IFT_IBM370PARCHAN": "syscall",
- "syscall.IFT_IDSL": "syscall",
- "syscall.IFT_IEEE1394": "syscall",
- "syscall.IFT_IEEE80211": "syscall",
- "syscall.IFT_IEEE80212": "syscall",
- "syscall.IFT_IEEE8023ADLAG": "syscall",
- "syscall.IFT_IFGSN": "syscall",
- "syscall.IFT_IMT": "syscall",
- "syscall.IFT_INFINIBAND": "syscall",
- "syscall.IFT_INTERLEAVE": "syscall",
- "syscall.IFT_IP": "syscall",
- "syscall.IFT_IPFORWARD": "syscall",
- "syscall.IFT_IPOVERATM": "syscall",
- "syscall.IFT_IPOVERCDLC": "syscall",
- "syscall.IFT_IPOVERCLAW": "syscall",
- "syscall.IFT_IPSWITCH": "syscall",
- "syscall.IFT_IPXIP": "syscall",
- "syscall.IFT_ISDN": "syscall",
- "syscall.IFT_ISDNBASIC": "syscall",
- "syscall.IFT_ISDNPRIMARY": "syscall",
- "syscall.IFT_ISDNS": "syscall",
- "syscall.IFT_ISDNU": "syscall",
- "syscall.IFT_ISO88022LLC": "syscall",
- "syscall.IFT_ISO88023": "syscall",
- "syscall.IFT_ISO88024": "syscall",
- "syscall.IFT_ISO88025": "syscall",
- "syscall.IFT_ISO88025CRFPINT": "syscall",
- "syscall.IFT_ISO88025DTR": "syscall",
- "syscall.IFT_ISO88025FIBER": "syscall",
- "syscall.IFT_ISO88026": "syscall",
- "syscall.IFT_ISUP": "syscall",
- "syscall.IFT_L2VLAN": "syscall",
- "syscall.IFT_L3IPVLAN": "syscall",
- "syscall.IFT_L3IPXVLAN": "syscall",
- "syscall.IFT_LAPB": "syscall",
- "syscall.IFT_LAPD": "syscall",
- "syscall.IFT_LAPF": "syscall",
- "syscall.IFT_LINEGROUP": "syscall",
- "syscall.IFT_LOCALTALK": "syscall",
- "syscall.IFT_LOOP": "syscall",
- "syscall.IFT_MEDIAMAILOVERIP": "syscall",
- "syscall.IFT_MFSIGLINK": "syscall",
- "syscall.IFT_MIOX25": "syscall",
- "syscall.IFT_MODEM": "syscall",
- "syscall.IFT_MPC": "syscall",
- "syscall.IFT_MPLS": "syscall",
- "syscall.IFT_MPLSTUNNEL": "syscall",
- "syscall.IFT_MSDSL": "syscall",
- "syscall.IFT_MVL": "syscall",
- "syscall.IFT_MYRINET": "syscall",
- "syscall.IFT_NFAS": "syscall",
- "syscall.IFT_NSIP": "syscall",
- "syscall.IFT_OPTICALCHANNEL": "syscall",
- "syscall.IFT_OPTICALTRANSPORT": "syscall",
- "syscall.IFT_OTHER": "syscall",
- "syscall.IFT_P10": "syscall",
- "syscall.IFT_P80": "syscall",
- "syscall.IFT_PARA": "syscall",
- "syscall.IFT_PDP": "syscall",
- "syscall.IFT_PFLOG": "syscall",
- "syscall.IFT_PFLOW": "syscall",
- "syscall.IFT_PFSYNC": "syscall",
- "syscall.IFT_PLC": "syscall",
- "syscall.IFT_PON155": "syscall",
- "syscall.IFT_PON622": "syscall",
- "syscall.IFT_POS": "syscall",
- "syscall.IFT_PPP": "syscall",
- "syscall.IFT_PPPMULTILINKBUNDLE": "syscall",
- "syscall.IFT_PROPATM": "syscall",
- "syscall.IFT_PROPBWAP2MP": "syscall",
- "syscall.IFT_PROPCNLS": "syscall",
- "syscall.IFT_PROPDOCSWIRELESSDOWNSTREAM": "syscall",
- "syscall.IFT_PROPDOCSWIRELESSMACLAYER": "syscall",
- "syscall.IFT_PROPDOCSWIRELESSUPSTREAM": "syscall",
- "syscall.IFT_PROPMUX": "syscall",
- "syscall.IFT_PROPVIRTUAL": "syscall",
- "syscall.IFT_PROPWIRELESSP2P": "syscall",
- "syscall.IFT_PTPSERIAL": "syscall",
- "syscall.IFT_PVC": "syscall",
- "syscall.IFT_Q2931": "syscall",
- "syscall.IFT_QLLC": "syscall",
- "syscall.IFT_RADIOMAC": "syscall",
- "syscall.IFT_RADSL": "syscall",
- "syscall.IFT_REACHDSL": "syscall",
- "syscall.IFT_RFC1483": "syscall",
- "syscall.IFT_RS232": "syscall",
- "syscall.IFT_RSRB": "syscall",
- "syscall.IFT_SDLC": "syscall",
- "syscall.IFT_SDSL": "syscall",
- "syscall.IFT_SHDSL": "syscall",
- "syscall.IFT_SIP": "syscall",
- "syscall.IFT_SIPSIG": "syscall",
- "syscall.IFT_SIPTG": "syscall",
- "syscall.IFT_SLIP": "syscall",
- "syscall.IFT_SMDSDXI": "syscall",
- "syscall.IFT_SMDSICIP": "syscall",
- "syscall.IFT_SONET": "syscall",
- "syscall.IFT_SONETOVERHEADCHANNEL": "syscall",
- "syscall.IFT_SONETPATH": "syscall",
- "syscall.IFT_SONETVT": "syscall",
- "syscall.IFT_SRP": "syscall",
- "syscall.IFT_SS7SIGLINK": "syscall",
- "syscall.IFT_STACKTOSTACK": "syscall",
- "syscall.IFT_STARLAN": "syscall",
- "syscall.IFT_STF": "syscall",
- "syscall.IFT_T1": "syscall",
- "syscall.IFT_TDLC": "syscall",
- "syscall.IFT_TELINK": "syscall",
- "syscall.IFT_TERMPAD": "syscall",
- "syscall.IFT_TR008": "syscall",
- "syscall.IFT_TRANSPHDLC": "syscall",
- "syscall.IFT_TUNNEL": "syscall",
- "syscall.IFT_ULTRA": "syscall",
- "syscall.IFT_USB": "syscall",
- "syscall.IFT_V11": "syscall",
- "syscall.IFT_V35": "syscall",
- "syscall.IFT_V36": "syscall",
- "syscall.IFT_V37": "syscall",
- "syscall.IFT_VDSL": "syscall",
- "syscall.IFT_VIRTUALIPADDRESS": "syscall",
- "syscall.IFT_VIRTUALTG": "syscall",
- "syscall.IFT_VOICEDID": "syscall",
- "syscall.IFT_VOICEEM": "syscall",
- "syscall.IFT_VOICEEMFGD": "syscall",
- "syscall.IFT_VOICEENCAP": "syscall",
- "syscall.IFT_VOICEFGDEANA": "syscall",
- "syscall.IFT_VOICEFXO": "syscall",
- "syscall.IFT_VOICEFXS": "syscall",
- "syscall.IFT_VOICEOVERATM": "syscall",
- "syscall.IFT_VOICEOVERCABLE": "syscall",
- "syscall.IFT_VOICEOVERFRAMERELAY": "syscall",
- "syscall.IFT_VOICEOVERIP": "syscall",
- "syscall.IFT_X213": "syscall",
- "syscall.IFT_X25": "syscall",
- "syscall.IFT_X25DDN": "syscall",
- "syscall.IFT_X25HUNTGROUP": "syscall",
- "syscall.IFT_X25MLP": "syscall",
- "syscall.IFT_X25PLE": "syscall",
- "syscall.IFT_XETHER": "syscall",
- "syscall.IGNBRK": "syscall",
- "syscall.IGNCR": "syscall",
- "syscall.IGNORE": "syscall",
- "syscall.IGNPAR": "syscall",
- "syscall.IMAXBEL": "syscall",
- "syscall.INFINITE": "syscall",
- "syscall.INLCR": "syscall",
- "syscall.INPCK": "syscall",
- "syscall.INVALID_FILE_ATTRIBUTES": "syscall",
- "syscall.IN_ACCESS": "syscall",
- "syscall.IN_ALL_EVENTS": "syscall",
- "syscall.IN_ATTRIB": "syscall",
- "syscall.IN_CLASSA_HOST": "syscall",
- "syscall.IN_CLASSA_MAX": "syscall",
- "syscall.IN_CLASSA_NET": "syscall",
- "syscall.IN_CLASSA_NSHIFT": "syscall",
- "syscall.IN_CLASSB_HOST": "syscall",
- "syscall.IN_CLASSB_MAX": "syscall",
- "syscall.IN_CLASSB_NET": "syscall",
- "syscall.IN_CLASSB_NSHIFT": "syscall",
- "syscall.IN_CLASSC_HOST": "syscall",
- "syscall.IN_CLASSC_NET": "syscall",
- "syscall.IN_CLASSC_NSHIFT": "syscall",
- "syscall.IN_CLASSD_HOST": "syscall",
- "syscall.IN_CLASSD_NET": "syscall",
- "syscall.IN_CLASSD_NSHIFT": "syscall",
- "syscall.IN_CLOEXEC": "syscall",
- "syscall.IN_CLOSE": "syscall",
- "syscall.IN_CLOSE_NOWRITE": "syscall",
- "syscall.IN_CLOSE_WRITE": "syscall",
- "syscall.IN_CREATE": "syscall",
- "syscall.IN_DELETE": "syscall",
- "syscall.IN_DELETE_SELF": "syscall",
- "syscall.IN_DONT_FOLLOW": "syscall",
- "syscall.IN_EXCL_UNLINK": "syscall",
- "syscall.IN_IGNORED": "syscall",
- "syscall.IN_ISDIR": "syscall",
- "syscall.IN_LINKLOCALNETNUM": "syscall",
- "syscall.IN_LOOPBACKNET": "syscall",
- "syscall.IN_MASK_ADD": "syscall",
- "syscall.IN_MODIFY": "syscall",
- "syscall.IN_MOVE": "syscall",
- "syscall.IN_MOVED_FROM": "syscall",
- "syscall.IN_MOVED_TO": "syscall",
- "syscall.IN_MOVE_SELF": "syscall",
- "syscall.IN_NONBLOCK": "syscall",
- "syscall.IN_ONESHOT": "syscall",
- "syscall.IN_ONLYDIR": "syscall",
- "syscall.IN_OPEN": "syscall",
- "syscall.IN_Q_OVERFLOW": "syscall",
- "syscall.IN_RFC3021_HOST": "syscall",
- "syscall.IN_RFC3021_MASK": "syscall",
- "syscall.IN_RFC3021_NET": "syscall",
- "syscall.IN_RFC3021_NSHIFT": "syscall",
- "syscall.IN_UNMOUNT": "syscall",
- "syscall.IOC_IN": "syscall",
- "syscall.IOC_INOUT": "syscall",
- "syscall.IOC_OUT": "syscall",
- "syscall.IOC_VENDOR": "syscall",
- "syscall.IOC_WS2": "syscall",
- "syscall.IPMreq": "syscall",
- "syscall.IPMreqn": "syscall",
- "syscall.IPPROTO_3PC": "syscall",
- "syscall.IPPROTO_ADFS": "syscall",
- "syscall.IPPROTO_AH": "syscall",
- "syscall.IPPROTO_AHIP": "syscall",
- "syscall.IPPROTO_APES": "syscall",
- "syscall.IPPROTO_ARGUS": "syscall",
- "syscall.IPPROTO_AX25": "syscall",
- "syscall.IPPROTO_BHA": "syscall",
- "syscall.IPPROTO_BLT": "syscall",
- "syscall.IPPROTO_BRSATMON": "syscall",
- "syscall.IPPROTO_CARP": "syscall",
- "syscall.IPPROTO_CFTP": "syscall",
- "syscall.IPPROTO_CHAOS": "syscall",
- "syscall.IPPROTO_CMTP": "syscall",
- "syscall.IPPROTO_COMP": "syscall",
- "syscall.IPPROTO_CPHB": "syscall",
- "syscall.IPPROTO_CPNX": "syscall",
- "syscall.IPPROTO_DCCP": "syscall",
- "syscall.IPPROTO_DDP": "syscall",
- "syscall.IPPROTO_DGP": "syscall",
- "syscall.IPPROTO_DIVERT": "syscall",
- "syscall.IPPROTO_DIVERT_INIT": "syscall",
- "syscall.IPPROTO_DIVERT_RESP": "syscall",
- "syscall.IPPROTO_DONE": "syscall",
- "syscall.IPPROTO_DSTOPTS": "syscall",
- "syscall.IPPROTO_EGP": "syscall",
- "syscall.IPPROTO_EMCON": "syscall",
- "syscall.IPPROTO_ENCAP": "syscall",
- "syscall.IPPROTO_EON": "syscall",
- "syscall.IPPROTO_ESP": "syscall",
- "syscall.IPPROTO_ETHERIP": "syscall",
- "syscall.IPPROTO_FRAGMENT": "syscall",
- "syscall.IPPROTO_GGP": "syscall",
- "syscall.IPPROTO_GMTP": "syscall",
- "syscall.IPPROTO_GRE": "syscall",
- "syscall.IPPROTO_HELLO": "syscall",
- "syscall.IPPROTO_HMP": "syscall",
- "syscall.IPPROTO_HOPOPTS": "syscall",
- "syscall.IPPROTO_ICMP": "syscall",
- "syscall.IPPROTO_ICMPV6": "syscall",
- "syscall.IPPROTO_IDP": "syscall",
- "syscall.IPPROTO_IDPR": "syscall",
- "syscall.IPPROTO_IDRP": "syscall",
- "syscall.IPPROTO_IGMP": "syscall",
- "syscall.IPPROTO_IGP": "syscall",
- "syscall.IPPROTO_IGRP": "syscall",
- "syscall.IPPROTO_IL": "syscall",
- "syscall.IPPROTO_INLSP": "syscall",
- "syscall.IPPROTO_INP": "syscall",
- "syscall.IPPROTO_IP": "syscall",
- "syscall.IPPROTO_IPCOMP": "syscall",
- "syscall.IPPROTO_IPCV": "syscall",
- "syscall.IPPROTO_IPEIP": "syscall",
- "syscall.IPPROTO_IPIP": "syscall",
- "syscall.IPPROTO_IPPC": "syscall",
- "syscall.IPPROTO_IPV4": "syscall",
- "syscall.IPPROTO_IPV6": "syscall",
- "syscall.IPPROTO_IPV6_ICMP": "syscall",
- "syscall.IPPROTO_IRTP": "syscall",
- "syscall.IPPROTO_KRYPTOLAN": "syscall",
- "syscall.IPPROTO_LARP": "syscall",
- "syscall.IPPROTO_LEAF1": "syscall",
- "syscall.IPPROTO_LEAF2": "syscall",
- "syscall.IPPROTO_MAX": "syscall",
- "syscall.IPPROTO_MAXID": "syscall",
- "syscall.IPPROTO_MEAS": "syscall",
- "syscall.IPPROTO_MH": "syscall",
- "syscall.IPPROTO_MHRP": "syscall",
- "syscall.IPPROTO_MICP": "syscall",
- "syscall.IPPROTO_MOBILE": "syscall",
- "syscall.IPPROTO_MPLS": "syscall",
- "syscall.IPPROTO_MTP": "syscall",
- "syscall.IPPROTO_MUX": "syscall",
- "syscall.IPPROTO_ND": "syscall",
- "syscall.IPPROTO_NHRP": "syscall",
- "syscall.IPPROTO_NONE": "syscall",
- "syscall.IPPROTO_NSP": "syscall",
- "syscall.IPPROTO_NVPII": "syscall",
- "syscall.IPPROTO_OLD_DIVERT": "syscall",
- "syscall.IPPROTO_OSPFIGP": "syscall",
- "syscall.IPPROTO_PFSYNC": "syscall",
- "syscall.IPPROTO_PGM": "syscall",
- "syscall.IPPROTO_PIGP": "syscall",
- "syscall.IPPROTO_PIM": "syscall",
- "syscall.IPPROTO_PRM": "syscall",
- "syscall.IPPROTO_PUP": "syscall",
- "syscall.IPPROTO_PVP": "syscall",
- "syscall.IPPROTO_RAW": "syscall",
- "syscall.IPPROTO_RCCMON": "syscall",
- "syscall.IPPROTO_RDP": "syscall",
- "syscall.IPPROTO_ROUTING": "syscall",
- "syscall.IPPROTO_RSVP": "syscall",
- "syscall.IPPROTO_RVD": "syscall",
- "syscall.IPPROTO_SATEXPAK": "syscall",
- "syscall.IPPROTO_SATMON": "syscall",
- "syscall.IPPROTO_SCCSP": "syscall",
- "syscall.IPPROTO_SCTP": "syscall",
- "syscall.IPPROTO_SDRP": "syscall",
- "syscall.IPPROTO_SEND": "syscall",
- "syscall.IPPROTO_SEP": "syscall",
- "syscall.IPPROTO_SKIP": "syscall",
- "syscall.IPPROTO_SPACER": "syscall",
- "syscall.IPPROTO_SRPC": "syscall",
- "syscall.IPPROTO_ST": "syscall",
- "syscall.IPPROTO_SVMTP": "syscall",
- "syscall.IPPROTO_SWIPE": "syscall",
- "syscall.IPPROTO_TCF": "syscall",
- "syscall.IPPROTO_TCP": "syscall",
- "syscall.IPPROTO_TLSP": "syscall",
- "syscall.IPPROTO_TP": "syscall",
- "syscall.IPPROTO_TPXX": "syscall",
- "syscall.IPPROTO_TRUNK1": "syscall",
- "syscall.IPPROTO_TRUNK2": "syscall",
- "syscall.IPPROTO_TTP": "syscall",
- "syscall.IPPROTO_UDP": "syscall",
- "syscall.IPPROTO_UDPLITE": "syscall",
- "syscall.IPPROTO_VINES": "syscall",
- "syscall.IPPROTO_VISA": "syscall",
- "syscall.IPPROTO_VMTP": "syscall",
- "syscall.IPPROTO_VRRP": "syscall",
- "syscall.IPPROTO_WBEXPAK": "syscall",
- "syscall.IPPROTO_WBMON": "syscall",
- "syscall.IPPROTO_WSN": "syscall",
- "syscall.IPPROTO_XNET": "syscall",
- "syscall.IPPROTO_XTP": "syscall",
- "syscall.IPV6_2292DSTOPTS": "syscall",
- "syscall.IPV6_2292HOPLIMIT": "syscall",
- "syscall.IPV6_2292HOPOPTS": "syscall",
- "syscall.IPV6_2292NEXTHOP": "syscall",
- "syscall.IPV6_2292PKTINFO": "syscall",
- "syscall.IPV6_2292PKTOPTIONS": "syscall",
- "syscall.IPV6_2292RTHDR": "syscall",
- "syscall.IPV6_ADDRFORM": "syscall",
- "syscall.IPV6_ADD_MEMBERSHIP": "syscall",
- "syscall.IPV6_AUTHHDR": "syscall",
- "syscall.IPV6_AUTH_LEVEL": "syscall",
- "syscall.IPV6_AUTOFLOWLABEL": "syscall",
- "syscall.IPV6_BINDANY": "syscall",
- "syscall.IPV6_BINDV6ONLY": "syscall",
- "syscall.IPV6_BOUND_IF": "syscall",
- "syscall.IPV6_CHECKSUM": "syscall",
- "syscall.IPV6_DEFAULT_MULTICAST_HOPS": "syscall",
- "syscall.IPV6_DEFAULT_MULTICAST_LOOP": "syscall",
- "syscall.IPV6_DEFHLIM": "syscall",
- "syscall.IPV6_DONTFRAG": "syscall",
- "syscall.IPV6_DROP_MEMBERSHIP": "syscall",
- "syscall.IPV6_DSTOPTS": "syscall",
- "syscall.IPV6_ESP_NETWORK_LEVEL": "syscall",
- "syscall.IPV6_ESP_TRANS_LEVEL": "syscall",
- "syscall.IPV6_FAITH": "syscall",
- "syscall.IPV6_FLOWINFO_MASK": "syscall",
- "syscall.IPV6_FLOWLABEL_MASK": "syscall",
- "syscall.IPV6_FRAGTTL": "syscall",
- "syscall.IPV6_FW_ADD": "syscall",
- "syscall.IPV6_FW_DEL": "syscall",
- "syscall.IPV6_FW_FLUSH": "syscall",
- "syscall.IPV6_FW_GET": "syscall",
- "syscall.IPV6_FW_ZERO": "syscall",
- "syscall.IPV6_HLIMDEC": "syscall",
- "syscall.IPV6_HOPLIMIT": "syscall",
- "syscall.IPV6_HOPOPTS": "syscall",
- "syscall.IPV6_IPCOMP_LEVEL": "syscall",
- "syscall.IPV6_IPSEC_POLICY": "syscall",
- "syscall.IPV6_JOIN_ANYCAST": "syscall",
- "syscall.IPV6_JOIN_GROUP": "syscall",
- "syscall.IPV6_LEAVE_ANYCAST": "syscall",
- "syscall.IPV6_LEAVE_GROUP": "syscall",
- "syscall.IPV6_MAXHLIM": "syscall",
- "syscall.IPV6_MAXOPTHDR": "syscall",
- "syscall.IPV6_MAXPACKET": "syscall",
- "syscall.IPV6_MAX_GROUP_SRC_FILTER": "syscall",
- "syscall.IPV6_MAX_MEMBERSHIPS": "syscall",
- "syscall.IPV6_MAX_SOCK_SRC_FILTER": "syscall",
- "syscall.IPV6_MIN_MEMBERSHIPS": "syscall",
- "syscall.IPV6_MMTU": "syscall",
- "syscall.IPV6_MSFILTER": "syscall",
- "syscall.IPV6_MTU": "syscall",
- "syscall.IPV6_MTU_DISCOVER": "syscall",
- "syscall.IPV6_MULTICAST_HOPS": "syscall",
- "syscall.IPV6_MULTICAST_IF": "syscall",
- "syscall.IPV6_MULTICAST_LOOP": "syscall",
- "syscall.IPV6_NEXTHOP": "syscall",
- "syscall.IPV6_OPTIONS": "syscall",
- "syscall.IPV6_PATHMTU": "syscall",
- "syscall.IPV6_PIPEX": "syscall",
- "syscall.IPV6_PKTINFO": "syscall",
- "syscall.IPV6_PMTUDISC_DO": "syscall",
- "syscall.IPV6_PMTUDISC_DONT": "syscall",
- "syscall.IPV6_PMTUDISC_PROBE": "syscall",
- "syscall.IPV6_PMTUDISC_WANT": "syscall",
- "syscall.IPV6_PORTRANGE": "syscall",
- "syscall.IPV6_PORTRANGE_DEFAULT": "syscall",
- "syscall.IPV6_PORTRANGE_HIGH": "syscall",
- "syscall.IPV6_PORTRANGE_LOW": "syscall",
- "syscall.IPV6_PREFER_TEMPADDR": "syscall",
- "syscall.IPV6_RECVDSTOPTS": "syscall",
- "syscall.IPV6_RECVDSTPORT": "syscall",
- "syscall.IPV6_RECVERR": "syscall",
- "syscall.IPV6_RECVHOPLIMIT": "syscall",
- "syscall.IPV6_RECVHOPOPTS": "syscall",
- "syscall.IPV6_RECVPATHMTU": "syscall",
- "syscall.IPV6_RECVPKTINFO": "syscall",
- "syscall.IPV6_RECVRTHDR": "syscall",
- "syscall.IPV6_RECVTCLASS": "syscall",
- "syscall.IPV6_ROUTER_ALERT": "syscall",
- "syscall.IPV6_RTABLE": "syscall",
- "syscall.IPV6_RTHDR": "syscall",
- "syscall.IPV6_RTHDRDSTOPTS": "syscall",
- "syscall.IPV6_RTHDR_LOOSE": "syscall",
- "syscall.IPV6_RTHDR_STRICT": "syscall",
- "syscall.IPV6_RTHDR_TYPE_0": "syscall",
- "syscall.IPV6_RXDSTOPTS": "syscall",
- "syscall.IPV6_RXHOPOPTS": "syscall",
- "syscall.IPV6_SOCKOPT_RESERVED1": "syscall",
- "syscall.IPV6_TCLASS": "syscall",
- "syscall.IPV6_UNICAST_HOPS": "syscall",
- "syscall.IPV6_USE_MIN_MTU": "syscall",
- "syscall.IPV6_V6ONLY": "syscall",
- "syscall.IPV6_VERSION": "syscall",
- "syscall.IPV6_VERSION_MASK": "syscall",
- "syscall.IPV6_XFRM_POLICY": "syscall",
- "syscall.IP_ADD_MEMBERSHIP": "syscall",
- "syscall.IP_ADD_SOURCE_MEMBERSHIP": "syscall",
- "syscall.IP_AUTH_LEVEL": "syscall",
- "syscall.IP_BINDANY": "syscall",
- "syscall.IP_BLOCK_SOURCE": "syscall",
- "syscall.IP_BOUND_IF": "syscall",
- "syscall.IP_DEFAULT_MULTICAST_LOOP": "syscall",
- "syscall.IP_DEFAULT_MULTICAST_TTL": "syscall",
- "syscall.IP_DF": "syscall",
- "syscall.IP_DIVERTFL": "syscall",
- "syscall.IP_DONTFRAG": "syscall",
- "syscall.IP_DROP_MEMBERSHIP": "syscall",
- "syscall.IP_DROP_SOURCE_MEMBERSHIP": "syscall",
- "syscall.IP_DUMMYNET3": "syscall",
- "syscall.IP_DUMMYNET_CONFIGURE": "syscall",
- "syscall.IP_DUMMYNET_DEL": "syscall",
- "syscall.IP_DUMMYNET_FLUSH": "syscall",
- "syscall.IP_DUMMYNET_GET": "syscall",
- "syscall.IP_EF": "syscall",
- "syscall.IP_ERRORMTU": "syscall",
- "syscall.IP_ESP_NETWORK_LEVEL": "syscall",
- "syscall.IP_ESP_TRANS_LEVEL": "syscall",
- "syscall.IP_FAITH": "syscall",
- "syscall.IP_FREEBIND": "syscall",
- "syscall.IP_FW3": "syscall",
- "syscall.IP_FW_ADD": "syscall",
- "syscall.IP_FW_DEL": "syscall",
- "syscall.IP_FW_FLUSH": "syscall",
- "syscall.IP_FW_GET": "syscall",
- "syscall.IP_FW_NAT_CFG": "syscall",
- "syscall.IP_FW_NAT_DEL": "syscall",
- "syscall.IP_FW_NAT_GET_CONFIG": "syscall",
- "syscall.IP_FW_NAT_GET_LOG": "syscall",
- "syscall.IP_FW_RESETLOG": "syscall",
- "syscall.IP_FW_TABLE_ADD": "syscall",
- "syscall.IP_FW_TABLE_DEL": "syscall",
- "syscall.IP_FW_TABLE_FLUSH": "syscall",
- "syscall.IP_FW_TABLE_GETSIZE": "syscall",
- "syscall.IP_FW_TABLE_LIST": "syscall",
- "syscall.IP_FW_ZERO": "syscall",
- "syscall.IP_HDRINCL": "syscall",
- "syscall.IP_IPCOMP_LEVEL": "syscall",
- "syscall.IP_IPSECFLOWINFO": "syscall",
- "syscall.IP_IPSEC_LOCAL_AUTH": "syscall",
- "syscall.IP_IPSEC_LOCAL_CRED": "syscall",
- "syscall.IP_IPSEC_LOCAL_ID": "syscall",
- "syscall.IP_IPSEC_POLICY": "syscall",
- "syscall.IP_IPSEC_REMOTE_AUTH": "syscall",
- "syscall.IP_IPSEC_REMOTE_CRED": "syscall",
- "syscall.IP_IPSEC_REMOTE_ID": "syscall",
- "syscall.IP_MAXPACKET": "syscall",
- "syscall.IP_MAX_GROUP_SRC_FILTER": "syscall",
- "syscall.IP_MAX_MEMBERSHIPS": "syscall",
- "syscall.IP_MAX_SOCK_MUTE_FILTER": "syscall",
- "syscall.IP_MAX_SOCK_SRC_FILTER": "syscall",
- "syscall.IP_MAX_SOURCE_FILTER": "syscall",
- "syscall.IP_MF": "syscall",
- "syscall.IP_MINFRAGSIZE": "syscall",
- "syscall.IP_MINTTL": "syscall",
- "syscall.IP_MIN_MEMBERSHIPS": "syscall",
- "syscall.IP_MSFILTER": "syscall",
- "syscall.IP_MSS": "syscall",
- "syscall.IP_MTU": "syscall",
- "syscall.IP_MTU_DISCOVER": "syscall",
- "syscall.IP_MULTICAST_IF": "syscall",
- "syscall.IP_MULTICAST_IFINDEX": "syscall",
- "syscall.IP_MULTICAST_LOOP": "syscall",
- "syscall.IP_MULTICAST_TTL": "syscall",
- "syscall.IP_MULTICAST_VIF": "syscall",
- "syscall.IP_NAT__XXX": "syscall",
- "syscall.IP_OFFMASK": "syscall",
- "syscall.IP_OLD_FW_ADD": "syscall",
- "syscall.IP_OLD_FW_DEL": "syscall",
- "syscall.IP_OLD_FW_FLUSH": "syscall",
- "syscall.IP_OLD_FW_GET": "syscall",
- "syscall.IP_OLD_FW_RESETLOG": "syscall",
- "syscall.IP_OLD_FW_ZERO": "syscall",
- "syscall.IP_ONESBCAST": "syscall",
- "syscall.IP_OPTIONS": "syscall",
- "syscall.IP_ORIGDSTADDR": "syscall",
- "syscall.IP_PASSSEC": "syscall",
- "syscall.IP_PIPEX": "syscall",
- "syscall.IP_PKTINFO": "syscall",
- "syscall.IP_PKTOPTIONS": "syscall",
- "syscall.IP_PMTUDISC": "syscall",
- "syscall.IP_PMTUDISC_DO": "syscall",
- "syscall.IP_PMTUDISC_DONT": "syscall",
- "syscall.IP_PMTUDISC_PROBE": "syscall",
- "syscall.IP_PMTUDISC_WANT": "syscall",
- "syscall.IP_PORTRANGE": "syscall",
- "syscall.IP_PORTRANGE_DEFAULT": "syscall",
- "syscall.IP_PORTRANGE_HIGH": "syscall",
- "syscall.IP_PORTRANGE_LOW": "syscall",
- "syscall.IP_RECVDSTADDR": "syscall",
- "syscall.IP_RECVDSTPORT": "syscall",
- "syscall.IP_RECVERR": "syscall",
- "syscall.IP_RECVIF": "syscall",
- "syscall.IP_RECVOPTS": "syscall",
- "syscall.IP_RECVORIGDSTADDR": "syscall",
- "syscall.IP_RECVPKTINFO": "syscall",
- "syscall.IP_RECVRETOPTS": "syscall",
- "syscall.IP_RECVRTABLE": "syscall",
- "syscall.IP_RECVTOS": "syscall",
- "syscall.IP_RECVTTL": "syscall",
- "syscall.IP_RETOPTS": "syscall",
- "syscall.IP_RF": "syscall",
- "syscall.IP_ROUTER_ALERT": "syscall",
- "syscall.IP_RSVP_OFF": "syscall",
- "syscall.IP_RSVP_ON": "syscall",
- "syscall.IP_RSVP_VIF_OFF": "syscall",
- "syscall.IP_RSVP_VIF_ON": "syscall",
- "syscall.IP_RTABLE": "syscall",
- "syscall.IP_SENDSRCADDR": "syscall",
- "syscall.IP_STRIPHDR": "syscall",
- "syscall.IP_TOS": "syscall",
- "syscall.IP_TRAFFIC_MGT_BACKGROUND": "syscall",
- "syscall.IP_TRANSPARENT": "syscall",
- "syscall.IP_TTL": "syscall",
- "syscall.IP_UNBLOCK_SOURCE": "syscall",
- "syscall.IP_XFRM_POLICY": "syscall",
- "syscall.IPv6MTUInfo": "syscall",
- "syscall.IPv6Mreq": "syscall",
- "syscall.ISIG": "syscall",
- "syscall.ISTRIP": "syscall",
- "syscall.IUCLC": "syscall",
- "syscall.IUTF8": "syscall",
- "syscall.IXANY": "syscall",
- "syscall.IXOFF": "syscall",
- "syscall.IXON": "syscall",
- "syscall.IfAddrmsg": "syscall",
- "syscall.IfAnnounceMsghdr": "syscall",
- "syscall.IfData": "syscall",
- "syscall.IfInfomsg": "syscall",
- "syscall.IfMsghdr": "syscall",
- "syscall.IfaMsghdr": "syscall",
- "syscall.IfmaMsghdr": "syscall",
- "syscall.IfmaMsghdr2": "syscall",
- "syscall.ImplementsGetwd": "syscall",
- "syscall.Inet4Pktinfo": "syscall",
- "syscall.Inet6Pktinfo": "syscall",
- "syscall.InotifyAddWatch": "syscall",
- "syscall.InotifyEvent": "syscall",
- "syscall.InotifyInit": "syscall",
- "syscall.InotifyInit1": "syscall",
- "syscall.InotifyRmWatch": "syscall",
- "syscall.InterfaceAddrMessage": "syscall",
- "syscall.InterfaceAnnounceMessage": "syscall",
- "syscall.InterfaceInfo": "syscall",
- "syscall.InterfaceMessage": "syscall",
- "syscall.InterfaceMulticastAddrMessage": "syscall",
- "syscall.InvalidHandle": "syscall",
- "syscall.Ioperm": "syscall",
- "syscall.Iopl": "syscall",
- "syscall.Iovec": "syscall",
- "syscall.IpAdapterInfo": "syscall",
- "syscall.IpAddrString": "syscall",
- "syscall.IpAddressString": "syscall",
- "syscall.IpMaskString": "syscall",
- "syscall.Issetugid": "syscall",
- "syscall.KEY_ALL_ACCESS": "syscall",
- "syscall.KEY_CREATE_LINK": "syscall",
- "syscall.KEY_CREATE_SUB_KEY": "syscall",
- "syscall.KEY_ENUMERATE_SUB_KEYS": "syscall",
- "syscall.KEY_EXECUTE": "syscall",
- "syscall.KEY_NOTIFY": "syscall",
- "syscall.KEY_QUERY_VALUE": "syscall",
- "syscall.KEY_READ": "syscall",
- "syscall.KEY_SET_VALUE": "syscall",
- "syscall.KEY_WOW64_32KEY": "syscall",
- "syscall.KEY_WOW64_64KEY": "syscall",
- "syscall.KEY_WRITE": "syscall",
- "syscall.Kevent": "syscall",
- "syscall.Kevent_t": "syscall",
- "syscall.Kill": "syscall",
- "syscall.Klogctl": "syscall",
- "syscall.Kqueue": "syscall",
- "syscall.LANG_ENGLISH": "syscall",
- "syscall.LAYERED_PROTOCOL": "syscall",
- "syscall.LCNT_OVERLOAD_FLUSH": "syscall",
- "syscall.LINUX_REBOOT_CMD_CAD_OFF": "syscall",
- "syscall.LINUX_REBOOT_CMD_CAD_ON": "syscall",
- "syscall.LINUX_REBOOT_CMD_HALT": "syscall",
- "syscall.LINUX_REBOOT_CMD_KEXEC": "syscall",
- "syscall.LINUX_REBOOT_CMD_POWER_OFF": "syscall",
- "syscall.LINUX_REBOOT_CMD_RESTART": "syscall",
- "syscall.LINUX_REBOOT_CMD_RESTART2": "syscall",
- "syscall.LINUX_REBOOT_CMD_SW_SUSPEND": "syscall",
- "syscall.LINUX_REBOOT_MAGIC1": "syscall",
- "syscall.LINUX_REBOOT_MAGIC2": "syscall",
- "syscall.LOCK_EX": "syscall",
- "syscall.LOCK_NB": "syscall",
- "syscall.LOCK_SH": "syscall",
- "syscall.LOCK_UN": "syscall",
- "syscall.LazyDLL": "syscall",
- "syscall.LazyProc": "syscall",
- "syscall.Lchown": "syscall",
- "syscall.Linger": "syscall",
- "syscall.Link": "syscall",
- "syscall.Listen": "syscall",
- "syscall.Listxattr": "syscall",
- "syscall.LoadCancelIoEx": "syscall",
- "syscall.LoadConnectEx": "syscall",
- "syscall.LoadDLL": "syscall",
- "syscall.LoadGetAddrInfo": "syscall",
- "syscall.LoadLibrary": "syscall",
- "syscall.LoadSetFileCompletionNotificationModes": "syscall",
- "syscall.LocalFree": "syscall",
- "syscall.Log2phys_t": "syscall",
- "syscall.LookupAccountName": "syscall",
- "syscall.LookupAccountSid": "syscall",
- "syscall.LookupSID": "syscall",
- "syscall.LsfJump": "syscall",
- "syscall.LsfSocket": "syscall",
- "syscall.LsfStmt": "syscall",
- "syscall.Lstat": "syscall",
- "syscall.MADV_AUTOSYNC": "syscall",
- "syscall.MADV_CAN_REUSE": "syscall",
- "syscall.MADV_CORE": "syscall",
- "syscall.MADV_DOFORK": "syscall",
- "syscall.MADV_DONTFORK": "syscall",
- "syscall.MADV_DONTNEED": "syscall",
- "syscall.MADV_FREE": "syscall",
- "syscall.MADV_FREE_REUSABLE": "syscall",
- "syscall.MADV_FREE_REUSE": "syscall",
- "syscall.MADV_HUGEPAGE": "syscall",
- "syscall.MADV_HWPOISON": "syscall",
- "syscall.MADV_MERGEABLE": "syscall",
- "syscall.MADV_NOCORE": "syscall",
- "syscall.MADV_NOHUGEPAGE": "syscall",
- "syscall.MADV_NORMAL": "syscall",
- "syscall.MADV_NOSYNC": "syscall",
- "syscall.MADV_PROTECT": "syscall",
- "syscall.MADV_RANDOM": "syscall",
- "syscall.MADV_REMOVE": "syscall",
- "syscall.MADV_SEQUENTIAL": "syscall",
- "syscall.MADV_SPACEAVAIL": "syscall",
- "syscall.MADV_UNMERGEABLE": "syscall",
- "syscall.MADV_WILLNEED": "syscall",
- "syscall.MADV_ZERO_WIRED_PAGES": "syscall",
- "syscall.MAP_32BIT": "syscall",
- "syscall.MAP_ALIGNED_SUPER": "syscall",
- "syscall.MAP_ALIGNMENT_16MB": "syscall",
- "syscall.MAP_ALIGNMENT_1TB": "syscall",
- "syscall.MAP_ALIGNMENT_256TB": "syscall",
- "syscall.MAP_ALIGNMENT_4GB": "syscall",
- "syscall.MAP_ALIGNMENT_64KB": "syscall",
- "syscall.MAP_ALIGNMENT_64PB": "syscall",
- "syscall.MAP_ALIGNMENT_MASK": "syscall",
- "syscall.MAP_ALIGNMENT_SHIFT": "syscall",
- "syscall.MAP_ANON": "syscall",
- "syscall.MAP_ANONYMOUS": "syscall",
- "syscall.MAP_COPY": "syscall",
- "syscall.MAP_DENYWRITE": "syscall",
- "syscall.MAP_EXECUTABLE": "syscall",
- "syscall.MAP_FILE": "syscall",
- "syscall.MAP_FIXED": "syscall",
- "syscall.MAP_FLAGMASK": "syscall",
- "syscall.MAP_GROWSDOWN": "syscall",
- "syscall.MAP_HASSEMAPHORE": "syscall",
- "syscall.MAP_HUGETLB": "syscall",
- "syscall.MAP_INHERIT": "syscall",
- "syscall.MAP_INHERIT_COPY": "syscall",
- "syscall.MAP_INHERIT_DEFAULT": "syscall",
- "syscall.MAP_INHERIT_DONATE_COPY": "syscall",
- "syscall.MAP_INHERIT_NONE": "syscall",
- "syscall.MAP_INHERIT_SHARE": "syscall",
- "syscall.MAP_JIT": "syscall",
- "syscall.MAP_LOCKED": "syscall",
- "syscall.MAP_NOCACHE": "syscall",
- "syscall.MAP_NOCORE": "syscall",
- "syscall.MAP_NOEXTEND": "syscall",
- "syscall.MAP_NONBLOCK": "syscall",
- "syscall.MAP_NORESERVE": "syscall",
- "syscall.MAP_NOSYNC": "syscall",
- "syscall.MAP_POPULATE": "syscall",
- "syscall.MAP_PREFAULT_READ": "syscall",
- "syscall.MAP_PRIVATE": "syscall",
- "syscall.MAP_RENAME": "syscall",
- "syscall.MAP_RESERVED0080": "syscall",
- "syscall.MAP_RESERVED0100": "syscall",
- "syscall.MAP_SHARED": "syscall",
- "syscall.MAP_STACK": "syscall",
- "syscall.MAP_TRYFIXED": "syscall",
- "syscall.MAP_TYPE": "syscall",
- "syscall.MAP_WIRED": "syscall",
- "syscall.MAXLEN_IFDESCR": "syscall",
- "syscall.MAXLEN_PHYSADDR": "syscall",
- "syscall.MAX_ADAPTER_ADDRESS_LENGTH": "syscall",
- "syscall.MAX_ADAPTER_DESCRIPTION_LENGTH": "syscall",
- "syscall.MAX_ADAPTER_NAME_LENGTH": "syscall",
- "syscall.MAX_COMPUTERNAME_LENGTH": "syscall",
- "syscall.MAX_INTERFACE_NAME_LEN": "syscall",
- "syscall.MAX_LONG_PATH": "syscall",
- "syscall.MAX_PATH": "syscall",
- "syscall.MAX_PROTOCOL_CHAIN": "syscall",
- "syscall.MCL_CURRENT": "syscall",
- "syscall.MCL_FUTURE": "syscall",
- "syscall.MNT_DETACH": "syscall",
- "syscall.MNT_EXPIRE": "syscall",
- "syscall.MNT_FORCE": "syscall",
- "syscall.MSG_BCAST": "syscall",
- "syscall.MSG_CMSG_CLOEXEC": "syscall",
- "syscall.MSG_COMPAT": "syscall",
- "syscall.MSG_CONFIRM": "syscall",
- "syscall.MSG_CONTROLMBUF": "syscall",
- "syscall.MSG_CTRUNC": "syscall",
- "syscall.MSG_DONTROUTE": "syscall",
- "syscall.MSG_DONTWAIT": "syscall",
- "syscall.MSG_EOF": "syscall",
- "syscall.MSG_EOR": "syscall",
- "syscall.MSG_ERRQUEUE": "syscall",
- "syscall.MSG_FASTOPEN": "syscall",
- "syscall.MSG_FIN": "syscall",
- "syscall.MSG_FLUSH": "syscall",
- "syscall.MSG_HAVEMORE": "syscall",
- "syscall.MSG_HOLD": "syscall",
- "syscall.MSG_IOVUSRSPACE": "syscall",
- "syscall.MSG_LENUSRSPACE": "syscall",
- "syscall.MSG_MCAST": "syscall",
- "syscall.MSG_MORE": "syscall",
- "syscall.MSG_NAMEMBUF": "syscall",
- "syscall.MSG_NBIO": "syscall",
- "syscall.MSG_NEEDSA": "syscall",
- "syscall.MSG_NOSIGNAL": "syscall",
- "syscall.MSG_NOTIFICATION": "syscall",
- "syscall.MSG_OOB": "syscall",
- "syscall.MSG_PEEK": "syscall",
- "syscall.MSG_PROXY": "syscall",
- "syscall.MSG_RCVMORE": "syscall",
- "syscall.MSG_RST": "syscall",
- "syscall.MSG_SEND": "syscall",
- "syscall.MSG_SYN": "syscall",
- "syscall.MSG_TRUNC": "syscall",
- "syscall.MSG_TRYHARD": "syscall",
- "syscall.MSG_USERFLAGS": "syscall",
- "syscall.MSG_WAITALL": "syscall",
- "syscall.MSG_WAITFORONE": "syscall",
- "syscall.MSG_WAITSTREAM": "syscall",
- "syscall.MS_ACTIVE": "syscall",
- "syscall.MS_ASYNC": "syscall",
- "syscall.MS_BIND": "syscall",
- "syscall.MS_DEACTIVATE": "syscall",
- "syscall.MS_DIRSYNC": "syscall",
- "syscall.MS_INVALIDATE": "syscall",
- "syscall.MS_I_VERSION": "syscall",
- "syscall.MS_KERNMOUNT": "syscall",
- "syscall.MS_KILLPAGES": "syscall",
- "syscall.MS_MANDLOCK": "syscall",
- "syscall.MS_MGC_MSK": "syscall",
- "syscall.MS_MGC_VAL": "syscall",
- "syscall.MS_MOVE": "syscall",
- "syscall.MS_NOATIME": "syscall",
- "syscall.MS_NODEV": "syscall",
- "syscall.MS_NODIRATIME": "syscall",
- "syscall.MS_NOEXEC": "syscall",
- "syscall.MS_NOSUID": "syscall",
- "syscall.MS_NOUSER": "syscall",
- "syscall.MS_POSIXACL": "syscall",
- "syscall.MS_PRIVATE": "syscall",
- "syscall.MS_RDONLY": "syscall",
- "syscall.MS_REC": "syscall",
- "syscall.MS_RELATIME": "syscall",
- "syscall.MS_REMOUNT": "syscall",
- "syscall.MS_RMT_MASK": "syscall",
- "syscall.MS_SHARED": "syscall",
- "syscall.MS_SILENT": "syscall",
- "syscall.MS_SLAVE": "syscall",
- "syscall.MS_STRICTATIME": "syscall",
- "syscall.MS_SYNC": "syscall",
- "syscall.MS_SYNCHRONOUS": "syscall",
- "syscall.MS_UNBINDABLE": "syscall",
- "syscall.Madvise": "syscall",
- "syscall.MapViewOfFile": "syscall",
- "syscall.MaxTokenInfoClass": "syscall",
- "syscall.Mclpool": "syscall",
- "syscall.MibIfRow": "syscall",
- "syscall.Mkdir": "syscall",
- "syscall.Mkdirat": "syscall",
- "syscall.Mkfifo": "syscall",
- "syscall.Mknod": "syscall",
- "syscall.Mknodat": "syscall",
- "syscall.Mlock": "syscall",
- "syscall.Mlockall": "syscall",
- "syscall.Mmap": "syscall",
- "syscall.Mount": "syscall",
- "syscall.MoveFile": "syscall",
- "syscall.Mprotect": "syscall",
- "syscall.Msghdr": "syscall",
- "syscall.Munlock": "syscall",
- "syscall.Munlockall": "syscall",
- "syscall.Munmap": "syscall",
- "syscall.MustLoadDLL": "syscall",
- "syscall.NAME_MAX": "syscall",
- "syscall.NETLINK_ADD_MEMBERSHIP": "syscall",
- "syscall.NETLINK_AUDIT": "syscall",
- "syscall.NETLINK_BROADCAST_ERROR": "syscall",
- "syscall.NETLINK_CONNECTOR": "syscall",
- "syscall.NETLINK_DNRTMSG": "syscall",
- "syscall.NETLINK_DROP_MEMBERSHIP": "syscall",
- "syscall.NETLINK_ECRYPTFS": "syscall",
- "syscall.NETLINK_FIB_LOOKUP": "syscall",
- "syscall.NETLINK_FIREWALL": "syscall",
- "syscall.NETLINK_GENERIC": "syscall",
- "syscall.NETLINK_INET_DIAG": "syscall",
- "syscall.NETLINK_IP6_FW": "syscall",
- "syscall.NETLINK_ISCSI": "syscall",
- "syscall.NETLINK_KOBJECT_UEVENT": "syscall",
- "syscall.NETLINK_NETFILTER": "syscall",
- "syscall.NETLINK_NFLOG": "syscall",
- "syscall.NETLINK_NO_ENOBUFS": "syscall",
- "syscall.NETLINK_PKTINFO": "syscall",
- "syscall.NETLINK_RDMA": "syscall",
- "syscall.NETLINK_ROUTE": "syscall",
- "syscall.NETLINK_SCSITRANSPORT": "syscall",
- "syscall.NETLINK_SELINUX": "syscall",
- "syscall.NETLINK_UNUSED": "syscall",
- "syscall.NETLINK_USERSOCK": "syscall",
- "syscall.NETLINK_XFRM": "syscall",
- "syscall.NET_RT_DUMP": "syscall",
- "syscall.NET_RT_DUMP2": "syscall",
- "syscall.NET_RT_FLAGS": "syscall",
- "syscall.NET_RT_IFLIST": "syscall",
- "syscall.NET_RT_IFLIST2": "syscall",
- "syscall.NET_RT_IFLISTL": "syscall",
- "syscall.NET_RT_IFMALIST": "syscall",
- "syscall.NET_RT_MAXID": "syscall",
- "syscall.NET_RT_OIFLIST": "syscall",
- "syscall.NET_RT_OOIFLIST": "syscall",
- "syscall.NET_RT_STAT": "syscall",
- "syscall.NET_RT_STATS": "syscall",
- "syscall.NET_RT_TABLE": "syscall",
- "syscall.NET_RT_TRASH": "syscall",
- "syscall.NLA_ALIGNTO": "syscall",
- "syscall.NLA_F_NESTED": "syscall",
- "syscall.NLA_F_NET_BYTEORDER": "syscall",
- "syscall.NLA_HDRLEN": "syscall",
- "syscall.NLMSG_ALIGNTO": "syscall",
- "syscall.NLMSG_DONE": "syscall",
- "syscall.NLMSG_ERROR": "syscall",
- "syscall.NLMSG_HDRLEN": "syscall",
- "syscall.NLMSG_MIN_TYPE": "syscall",
- "syscall.NLMSG_NOOP": "syscall",
- "syscall.NLMSG_OVERRUN": "syscall",
- "syscall.NLM_F_ACK": "syscall",
- "syscall.NLM_F_APPEND": "syscall",
- "syscall.NLM_F_ATOMIC": "syscall",
- "syscall.NLM_F_CREATE": "syscall",
- "syscall.NLM_F_DUMP": "syscall",
- "syscall.NLM_F_ECHO": "syscall",
- "syscall.NLM_F_EXCL": "syscall",
- "syscall.NLM_F_MATCH": "syscall",
- "syscall.NLM_F_MULTI": "syscall",
- "syscall.NLM_F_REPLACE": "syscall",
- "syscall.NLM_F_REQUEST": "syscall",
- "syscall.NLM_F_ROOT": "syscall",
- "syscall.NOFLSH": "syscall",
- "syscall.NOTE_ABSOLUTE": "syscall",
- "syscall.NOTE_ATTRIB": "syscall",
- "syscall.NOTE_CHILD": "syscall",
- "syscall.NOTE_DELETE": "syscall",
- "syscall.NOTE_EOF": "syscall",
- "syscall.NOTE_EXEC": "syscall",
- "syscall.NOTE_EXIT": "syscall",
- "syscall.NOTE_EXITSTATUS": "syscall",
- "syscall.NOTE_EXTEND": "syscall",
- "syscall.NOTE_FFAND": "syscall",
- "syscall.NOTE_FFCOPY": "syscall",
- "syscall.NOTE_FFCTRLMASK": "syscall",
- "syscall.NOTE_FFLAGSMASK": "syscall",
- "syscall.NOTE_FFNOP": "syscall",
- "syscall.NOTE_FFOR": "syscall",
- "syscall.NOTE_FORK": "syscall",
- "syscall.NOTE_LINK": "syscall",
- "syscall.NOTE_LOWAT": "syscall",
- "syscall.NOTE_NONE": "syscall",
- "syscall.NOTE_NSECONDS": "syscall",
- "syscall.NOTE_PCTRLMASK": "syscall",
- "syscall.NOTE_PDATAMASK": "syscall",
- "syscall.NOTE_REAP": "syscall",
- "syscall.NOTE_RENAME": "syscall",
- "syscall.NOTE_RESOURCEEND": "syscall",
- "syscall.NOTE_REVOKE": "syscall",
- "syscall.NOTE_SECONDS": "syscall",
- "syscall.NOTE_SIGNAL": "syscall",
- "syscall.NOTE_TRACK": "syscall",
- "syscall.NOTE_TRACKERR": "syscall",
- "syscall.NOTE_TRIGGER": "syscall",
- "syscall.NOTE_TRUNCATE": "syscall",
- "syscall.NOTE_USECONDS": "syscall",
- "syscall.NOTE_VM_ERROR": "syscall",
- "syscall.NOTE_VM_PRESSURE": "syscall",
- "syscall.NOTE_VM_PRESSURE_SUDDEN_TERMINATE": "syscall",
- "syscall.NOTE_VM_PRESSURE_TERMINATE": "syscall",
- "syscall.NOTE_WRITE": "syscall",
- "syscall.NameCanonical": "syscall",
- "syscall.NameCanonicalEx": "syscall",
- "syscall.NameDisplay": "syscall",
- "syscall.NameDnsDomain": "syscall",
- "syscall.NameFullyQualifiedDN": "syscall",
- "syscall.NameSamCompatible": "syscall",
- "syscall.NameServicePrincipal": "syscall",
- "syscall.NameUniqueId": "syscall",
- "syscall.NameUnknown": "syscall",
- "syscall.NameUserPrincipal": "syscall",
- "syscall.Nanosleep": "syscall",
- "syscall.NetApiBufferFree": "syscall",
- "syscall.NetGetJoinInformation": "syscall",
- "syscall.NetSetupDomainName": "syscall",
- "syscall.NetSetupUnjoined": "syscall",
- "syscall.NetSetupUnknownStatus": "syscall",
- "syscall.NetSetupWorkgroupName": "syscall",
- "syscall.NetUserGetInfo": "syscall",
- "syscall.NetlinkMessage": "syscall",
- "syscall.NetlinkRIB": "syscall",
- "syscall.NetlinkRouteAttr": "syscall",
- "syscall.NetlinkRouteRequest": "syscall",
- "syscall.NewCallback": "syscall",
- "syscall.NewCallbackCDecl": "syscall",
- "syscall.NewLazyDLL": "syscall",
- "syscall.NlAttr": "syscall",
- "syscall.NlMsgerr": "syscall",
- "syscall.NlMsghdr": "syscall",
- "syscall.NsecToFiletime": "syscall",
- "syscall.NsecToTimespec": "syscall",
- "syscall.NsecToTimeval": "syscall",
- "syscall.Ntohs": "syscall",
- "syscall.OCRNL": "syscall",
- "syscall.OFDEL": "syscall",
- "syscall.OFILL": "syscall",
- "syscall.OFIOGETBMAP": "syscall",
- "syscall.OID_PKIX_KP_SERVER_AUTH": "syscall",
- "syscall.OID_SERVER_GATED_CRYPTO": "syscall",
- "syscall.OID_SGC_NETSCAPE": "syscall",
- "syscall.OLCUC": "syscall",
- "syscall.ONLCR": "syscall",
- "syscall.ONLRET": "syscall",
- "syscall.ONOCR": "syscall",
- "syscall.ONOEOT": "syscall",
- "syscall.OPEN_ALWAYS": "syscall",
- "syscall.OPEN_EXISTING": "syscall",
- "syscall.OPOST": "syscall",
- "syscall.O_ACCMODE": "syscall",
- "syscall.O_ALERT": "syscall",
- "syscall.O_ALT_IO": "syscall",
- "syscall.O_APPEND": "syscall",
- "syscall.O_ASYNC": "syscall",
- "syscall.O_CLOEXEC": "syscall",
- "syscall.O_CREAT": "syscall",
- "syscall.O_DIRECT": "syscall",
- "syscall.O_DIRECTORY": "syscall",
- "syscall.O_DSYNC": "syscall",
- "syscall.O_EVTONLY": "syscall",
- "syscall.O_EXCL": "syscall",
- "syscall.O_EXEC": "syscall",
- "syscall.O_EXLOCK": "syscall",
- "syscall.O_FSYNC": "syscall",
- "syscall.O_LARGEFILE": "syscall",
- "syscall.O_NDELAY": "syscall",
- "syscall.O_NOATIME": "syscall",
- "syscall.O_NOCTTY": "syscall",
- "syscall.O_NOFOLLOW": "syscall",
- "syscall.O_NONBLOCK": "syscall",
- "syscall.O_NOSIGPIPE": "syscall",
- "syscall.O_POPUP": "syscall",
- "syscall.O_RDONLY": "syscall",
- "syscall.O_RDWR": "syscall",
- "syscall.O_RSYNC": "syscall",
- "syscall.O_SHLOCK": "syscall",
- "syscall.O_SYMLINK": "syscall",
- "syscall.O_SYNC": "syscall",
- "syscall.O_TRUNC": "syscall",
- "syscall.O_TTY_INIT": "syscall",
- "syscall.O_WRONLY": "syscall",
- "syscall.Open": "syscall",
- "syscall.OpenCurrentProcessToken": "syscall",
- "syscall.OpenProcess": "syscall",
- "syscall.OpenProcessToken": "syscall",
- "syscall.Openat": "syscall",
- "syscall.Overlapped": "syscall",
- "syscall.PACKET_ADD_MEMBERSHIP": "syscall",
- "syscall.PACKET_BROADCAST": "syscall",
- "syscall.PACKET_DROP_MEMBERSHIP": "syscall",
- "syscall.PACKET_FASTROUTE": "syscall",
- "syscall.PACKET_HOST": "syscall",
- "syscall.PACKET_LOOPBACK": "syscall",
- "syscall.PACKET_MR_ALLMULTI": "syscall",
- "syscall.PACKET_MR_MULTICAST": "syscall",
- "syscall.PACKET_MR_PROMISC": "syscall",
- "syscall.PACKET_MULTICAST": "syscall",
- "syscall.PACKET_OTHERHOST": "syscall",
- "syscall.PACKET_OUTGOING": "syscall",
- "syscall.PACKET_RECV_OUTPUT": "syscall",
- "syscall.PACKET_RX_RING": "syscall",
- "syscall.PACKET_STATISTICS": "syscall",
- "syscall.PAGE_EXECUTE_READ": "syscall",
- "syscall.PAGE_EXECUTE_READWRITE": "syscall",
- "syscall.PAGE_EXECUTE_WRITECOPY": "syscall",
- "syscall.PAGE_READONLY": "syscall",
- "syscall.PAGE_READWRITE": "syscall",
- "syscall.PAGE_WRITECOPY": "syscall",
- "syscall.PARENB": "syscall",
- "syscall.PARMRK": "syscall",
- "syscall.PARODD": "syscall",
- "syscall.PENDIN": "syscall",
- "syscall.PFL_HIDDEN": "syscall",
- "syscall.PFL_MATCHES_PROTOCOL_ZERO": "syscall",
- "syscall.PFL_MULTIPLE_PROTO_ENTRIES": "syscall",
- "syscall.PFL_NETWORKDIRECT_PROVIDER": "syscall",
- "syscall.PFL_RECOMMENDED_PROTO_ENTRY": "syscall",
- "syscall.PF_FLUSH": "syscall",
- "syscall.PKCS_7_ASN_ENCODING": "syscall",
- "syscall.PMC5_PIPELINE_FLUSH": "syscall",
- "syscall.PRIO_PGRP": "syscall",
- "syscall.PRIO_PROCESS": "syscall",
- "syscall.PRIO_USER": "syscall",
- "syscall.PRI_IOFLUSH": "syscall",
- "syscall.PROCESS_QUERY_INFORMATION": "syscall",
- "syscall.PROCESS_TERMINATE": "syscall",
- "syscall.PROT_EXEC": "syscall",
- "syscall.PROT_GROWSDOWN": "syscall",
- "syscall.PROT_GROWSUP": "syscall",
- "syscall.PROT_NONE": "syscall",
- "syscall.PROT_READ": "syscall",
- "syscall.PROT_WRITE": "syscall",
- "syscall.PROV_DH_SCHANNEL": "syscall",
- "syscall.PROV_DSS": "syscall",
- "syscall.PROV_DSS_DH": "syscall",
- "syscall.PROV_EC_ECDSA_FULL": "syscall",
- "syscall.PROV_EC_ECDSA_SIG": "syscall",
- "syscall.PROV_EC_ECNRA_FULL": "syscall",
- "syscall.PROV_EC_ECNRA_SIG": "syscall",
- "syscall.PROV_FORTEZZA": "syscall",
- "syscall.PROV_INTEL_SEC": "syscall",
- "syscall.PROV_MS_EXCHANGE": "syscall",
- "syscall.PROV_REPLACE_OWF": "syscall",
- "syscall.PROV_RNG": "syscall",
- "syscall.PROV_RSA_AES": "syscall",
- "syscall.PROV_RSA_FULL": "syscall",
- "syscall.PROV_RSA_SCHANNEL": "syscall",
- "syscall.PROV_RSA_SIG": "syscall",
- "syscall.PROV_SPYRUS_LYNKS": "syscall",
- "syscall.PROV_SSL": "syscall",
- "syscall.PR_CAPBSET_DROP": "syscall",
- "syscall.PR_CAPBSET_READ": "syscall",
- "syscall.PR_CLEAR_SECCOMP_FILTER": "syscall",
- "syscall.PR_ENDIAN_BIG": "syscall",
- "syscall.PR_ENDIAN_LITTLE": "syscall",
- "syscall.PR_ENDIAN_PPC_LITTLE": "syscall",
- "syscall.PR_FPEMU_NOPRINT": "syscall",
- "syscall.PR_FPEMU_SIGFPE": "syscall",
- "syscall.PR_FP_EXC_ASYNC": "syscall",
- "syscall.PR_FP_EXC_DISABLED": "syscall",
- "syscall.PR_FP_EXC_DIV": "syscall",
- "syscall.PR_FP_EXC_INV": "syscall",
- "syscall.PR_FP_EXC_NONRECOV": "syscall",
- "syscall.PR_FP_EXC_OVF": "syscall",
- "syscall.PR_FP_EXC_PRECISE": "syscall",
- "syscall.PR_FP_EXC_RES": "syscall",
- "syscall.PR_FP_EXC_SW_ENABLE": "syscall",
- "syscall.PR_FP_EXC_UND": "syscall",
- "syscall.PR_GET_DUMPABLE": "syscall",
- "syscall.PR_GET_ENDIAN": "syscall",
- "syscall.PR_GET_FPEMU": "syscall",
- "syscall.PR_GET_FPEXC": "syscall",
- "syscall.PR_GET_KEEPCAPS": "syscall",
- "syscall.PR_GET_NAME": "syscall",
- "syscall.PR_GET_PDEATHSIG": "syscall",
- "syscall.PR_GET_SECCOMP": "syscall",
- "syscall.PR_GET_SECCOMP_FILTER": "syscall",
- "syscall.PR_GET_SECUREBITS": "syscall",
- "syscall.PR_GET_TIMERSLACK": "syscall",
- "syscall.PR_GET_TIMING": "syscall",
- "syscall.PR_GET_TSC": "syscall",
- "syscall.PR_GET_UNALIGN": "syscall",
- "syscall.PR_MCE_KILL": "syscall",
- "syscall.PR_MCE_KILL_CLEAR": "syscall",
- "syscall.PR_MCE_KILL_DEFAULT": "syscall",
- "syscall.PR_MCE_KILL_EARLY": "syscall",
- "syscall.PR_MCE_KILL_GET": "syscall",
- "syscall.PR_MCE_KILL_LATE": "syscall",
- "syscall.PR_MCE_KILL_SET": "syscall",
- "syscall.PR_SECCOMP_FILTER_EVENT": "syscall",
- "syscall.PR_SECCOMP_FILTER_SYSCALL": "syscall",
- "syscall.PR_SET_DUMPABLE": "syscall",
- "syscall.PR_SET_ENDIAN": "syscall",
- "syscall.PR_SET_FPEMU": "syscall",
- "syscall.PR_SET_FPEXC": "syscall",
- "syscall.PR_SET_KEEPCAPS": "syscall",
- "syscall.PR_SET_NAME": "syscall",
- "syscall.PR_SET_PDEATHSIG": "syscall",
- "syscall.PR_SET_PTRACER": "syscall",
- "syscall.PR_SET_SECCOMP": "syscall",
- "syscall.PR_SET_SECCOMP_FILTER": "syscall",
- "syscall.PR_SET_SECUREBITS": "syscall",
- "syscall.PR_SET_TIMERSLACK": "syscall",
- "syscall.PR_SET_TIMING": "syscall",
- "syscall.PR_SET_TSC": "syscall",
- "syscall.PR_SET_UNALIGN": "syscall",
- "syscall.PR_TASK_PERF_EVENTS_DISABLE": "syscall",
- "syscall.PR_TASK_PERF_EVENTS_ENABLE": "syscall",
- "syscall.PR_TIMING_STATISTICAL": "syscall",
- "syscall.PR_TIMING_TIMESTAMP": "syscall",
- "syscall.PR_TSC_ENABLE": "syscall",
- "syscall.PR_TSC_SIGSEGV": "syscall",
- "syscall.PR_UNALIGN_NOPRINT": "syscall",
- "syscall.PR_UNALIGN_SIGBUS": "syscall",
- "syscall.PTRACE_ARCH_PRCTL": "syscall",
- "syscall.PTRACE_ATTACH": "syscall",
- "syscall.PTRACE_CONT": "syscall",
- "syscall.PTRACE_DETACH": "syscall",
- "syscall.PTRACE_EVENT_CLONE": "syscall",
- "syscall.PTRACE_EVENT_EXEC": "syscall",
- "syscall.PTRACE_EVENT_EXIT": "syscall",
- "syscall.PTRACE_EVENT_FORK": "syscall",
- "syscall.PTRACE_EVENT_VFORK": "syscall",
- "syscall.PTRACE_EVENT_VFORK_DONE": "syscall",
- "syscall.PTRACE_GETCRUNCHREGS": "syscall",
- "syscall.PTRACE_GETEVENTMSG": "syscall",
- "syscall.PTRACE_GETFPREGS": "syscall",
- "syscall.PTRACE_GETFPXREGS": "syscall",
- "syscall.PTRACE_GETHBPREGS": "syscall",
- "syscall.PTRACE_GETREGS": "syscall",
- "syscall.PTRACE_GETREGSET": "syscall",
- "syscall.PTRACE_GETSIGINFO": "syscall",
- "syscall.PTRACE_GETVFPREGS": "syscall",
- "syscall.PTRACE_GETWMMXREGS": "syscall",
- "syscall.PTRACE_GET_THREAD_AREA": "syscall",
- "syscall.PTRACE_KILL": "syscall",
- "syscall.PTRACE_OLDSETOPTIONS": "syscall",
- "syscall.PTRACE_O_MASK": "syscall",
- "syscall.PTRACE_O_TRACECLONE": "syscall",
- "syscall.PTRACE_O_TRACEEXEC": "syscall",
- "syscall.PTRACE_O_TRACEEXIT": "syscall",
- "syscall.PTRACE_O_TRACEFORK": "syscall",
- "syscall.PTRACE_O_TRACESYSGOOD": "syscall",
- "syscall.PTRACE_O_TRACEVFORK": "syscall",
- "syscall.PTRACE_O_TRACEVFORKDONE": "syscall",
- "syscall.PTRACE_PEEKDATA": "syscall",
- "syscall.PTRACE_PEEKTEXT": "syscall",
- "syscall.PTRACE_PEEKUSR": "syscall",
- "syscall.PTRACE_POKEDATA": "syscall",
- "syscall.PTRACE_POKETEXT": "syscall",
- "syscall.PTRACE_POKEUSR": "syscall",
- "syscall.PTRACE_SETCRUNCHREGS": "syscall",
- "syscall.PTRACE_SETFPREGS": "syscall",
- "syscall.PTRACE_SETFPXREGS": "syscall",
- "syscall.PTRACE_SETHBPREGS": "syscall",
- "syscall.PTRACE_SETOPTIONS": "syscall",
- "syscall.PTRACE_SETREGS": "syscall",
- "syscall.PTRACE_SETREGSET": "syscall",
- "syscall.PTRACE_SETSIGINFO": "syscall",
- "syscall.PTRACE_SETVFPREGS": "syscall",
- "syscall.PTRACE_SETWMMXREGS": "syscall",
- "syscall.PTRACE_SET_SYSCALL": "syscall",
- "syscall.PTRACE_SET_THREAD_AREA": "syscall",
- "syscall.PTRACE_SINGLEBLOCK": "syscall",
- "syscall.PTRACE_SINGLESTEP": "syscall",
- "syscall.PTRACE_SYSCALL": "syscall",
- "syscall.PTRACE_SYSEMU": "syscall",
- "syscall.PTRACE_SYSEMU_SINGLESTEP": "syscall",
- "syscall.PTRACE_TRACEME": "syscall",
- "syscall.PT_ATTACH": "syscall",
- "syscall.PT_ATTACHEXC": "syscall",
- "syscall.PT_CONTINUE": "syscall",
- "syscall.PT_DATA_ADDR": "syscall",
- "syscall.PT_DENY_ATTACH": "syscall",
- "syscall.PT_DETACH": "syscall",
- "syscall.PT_FIRSTMACH": "syscall",
- "syscall.PT_FORCEQUOTA": "syscall",
- "syscall.PT_KILL": "syscall",
- "syscall.PT_MASK": "syscall",
- "syscall.PT_READ_D": "syscall",
- "syscall.PT_READ_I": "syscall",
- "syscall.PT_READ_U": "syscall",
- "syscall.PT_SIGEXC": "syscall",
- "syscall.PT_STEP": "syscall",
- "syscall.PT_TEXT_ADDR": "syscall",
- "syscall.PT_TEXT_END_ADDR": "syscall",
- "syscall.PT_THUPDATE": "syscall",
- "syscall.PT_TRACE_ME": "syscall",
- "syscall.PT_WRITE_D": "syscall",
- "syscall.PT_WRITE_I": "syscall",
- "syscall.PT_WRITE_U": "syscall",
- "syscall.ParseDirent": "syscall",
- "syscall.ParseNetlinkMessage": "syscall",
- "syscall.ParseNetlinkRouteAttr": "syscall",
- "syscall.ParseRoutingMessage": "syscall",
- "syscall.ParseRoutingSockaddr": "syscall",
- "syscall.ParseSocketControlMessage": "syscall",
- "syscall.ParseUnixCredentials": "syscall",
- "syscall.ParseUnixRights": "syscall",
- "syscall.PathMax": "syscall",
- "syscall.Pathconf": "syscall",
- "syscall.Pause": "syscall",
- "syscall.Pipe": "syscall",
- "syscall.Pipe2": "syscall",
- "syscall.PivotRoot": "syscall",
- "syscall.PostQueuedCompletionStatus": "syscall",
- "syscall.Pread": "syscall",
- "syscall.Proc": "syscall",
- "syscall.ProcAttr": "syscall",
- "syscall.ProcessInformation": "syscall",
- "syscall.Protoent": "syscall",
- "syscall.PtraceAttach": "syscall",
- "syscall.PtraceCont": "syscall",
- "syscall.PtraceDetach": "syscall",
- "syscall.PtraceGetEventMsg": "syscall",
- "syscall.PtraceGetRegs": "syscall",
- "syscall.PtracePeekData": "syscall",
- "syscall.PtracePeekText": "syscall",
- "syscall.PtracePokeData": "syscall",
- "syscall.PtracePokeText": "syscall",
- "syscall.PtraceRegs": "syscall",
- "syscall.PtraceSetOptions": "syscall",
- "syscall.PtraceSetRegs": "syscall",
- "syscall.PtraceSingleStep": "syscall",
- "syscall.PtraceSyscall": "syscall",
- "syscall.Pwrite": "syscall",
- "syscall.REG_BINARY": "syscall",
- "syscall.REG_DWORD": "syscall",
- "syscall.REG_DWORD_BIG_ENDIAN": "syscall",
- "syscall.REG_DWORD_LITTLE_ENDIAN": "syscall",
- "syscall.REG_EXPAND_SZ": "syscall",
- "syscall.REG_FULL_RESOURCE_DESCRIPTOR": "syscall",
- "syscall.REG_LINK": "syscall",
- "syscall.REG_MULTI_SZ": "syscall",
- "syscall.REG_NONE": "syscall",
- "syscall.REG_QWORD": "syscall",
- "syscall.REG_QWORD_LITTLE_ENDIAN": "syscall",
- "syscall.REG_RESOURCE_LIST": "syscall",
- "syscall.REG_RESOURCE_REQUIREMENTS_LIST": "syscall",
- "syscall.REG_SZ": "syscall",
- "syscall.RLIMIT_AS": "syscall",
- "syscall.RLIMIT_CORE": "syscall",
- "syscall.RLIMIT_CPU": "syscall",
- "syscall.RLIMIT_DATA": "syscall",
- "syscall.RLIMIT_FSIZE": "syscall",
- "syscall.RLIMIT_NOFILE": "syscall",
- "syscall.RLIMIT_STACK": "syscall",
- "syscall.RLIM_INFINITY": "syscall",
- "syscall.RTAX_ADVMSS": "syscall",
- "syscall.RTAX_AUTHOR": "syscall",
- "syscall.RTAX_BRD": "syscall",
- "syscall.RTAX_CWND": "syscall",
- "syscall.RTAX_DST": "syscall",
- "syscall.RTAX_FEATURES": "syscall",
- "syscall.RTAX_FEATURE_ALLFRAG": "syscall",
- "syscall.RTAX_FEATURE_ECN": "syscall",
- "syscall.RTAX_FEATURE_SACK": "syscall",
- "syscall.RTAX_FEATURE_TIMESTAMP": "syscall",
- "syscall.RTAX_GATEWAY": "syscall",
- "syscall.RTAX_GENMASK": "syscall",
- "syscall.RTAX_HOPLIMIT": "syscall",
- "syscall.RTAX_IFA": "syscall",
- "syscall.RTAX_IFP": "syscall",
- "syscall.RTAX_INITCWND": "syscall",
- "syscall.RTAX_INITRWND": "syscall",
- "syscall.RTAX_LABEL": "syscall",
- "syscall.RTAX_LOCK": "syscall",
- "syscall.RTAX_MAX": "syscall",
- "syscall.RTAX_MTU": "syscall",
- "syscall.RTAX_NETMASK": "syscall",
- "syscall.RTAX_REORDERING": "syscall",
- "syscall.RTAX_RTO_MIN": "syscall",
- "syscall.RTAX_RTT": "syscall",
- "syscall.RTAX_RTTVAR": "syscall",
- "syscall.RTAX_SRC": "syscall",
- "syscall.RTAX_SRCMASK": "syscall",
- "syscall.RTAX_SSTHRESH": "syscall",
- "syscall.RTAX_TAG": "syscall",
- "syscall.RTAX_UNSPEC": "syscall",
- "syscall.RTAX_WINDOW": "syscall",
- "syscall.RTA_ALIGNTO": "syscall",
- "syscall.RTA_AUTHOR": "syscall",
- "syscall.RTA_BRD": "syscall",
- "syscall.RTA_CACHEINFO": "syscall",
- "syscall.RTA_DST": "syscall",
- "syscall.RTA_FLOW": "syscall",
- "syscall.RTA_GATEWAY": "syscall",
- "syscall.RTA_GENMASK": "syscall",
- "syscall.RTA_IFA": "syscall",
- "syscall.RTA_IFP": "syscall",
- "syscall.RTA_IIF": "syscall",
- "syscall.RTA_LABEL": "syscall",
- "syscall.RTA_MAX": "syscall",
- "syscall.RTA_METRICS": "syscall",
- "syscall.RTA_MULTIPATH": "syscall",
- "syscall.RTA_NETMASK": "syscall",
- "syscall.RTA_OIF": "syscall",
- "syscall.RTA_PREFSRC": "syscall",
- "syscall.RTA_PRIORITY": "syscall",
- "syscall.RTA_SRC": "syscall",
- "syscall.RTA_SRCMASK": "syscall",
- "syscall.RTA_TABLE": "syscall",
- "syscall.RTA_TAG": "syscall",
- "syscall.RTA_UNSPEC": "syscall",
- "syscall.RTCF_DIRECTSRC": "syscall",
- "syscall.RTCF_DOREDIRECT": "syscall",
- "syscall.RTCF_LOG": "syscall",
- "syscall.RTCF_MASQ": "syscall",
- "syscall.RTCF_NAT": "syscall",
- "syscall.RTCF_VALVE": "syscall",
- "syscall.RTF_ADDRCLASSMASK": "syscall",
- "syscall.RTF_ADDRCONF": "syscall",
- "syscall.RTF_ALLONLINK": "syscall",
- "syscall.RTF_ANNOUNCE": "syscall",
- "syscall.RTF_BLACKHOLE": "syscall",
- "syscall.RTF_BROADCAST": "syscall",
- "syscall.RTF_CACHE": "syscall",
- "syscall.RTF_CLONED": "syscall",
- "syscall.RTF_CLONING": "syscall",
- "syscall.RTF_CONDEMNED": "syscall",
- "syscall.RTF_DEFAULT": "syscall",
- "syscall.RTF_DELCLONE": "syscall",
- "syscall.RTF_DONE": "syscall",
- "syscall.RTF_DYNAMIC": "syscall",
- "syscall.RTF_FLOW": "syscall",
- "syscall.RTF_FMASK": "syscall",
- "syscall.RTF_GATEWAY": "syscall",
- "syscall.RTF_GWFLAG_COMPAT": "syscall",
- "syscall.RTF_HOST": "syscall",
- "syscall.RTF_IFREF": "syscall",
- "syscall.RTF_IFSCOPE": "syscall",
- "syscall.RTF_INTERFACE": "syscall",
- "syscall.RTF_IRTT": "syscall",
- "syscall.RTF_LINKRT": "syscall",
- "syscall.RTF_LLDATA": "syscall",
- "syscall.RTF_LLINFO": "syscall",
- "syscall.RTF_LOCAL": "syscall",
- "syscall.RTF_MASK": "syscall",
- "syscall.RTF_MODIFIED": "syscall",
- "syscall.RTF_MPATH": "syscall",
- "syscall.RTF_MPLS": "syscall",
- "syscall.RTF_MSS": "syscall",
- "syscall.RTF_MTU": "syscall",
- "syscall.RTF_MULTICAST": "syscall",
- "syscall.RTF_NAT": "syscall",
- "syscall.RTF_NOFORWARD": "syscall",
- "syscall.RTF_NONEXTHOP": "syscall",
- "syscall.RTF_NOPMTUDISC": "syscall",
- "syscall.RTF_PERMANENT_ARP": "syscall",
- "syscall.RTF_PINNED": "syscall",
- "syscall.RTF_POLICY": "syscall",
- "syscall.RTF_PRCLONING": "syscall",
- "syscall.RTF_PROTO1": "syscall",
- "syscall.RTF_PROTO2": "syscall",
- "syscall.RTF_PROTO3": "syscall",
- "syscall.RTF_REINSTATE": "syscall",
- "syscall.RTF_REJECT": "syscall",
- "syscall.RTF_RNH_LOCKED": "syscall",
- "syscall.RTF_SOURCE": "syscall",
- "syscall.RTF_SRC": "syscall",
- "syscall.RTF_STATIC": "syscall",
- "syscall.RTF_STICKY": "syscall",
- "syscall.RTF_THROW": "syscall",
- "syscall.RTF_TUNNEL": "syscall",
- "syscall.RTF_UP": "syscall",
- "syscall.RTF_USETRAILERS": "syscall",
- "syscall.RTF_WASCLONED": "syscall",
- "syscall.RTF_WINDOW": "syscall",
- "syscall.RTF_XRESOLVE": "syscall",
- "syscall.RTM_ADD": "syscall",
- "syscall.RTM_BASE": "syscall",
- "syscall.RTM_CHANGE": "syscall",
- "syscall.RTM_CHGADDR": "syscall",
- "syscall.RTM_DELACTION": "syscall",
- "syscall.RTM_DELADDR": "syscall",
- "syscall.RTM_DELADDRLABEL": "syscall",
- "syscall.RTM_DELETE": "syscall",
- "syscall.RTM_DELLINK": "syscall",
- "syscall.RTM_DELMADDR": "syscall",
- "syscall.RTM_DELNEIGH": "syscall",
- "syscall.RTM_DELQDISC": "syscall",
- "syscall.RTM_DELROUTE": "syscall",
- "syscall.RTM_DELRULE": "syscall",
- "syscall.RTM_DELTCLASS": "syscall",
- "syscall.RTM_DELTFILTER": "syscall",
- "syscall.RTM_DESYNC": "syscall",
- "syscall.RTM_F_CLONED": "syscall",
- "syscall.RTM_F_EQUALIZE": "syscall",
- "syscall.RTM_F_NOTIFY": "syscall",
- "syscall.RTM_F_PREFIX": "syscall",
- "syscall.RTM_GET": "syscall",
- "syscall.RTM_GET2": "syscall",
- "syscall.RTM_GETACTION": "syscall",
- "syscall.RTM_GETADDR": "syscall",
- "syscall.RTM_GETADDRLABEL": "syscall",
- "syscall.RTM_GETANYCAST": "syscall",
- "syscall.RTM_GETDCB": "syscall",
- "syscall.RTM_GETLINK": "syscall",
- "syscall.RTM_GETMULTICAST": "syscall",
- "syscall.RTM_GETNEIGH": "syscall",
- "syscall.RTM_GETNEIGHTBL": "syscall",
- "syscall.RTM_GETQDISC": "syscall",
- "syscall.RTM_GETROUTE": "syscall",
- "syscall.RTM_GETRULE": "syscall",
- "syscall.RTM_GETTCLASS": "syscall",
- "syscall.RTM_GETTFILTER": "syscall",
- "syscall.RTM_IEEE80211": "syscall",
- "syscall.RTM_IFANNOUNCE": "syscall",
- "syscall.RTM_IFINFO": "syscall",
- "syscall.RTM_IFINFO2": "syscall",
- "syscall.RTM_LLINFO_UPD": "syscall",
- "syscall.RTM_LOCK": "syscall",
- "syscall.RTM_LOSING": "syscall",
- "syscall.RTM_MAX": "syscall",
- "syscall.RTM_MAXSIZE": "syscall",
- "syscall.RTM_MISS": "syscall",
- "syscall.RTM_NEWACTION": "syscall",
- "syscall.RTM_NEWADDR": "syscall",
- "syscall.RTM_NEWADDRLABEL": "syscall",
- "syscall.RTM_NEWLINK": "syscall",
- "syscall.RTM_NEWMADDR": "syscall",
- "syscall.RTM_NEWMADDR2": "syscall",
- "syscall.RTM_NEWNDUSEROPT": "syscall",
- "syscall.RTM_NEWNEIGH": "syscall",
- "syscall.RTM_NEWNEIGHTBL": "syscall",
- "syscall.RTM_NEWPREFIX": "syscall",
- "syscall.RTM_NEWQDISC": "syscall",
- "syscall.RTM_NEWROUTE": "syscall",
- "syscall.RTM_NEWRULE": "syscall",
- "syscall.RTM_NEWTCLASS": "syscall",
- "syscall.RTM_NEWTFILTER": "syscall",
- "syscall.RTM_NR_FAMILIES": "syscall",
- "syscall.RTM_NR_MSGTYPES": "syscall",
- "syscall.RTM_OIFINFO": "syscall",
- "syscall.RTM_OLDADD": "syscall",
- "syscall.RTM_OLDDEL": "syscall",
- "syscall.RTM_OOIFINFO": "syscall",
- "syscall.RTM_REDIRECT": "syscall",
- "syscall.RTM_RESOLVE": "syscall",
- "syscall.RTM_RTTUNIT": "syscall",
- "syscall.RTM_SETDCB": "syscall",
- "syscall.RTM_SETGATE": "syscall",
- "syscall.RTM_SETLINK": "syscall",
- "syscall.RTM_SETNEIGHTBL": "syscall",
- "syscall.RTM_VERSION": "syscall",
- "syscall.RTNH_ALIGNTO": "syscall",
- "syscall.RTNH_F_DEAD": "syscall",
- "syscall.RTNH_F_ONLINK": "syscall",
- "syscall.RTNH_F_PERVASIVE": "syscall",
- "syscall.RTNLGRP_IPV4_IFADDR": "syscall",
- "syscall.RTNLGRP_IPV4_MROUTE": "syscall",
- "syscall.RTNLGRP_IPV4_ROUTE": "syscall",
- "syscall.RTNLGRP_IPV4_RULE": "syscall",
- "syscall.RTNLGRP_IPV6_IFADDR": "syscall",
- "syscall.RTNLGRP_IPV6_IFINFO": "syscall",
- "syscall.RTNLGRP_IPV6_MROUTE": "syscall",
- "syscall.RTNLGRP_IPV6_PREFIX": "syscall",
- "syscall.RTNLGRP_IPV6_ROUTE": "syscall",
- "syscall.RTNLGRP_IPV6_RULE": "syscall",
- "syscall.RTNLGRP_LINK": "syscall",
- "syscall.RTNLGRP_ND_USEROPT": "syscall",
- "syscall.RTNLGRP_NEIGH": "syscall",
- "syscall.RTNLGRP_NONE": "syscall",
- "syscall.RTNLGRP_NOTIFY": "syscall",
- "syscall.RTNLGRP_TC": "syscall",
- "syscall.RTN_ANYCAST": "syscall",
- "syscall.RTN_BLACKHOLE": "syscall",
- "syscall.RTN_BROADCAST": "syscall",
- "syscall.RTN_LOCAL": "syscall",
- "syscall.RTN_MAX": "syscall",
- "syscall.RTN_MULTICAST": "syscall",
- "syscall.RTN_NAT": "syscall",
- "syscall.RTN_PROHIBIT": "syscall",
- "syscall.RTN_THROW": "syscall",
- "syscall.RTN_UNICAST": "syscall",
- "syscall.RTN_UNREACHABLE": "syscall",
- "syscall.RTN_UNSPEC": "syscall",
- "syscall.RTN_XRESOLVE": "syscall",
- "syscall.RTPROT_BIRD": "syscall",
- "syscall.RTPROT_BOOT": "syscall",
- "syscall.RTPROT_DHCP": "syscall",
- "syscall.RTPROT_DNROUTED": "syscall",
- "syscall.RTPROT_GATED": "syscall",
- "syscall.RTPROT_KERNEL": "syscall",
- "syscall.RTPROT_MRT": "syscall",
- "syscall.RTPROT_NTK": "syscall",
- "syscall.RTPROT_RA": "syscall",
- "syscall.RTPROT_REDIRECT": "syscall",
- "syscall.RTPROT_STATIC": "syscall",
- "syscall.RTPROT_UNSPEC": "syscall",
- "syscall.RTPROT_XORP": "syscall",
- "syscall.RTPROT_ZEBRA": "syscall",
- "syscall.RTV_EXPIRE": "syscall",
- "syscall.RTV_HOPCOUNT": "syscall",
- "syscall.RTV_MTU": "syscall",
- "syscall.RTV_RPIPE": "syscall",
- "syscall.RTV_RTT": "syscall",
- "syscall.RTV_RTTVAR": "syscall",
- "syscall.RTV_SPIPE": "syscall",
- "syscall.RTV_SSTHRESH": "syscall",
- "syscall.RTV_WEIGHT": "syscall",
- "syscall.RT_CACHING_CONTEXT": "syscall",
- "syscall.RT_CLASS_DEFAULT": "syscall",
- "syscall.RT_CLASS_LOCAL": "syscall",
- "syscall.RT_CLASS_MAIN": "syscall",
- "syscall.RT_CLASS_MAX": "syscall",
- "syscall.RT_CLASS_UNSPEC": "syscall",
- "syscall.RT_DEFAULT_FIB": "syscall",
- "syscall.RT_NORTREF": "syscall",
- "syscall.RT_SCOPE_HOST": "syscall",
- "syscall.RT_SCOPE_LINK": "syscall",
- "syscall.RT_SCOPE_NOWHERE": "syscall",
- "syscall.RT_SCOPE_SITE": "syscall",
- "syscall.RT_SCOPE_UNIVERSE": "syscall",
- "syscall.RT_TABLEID_MAX": "syscall",
- "syscall.RT_TABLE_COMPAT": "syscall",
- "syscall.RT_TABLE_DEFAULT": "syscall",
- "syscall.RT_TABLE_LOCAL": "syscall",
- "syscall.RT_TABLE_MAIN": "syscall",
- "syscall.RT_TABLE_MAX": "syscall",
- "syscall.RT_TABLE_UNSPEC": "syscall",
- "syscall.RUSAGE_CHILDREN": "syscall",
- "syscall.RUSAGE_SELF": "syscall",
- "syscall.RUSAGE_THREAD": "syscall",
- "syscall.Radvisory_t": "syscall",
- "syscall.RawSockaddr": "syscall",
- "syscall.RawSockaddrAny": "syscall",
- "syscall.RawSockaddrDatalink": "syscall",
- "syscall.RawSockaddrInet4": "syscall",
- "syscall.RawSockaddrInet6": "syscall",
- "syscall.RawSockaddrLinklayer": "syscall",
- "syscall.RawSockaddrNetlink": "syscall",
- "syscall.RawSockaddrUnix": "syscall",
- "syscall.RawSyscall": "syscall",
- "syscall.RawSyscall6": "syscall",
- "syscall.Read": "syscall",
- "syscall.ReadConsole": "syscall",
- "syscall.ReadDirectoryChanges": "syscall",
- "syscall.ReadDirent": "syscall",
- "syscall.ReadFile": "syscall",
- "syscall.Readlink": "syscall",
- "syscall.Reboot": "syscall",
- "syscall.Recvfrom": "syscall",
- "syscall.Recvmsg": "syscall",
- "syscall.RegCloseKey": "syscall",
- "syscall.RegEnumKeyEx": "syscall",
- "syscall.RegOpenKeyEx": "syscall",
- "syscall.RegQueryInfoKey": "syscall",
- "syscall.RegQueryValueEx": "syscall",
- "syscall.RemoveDirectory": "syscall",
- "syscall.Removexattr": "syscall",
- "syscall.Rename": "syscall",
- "syscall.Renameat": "syscall",
- "syscall.Revoke": "syscall",
- "syscall.Rlimit": "syscall",
- "syscall.Rmdir": "syscall",
- "syscall.RouteMessage": "syscall",
- "syscall.RouteRIB": "syscall",
- "syscall.RtAttr": "syscall",
- "syscall.RtGenmsg": "syscall",
- "syscall.RtMetrics": "syscall",
- "syscall.RtMsg": "syscall",
- "syscall.RtMsghdr": "syscall",
- "syscall.RtNexthop": "syscall",
- "syscall.Rusage": "syscall",
- "syscall.SCM_BINTIME": "syscall",
- "syscall.SCM_CREDENTIALS": "syscall",
- "syscall.SCM_CREDS": "syscall",
- "syscall.SCM_RIGHTS": "syscall",
- "syscall.SCM_TIMESTAMP": "syscall",
- "syscall.SCM_TIMESTAMPING": "syscall",
- "syscall.SCM_TIMESTAMPNS": "syscall",
- "syscall.SCM_TIMESTAMP_MONOTONIC": "syscall",
- "syscall.SHUT_RD": "syscall",
- "syscall.SHUT_RDWR": "syscall",
- "syscall.SHUT_WR": "syscall",
- "syscall.SID": "syscall",
- "syscall.SIDAndAttributes": "syscall",
- "syscall.SIGABRT": "syscall",
- "syscall.SIGALRM": "syscall",
- "syscall.SIGBUS": "syscall",
- "syscall.SIGCHLD": "syscall",
- "syscall.SIGCLD": "syscall",
- "syscall.SIGCONT": "syscall",
- "syscall.SIGEMT": "syscall",
- "syscall.SIGFPE": "syscall",
- "syscall.SIGHUP": "syscall",
- "syscall.SIGILL": "syscall",
- "syscall.SIGINFO": "syscall",
- "syscall.SIGINT": "syscall",
- "syscall.SIGIO": "syscall",
- "syscall.SIGIOT": "syscall",
- "syscall.SIGKILL": "syscall",
- "syscall.SIGLIBRT": "syscall",
- "syscall.SIGLWP": "syscall",
- "syscall.SIGPIPE": "syscall",
- "syscall.SIGPOLL": "syscall",
- "syscall.SIGPROF": "syscall",
- "syscall.SIGPWR": "syscall",
- "syscall.SIGQUIT": "syscall",
- "syscall.SIGSEGV": "syscall",
- "syscall.SIGSTKFLT": "syscall",
- "syscall.SIGSTOP": "syscall",
- "syscall.SIGSYS": "syscall",
- "syscall.SIGTERM": "syscall",
- "syscall.SIGTHR": "syscall",
- "syscall.SIGTRAP": "syscall",
- "syscall.SIGTSTP": "syscall",
- "syscall.SIGTTIN": "syscall",
- "syscall.SIGTTOU": "syscall",
- "syscall.SIGUNUSED": "syscall",
- "syscall.SIGURG": "syscall",
- "syscall.SIGUSR1": "syscall",
- "syscall.SIGUSR2": "syscall",
- "syscall.SIGVTALRM": "syscall",
- "syscall.SIGWINCH": "syscall",
- "syscall.SIGXCPU": "syscall",
- "syscall.SIGXFSZ": "syscall",
- "syscall.SIOCADDDLCI": "syscall",
- "syscall.SIOCADDMULTI": "syscall",
- "syscall.SIOCADDRT": "syscall",
- "syscall.SIOCAIFADDR": "syscall",
- "syscall.SIOCAIFGROUP": "syscall",
- "syscall.SIOCALIFADDR": "syscall",
- "syscall.SIOCARPIPLL": "syscall",
- "syscall.SIOCATMARK": "syscall",
- "syscall.SIOCAUTOADDR": "syscall",
- "syscall.SIOCAUTONETMASK": "syscall",
- "syscall.SIOCBRDGADD": "syscall",
- "syscall.SIOCBRDGADDS": "syscall",
- "syscall.SIOCBRDGARL": "syscall",
- "syscall.SIOCBRDGDADDR": "syscall",
- "syscall.SIOCBRDGDEL": "syscall",
- "syscall.SIOCBRDGDELS": "syscall",
- "syscall.SIOCBRDGFLUSH": "syscall",
- "syscall.SIOCBRDGFRL": "syscall",
- "syscall.SIOCBRDGGCACHE": "syscall",
- "syscall.SIOCBRDGGFD": "syscall",
- "syscall.SIOCBRDGGHT": "syscall",
- "syscall.SIOCBRDGGIFFLGS": "syscall",
- "syscall.SIOCBRDGGMA": "syscall",
- "syscall.SIOCBRDGGPARAM": "syscall",
- "syscall.SIOCBRDGGPRI": "syscall",
- "syscall.SIOCBRDGGRL": "syscall",
- "syscall.SIOCBRDGGSIFS": "syscall",
- "syscall.SIOCBRDGGTO": "syscall",
- "syscall.SIOCBRDGIFS": "syscall",
- "syscall.SIOCBRDGRTS": "syscall",
- "syscall.SIOCBRDGSADDR": "syscall",
- "syscall.SIOCBRDGSCACHE": "syscall",
- "syscall.SIOCBRDGSFD": "syscall",
- "syscall.SIOCBRDGSHT": "syscall",
- "syscall.SIOCBRDGSIFCOST": "syscall",
- "syscall.SIOCBRDGSIFFLGS": "syscall",
- "syscall.SIOCBRDGSIFPRIO": "syscall",
- "syscall.SIOCBRDGSMA": "syscall",
- "syscall.SIOCBRDGSPRI": "syscall",
- "syscall.SIOCBRDGSPROTO": "syscall",
- "syscall.SIOCBRDGSTO": "syscall",
- "syscall.SIOCBRDGSTXHC": "syscall",
- "syscall.SIOCDARP": "syscall",
- "syscall.SIOCDELDLCI": "syscall",
- "syscall.SIOCDELMULTI": "syscall",
- "syscall.SIOCDELRT": "syscall",
- "syscall.SIOCDEVPRIVATE": "syscall",
- "syscall.SIOCDIFADDR": "syscall",
- "syscall.SIOCDIFGROUP": "syscall",
- "syscall.SIOCDIFPHYADDR": "syscall",
- "syscall.SIOCDLIFADDR": "syscall",
- "syscall.SIOCDRARP": "syscall",
- "syscall.SIOCGARP": "syscall",
- "syscall.SIOCGDRVSPEC": "syscall",
- "syscall.SIOCGETKALIVE": "syscall",
- "syscall.SIOCGETLABEL": "syscall",
- "syscall.SIOCGETPFLOW": "syscall",
- "syscall.SIOCGETPFSYNC": "syscall",
- "syscall.SIOCGETSGCNT": "syscall",
- "syscall.SIOCGETVIFCNT": "syscall",
- "syscall.SIOCGETVLAN": "syscall",
- "syscall.SIOCGHIWAT": "syscall",
- "syscall.SIOCGIFADDR": "syscall",
- "syscall.SIOCGIFADDRPREF": "syscall",
- "syscall.SIOCGIFALIAS": "syscall",
- "syscall.SIOCGIFALTMTU": "syscall",
- "syscall.SIOCGIFASYNCMAP": "syscall",
- "syscall.SIOCGIFBOND": "syscall",
- "syscall.SIOCGIFBR": "syscall",
- "syscall.SIOCGIFBRDADDR": "syscall",
- "syscall.SIOCGIFCAP": "syscall",
- "syscall.SIOCGIFCONF": "syscall",
- "syscall.SIOCGIFCOUNT": "syscall",
- "syscall.SIOCGIFDATA": "syscall",
- "syscall.SIOCGIFDESCR": "syscall",
- "syscall.SIOCGIFDEVMTU": "syscall",
- "syscall.SIOCGIFDLT": "syscall",
- "syscall.SIOCGIFDSTADDR": "syscall",
- "syscall.SIOCGIFENCAP": "syscall",
- "syscall.SIOCGIFFIB": "syscall",
- "syscall.SIOCGIFFLAGS": "syscall",
- "syscall.SIOCGIFGATTR": "syscall",
- "syscall.SIOCGIFGENERIC": "syscall",
- "syscall.SIOCGIFGMEMB": "syscall",
- "syscall.SIOCGIFGROUP": "syscall",
- "syscall.SIOCGIFHARDMTU": "syscall",
- "syscall.SIOCGIFHWADDR": "syscall",
- "syscall.SIOCGIFINDEX": "syscall",
- "syscall.SIOCGIFKPI": "syscall",
- "syscall.SIOCGIFMAC": "syscall",
- "syscall.SIOCGIFMAP": "syscall",
- "syscall.SIOCGIFMEDIA": "syscall",
- "syscall.SIOCGIFMEM": "syscall",
- "syscall.SIOCGIFMETRIC": "syscall",
- "syscall.SIOCGIFMTU": "syscall",
- "syscall.SIOCGIFNAME": "syscall",
- "syscall.SIOCGIFNETMASK": "syscall",
- "syscall.SIOCGIFPDSTADDR": "syscall",
- "syscall.SIOCGIFPFLAGS": "syscall",
- "syscall.SIOCGIFPHYS": "syscall",
- "syscall.SIOCGIFPRIORITY": "syscall",
- "syscall.SIOCGIFPSRCADDR": "syscall",
- "syscall.SIOCGIFRDOMAIN": "syscall",
- "syscall.SIOCGIFRTLABEL": "syscall",
- "syscall.SIOCGIFSLAVE": "syscall",
- "syscall.SIOCGIFSTATUS": "syscall",
- "syscall.SIOCGIFTIMESLOT": "syscall",
- "syscall.SIOCGIFTXQLEN": "syscall",
- "syscall.SIOCGIFVLAN": "syscall",
- "syscall.SIOCGIFWAKEFLAGS": "syscall",
- "syscall.SIOCGIFXFLAGS": "syscall",
- "syscall.SIOCGLIFADDR": "syscall",
- "syscall.SIOCGLIFPHYADDR": "syscall",
- "syscall.SIOCGLIFPHYRTABLE": "syscall",
- "syscall.SIOCGLIFPHYTTL": "syscall",
- "syscall.SIOCGLINKSTR": "syscall",
- "syscall.SIOCGLOWAT": "syscall",
- "syscall.SIOCGPGRP": "syscall",
- "syscall.SIOCGPRIVATE_0": "syscall",
- "syscall.SIOCGPRIVATE_1": "syscall",
- "syscall.SIOCGRARP": "syscall",
- "syscall.SIOCGSPPPPARAMS": "syscall",
- "syscall.SIOCGSTAMP": "syscall",
- "syscall.SIOCGSTAMPNS": "syscall",
- "syscall.SIOCGVH": "syscall",
- "syscall.SIOCGVNETID": "syscall",
- "syscall.SIOCIFCREATE": "syscall",
- "syscall.SIOCIFCREATE2": "syscall",
- "syscall.SIOCIFDESTROY": "syscall",
- "syscall.SIOCIFGCLONERS": "syscall",
- "syscall.SIOCINITIFADDR": "syscall",
- "syscall.SIOCPROTOPRIVATE": "syscall",
- "syscall.SIOCRSLVMULTI": "syscall",
- "syscall.SIOCRTMSG": "syscall",
- "syscall.SIOCSARP": "syscall",
- "syscall.SIOCSDRVSPEC": "syscall",
- "syscall.SIOCSETKALIVE": "syscall",
- "syscall.SIOCSETLABEL": "syscall",
- "syscall.SIOCSETPFLOW": "syscall",
- "syscall.SIOCSETPFSYNC": "syscall",
- "syscall.SIOCSETVLAN": "syscall",
- "syscall.SIOCSHIWAT": "syscall",
- "syscall.SIOCSIFADDR": "syscall",
- "syscall.SIOCSIFADDRPREF": "syscall",
- "syscall.SIOCSIFALTMTU": "syscall",
- "syscall.SIOCSIFASYNCMAP": "syscall",
- "syscall.SIOCSIFBOND": "syscall",
- "syscall.SIOCSIFBR": "syscall",
- "syscall.SIOCSIFBRDADDR": "syscall",
- "syscall.SIOCSIFCAP": "syscall",
- "syscall.SIOCSIFDESCR": "syscall",
- "syscall.SIOCSIFDSTADDR": "syscall",
- "syscall.SIOCSIFENCAP": "syscall",
- "syscall.SIOCSIFFIB": "syscall",
- "syscall.SIOCSIFFLAGS": "syscall",
- "syscall.SIOCSIFGATTR": "syscall",
- "syscall.SIOCSIFGENERIC": "syscall",
- "syscall.SIOCSIFHWADDR": "syscall",
- "syscall.SIOCSIFHWBROADCAST": "syscall",
- "syscall.SIOCSIFKPI": "syscall",
- "syscall.SIOCSIFLINK": "syscall",
- "syscall.SIOCSIFLLADDR": "syscall",
- "syscall.SIOCSIFMAC": "syscall",
- "syscall.SIOCSIFMAP": "syscall",
- "syscall.SIOCSIFMEDIA": "syscall",
- "syscall.SIOCSIFMEM": "syscall",
- "syscall.SIOCSIFMETRIC": "syscall",
- "syscall.SIOCSIFMTU": "syscall",
- "syscall.SIOCSIFNAME": "syscall",
- "syscall.SIOCSIFNETMASK": "syscall",
- "syscall.SIOCSIFPFLAGS": "syscall",
- "syscall.SIOCSIFPHYADDR": "syscall",
- "syscall.SIOCSIFPHYS": "syscall",
- "syscall.SIOCSIFPRIORITY": "syscall",
- "syscall.SIOCSIFRDOMAIN": "syscall",
- "syscall.SIOCSIFRTLABEL": "syscall",
- "syscall.SIOCSIFRVNET": "syscall",
- "syscall.SIOCSIFSLAVE": "syscall",
- "syscall.SIOCSIFTIMESLOT": "syscall",
- "syscall.SIOCSIFTXQLEN": "syscall",
- "syscall.SIOCSIFVLAN": "syscall",
- "syscall.SIOCSIFVNET": "syscall",
- "syscall.SIOCSIFXFLAGS": "syscall",
- "syscall.SIOCSLIFPHYADDR": "syscall",
- "syscall.SIOCSLIFPHYRTABLE": "syscall",
- "syscall.SIOCSLIFPHYTTL": "syscall",
- "syscall.SIOCSLINKSTR": "syscall",
- "syscall.SIOCSLOWAT": "syscall",
- "syscall.SIOCSPGRP": "syscall",
- "syscall.SIOCSRARP": "syscall",
- "syscall.SIOCSSPPPPARAMS": "syscall",
- "syscall.SIOCSVH": "syscall",
- "syscall.SIOCSVNETID": "syscall",
- "syscall.SIOCZIFDATA": "syscall",
- "syscall.SIO_GET_EXTENSION_FUNCTION_POINTER": "syscall",
- "syscall.SIO_GET_INTERFACE_LIST": "syscall",
- "syscall.SIO_KEEPALIVE_VALS": "syscall",
- "syscall.SOCK_CLOEXEC": "syscall",
- "syscall.SOCK_DCCP": "syscall",
- "syscall.SOCK_DGRAM": "syscall",
- "syscall.SOCK_FLAGS_MASK": "syscall",
- "syscall.SOCK_MAXADDRLEN": "syscall",
- "syscall.SOCK_NONBLOCK": "syscall",
- "syscall.SOCK_NOSIGPIPE": "syscall",
- "syscall.SOCK_PACKET": "syscall",
- "syscall.SOCK_RAW": "syscall",
- "syscall.SOCK_RDM": "syscall",
- "syscall.SOCK_SEQPACKET": "syscall",
- "syscall.SOCK_STREAM": "syscall",
- "syscall.SOL_AAL": "syscall",
- "syscall.SOL_ATM": "syscall",
- "syscall.SOL_DECNET": "syscall",
- "syscall.SOL_ICMPV6": "syscall",
- "syscall.SOL_IP": "syscall",
- "syscall.SOL_IPV6": "syscall",
- "syscall.SOL_IRDA": "syscall",
- "syscall.SOL_PACKET": "syscall",
- "syscall.SOL_RAW": "syscall",
- "syscall.SOL_SOCKET": "syscall",
- "syscall.SOL_TCP": "syscall",
- "syscall.SOL_X25": "syscall",
- "syscall.SOMAXCONN": "syscall",
- "syscall.SO_ACCEPTCONN": "syscall",
- "syscall.SO_ACCEPTFILTER": "syscall",
- "syscall.SO_ATTACH_FILTER": "syscall",
- "syscall.SO_BINDANY": "syscall",
- "syscall.SO_BINDTODEVICE": "syscall",
- "syscall.SO_BINTIME": "syscall",
- "syscall.SO_BROADCAST": "syscall",
- "syscall.SO_BSDCOMPAT": "syscall",
- "syscall.SO_DEBUG": "syscall",
- "syscall.SO_DETACH_FILTER": "syscall",
- "syscall.SO_DOMAIN": "syscall",
- "syscall.SO_DONTROUTE": "syscall",
- "syscall.SO_DONTTRUNC": "syscall",
- "syscall.SO_ERROR": "syscall",
- "syscall.SO_KEEPALIVE": "syscall",
- "syscall.SO_LABEL": "syscall",
- "syscall.SO_LINGER": "syscall",
- "syscall.SO_LINGER_SEC": "syscall",
- "syscall.SO_LISTENINCQLEN": "syscall",
- "syscall.SO_LISTENQLEN": "syscall",
- "syscall.SO_LISTENQLIMIT": "syscall",
- "syscall.SO_MARK": "syscall",
- "syscall.SO_NETPROC": "syscall",
- "syscall.SO_NKE": "syscall",
- "syscall.SO_NOADDRERR": "syscall",
- "syscall.SO_NOHEADER": "syscall",
- "syscall.SO_NOSIGPIPE": "syscall",
- "syscall.SO_NOTIFYCONFLICT": "syscall",
- "syscall.SO_NO_CHECK": "syscall",
- "syscall.SO_NO_DDP": "syscall",
- "syscall.SO_NO_OFFLOAD": "syscall",
- "syscall.SO_NP_EXTENSIONS": "syscall",
- "syscall.SO_NREAD": "syscall",
- "syscall.SO_NWRITE": "syscall",
- "syscall.SO_OOBINLINE": "syscall",
- "syscall.SO_OVERFLOWED": "syscall",
- "syscall.SO_PASSCRED": "syscall",
- "syscall.SO_PASSSEC": "syscall",
- "syscall.SO_PEERCRED": "syscall",
- "syscall.SO_PEERLABEL": "syscall",
- "syscall.SO_PEERNAME": "syscall",
- "syscall.SO_PEERSEC": "syscall",
- "syscall.SO_PRIORITY": "syscall",
- "syscall.SO_PROTOCOL": "syscall",
- "syscall.SO_PROTOTYPE": "syscall",
- "syscall.SO_RANDOMPORT": "syscall",
- "syscall.SO_RCVBUF": "syscall",
- "syscall.SO_RCVBUFFORCE": "syscall",
- "syscall.SO_RCVLOWAT": "syscall",
- "syscall.SO_RCVTIMEO": "syscall",
- "syscall.SO_RESTRICTIONS": "syscall",
- "syscall.SO_RESTRICT_DENYIN": "syscall",
- "syscall.SO_RESTRICT_DENYOUT": "syscall",
- "syscall.SO_RESTRICT_DENYSET": "syscall",
- "syscall.SO_REUSEADDR": "syscall",
- "syscall.SO_REUSEPORT": "syscall",
- "syscall.SO_REUSESHAREUID": "syscall",
- "syscall.SO_RTABLE": "syscall",
- "syscall.SO_RXQ_OVFL": "syscall",
- "syscall.SO_SECURITY_AUTHENTICATION": "syscall",
- "syscall.SO_SECURITY_ENCRYPTION_NETWORK": "syscall",
- "syscall.SO_SECURITY_ENCRYPTION_TRANSPORT": "syscall",
- "syscall.SO_SETFIB": "syscall",
- "syscall.SO_SNDBUF": "syscall",
- "syscall.SO_SNDBUFFORCE": "syscall",
- "syscall.SO_SNDLOWAT": "syscall",
- "syscall.SO_SNDTIMEO": "syscall",
- "syscall.SO_SPLICE": "syscall",
- "syscall.SO_TIMESTAMP": "syscall",
- "syscall.SO_TIMESTAMPING": "syscall",
- "syscall.SO_TIMESTAMPNS": "syscall",
- "syscall.SO_TIMESTAMP_MONOTONIC": "syscall",
- "syscall.SO_TYPE": "syscall",
- "syscall.SO_UPCALLCLOSEWAIT": "syscall",
- "syscall.SO_UPDATE_ACCEPT_CONTEXT": "syscall",
- "syscall.SO_UPDATE_CONNECT_CONTEXT": "syscall",
- "syscall.SO_USELOOPBACK": "syscall",
- "syscall.SO_USER_COOKIE": "syscall",
- "syscall.SO_VENDOR": "syscall",
- "syscall.SO_WANTMORE": "syscall",
- "syscall.SO_WANTOOBFLAG": "syscall",
- "syscall.SSLExtraCertChainPolicyPara": "syscall",
- "syscall.STANDARD_RIGHTS_ALL": "syscall",
- "syscall.STANDARD_RIGHTS_EXECUTE": "syscall",
- "syscall.STANDARD_RIGHTS_READ": "syscall",
- "syscall.STANDARD_RIGHTS_REQUIRED": "syscall",
- "syscall.STANDARD_RIGHTS_WRITE": "syscall",
- "syscall.STARTF_USESHOWWINDOW": "syscall",
- "syscall.STARTF_USESTDHANDLES": "syscall",
- "syscall.STD_ERROR_HANDLE": "syscall",
- "syscall.STD_INPUT_HANDLE": "syscall",
- "syscall.STD_OUTPUT_HANDLE": "syscall",
- "syscall.SUBLANG_ENGLISH_US": "syscall",
- "syscall.SW_FORCEMINIMIZE": "syscall",
- "syscall.SW_HIDE": "syscall",
- "syscall.SW_MAXIMIZE": "syscall",
- "syscall.SW_MINIMIZE": "syscall",
- "syscall.SW_NORMAL": "syscall",
- "syscall.SW_RESTORE": "syscall",
- "syscall.SW_SHOW": "syscall",
- "syscall.SW_SHOWDEFAULT": "syscall",
- "syscall.SW_SHOWMAXIMIZED": "syscall",
- "syscall.SW_SHOWMINIMIZED": "syscall",
- "syscall.SW_SHOWMINNOACTIVE": "syscall",
- "syscall.SW_SHOWNA": "syscall",
- "syscall.SW_SHOWNOACTIVATE": "syscall",
- "syscall.SW_SHOWNORMAL": "syscall",
- "syscall.SYNCHRONIZE": "syscall",
- "syscall.SYSCTL_VERSION": "syscall",
- "syscall.SYSCTL_VERS_0": "syscall",
- "syscall.SYSCTL_VERS_1": "syscall",
- "syscall.SYSCTL_VERS_MASK": "syscall",
- "syscall.SYS_ABORT2": "syscall",
- "syscall.SYS_ACCEPT": "syscall",
- "syscall.SYS_ACCEPT4": "syscall",
- "syscall.SYS_ACCEPT_NOCANCEL": "syscall",
- "syscall.SYS_ACCESS": "syscall",
- "syscall.SYS_ACCESS_EXTENDED": "syscall",
- "syscall.SYS_ACCT": "syscall",
- "syscall.SYS_ADD_KEY": "syscall",
- "syscall.SYS_ADD_PROFIL": "syscall",
- "syscall.SYS_ADJFREQ": "syscall",
- "syscall.SYS_ADJTIME": "syscall",
- "syscall.SYS_ADJTIMEX": "syscall",
- "syscall.SYS_AFS_SYSCALL": "syscall",
- "syscall.SYS_AIO_CANCEL": "syscall",
- "syscall.SYS_AIO_ERROR": "syscall",
- "syscall.SYS_AIO_FSYNC": "syscall",
- "syscall.SYS_AIO_READ": "syscall",
- "syscall.SYS_AIO_RETURN": "syscall",
- "syscall.SYS_AIO_SUSPEND": "syscall",
- "syscall.SYS_AIO_SUSPEND_NOCANCEL": "syscall",
- "syscall.SYS_AIO_WRITE": "syscall",
- "syscall.SYS_ALARM": "syscall",
- "syscall.SYS_ARCH_PRCTL": "syscall",
- "syscall.SYS_ARM_FADVISE64_64": "syscall",
- "syscall.SYS_ARM_SYNC_FILE_RANGE": "syscall",
- "syscall.SYS_ATGETMSG": "syscall",
- "syscall.SYS_ATPGETREQ": "syscall",
- "syscall.SYS_ATPGETRSP": "syscall",
- "syscall.SYS_ATPSNDREQ": "syscall",
- "syscall.SYS_ATPSNDRSP": "syscall",
- "syscall.SYS_ATPUTMSG": "syscall",
- "syscall.SYS_ATSOCKET": "syscall",
- "syscall.SYS_AUDIT": "syscall",
- "syscall.SYS_AUDITCTL": "syscall",
- "syscall.SYS_AUDITON": "syscall",
- "syscall.SYS_AUDIT_SESSION_JOIN": "syscall",
- "syscall.SYS_AUDIT_SESSION_PORT": "syscall",
- "syscall.SYS_AUDIT_SESSION_SELF": "syscall",
- "syscall.SYS_BDFLUSH": "syscall",
- "syscall.SYS_BIND": "syscall",
- "syscall.SYS_BINDAT": "syscall",
- "syscall.SYS_BREAK": "syscall",
- "syscall.SYS_BRK": "syscall",
- "syscall.SYS_BSDTHREAD_CREATE": "syscall",
- "syscall.SYS_BSDTHREAD_REGISTER": "syscall",
- "syscall.SYS_BSDTHREAD_TERMINATE": "syscall",
- "syscall.SYS_CAPGET": "syscall",
- "syscall.SYS_CAPSET": "syscall",
- "syscall.SYS_CAP_ENTER": "syscall",
- "syscall.SYS_CAP_FCNTLS_GET": "syscall",
- "syscall.SYS_CAP_FCNTLS_LIMIT": "syscall",
- "syscall.SYS_CAP_GETMODE": "syscall",
- "syscall.SYS_CAP_GETRIGHTS": "syscall",
- "syscall.SYS_CAP_IOCTLS_GET": "syscall",
- "syscall.SYS_CAP_IOCTLS_LIMIT": "syscall",
- "syscall.SYS_CAP_NEW": "syscall",
- "syscall.SYS_CAP_RIGHTS_GET": "syscall",
- "syscall.SYS_CAP_RIGHTS_LIMIT": "syscall",
- "syscall.SYS_CHDIR": "syscall",
- "syscall.SYS_CHFLAGS": "syscall",
- "syscall.SYS_CHFLAGSAT": "syscall",
- "syscall.SYS_CHMOD": "syscall",
- "syscall.SYS_CHMOD_EXTENDED": "syscall",
- "syscall.SYS_CHOWN": "syscall",
- "syscall.SYS_CHOWN32": "syscall",
- "syscall.SYS_CHROOT": "syscall",
- "syscall.SYS_CHUD": "syscall",
- "syscall.SYS_CLOCK_ADJTIME": "syscall",
- "syscall.SYS_CLOCK_GETCPUCLOCKID2": "syscall",
- "syscall.SYS_CLOCK_GETRES": "syscall",
- "syscall.SYS_CLOCK_GETTIME": "syscall",
- "syscall.SYS_CLOCK_NANOSLEEP": "syscall",
- "syscall.SYS_CLOCK_SETTIME": "syscall",
- "syscall.SYS_CLONE": "syscall",
- "syscall.SYS_CLOSE": "syscall",
- "syscall.SYS_CLOSEFROM": "syscall",
- "syscall.SYS_CLOSE_NOCANCEL": "syscall",
- "syscall.SYS_CONNECT": "syscall",
- "syscall.SYS_CONNECTAT": "syscall",
- "syscall.SYS_CONNECT_NOCANCEL": "syscall",
- "syscall.SYS_COPYFILE": "syscall",
- "syscall.SYS_CPUSET": "syscall",
- "syscall.SYS_CPUSET_GETAFFINITY": "syscall",
- "syscall.SYS_CPUSET_GETID": "syscall",
- "syscall.SYS_CPUSET_SETAFFINITY": "syscall",
- "syscall.SYS_CPUSET_SETID": "syscall",
- "syscall.SYS_CREAT": "syscall",
- "syscall.SYS_CREATE_MODULE": "syscall",
- "syscall.SYS_CSOPS": "syscall",
- "syscall.SYS_DELETE": "syscall",
- "syscall.SYS_DELETE_MODULE": "syscall",
- "syscall.SYS_DUP": "syscall",
- "syscall.SYS_DUP2": "syscall",
- "syscall.SYS_DUP3": "syscall",
- "syscall.SYS_EACCESS": "syscall",
- "syscall.SYS_EPOLL_CREATE": "syscall",
- "syscall.SYS_EPOLL_CREATE1": "syscall",
- "syscall.SYS_EPOLL_CTL": "syscall",
- "syscall.SYS_EPOLL_CTL_OLD": "syscall",
- "syscall.SYS_EPOLL_PWAIT": "syscall",
- "syscall.SYS_EPOLL_WAIT": "syscall",
- "syscall.SYS_EPOLL_WAIT_OLD": "syscall",
- "syscall.SYS_EVENTFD": "syscall",
- "syscall.SYS_EVENTFD2": "syscall",
- "syscall.SYS_EXCHANGEDATA": "syscall",
- "syscall.SYS_EXECVE": "syscall",
- "syscall.SYS_EXIT": "syscall",
- "syscall.SYS_EXIT_GROUP": "syscall",
- "syscall.SYS_EXTATTRCTL": "syscall",
- "syscall.SYS_EXTATTR_DELETE_FD": "syscall",
- "syscall.SYS_EXTATTR_DELETE_FILE": "syscall",
- "syscall.SYS_EXTATTR_DELETE_LINK": "syscall",
- "syscall.SYS_EXTATTR_GET_FD": "syscall",
- "syscall.SYS_EXTATTR_GET_FILE": "syscall",
- "syscall.SYS_EXTATTR_GET_LINK": "syscall",
- "syscall.SYS_EXTATTR_LIST_FD": "syscall",
- "syscall.SYS_EXTATTR_LIST_FILE": "syscall",
- "syscall.SYS_EXTATTR_LIST_LINK": "syscall",
- "syscall.SYS_EXTATTR_SET_FD": "syscall",
- "syscall.SYS_EXTATTR_SET_FILE": "syscall",
- "syscall.SYS_EXTATTR_SET_LINK": "syscall",
- "syscall.SYS_FACCESSAT": "syscall",
- "syscall.SYS_FADVISE64": "syscall",
- "syscall.SYS_FADVISE64_64": "syscall",
- "syscall.SYS_FALLOCATE": "syscall",
- "syscall.SYS_FANOTIFY_INIT": "syscall",
- "syscall.SYS_FANOTIFY_MARK": "syscall",
- "syscall.SYS_FCHDIR": "syscall",
- "syscall.SYS_FCHFLAGS": "syscall",
- "syscall.SYS_FCHMOD": "syscall",
- "syscall.SYS_FCHMODAT": "syscall",
- "syscall.SYS_FCHMOD_EXTENDED": "syscall",
- "syscall.SYS_FCHOWN": "syscall",
- "syscall.SYS_FCHOWN32": "syscall",
- "syscall.SYS_FCHOWNAT": "syscall",
- "syscall.SYS_FCHROOT": "syscall",
- "syscall.SYS_FCNTL": "syscall",
- "syscall.SYS_FCNTL64": "syscall",
- "syscall.SYS_FCNTL_NOCANCEL": "syscall",
- "syscall.SYS_FDATASYNC": "syscall",
- "syscall.SYS_FEXECVE": "syscall",
- "syscall.SYS_FFCLOCK_GETCOUNTER": "syscall",
- "syscall.SYS_FFCLOCK_GETESTIMATE": "syscall",
- "syscall.SYS_FFCLOCK_SETESTIMATE": "syscall",
- "syscall.SYS_FFSCTL": "syscall",
- "syscall.SYS_FGETATTRLIST": "syscall",
- "syscall.SYS_FGETXATTR": "syscall",
- "syscall.SYS_FHOPEN": "syscall",
- "syscall.SYS_FHSTAT": "syscall",
- "syscall.SYS_FHSTATFS": "syscall",
- "syscall.SYS_FILEPORT_MAKEFD": "syscall",
- "syscall.SYS_FILEPORT_MAKEPORT": "syscall",
- "syscall.SYS_FKTRACE": "syscall",
- "syscall.SYS_FLISTXATTR": "syscall",
- "syscall.SYS_FLOCK": "syscall",
- "syscall.SYS_FORK": "syscall",
- "syscall.SYS_FPATHCONF": "syscall",
- "syscall.SYS_FREEBSD6_FTRUNCATE": "syscall",
- "syscall.SYS_FREEBSD6_LSEEK": "syscall",
- "syscall.SYS_FREEBSD6_MMAP": "syscall",
- "syscall.SYS_FREEBSD6_PREAD": "syscall",
- "syscall.SYS_FREEBSD6_PWRITE": "syscall",
- "syscall.SYS_FREEBSD6_TRUNCATE": "syscall",
- "syscall.SYS_FREMOVEXATTR": "syscall",
- "syscall.SYS_FSCTL": "syscall",
- "syscall.SYS_FSETATTRLIST": "syscall",
- "syscall.SYS_FSETXATTR": "syscall",
- "syscall.SYS_FSGETPATH": "syscall",
- "syscall.SYS_FSTAT": "syscall",
- "syscall.SYS_FSTAT64": "syscall",
- "syscall.SYS_FSTAT64_EXTENDED": "syscall",
- "syscall.SYS_FSTATAT": "syscall",
- "syscall.SYS_FSTATAT64": "syscall",
- "syscall.SYS_FSTATFS": "syscall",
- "syscall.SYS_FSTATFS64": "syscall",
- "syscall.SYS_FSTATV": "syscall",
- "syscall.SYS_FSTATVFS1": "syscall",
- "syscall.SYS_FSTAT_EXTENDED": "syscall",
- "syscall.SYS_FSYNC": "syscall",
- "syscall.SYS_FSYNC_NOCANCEL": "syscall",
- "syscall.SYS_FSYNC_RANGE": "syscall",
- "syscall.SYS_FTIME": "syscall",
- "syscall.SYS_FTRUNCATE": "syscall",
- "syscall.SYS_FTRUNCATE64": "syscall",
- "syscall.SYS_FUTEX": "syscall",
- "syscall.SYS_FUTIMENS": "syscall",
- "syscall.SYS_FUTIMES": "syscall",
- "syscall.SYS_FUTIMESAT": "syscall",
- "syscall.SYS_GETATTRLIST": "syscall",
- "syscall.SYS_GETAUDIT": "syscall",
- "syscall.SYS_GETAUDIT_ADDR": "syscall",
- "syscall.SYS_GETAUID": "syscall",
- "syscall.SYS_GETCONTEXT": "syscall",
- "syscall.SYS_GETCPU": "syscall",
- "syscall.SYS_GETCWD": "syscall",
- "syscall.SYS_GETDENTS": "syscall",
- "syscall.SYS_GETDENTS64": "syscall",
- "syscall.SYS_GETDIRENTRIES": "syscall",
- "syscall.SYS_GETDIRENTRIES64": "syscall",
- "syscall.SYS_GETDIRENTRIESATTR": "syscall",
- "syscall.SYS_GETDTABLECOUNT": "syscall",
- "syscall.SYS_GETDTABLESIZE": "syscall",
- "syscall.SYS_GETEGID": "syscall",
- "syscall.SYS_GETEGID32": "syscall",
- "syscall.SYS_GETEUID": "syscall",
- "syscall.SYS_GETEUID32": "syscall",
- "syscall.SYS_GETFH": "syscall",
- "syscall.SYS_GETFSSTAT": "syscall",
- "syscall.SYS_GETFSSTAT64": "syscall",
- "syscall.SYS_GETGID": "syscall",
- "syscall.SYS_GETGID32": "syscall",
- "syscall.SYS_GETGROUPS": "syscall",
- "syscall.SYS_GETGROUPS32": "syscall",
- "syscall.SYS_GETHOSTUUID": "syscall",
- "syscall.SYS_GETITIMER": "syscall",
- "syscall.SYS_GETLCID": "syscall",
- "syscall.SYS_GETLOGIN": "syscall",
- "syscall.SYS_GETLOGINCLASS": "syscall",
- "syscall.SYS_GETPEERNAME": "syscall",
- "syscall.SYS_GETPGID": "syscall",
- "syscall.SYS_GETPGRP": "syscall",
- "syscall.SYS_GETPID": "syscall",
- "syscall.SYS_GETPMSG": "syscall",
- "syscall.SYS_GETPPID": "syscall",
- "syscall.SYS_GETPRIORITY": "syscall",
- "syscall.SYS_GETRESGID": "syscall",
- "syscall.SYS_GETRESGID32": "syscall",
- "syscall.SYS_GETRESUID": "syscall",
- "syscall.SYS_GETRESUID32": "syscall",
- "syscall.SYS_GETRLIMIT": "syscall",
- "syscall.SYS_GETRTABLE": "syscall",
- "syscall.SYS_GETRUSAGE": "syscall",
- "syscall.SYS_GETSGROUPS": "syscall",
- "syscall.SYS_GETSID": "syscall",
- "syscall.SYS_GETSOCKNAME": "syscall",
- "syscall.SYS_GETSOCKOPT": "syscall",
- "syscall.SYS_GETTHRID": "syscall",
- "syscall.SYS_GETTID": "syscall",
- "syscall.SYS_GETTIMEOFDAY": "syscall",
- "syscall.SYS_GETUID": "syscall",
- "syscall.SYS_GETUID32": "syscall",
- "syscall.SYS_GETVFSSTAT": "syscall",
- "syscall.SYS_GETWGROUPS": "syscall",
- "syscall.SYS_GETXATTR": "syscall",
- "syscall.SYS_GET_KERNEL_SYMS": "syscall",
- "syscall.SYS_GET_MEMPOLICY": "syscall",
- "syscall.SYS_GET_ROBUST_LIST": "syscall",
- "syscall.SYS_GET_THREAD_AREA": "syscall",
- "syscall.SYS_GTTY": "syscall",
- "syscall.SYS_IDENTITYSVC": "syscall",
- "syscall.SYS_IDLE": "syscall",
- "syscall.SYS_INITGROUPS": "syscall",
- "syscall.SYS_INIT_MODULE": "syscall",
- "syscall.SYS_INOTIFY_ADD_WATCH": "syscall",
- "syscall.SYS_INOTIFY_INIT": "syscall",
- "syscall.SYS_INOTIFY_INIT1": "syscall",
- "syscall.SYS_INOTIFY_RM_WATCH": "syscall",
- "syscall.SYS_IOCTL": "syscall",
- "syscall.SYS_IOPERM": "syscall",
- "syscall.SYS_IOPL": "syscall",
- "syscall.SYS_IOPOLICYSYS": "syscall",
- "syscall.SYS_IOPRIO_GET": "syscall",
- "syscall.SYS_IOPRIO_SET": "syscall",
- "syscall.SYS_IO_CANCEL": "syscall",
- "syscall.SYS_IO_DESTROY": "syscall",
- "syscall.SYS_IO_GETEVENTS": "syscall",
- "syscall.SYS_IO_SETUP": "syscall",
- "syscall.SYS_IO_SUBMIT": "syscall",
- "syscall.SYS_IPC": "syscall",
- "syscall.SYS_ISSETUGID": "syscall",
- "syscall.SYS_JAIL": "syscall",
- "syscall.SYS_JAIL_ATTACH": "syscall",
- "syscall.SYS_JAIL_GET": "syscall",
- "syscall.SYS_JAIL_REMOVE": "syscall",
- "syscall.SYS_JAIL_SET": "syscall",
- "syscall.SYS_KDEBUG_TRACE": "syscall",
- "syscall.SYS_KENV": "syscall",
- "syscall.SYS_KEVENT": "syscall",
- "syscall.SYS_KEVENT64": "syscall",
- "syscall.SYS_KEXEC_LOAD": "syscall",
- "syscall.SYS_KEYCTL": "syscall",
- "syscall.SYS_KILL": "syscall",
- "syscall.SYS_KLDFIND": "syscall",
- "syscall.SYS_KLDFIRSTMOD": "syscall",
- "syscall.SYS_KLDLOAD": "syscall",
- "syscall.SYS_KLDNEXT": "syscall",
- "syscall.SYS_KLDSTAT": "syscall",
- "syscall.SYS_KLDSYM": "syscall",
- "syscall.SYS_KLDUNLOAD": "syscall",
- "syscall.SYS_KLDUNLOADF": "syscall",
- "syscall.SYS_KQUEUE": "syscall",
- "syscall.SYS_KQUEUE1": "syscall",
- "syscall.SYS_KTIMER_CREATE": "syscall",
- "syscall.SYS_KTIMER_DELETE": "syscall",
- "syscall.SYS_KTIMER_GETOVERRUN": "syscall",
- "syscall.SYS_KTIMER_GETTIME": "syscall",
- "syscall.SYS_KTIMER_SETTIME": "syscall",
- "syscall.SYS_KTRACE": "syscall",
- "syscall.SYS_LCHFLAGS": "syscall",
- "syscall.SYS_LCHMOD": "syscall",
- "syscall.SYS_LCHOWN": "syscall",
- "syscall.SYS_LCHOWN32": "syscall",
- "syscall.SYS_LGETFH": "syscall",
- "syscall.SYS_LGETXATTR": "syscall",
- "syscall.SYS_LINK": "syscall",
- "syscall.SYS_LINKAT": "syscall",
- "syscall.SYS_LIO_LISTIO": "syscall",
- "syscall.SYS_LISTEN": "syscall",
- "syscall.SYS_LISTXATTR": "syscall",
- "syscall.SYS_LLISTXATTR": "syscall",
- "syscall.SYS_LOCK": "syscall",
- "syscall.SYS_LOOKUP_DCOOKIE": "syscall",
- "syscall.SYS_LPATHCONF": "syscall",
- "syscall.SYS_LREMOVEXATTR": "syscall",
- "syscall.SYS_LSEEK": "syscall",
- "syscall.SYS_LSETXATTR": "syscall",
- "syscall.SYS_LSTAT": "syscall",
- "syscall.SYS_LSTAT64": "syscall",
- "syscall.SYS_LSTAT64_EXTENDED": "syscall",
- "syscall.SYS_LSTATV": "syscall",
- "syscall.SYS_LSTAT_EXTENDED": "syscall",
- "syscall.SYS_LUTIMES": "syscall",
- "syscall.SYS_MAC_SYSCALL": "syscall",
- "syscall.SYS_MADVISE": "syscall",
- "syscall.SYS_MADVISE1": "syscall",
- "syscall.SYS_MAXSYSCALL": "syscall",
- "syscall.SYS_MBIND": "syscall",
- "syscall.SYS_MIGRATE_PAGES": "syscall",
- "syscall.SYS_MINCORE": "syscall",
- "syscall.SYS_MINHERIT": "syscall",
- "syscall.SYS_MKCOMPLEX": "syscall",
- "syscall.SYS_MKDIR": "syscall",
- "syscall.SYS_MKDIRAT": "syscall",
- "syscall.SYS_MKDIR_EXTENDED": "syscall",
- "syscall.SYS_MKFIFO": "syscall",
- "syscall.SYS_MKFIFOAT": "syscall",
- "syscall.SYS_MKFIFO_EXTENDED": "syscall",
- "syscall.SYS_MKNOD": "syscall",
- "syscall.SYS_MKNODAT": "syscall",
- "syscall.SYS_MLOCK": "syscall",
- "syscall.SYS_MLOCKALL": "syscall",
- "syscall.SYS_MMAP": "syscall",
- "syscall.SYS_MMAP2": "syscall",
- "syscall.SYS_MODCTL": "syscall",
- "syscall.SYS_MODFIND": "syscall",
- "syscall.SYS_MODFNEXT": "syscall",
- "syscall.SYS_MODIFY_LDT": "syscall",
- "syscall.SYS_MODNEXT": "syscall",
- "syscall.SYS_MODSTAT": "syscall",
- "syscall.SYS_MODWATCH": "syscall",
- "syscall.SYS_MOUNT": "syscall",
- "syscall.SYS_MOVE_PAGES": "syscall",
- "syscall.SYS_MPROTECT": "syscall",
- "syscall.SYS_MPX": "syscall",
- "syscall.SYS_MQUERY": "syscall",
- "syscall.SYS_MQ_GETSETATTR": "syscall",
- "syscall.SYS_MQ_NOTIFY": "syscall",
- "syscall.SYS_MQ_OPEN": "syscall",
- "syscall.SYS_MQ_TIMEDRECEIVE": "syscall",
- "syscall.SYS_MQ_TIMEDSEND": "syscall",
- "syscall.SYS_MQ_UNLINK": "syscall",
- "syscall.SYS_MREMAP": "syscall",
- "syscall.SYS_MSGCTL": "syscall",
- "syscall.SYS_MSGGET": "syscall",
- "syscall.SYS_MSGRCV": "syscall",
- "syscall.SYS_MSGRCV_NOCANCEL": "syscall",
- "syscall.SYS_MSGSND": "syscall",
- "syscall.SYS_MSGSND_NOCANCEL": "syscall",
- "syscall.SYS_MSGSYS": "syscall",
- "syscall.SYS_MSYNC": "syscall",
- "syscall.SYS_MSYNC_NOCANCEL": "syscall",
- "syscall.SYS_MUNLOCK": "syscall",
- "syscall.SYS_MUNLOCKALL": "syscall",
- "syscall.SYS_MUNMAP": "syscall",
- "syscall.SYS_NAME_TO_HANDLE_AT": "syscall",
- "syscall.SYS_NANOSLEEP": "syscall",
- "syscall.SYS_NEWFSTATAT": "syscall",
- "syscall.SYS_NFSCLNT": "syscall",
- "syscall.SYS_NFSSERVCTL": "syscall",
- "syscall.SYS_NFSSVC": "syscall",
- "syscall.SYS_NFSTAT": "syscall",
- "syscall.SYS_NICE": "syscall",
- "syscall.SYS_NLSTAT": "syscall",
- "syscall.SYS_NMOUNT": "syscall",
- "syscall.SYS_NSTAT": "syscall",
- "syscall.SYS_NTP_ADJTIME": "syscall",
- "syscall.SYS_NTP_GETTIME": "syscall",
- "syscall.SYS_OABI_SYSCALL_BASE": "syscall",
- "syscall.SYS_OBREAK": "syscall",
- "syscall.SYS_OLDFSTAT": "syscall",
- "syscall.SYS_OLDLSTAT": "syscall",
- "syscall.SYS_OLDOLDUNAME": "syscall",
- "syscall.SYS_OLDSTAT": "syscall",
- "syscall.SYS_OLDUNAME": "syscall",
- "syscall.SYS_OPEN": "syscall",
- "syscall.SYS_OPENAT": "syscall",
- "syscall.SYS_OPENBSD_POLL": "syscall",
- "syscall.SYS_OPEN_BY_HANDLE_AT": "syscall",
- "syscall.SYS_OPEN_EXTENDED": "syscall",
- "syscall.SYS_OPEN_NOCANCEL": "syscall",
- "syscall.SYS_OVADVISE": "syscall",
- "syscall.SYS_PACCEPT": "syscall",
- "syscall.SYS_PATHCONF": "syscall",
- "syscall.SYS_PAUSE": "syscall",
- "syscall.SYS_PCICONFIG_IOBASE": "syscall",
- "syscall.SYS_PCICONFIG_READ": "syscall",
- "syscall.SYS_PCICONFIG_WRITE": "syscall",
- "syscall.SYS_PDFORK": "syscall",
- "syscall.SYS_PDGETPID": "syscall",
- "syscall.SYS_PDKILL": "syscall",
- "syscall.SYS_PERF_EVENT_OPEN": "syscall",
- "syscall.SYS_PERSONALITY": "syscall",
- "syscall.SYS_PID_HIBERNATE": "syscall",
- "syscall.SYS_PID_RESUME": "syscall",
- "syscall.SYS_PID_SHUTDOWN_SOCKETS": "syscall",
- "syscall.SYS_PID_SUSPEND": "syscall",
- "syscall.SYS_PIPE": "syscall",
- "syscall.SYS_PIPE2": "syscall",
- "syscall.SYS_PIVOT_ROOT": "syscall",
- "syscall.SYS_PMC_CONTROL": "syscall",
- "syscall.SYS_PMC_GET_INFO": "syscall",
- "syscall.SYS_POLL": "syscall",
- "syscall.SYS_POLLTS": "syscall",
- "syscall.SYS_POLL_NOCANCEL": "syscall",
- "syscall.SYS_POSIX_FADVISE": "syscall",
- "syscall.SYS_POSIX_FALLOCATE": "syscall",
- "syscall.SYS_POSIX_OPENPT": "syscall",
- "syscall.SYS_POSIX_SPAWN": "syscall",
- "syscall.SYS_PPOLL": "syscall",
- "syscall.SYS_PRCTL": "syscall",
- "syscall.SYS_PREAD": "syscall",
- "syscall.SYS_PREAD64": "syscall",
- "syscall.SYS_PREADV": "syscall",
- "syscall.SYS_PREAD_NOCANCEL": "syscall",
- "syscall.SYS_PRLIMIT64": "syscall",
- "syscall.SYS_PROCCTL": "syscall",
- "syscall.SYS_PROCESS_POLICY": "syscall",
- "syscall.SYS_PROCESS_VM_READV": "syscall",
- "syscall.SYS_PROCESS_VM_WRITEV": "syscall",
- "syscall.SYS_PROC_INFO": "syscall",
- "syscall.SYS_PROF": "syscall",
- "syscall.SYS_PROFIL": "syscall",
- "syscall.SYS_PSELECT": "syscall",
- "syscall.SYS_PSELECT6": "syscall",
- "syscall.SYS_PSET_ASSIGN": "syscall",
- "syscall.SYS_PSET_CREATE": "syscall",
- "syscall.SYS_PSET_DESTROY": "syscall",
- "syscall.SYS_PSYNCH_CVBROAD": "syscall",
- "syscall.SYS_PSYNCH_CVCLRPREPOST": "syscall",
- "syscall.SYS_PSYNCH_CVSIGNAL": "syscall",
- "syscall.SYS_PSYNCH_CVWAIT": "syscall",
- "syscall.SYS_PSYNCH_MUTEXDROP": "syscall",
- "syscall.SYS_PSYNCH_MUTEXWAIT": "syscall",
- "syscall.SYS_PSYNCH_RW_DOWNGRADE": "syscall",
- "syscall.SYS_PSYNCH_RW_LONGRDLOCK": "syscall",
- "syscall.SYS_PSYNCH_RW_RDLOCK": "syscall",
- "syscall.SYS_PSYNCH_RW_UNLOCK": "syscall",
- "syscall.SYS_PSYNCH_RW_UNLOCK2": "syscall",
- "syscall.SYS_PSYNCH_RW_UPGRADE": "syscall",
- "syscall.SYS_PSYNCH_RW_WRLOCK": "syscall",
- "syscall.SYS_PSYNCH_RW_YIELDWRLOCK": "syscall",
- "syscall.SYS_PTRACE": "syscall",
- "syscall.SYS_PUTPMSG": "syscall",
- "syscall.SYS_PWRITE": "syscall",
- "syscall.SYS_PWRITE64": "syscall",
- "syscall.SYS_PWRITEV": "syscall",
- "syscall.SYS_PWRITE_NOCANCEL": "syscall",
- "syscall.SYS_QUERY_MODULE": "syscall",
- "syscall.SYS_QUOTACTL": "syscall",
- "syscall.SYS_RASCTL": "syscall",
- "syscall.SYS_RCTL_ADD_RULE": "syscall",
- "syscall.SYS_RCTL_GET_LIMITS": "syscall",
- "syscall.SYS_RCTL_GET_RACCT": "syscall",
- "syscall.SYS_RCTL_GET_RULES": "syscall",
- "syscall.SYS_RCTL_REMOVE_RULE": "syscall",
- "syscall.SYS_READ": "syscall",
- "syscall.SYS_READAHEAD": "syscall",
- "syscall.SYS_READDIR": "syscall",
- "syscall.SYS_READLINK": "syscall",
- "syscall.SYS_READLINKAT": "syscall",
- "syscall.SYS_READV": "syscall",
- "syscall.SYS_READV_NOCANCEL": "syscall",
- "syscall.SYS_READ_NOCANCEL": "syscall",
- "syscall.SYS_REBOOT": "syscall",
- "syscall.SYS_RECV": "syscall",
- "syscall.SYS_RECVFROM": "syscall",
- "syscall.SYS_RECVFROM_NOCANCEL": "syscall",
- "syscall.SYS_RECVMMSG": "syscall",
- "syscall.SYS_RECVMSG": "syscall",
- "syscall.SYS_RECVMSG_NOCANCEL": "syscall",
- "syscall.SYS_REMAP_FILE_PAGES": "syscall",
- "syscall.SYS_REMOVEXATTR": "syscall",
- "syscall.SYS_RENAME": "syscall",
- "syscall.SYS_RENAMEAT": "syscall",
- "syscall.SYS_REQUEST_KEY": "syscall",
- "syscall.SYS_RESTART_SYSCALL": "syscall",
- "syscall.SYS_REVOKE": "syscall",
- "syscall.SYS_RFORK": "syscall",
- "syscall.SYS_RMDIR": "syscall",
- "syscall.SYS_RTPRIO": "syscall",
- "syscall.SYS_RTPRIO_THREAD": "syscall",
- "syscall.SYS_RT_SIGACTION": "syscall",
- "syscall.SYS_RT_SIGPENDING": "syscall",
- "syscall.SYS_RT_SIGPROCMASK": "syscall",
- "syscall.SYS_RT_SIGQUEUEINFO": "syscall",
- "syscall.SYS_RT_SIGRETURN": "syscall",
- "syscall.SYS_RT_SIGSUSPEND": "syscall",
- "syscall.SYS_RT_SIGTIMEDWAIT": "syscall",
- "syscall.SYS_RT_TGSIGQUEUEINFO": "syscall",
- "syscall.SYS_SBRK": "syscall",
- "syscall.SYS_SCHED_GETAFFINITY": "syscall",
- "syscall.SYS_SCHED_GETPARAM": "syscall",
- "syscall.SYS_SCHED_GETSCHEDULER": "syscall",
- "syscall.SYS_SCHED_GET_PRIORITY_MAX": "syscall",
- "syscall.SYS_SCHED_GET_PRIORITY_MIN": "syscall",
- "syscall.SYS_SCHED_RR_GET_INTERVAL": "syscall",
- "syscall.SYS_SCHED_SETAFFINITY": "syscall",
- "syscall.SYS_SCHED_SETPARAM": "syscall",
- "syscall.SYS_SCHED_SETSCHEDULER": "syscall",
- "syscall.SYS_SCHED_YIELD": "syscall",
- "syscall.SYS_SCTP_GENERIC_RECVMSG": "syscall",
- "syscall.SYS_SCTP_GENERIC_SENDMSG": "syscall",
- "syscall.SYS_SCTP_GENERIC_SENDMSG_IOV": "syscall",
- "syscall.SYS_SCTP_PEELOFF": "syscall",
- "syscall.SYS_SEARCHFS": "syscall",
- "syscall.SYS_SECURITY": "syscall",
- "syscall.SYS_SELECT": "syscall",
- "syscall.SYS_SELECT_NOCANCEL": "syscall",
- "syscall.SYS_SEMCONFIG": "syscall",
- "syscall.SYS_SEMCTL": "syscall",
- "syscall.SYS_SEMGET": "syscall",
- "syscall.SYS_SEMOP": "syscall",
- "syscall.SYS_SEMSYS": "syscall",
- "syscall.SYS_SEMTIMEDOP": "syscall",
- "syscall.SYS_SEM_CLOSE": "syscall",
- "syscall.SYS_SEM_DESTROY": "syscall",
- "syscall.SYS_SEM_GETVALUE": "syscall",
- "syscall.SYS_SEM_INIT": "syscall",
- "syscall.SYS_SEM_OPEN": "syscall",
- "syscall.SYS_SEM_POST": "syscall",
- "syscall.SYS_SEM_TRYWAIT": "syscall",
- "syscall.SYS_SEM_UNLINK": "syscall",
- "syscall.SYS_SEM_WAIT": "syscall",
- "syscall.SYS_SEM_WAIT_NOCANCEL": "syscall",
- "syscall.SYS_SEND": "syscall",
- "syscall.SYS_SENDFILE": "syscall",
- "syscall.SYS_SENDFILE64": "syscall",
- "syscall.SYS_SENDMMSG": "syscall",
- "syscall.SYS_SENDMSG": "syscall",
- "syscall.SYS_SENDMSG_NOCANCEL": "syscall",
- "syscall.SYS_SENDTO": "syscall",
- "syscall.SYS_SENDTO_NOCANCEL": "syscall",
- "syscall.SYS_SETATTRLIST": "syscall",
- "syscall.SYS_SETAUDIT": "syscall",
- "syscall.SYS_SETAUDIT_ADDR": "syscall",
- "syscall.SYS_SETAUID": "syscall",
- "syscall.SYS_SETCONTEXT": "syscall",
- "syscall.SYS_SETDOMAINNAME": "syscall",
- "syscall.SYS_SETEGID": "syscall",
- "syscall.SYS_SETEUID": "syscall",
- "syscall.SYS_SETFIB": "syscall",
- "syscall.SYS_SETFSGID": "syscall",
- "syscall.SYS_SETFSGID32": "syscall",
- "syscall.SYS_SETFSUID": "syscall",
- "syscall.SYS_SETFSUID32": "syscall",
- "syscall.SYS_SETGID": "syscall",
- "syscall.SYS_SETGID32": "syscall",
- "syscall.SYS_SETGROUPS": "syscall",
- "syscall.SYS_SETGROUPS32": "syscall",
- "syscall.SYS_SETHOSTNAME": "syscall",
- "syscall.SYS_SETITIMER": "syscall",
- "syscall.SYS_SETLCID": "syscall",
- "syscall.SYS_SETLOGIN": "syscall",
- "syscall.SYS_SETLOGINCLASS": "syscall",
- "syscall.SYS_SETNS": "syscall",
- "syscall.SYS_SETPGID": "syscall",
- "syscall.SYS_SETPRIORITY": "syscall",
- "syscall.SYS_SETPRIVEXEC": "syscall",
- "syscall.SYS_SETREGID": "syscall",
- "syscall.SYS_SETREGID32": "syscall",
- "syscall.SYS_SETRESGID": "syscall",
- "syscall.SYS_SETRESGID32": "syscall",
- "syscall.SYS_SETRESUID": "syscall",
- "syscall.SYS_SETRESUID32": "syscall",
- "syscall.SYS_SETREUID": "syscall",
- "syscall.SYS_SETREUID32": "syscall",
- "syscall.SYS_SETRLIMIT": "syscall",
- "syscall.SYS_SETRTABLE": "syscall",
- "syscall.SYS_SETSGROUPS": "syscall",
- "syscall.SYS_SETSID": "syscall",
- "syscall.SYS_SETSOCKOPT": "syscall",
- "syscall.SYS_SETTID": "syscall",
- "syscall.SYS_SETTID_WITH_PID": "syscall",
- "syscall.SYS_SETTIMEOFDAY": "syscall",
- "syscall.SYS_SETUID": "syscall",
- "syscall.SYS_SETUID32": "syscall",
- "syscall.SYS_SETWGROUPS": "syscall",
- "syscall.SYS_SETXATTR": "syscall",
- "syscall.SYS_SET_MEMPOLICY": "syscall",
- "syscall.SYS_SET_ROBUST_LIST": "syscall",
- "syscall.SYS_SET_THREAD_AREA": "syscall",
- "syscall.SYS_SET_TID_ADDRESS": "syscall",
- "syscall.SYS_SGETMASK": "syscall",
- "syscall.SYS_SHARED_REGION_CHECK_NP": "syscall",
- "syscall.SYS_SHARED_REGION_MAP_AND_SLIDE_NP": "syscall",
- "syscall.SYS_SHMAT": "syscall",
- "syscall.SYS_SHMCTL": "syscall",
- "syscall.SYS_SHMDT": "syscall",
- "syscall.SYS_SHMGET": "syscall",
- "syscall.SYS_SHMSYS": "syscall",
- "syscall.SYS_SHM_OPEN": "syscall",
- "syscall.SYS_SHM_UNLINK": "syscall",
- "syscall.SYS_SHUTDOWN": "syscall",
- "syscall.SYS_SIGACTION": "syscall",
- "syscall.SYS_SIGALTSTACK": "syscall",
- "syscall.SYS_SIGNAL": "syscall",
- "syscall.SYS_SIGNALFD": "syscall",
- "syscall.SYS_SIGNALFD4": "syscall",
- "syscall.SYS_SIGPENDING": "syscall",
- "syscall.SYS_SIGPROCMASK": "syscall",
- "syscall.SYS_SIGQUEUE": "syscall",
- "syscall.SYS_SIGQUEUEINFO": "syscall",
- "syscall.SYS_SIGRETURN": "syscall",
- "syscall.SYS_SIGSUSPEND": "syscall",
- "syscall.SYS_SIGSUSPEND_NOCANCEL": "syscall",
- "syscall.SYS_SIGTIMEDWAIT": "syscall",
- "syscall.SYS_SIGWAIT": "syscall",
- "syscall.SYS_SIGWAITINFO": "syscall",
- "syscall.SYS_SOCKET": "syscall",
- "syscall.SYS_SOCKETCALL": "syscall",
- "syscall.SYS_SOCKETPAIR": "syscall",
- "syscall.SYS_SPLICE": "syscall",
- "syscall.SYS_SSETMASK": "syscall",
- "syscall.SYS_SSTK": "syscall",
- "syscall.SYS_STACK_SNAPSHOT": "syscall",
- "syscall.SYS_STAT": "syscall",
- "syscall.SYS_STAT64": "syscall",
- "syscall.SYS_STAT64_EXTENDED": "syscall",
- "syscall.SYS_STATFS": "syscall",
- "syscall.SYS_STATFS64": "syscall",
- "syscall.SYS_STATV": "syscall",
- "syscall.SYS_STATVFS1": "syscall",
- "syscall.SYS_STAT_EXTENDED": "syscall",
- "syscall.SYS_STIME": "syscall",
- "syscall.SYS_STTY": "syscall",
- "syscall.SYS_SWAPCONTEXT": "syscall",
- "syscall.SYS_SWAPCTL": "syscall",
- "syscall.SYS_SWAPOFF": "syscall",
- "syscall.SYS_SWAPON": "syscall",
- "syscall.SYS_SYMLINK": "syscall",
- "syscall.SYS_SYMLINKAT": "syscall",
- "syscall.SYS_SYNC": "syscall",
- "syscall.SYS_SYNCFS": "syscall",
- "syscall.SYS_SYNC_FILE_RANGE": "syscall",
- "syscall.SYS_SYSARCH": "syscall",
- "syscall.SYS_SYSCALL": "syscall",
- "syscall.SYS_SYSCALL_BASE": "syscall",
- "syscall.SYS_SYSFS": "syscall",
- "syscall.SYS_SYSINFO": "syscall",
- "syscall.SYS_SYSLOG": "syscall",
- "syscall.SYS_TEE": "syscall",
- "syscall.SYS_TGKILL": "syscall",
- "syscall.SYS_THREAD_SELFID": "syscall",
- "syscall.SYS_THR_CREATE": "syscall",
- "syscall.SYS_THR_EXIT": "syscall",
- "syscall.SYS_THR_KILL": "syscall",
- "syscall.SYS_THR_KILL2": "syscall",
- "syscall.SYS_THR_NEW": "syscall",
- "syscall.SYS_THR_SELF": "syscall",
- "syscall.SYS_THR_SET_NAME": "syscall",
- "syscall.SYS_THR_SUSPEND": "syscall",
- "syscall.SYS_THR_WAKE": "syscall",
- "syscall.SYS_TIME": "syscall",
- "syscall.SYS_TIMERFD_CREATE": "syscall",
- "syscall.SYS_TIMERFD_GETTIME": "syscall",
- "syscall.SYS_TIMERFD_SETTIME": "syscall",
- "syscall.SYS_TIMER_CREATE": "syscall",
- "syscall.SYS_TIMER_DELETE": "syscall",
- "syscall.SYS_TIMER_GETOVERRUN": "syscall",
- "syscall.SYS_TIMER_GETTIME": "syscall",
- "syscall.SYS_TIMER_SETTIME": "syscall",
- "syscall.SYS_TIMES": "syscall",
- "syscall.SYS_TKILL": "syscall",
- "syscall.SYS_TRUNCATE": "syscall",
- "syscall.SYS_TRUNCATE64": "syscall",
- "syscall.SYS_TUXCALL": "syscall",
- "syscall.SYS_UGETRLIMIT": "syscall",
- "syscall.SYS_ULIMIT": "syscall",
- "syscall.SYS_UMASK": "syscall",
- "syscall.SYS_UMASK_EXTENDED": "syscall",
- "syscall.SYS_UMOUNT": "syscall",
- "syscall.SYS_UMOUNT2": "syscall",
- "syscall.SYS_UNAME": "syscall",
- "syscall.SYS_UNDELETE": "syscall",
- "syscall.SYS_UNLINK": "syscall",
- "syscall.SYS_UNLINKAT": "syscall",
- "syscall.SYS_UNMOUNT": "syscall",
- "syscall.SYS_UNSHARE": "syscall",
- "syscall.SYS_USELIB": "syscall",
- "syscall.SYS_USTAT": "syscall",
- "syscall.SYS_UTIME": "syscall",
- "syscall.SYS_UTIMENSAT": "syscall",
- "syscall.SYS_UTIMES": "syscall",
- "syscall.SYS_UTRACE": "syscall",
- "syscall.SYS_UUIDGEN": "syscall",
- "syscall.SYS_VADVISE": "syscall",
- "syscall.SYS_VFORK": "syscall",
- "syscall.SYS_VHANGUP": "syscall",
- "syscall.SYS_VM86": "syscall",
- "syscall.SYS_VM86OLD": "syscall",
- "syscall.SYS_VMSPLICE": "syscall",
- "syscall.SYS_VM_PRESSURE_MONITOR": "syscall",
- "syscall.SYS_VSERVER": "syscall",
- "syscall.SYS_WAIT4": "syscall",
- "syscall.SYS_WAIT4_NOCANCEL": "syscall",
- "syscall.SYS_WAIT6": "syscall",
- "syscall.SYS_WAITEVENT": "syscall",
- "syscall.SYS_WAITID": "syscall",
- "syscall.SYS_WAITID_NOCANCEL": "syscall",
- "syscall.SYS_WAITPID": "syscall",
- "syscall.SYS_WATCHEVENT": "syscall",
- "syscall.SYS_WORKQ_KERNRETURN": "syscall",
- "syscall.SYS_WORKQ_OPEN": "syscall",
- "syscall.SYS_WRITE": "syscall",
- "syscall.SYS_WRITEV": "syscall",
- "syscall.SYS_WRITEV_NOCANCEL": "syscall",
- "syscall.SYS_WRITE_NOCANCEL": "syscall",
- "syscall.SYS_YIELD": "syscall",
- "syscall.SYS__LLSEEK": "syscall",
- "syscall.SYS__LWP_CONTINUE": "syscall",
- "syscall.SYS__LWP_CREATE": "syscall",
- "syscall.SYS__LWP_CTL": "syscall",
- "syscall.SYS__LWP_DETACH": "syscall",
- "syscall.SYS__LWP_EXIT": "syscall",
- "syscall.SYS__LWP_GETNAME": "syscall",
- "syscall.SYS__LWP_GETPRIVATE": "syscall",
- "syscall.SYS__LWP_KILL": "syscall",
- "syscall.SYS__LWP_PARK": "syscall",
- "syscall.SYS__LWP_SELF": "syscall",
- "syscall.SYS__LWP_SETNAME": "syscall",
- "syscall.SYS__LWP_SETPRIVATE": "syscall",
- "syscall.SYS__LWP_SUSPEND": "syscall",
- "syscall.SYS__LWP_UNPARK": "syscall",
- "syscall.SYS__LWP_UNPARK_ALL": "syscall",
- "syscall.SYS__LWP_WAIT": "syscall",
- "syscall.SYS__LWP_WAKEUP": "syscall",
- "syscall.SYS__NEWSELECT": "syscall",
- "syscall.SYS__PSET_BIND": "syscall",
- "syscall.SYS__SCHED_GETAFFINITY": "syscall",
- "syscall.SYS__SCHED_GETPARAM": "syscall",
- "syscall.SYS__SCHED_SETAFFINITY": "syscall",
- "syscall.SYS__SCHED_SETPARAM": "syscall",
- "syscall.SYS__SYSCTL": "syscall",
- "syscall.SYS__UMTX_LOCK": "syscall",
- "syscall.SYS__UMTX_OP": "syscall",
- "syscall.SYS__UMTX_UNLOCK": "syscall",
- "syscall.SYS___ACL_ACLCHECK_FD": "syscall",
- "syscall.SYS___ACL_ACLCHECK_FILE": "syscall",
- "syscall.SYS___ACL_ACLCHECK_LINK": "syscall",
- "syscall.SYS___ACL_DELETE_FD": "syscall",
- "syscall.SYS___ACL_DELETE_FILE": "syscall",
- "syscall.SYS___ACL_DELETE_LINK": "syscall",
- "syscall.SYS___ACL_GET_FD": "syscall",
- "syscall.SYS___ACL_GET_FILE": "syscall",
- "syscall.SYS___ACL_GET_LINK": "syscall",
- "syscall.SYS___ACL_SET_FD": "syscall",
- "syscall.SYS___ACL_SET_FILE": "syscall",
- "syscall.SYS___ACL_SET_LINK": "syscall",
- "syscall.SYS___CLONE": "syscall",
- "syscall.SYS___DISABLE_THREADSIGNAL": "syscall",
- "syscall.SYS___GETCWD": "syscall",
- "syscall.SYS___GETLOGIN": "syscall",
- "syscall.SYS___GET_TCB": "syscall",
- "syscall.SYS___MAC_EXECVE": "syscall",
- "syscall.SYS___MAC_GETFSSTAT": "syscall",
- "syscall.SYS___MAC_GET_FD": "syscall",
- "syscall.SYS___MAC_GET_FILE": "syscall",
- "syscall.SYS___MAC_GET_LCID": "syscall",
- "syscall.SYS___MAC_GET_LCTX": "syscall",
- "syscall.SYS___MAC_GET_LINK": "syscall",
- "syscall.SYS___MAC_GET_MOUNT": "syscall",
- "syscall.SYS___MAC_GET_PID": "syscall",
- "syscall.SYS___MAC_GET_PROC": "syscall",
- "syscall.SYS___MAC_MOUNT": "syscall",
- "syscall.SYS___MAC_SET_FD": "syscall",
- "syscall.SYS___MAC_SET_FILE": "syscall",
- "syscall.SYS___MAC_SET_LCTX": "syscall",
- "syscall.SYS___MAC_SET_LINK": "syscall",
- "syscall.SYS___MAC_SET_PROC": "syscall",
- "syscall.SYS___MAC_SYSCALL": "syscall",
- "syscall.SYS___OLD_SEMWAIT_SIGNAL": "syscall",
- "syscall.SYS___OLD_SEMWAIT_SIGNAL_NOCANCEL": "syscall",
- "syscall.SYS___POSIX_CHOWN": "syscall",
- "syscall.SYS___POSIX_FCHOWN": "syscall",
- "syscall.SYS___POSIX_LCHOWN": "syscall",
- "syscall.SYS___POSIX_RENAME": "syscall",
- "syscall.SYS___PTHREAD_CANCELED": "syscall",
- "syscall.SYS___PTHREAD_CHDIR": "syscall",
- "syscall.SYS___PTHREAD_FCHDIR": "syscall",
- "syscall.SYS___PTHREAD_KILL": "syscall",
- "syscall.SYS___PTHREAD_MARKCANCEL": "syscall",
- "syscall.SYS___PTHREAD_SIGMASK": "syscall",
- "syscall.SYS___QUOTACTL": "syscall",
- "syscall.SYS___SEMCTL": "syscall",
- "syscall.SYS___SEMWAIT_SIGNAL": "syscall",
- "syscall.SYS___SEMWAIT_SIGNAL_NOCANCEL": "syscall",
- "syscall.SYS___SETLOGIN": "syscall",
- "syscall.SYS___SETUGID": "syscall",
- "syscall.SYS___SET_TCB": "syscall",
- "syscall.SYS___SIGACTION_SIGTRAMP": "syscall",
- "syscall.SYS___SIGTIMEDWAIT": "syscall",
- "syscall.SYS___SIGWAIT": "syscall",
- "syscall.SYS___SIGWAIT_NOCANCEL": "syscall",
- "syscall.SYS___SYSCTL": "syscall",
- "syscall.SYS___TFORK": "syscall",
- "syscall.SYS___THREXIT": "syscall",
- "syscall.SYS___THRSIGDIVERT": "syscall",
- "syscall.SYS___THRSLEEP": "syscall",
- "syscall.SYS___THRWAKEUP": "syscall",
- "syscall.S_ARCH1": "syscall",
- "syscall.S_ARCH2": "syscall",
- "syscall.S_BLKSIZE": "syscall",
- "syscall.S_IEXEC": "syscall",
- "syscall.S_IFBLK": "syscall",
- "syscall.S_IFCHR": "syscall",
- "syscall.S_IFDIR": "syscall",
- "syscall.S_IFIFO": "syscall",
- "syscall.S_IFLNK": "syscall",
- "syscall.S_IFMT": "syscall",
- "syscall.S_IFREG": "syscall",
- "syscall.S_IFSOCK": "syscall",
- "syscall.S_IFWHT": "syscall",
- "syscall.S_IREAD": "syscall",
- "syscall.S_IRGRP": "syscall",
- "syscall.S_IROTH": "syscall",
- "syscall.S_IRUSR": "syscall",
- "syscall.S_IRWXG": "syscall",
- "syscall.S_IRWXO": "syscall",
- "syscall.S_IRWXU": "syscall",
- "syscall.S_ISGID": "syscall",
- "syscall.S_ISTXT": "syscall",
- "syscall.S_ISUID": "syscall",
- "syscall.S_ISVTX": "syscall",
- "syscall.S_IWGRP": "syscall",
- "syscall.S_IWOTH": "syscall",
- "syscall.S_IWRITE": "syscall",
- "syscall.S_IWUSR": "syscall",
- "syscall.S_IXGRP": "syscall",
- "syscall.S_IXOTH": "syscall",
- "syscall.S_IXUSR": "syscall",
- "syscall.S_LOGIN_SET": "syscall",
- "syscall.SecurityAttributes": "syscall",
- "syscall.Seek": "syscall",
- "syscall.Select": "syscall",
- "syscall.Sendfile": "syscall",
- "syscall.Sendmsg": "syscall",
- "syscall.SendmsgN": "syscall",
- "syscall.Sendto": "syscall",
- "syscall.Servent": "syscall",
- "syscall.SetBpf": "syscall",
- "syscall.SetBpfBuflen": "syscall",
- "syscall.SetBpfDatalink": "syscall",
- "syscall.SetBpfHeadercmpl": "syscall",
- "syscall.SetBpfImmediate": "syscall",
- "syscall.SetBpfInterface": "syscall",
- "syscall.SetBpfPromisc": "syscall",
- "syscall.SetBpfTimeout": "syscall",
- "syscall.SetCurrentDirectory": "syscall",
- "syscall.SetEndOfFile": "syscall",
- "syscall.SetEnvironmentVariable": "syscall",
- "syscall.SetFileAttributes": "syscall",
- "syscall.SetFileCompletionNotificationModes": "syscall",
- "syscall.SetFilePointer": "syscall",
- "syscall.SetFileTime": "syscall",
- "syscall.SetHandleInformation": "syscall",
- "syscall.SetKevent": "syscall",
- "syscall.SetLsfPromisc": "syscall",
- "syscall.SetNonblock": "syscall",
- "syscall.Setdomainname": "syscall",
- "syscall.Setegid": "syscall",
- "syscall.Setenv": "syscall",
- "syscall.Seteuid": "syscall",
- "syscall.Setfsgid": "syscall",
- "syscall.Setfsuid": "syscall",
- "syscall.Setgid": "syscall",
- "syscall.Setgroups": "syscall",
- "syscall.Sethostname": "syscall",
- "syscall.Setlogin": "syscall",
- "syscall.Setpgid": "syscall",
- "syscall.Setpriority": "syscall",
- "syscall.Setprivexec": "syscall",
- "syscall.Setregid": "syscall",
- "syscall.Setresgid": "syscall",
- "syscall.Setresuid": "syscall",
- "syscall.Setreuid": "syscall",
- "syscall.Setrlimit": "syscall",
- "syscall.Setsid": "syscall",
- "syscall.Setsockopt": "syscall",
- "syscall.SetsockoptByte": "syscall",
- "syscall.SetsockoptICMPv6Filter": "syscall",
- "syscall.SetsockoptIPMreq": "syscall",
- "syscall.SetsockoptIPMreqn": "syscall",
- "syscall.SetsockoptIPv6Mreq": "syscall",
- "syscall.SetsockoptInet4Addr": "syscall",
- "syscall.SetsockoptInt": "syscall",
- "syscall.SetsockoptLinger": "syscall",
- "syscall.SetsockoptString": "syscall",
- "syscall.SetsockoptTimeval": "syscall",
- "syscall.Settimeofday": "syscall",
- "syscall.Setuid": "syscall",
- "syscall.Setxattr": "syscall",
- "syscall.Shutdown": "syscall",
- "syscall.SidTypeAlias": "syscall",
- "syscall.SidTypeComputer": "syscall",
- "syscall.SidTypeDeletedAccount": "syscall",
- "syscall.SidTypeDomain": "syscall",
- "syscall.SidTypeGroup": "syscall",
- "syscall.SidTypeInvalid": "syscall",
- "syscall.SidTypeLabel": "syscall",
- "syscall.SidTypeUnknown": "syscall",
- "syscall.SidTypeUser": "syscall",
- "syscall.SidTypeWellKnownGroup": "syscall",
- "syscall.Signal": "syscall",
- "syscall.SizeofBpfHdr": "syscall",
- "syscall.SizeofBpfInsn": "syscall",
- "syscall.SizeofBpfProgram": "syscall",
- "syscall.SizeofBpfStat": "syscall",
- "syscall.SizeofBpfVersion": "syscall",
- "syscall.SizeofBpfZbuf": "syscall",
- "syscall.SizeofBpfZbufHeader": "syscall",
- "syscall.SizeofCmsghdr": "syscall",
- "syscall.SizeofICMPv6Filter": "syscall",
- "syscall.SizeofIPMreq": "syscall",
- "syscall.SizeofIPMreqn": "syscall",
- "syscall.SizeofIPv6MTUInfo": "syscall",
- "syscall.SizeofIPv6Mreq": "syscall",
- "syscall.SizeofIfAddrmsg": "syscall",
- "syscall.SizeofIfAnnounceMsghdr": "syscall",
- "syscall.SizeofIfData": "syscall",
- "syscall.SizeofIfInfomsg": "syscall",
- "syscall.SizeofIfMsghdr": "syscall",
- "syscall.SizeofIfaMsghdr": "syscall",
- "syscall.SizeofIfmaMsghdr": "syscall",
- "syscall.SizeofIfmaMsghdr2": "syscall",
- "syscall.SizeofInet4Pktinfo": "syscall",
- "syscall.SizeofInet6Pktinfo": "syscall",
- "syscall.SizeofInotifyEvent": "syscall",
- "syscall.SizeofLinger": "syscall",
- "syscall.SizeofMsghdr": "syscall",
- "syscall.SizeofNlAttr": "syscall",
- "syscall.SizeofNlMsgerr": "syscall",
- "syscall.SizeofNlMsghdr": "syscall",
- "syscall.SizeofRtAttr": "syscall",
- "syscall.SizeofRtGenmsg": "syscall",
- "syscall.SizeofRtMetrics": "syscall",
- "syscall.SizeofRtMsg": "syscall",
- "syscall.SizeofRtMsghdr": "syscall",
- "syscall.SizeofRtNexthop": "syscall",
- "syscall.SizeofSockFilter": "syscall",
- "syscall.SizeofSockFprog": "syscall",
- "syscall.SizeofSockaddrAny": "syscall",
- "syscall.SizeofSockaddrDatalink": "syscall",
- "syscall.SizeofSockaddrInet4": "syscall",
- "syscall.SizeofSockaddrInet6": "syscall",
- "syscall.SizeofSockaddrLinklayer": "syscall",
- "syscall.SizeofSockaddrNetlink": "syscall",
- "syscall.SizeofSockaddrUnix": "syscall",
- "syscall.SizeofTCPInfo": "syscall",
- "syscall.SizeofUcred": "syscall",
- "syscall.SlicePtrFromStrings": "syscall",
- "syscall.SockFilter": "syscall",
- "syscall.SockFprog": "syscall",
- "syscall.SockaddrDatalink": "syscall",
- "syscall.SockaddrGen": "syscall",
- "syscall.SockaddrInet4": "syscall",
- "syscall.SockaddrInet6": "syscall",
- "syscall.SockaddrLinklayer": "syscall",
- "syscall.SockaddrNetlink": "syscall",
- "syscall.SockaddrUnix": "syscall",
- "syscall.Socket": "syscall",
- "syscall.SocketControlMessage": "syscall",
- "syscall.SocketDisableIPv6": "syscall",
- "syscall.Socketpair": "syscall",
- "syscall.Splice": "syscall",
- "syscall.StartProcess": "syscall",
- "syscall.StartupInfo": "syscall",
- "syscall.Stat": "syscall",
- "syscall.Stat_t": "syscall",
- "syscall.Statfs": "syscall",
- "syscall.Statfs_t": "syscall",
- "syscall.Stderr": "syscall",
- "syscall.Stdin": "syscall",
- "syscall.Stdout": "syscall",
- "syscall.StringBytePtr": "syscall",
- "syscall.StringByteSlice": "syscall",
- "syscall.StringSlicePtr": "syscall",
- "syscall.StringToSid": "syscall",
- "syscall.StringToUTF16": "syscall",
- "syscall.StringToUTF16Ptr": "syscall",
- "syscall.Symlink": "syscall",
- "syscall.Sync": "syscall",
- "syscall.SyncFileRange": "syscall",
- "syscall.SysProcAttr": "syscall",
- "syscall.Syscall": "syscall",
- "syscall.Syscall12": "syscall",
- "syscall.Syscall15": "syscall",
- "syscall.Syscall6": "syscall",
- "syscall.Syscall9": "syscall",
- "syscall.Sysctl": "syscall",
- "syscall.SysctlUint32": "syscall",
- "syscall.Sysctlnode": "syscall",
- "syscall.Sysinfo": "syscall",
- "syscall.Sysinfo_t": "syscall",
- "syscall.Systemtime": "syscall",
- "syscall.TCGETS": "syscall",
- "syscall.TCIFLUSH": "syscall",
- "syscall.TCIOFLUSH": "syscall",
- "syscall.TCOFLUSH": "syscall",
- "syscall.TCPInfo": "syscall",
- "syscall.TCPKeepalive": "syscall",
- "syscall.TCP_CA_NAME_MAX": "syscall",
- "syscall.TCP_CONGCTL": "syscall",
- "syscall.TCP_CONGESTION": "syscall",
- "syscall.TCP_CONNECTIONTIMEOUT": "syscall",
- "syscall.TCP_CORK": "syscall",
- "syscall.TCP_DEFER_ACCEPT": "syscall",
- "syscall.TCP_INFO": "syscall",
- "syscall.TCP_KEEPALIVE": "syscall",
- "syscall.TCP_KEEPCNT": "syscall",
- "syscall.TCP_KEEPIDLE": "syscall",
- "syscall.TCP_KEEPINIT": "syscall",
- "syscall.TCP_KEEPINTVL": "syscall",
- "syscall.TCP_LINGER2": "syscall",
- "syscall.TCP_MAXBURST": "syscall",
- "syscall.TCP_MAXHLEN": "syscall",
- "syscall.TCP_MAXOLEN": "syscall",
- "syscall.TCP_MAXSEG": "syscall",
- "syscall.TCP_MAXWIN": "syscall",
- "syscall.TCP_MAX_SACK": "syscall",
- "syscall.TCP_MAX_WINSHIFT": "syscall",
- "syscall.TCP_MD5SIG": "syscall",
- "syscall.TCP_MD5SIG_MAXKEYLEN": "syscall",
- "syscall.TCP_MINMSS": "syscall",
- "syscall.TCP_MINMSSOVERLOAD": "syscall",
- "syscall.TCP_MSS": "syscall",
- "syscall.TCP_NODELAY": "syscall",
- "syscall.TCP_NOOPT": "syscall",
- "syscall.TCP_NOPUSH": "syscall",
- "syscall.TCP_NSTATES": "syscall",
- "syscall.TCP_QUICKACK": "syscall",
- "syscall.TCP_RXT_CONNDROPTIME": "syscall",
- "syscall.TCP_RXT_FINDROP": "syscall",
- "syscall.TCP_SACK_ENABLE": "syscall",
- "syscall.TCP_SYNCNT": "syscall",
- "syscall.TCP_VENDOR": "syscall",
- "syscall.TCP_WINDOW_CLAMP": "syscall",
- "syscall.TCSAFLUSH": "syscall",
- "syscall.TCSETS": "syscall",
- "syscall.TF_DISCONNECT": "syscall",
- "syscall.TF_REUSE_SOCKET": "syscall",
- "syscall.TF_USE_DEFAULT_WORKER": "syscall",
- "syscall.TF_USE_KERNEL_APC": "syscall",
- "syscall.TF_USE_SYSTEM_THREAD": "syscall",
- "syscall.TF_WRITE_BEHIND": "syscall",
- "syscall.TIME_ZONE_ID_DAYLIGHT": "syscall",
- "syscall.TIME_ZONE_ID_STANDARD": "syscall",
- "syscall.TIME_ZONE_ID_UNKNOWN": "syscall",
- "syscall.TIOCCBRK": "syscall",
- "syscall.TIOCCDTR": "syscall",
- "syscall.TIOCCONS": "syscall",
- "syscall.TIOCDCDTIMESTAMP": "syscall",
- "syscall.TIOCDRAIN": "syscall",
- "syscall.TIOCDSIMICROCODE": "syscall",
- "syscall.TIOCEXCL": "syscall",
- "syscall.TIOCEXT": "syscall",
- "syscall.TIOCFLAG_CDTRCTS": "syscall",
- "syscall.TIOCFLAG_CLOCAL": "syscall",
- "syscall.TIOCFLAG_CRTSCTS": "syscall",
- "syscall.TIOCFLAG_MDMBUF": "syscall",
- "syscall.TIOCFLAG_PPS": "syscall",
- "syscall.TIOCFLAG_SOFTCAR": "syscall",
- "syscall.TIOCFLUSH": "syscall",
- "syscall.TIOCGDEV": "syscall",
- "syscall.TIOCGDRAINWAIT": "syscall",
- "syscall.TIOCGETA": "syscall",
- "syscall.TIOCGETD": "syscall",
- "syscall.TIOCGFLAGS": "syscall",
- "syscall.TIOCGICOUNT": "syscall",
- "syscall.TIOCGLCKTRMIOS": "syscall",
- "syscall.TIOCGLINED": "syscall",
- "syscall.TIOCGPGRP": "syscall",
- "syscall.TIOCGPTN": "syscall",
- "syscall.TIOCGQSIZE": "syscall",
- "syscall.TIOCGRANTPT": "syscall",
- "syscall.TIOCGRS485": "syscall",
- "syscall.TIOCGSERIAL": "syscall",
- "syscall.TIOCGSID": "syscall",
- "syscall.TIOCGSIZE": "syscall",
- "syscall.TIOCGSOFTCAR": "syscall",
- "syscall.TIOCGTSTAMP": "syscall",
- "syscall.TIOCGWINSZ": "syscall",
- "syscall.TIOCINQ": "syscall",
- "syscall.TIOCIXOFF": "syscall",
- "syscall.TIOCIXON": "syscall",
- "syscall.TIOCLINUX": "syscall",
- "syscall.TIOCMBIC": "syscall",
- "syscall.TIOCMBIS": "syscall",
- "syscall.TIOCMGDTRWAIT": "syscall",
- "syscall.TIOCMGET": "syscall",
- "syscall.TIOCMIWAIT": "syscall",
- "syscall.TIOCMODG": "syscall",
- "syscall.TIOCMODS": "syscall",
- "syscall.TIOCMSDTRWAIT": "syscall",
- "syscall.TIOCMSET": "syscall",
- "syscall.TIOCM_CAR": "syscall",
- "syscall.TIOCM_CD": "syscall",
- "syscall.TIOCM_CTS": "syscall",
- "syscall.TIOCM_DCD": "syscall",
- "syscall.TIOCM_DSR": "syscall",
- "syscall.TIOCM_DTR": "syscall",
- "syscall.TIOCM_LE": "syscall",
- "syscall.TIOCM_RI": "syscall",
- "syscall.TIOCM_RNG": "syscall",
- "syscall.TIOCM_RTS": "syscall",
- "syscall.TIOCM_SR": "syscall",
- "syscall.TIOCM_ST": "syscall",
- "syscall.TIOCNOTTY": "syscall",
- "syscall.TIOCNXCL": "syscall",
- "syscall.TIOCOUTQ": "syscall",
- "syscall.TIOCPKT": "syscall",
- "syscall.TIOCPKT_DATA": "syscall",
- "syscall.TIOCPKT_DOSTOP": "syscall",
- "syscall.TIOCPKT_FLUSHREAD": "syscall",
- "syscall.TIOCPKT_FLUSHWRITE": "syscall",
- "syscall.TIOCPKT_IOCTL": "syscall",
- "syscall.TIOCPKT_NOSTOP": "syscall",
- "syscall.TIOCPKT_START": "syscall",
- "syscall.TIOCPKT_STOP": "syscall",
- "syscall.TIOCPTMASTER": "syscall",
- "syscall.TIOCPTMGET": "syscall",
- "syscall.TIOCPTSNAME": "syscall",
- "syscall.TIOCPTYGNAME": "syscall",
- "syscall.TIOCPTYGRANT": "syscall",
- "syscall.TIOCPTYUNLK": "syscall",
- "syscall.TIOCRCVFRAME": "syscall",
- "syscall.TIOCREMOTE": "syscall",
- "syscall.TIOCSBRK": "syscall",
- "syscall.TIOCSCONS": "syscall",
- "syscall.TIOCSCTTY": "syscall",
- "syscall.TIOCSDRAINWAIT": "syscall",
- "syscall.TIOCSDTR": "syscall",
- "syscall.TIOCSERCONFIG": "syscall",
- "syscall.TIOCSERGETLSR": "syscall",
- "syscall.TIOCSERGETMULTI": "syscall",
- "syscall.TIOCSERGSTRUCT": "syscall",
- "syscall.TIOCSERGWILD": "syscall",
- "syscall.TIOCSERSETMULTI": "syscall",
- "syscall.TIOCSERSWILD": "syscall",
- "syscall.TIOCSER_TEMT": "syscall",
- "syscall.TIOCSETA": "syscall",
- "syscall.TIOCSETAF": "syscall",
- "syscall.TIOCSETAW": "syscall",
- "syscall.TIOCSETD": "syscall",
- "syscall.TIOCSFLAGS": "syscall",
- "syscall.TIOCSIG": "syscall",
- "syscall.TIOCSLCKTRMIOS": "syscall",
- "syscall.TIOCSLINED": "syscall",
- "syscall.TIOCSPGRP": "syscall",
- "syscall.TIOCSPTLCK": "syscall",
- "syscall.TIOCSQSIZE": "syscall",
- "syscall.TIOCSRS485": "syscall",
- "syscall.TIOCSSERIAL": "syscall",
- "syscall.TIOCSSIZE": "syscall",
- "syscall.TIOCSSOFTCAR": "syscall",
- "syscall.TIOCSTART": "syscall",
- "syscall.TIOCSTAT": "syscall",
- "syscall.TIOCSTI": "syscall",
- "syscall.TIOCSTOP": "syscall",
- "syscall.TIOCSTSTAMP": "syscall",
- "syscall.TIOCSWINSZ": "syscall",
- "syscall.TIOCTIMESTAMP": "syscall",
- "syscall.TIOCUCNTL": "syscall",
- "syscall.TIOCVHANGUP": "syscall",
- "syscall.TIOCXMTFRAME": "syscall",
- "syscall.TOKEN_ADJUST_DEFAULT": "syscall",
- "syscall.TOKEN_ADJUST_GROUPS": "syscall",
- "syscall.TOKEN_ADJUST_PRIVILEGES": "syscall",
- "syscall.TOKEN_ALL_ACCESS": "syscall",
- "syscall.TOKEN_ASSIGN_PRIMARY": "syscall",
- "syscall.TOKEN_DUPLICATE": "syscall",
- "syscall.TOKEN_EXECUTE": "syscall",
- "syscall.TOKEN_IMPERSONATE": "syscall",
- "syscall.TOKEN_QUERY": "syscall",
- "syscall.TOKEN_QUERY_SOURCE": "syscall",
- "syscall.TOKEN_READ": "syscall",
- "syscall.TOKEN_WRITE": "syscall",
- "syscall.TOSTOP": "syscall",
- "syscall.TRUNCATE_EXISTING": "syscall",
- "syscall.TUNATTACHFILTER": "syscall",
- "syscall.TUNDETACHFILTER": "syscall",
- "syscall.TUNGETFEATURES": "syscall",
- "syscall.TUNGETIFF": "syscall",
- "syscall.TUNGETSNDBUF": "syscall",
- "syscall.TUNGETVNETHDRSZ": "syscall",
- "syscall.TUNSETDEBUG": "syscall",
- "syscall.TUNSETGROUP": "syscall",
- "syscall.TUNSETIFF": "syscall",
- "syscall.TUNSETLINK": "syscall",
- "syscall.TUNSETNOCSUM": "syscall",
- "syscall.TUNSETOFFLOAD": "syscall",
- "syscall.TUNSETOWNER": "syscall",
- "syscall.TUNSETPERSIST": "syscall",
- "syscall.TUNSETSNDBUF": "syscall",
- "syscall.TUNSETTXFILTER": "syscall",
- "syscall.TUNSETVNETHDRSZ": "syscall",
- "syscall.Tee": "syscall",
- "syscall.TerminateProcess": "syscall",
- "syscall.Termios": "syscall",
- "syscall.Tgkill": "syscall",
- "syscall.Time": "syscall",
- "syscall.Time_t": "syscall",
- "syscall.Times": "syscall",
- "syscall.Timespec": "syscall",
- "syscall.TimespecToNsec": "syscall",
- "syscall.Timeval": "syscall",
- "syscall.Timeval32": "syscall",
- "syscall.TimevalToNsec": "syscall",
- "syscall.Timex": "syscall",
- "syscall.Timezoneinformation": "syscall",
- "syscall.Tms": "syscall",
- "syscall.Token": "syscall",
- "syscall.TokenAccessInformation": "syscall",
- "syscall.TokenAuditPolicy": "syscall",
- "syscall.TokenDefaultDacl": "syscall",
- "syscall.TokenElevation": "syscall",
- "syscall.TokenElevationType": "syscall",
- "syscall.TokenGroups": "syscall",
- "syscall.TokenGroupsAndPrivileges": "syscall",
- "syscall.TokenHasRestrictions": "syscall",
- "syscall.TokenImpersonationLevel": "syscall",
- "syscall.TokenIntegrityLevel": "syscall",
- "syscall.TokenLinkedToken": "syscall",
- "syscall.TokenLogonSid": "syscall",
- "syscall.TokenMandatoryPolicy": "syscall",
- "syscall.TokenOrigin": "syscall",
- "syscall.TokenOwner": "syscall",
- "syscall.TokenPrimaryGroup": "syscall",
- "syscall.TokenPrivileges": "syscall",
- "syscall.TokenRestrictedSids": "syscall",
- "syscall.TokenSandBoxInert": "syscall",
- "syscall.TokenSessionId": "syscall",
- "syscall.TokenSessionReference": "syscall",
- "syscall.TokenSource": "syscall",
- "syscall.TokenStatistics": "syscall",
- "syscall.TokenType": "syscall",
- "syscall.TokenUIAccess": "syscall",
- "syscall.TokenUser": "syscall",
- "syscall.TokenVirtualizationAllowed": "syscall",
- "syscall.TokenVirtualizationEnabled": "syscall",
- "syscall.Tokenprimarygroup": "syscall",
- "syscall.Tokenuser": "syscall",
- "syscall.TranslateAccountName": "syscall",
- "syscall.TranslateName": "syscall",
- "syscall.TransmitFile": "syscall",
- "syscall.TransmitFileBuffers": "syscall",
- "syscall.Truncate": "syscall",
- "syscall.USAGE_MATCH_TYPE_AND": "syscall",
- "syscall.USAGE_MATCH_TYPE_OR": "syscall",
- "syscall.UTF16FromString": "syscall",
- "syscall.UTF16PtrFromString": "syscall",
- "syscall.UTF16ToString": "syscall",
- "syscall.Ucred": "syscall",
- "syscall.Umask": "syscall",
- "syscall.Uname": "syscall",
- "syscall.Undelete": "syscall",
- "syscall.UnixCredentials": "syscall",
- "syscall.UnixRights": "syscall",
- "syscall.Unlink": "syscall",
- "syscall.Unlinkat": "syscall",
- "syscall.UnmapViewOfFile": "syscall",
- "syscall.Unmount": "syscall",
- "syscall.Unshare": "syscall",
- "syscall.UserInfo10": "syscall",
- "syscall.Ustat": "syscall",
- "syscall.Ustat_t": "syscall",
- "syscall.Utimbuf": "syscall",
- "syscall.Utime": "syscall",
- "syscall.Utimes": "syscall",
- "syscall.UtimesNano": "syscall",
- "syscall.Utsname": "syscall",
- "syscall.VDISCARD": "syscall",
- "syscall.VDSUSP": "syscall",
- "syscall.VEOF": "syscall",
- "syscall.VEOL": "syscall",
- "syscall.VEOL2": "syscall",
- "syscall.VERASE": "syscall",
- "syscall.VERASE2": "syscall",
- "syscall.VINTR": "syscall",
- "syscall.VKILL": "syscall",
- "syscall.VLNEXT": "syscall",
- "syscall.VMIN": "syscall",
- "syscall.VQUIT": "syscall",
- "syscall.VREPRINT": "syscall",
- "syscall.VSTART": "syscall",
- "syscall.VSTATUS": "syscall",
- "syscall.VSTOP": "syscall",
- "syscall.VSUSP": "syscall",
- "syscall.VSWTC": "syscall",
- "syscall.VT0": "syscall",
- "syscall.VT1": "syscall",
- "syscall.VTDLY": "syscall",
- "syscall.VTIME": "syscall",
- "syscall.VWERASE": "syscall",
- "syscall.VirtualLock": "syscall",
- "syscall.VirtualUnlock": "syscall",
- "syscall.WAIT_ABANDONED": "syscall",
- "syscall.WAIT_FAILED": "syscall",
- "syscall.WAIT_OBJECT_0": "syscall",
- "syscall.WAIT_TIMEOUT": "syscall",
- "syscall.WALL": "syscall",
- "syscall.WALLSIG": "syscall",
- "syscall.WALTSIG": "syscall",
- "syscall.WCLONE": "syscall",
- "syscall.WCONTINUED": "syscall",
- "syscall.WCOREFLAG": "syscall",
- "syscall.WEXITED": "syscall",
- "syscall.WLINUXCLONE": "syscall",
- "syscall.WNOHANG": "syscall",
- "syscall.WNOTHREAD": "syscall",
- "syscall.WNOWAIT": "syscall",
- "syscall.WNOZOMBIE": "syscall",
- "syscall.WOPTSCHECKED": "syscall",
- "syscall.WORDSIZE": "syscall",
- "syscall.WSABuf": "syscall",
- "syscall.WSACleanup": "syscall",
- "syscall.WSADESCRIPTION_LEN": "syscall",
- "syscall.WSAData": "syscall",
- "syscall.WSAEACCES": "syscall",
- "syscall.WSAECONNRESET": "syscall",
- "syscall.WSAEnumProtocols": "syscall",
- "syscall.WSAID_CONNECTEX": "syscall",
- "syscall.WSAIoctl": "syscall",
- "syscall.WSAPROTOCOL_LEN": "syscall",
- "syscall.WSAProtocolChain": "syscall",
- "syscall.WSAProtocolInfo": "syscall",
- "syscall.WSARecv": "syscall",
- "syscall.WSARecvFrom": "syscall",
- "syscall.WSASYS_STATUS_LEN": "syscall",
- "syscall.WSASend": "syscall",
- "syscall.WSASendTo": "syscall",
- "syscall.WSASendto": "syscall",
- "syscall.WSAStartup": "syscall",
- "syscall.WSTOPPED": "syscall",
- "syscall.WTRAPPED": "syscall",
- "syscall.WUNTRACED": "syscall",
- "syscall.Wait4": "syscall",
- "syscall.WaitForSingleObject": "syscall",
- "syscall.WaitStatus": "syscall",
- "syscall.Win32FileAttributeData": "syscall",
- "syscall.Win32finddata": "syscall",
- "syscall.Write": "syscall",
- "syscall.WriteConsole": "syscall",
- "syscall.WriteFile": "syscall",
- "syscall.X509_ASN_ENCODING": "syscall",
- "syscall.XCASE": "syscall",
- "syscall.XP1_CONNECTIONLESS": "syscall",
- "syscall.XP1_CONNECT_DATA": "syscall",
- "syscall.XP1_DISCONNECT_DATA": "syscall",
- "syscall.XP1_EXPEDITED_DATA": "syscall",
- "syscall.XP1_GRACEFUL_CLOSE": "syscall",
- "syscall.XP1_GUARANTEED_DELIVERY": "syscall",
- "syscall.XP1_GUARANTEED_ORDER": "syscall",
- "syscall.XP1_IFS_HANDLES": "syscall",
- "syscall.XP1_MESSAGE_ORIENTED": "syscall",
- "syscall.XP1_MULTIPOINT_CONTROL_PLANE": "syscall",
- "syscall.XP1_MULTIPOINT_DATA_PLANE": "syscall",
- "syscall.XP1_PARTIAL_MESSAGE": "syscall",
- "syscall.XP1_PSEUDO_STREAM": "syscall",
- "syscall.XP1_QOS_SUPPORTED": "syscall",
- "syscall.XP1_SAN_SUPPORT_SDP": "syscall",
- "syscall.XP1_SUPPORT_BROADCAST": "syscall",
- "syscall.XP1_SUPPORT_MULTIPOINT": "syscall",
- "syscall.XP1_UNI_RECV": "syscall",
- "syscall.XP1_UNI_SEND": "syscall",
- "syslog.Dial": "log/syslog",
- "syslog.LOG_ALERT": "log/syslog",
- "syslog.LOG_AUTH": "log/syslog",
- "syslog.LOG_AUTHPRIV": "log/syslog",
- "syslog.LOG_CRIT": "log/syslog",
- "syslog.LOG_CRON": "log/syslog",
- "syslog.LOG_DAEMON": "log/syslog",
- "syslog.LOG_DEBUG": "log/syslog",
- "syslog.LOG_EMERG": "log/syslog",
- "syslog.LOG_ERR": "log/syslog",
- "syslog.LOG_FTP": "log/syslog",
- "syslog.LOG_INFO": "log/syslog",
- "syslog.LOG_KERN": "log/syslog",
- "syslog.LOG_LOCAL0": "log/syslog",
- "syslog.LOG_LOCAL1": "log/syslog",
- "syslog.LOG_LOCAL2": "log/syslog",
- "syslog.LOG_LOCAL3": "log/syslog",
- "syslog.LOG_LOCAL4": "log/syslog",
- "syslog.LOG_LOCAL5": "log/syslog",
- "syslog.LOG_LOCAL6": "log/syslog",
- "syslog.LOG_LOCAL7": "log/syslog",
- "syslog.LOG_LPR": "log/syslog",
- "syslog.LOG_MAIL": "log/syslog",
- "syslog.LOG_NEWS": "log/syslog",
- "syslog.LOG_NOTICE": "log/syslog",
- "syslog.LOG_SYSLOG": "log/syslog",
- "syslog.LOG_USER": "log/syslog",
- "syslog.LOG_UUCP": "log/syslog",
- "syslog.LOG_WARNING": "log/syslog",
- "syslog.New": "log/syslog",
- "syslog.NewLogger": "log/syslog",
- "syslog.Priority": "log/syslog",
- "syslog.Writer": "log/syslog",
- "tabwriter.AlignRight": "text/tabwriter",
- "tabwriter.Debug": "text/tabwriter",
- "tabwriter.DiscardEmptyColumns": "text/tabwriter",
- "tabwriter.Escape": "text/tabwriter",
- "tabwriter.FilterHTML": "text/tabwriter",
- "tabwriter.NewWriter": "text/tabwriter",
- "tabwriter.StripEscape": "text/tabwriter",
- "tabwriter.TabIndent": "text/tabwriter",
- "tabwriter.Writer": "text/tabwriter",
- "tar.ErrFieldTooLong": "archive/tar",
- "tar.ErrHeader": "archive/tar",
- "tar.ErrWriteAfterClose": "archive/tar",
- "tar.ErrWriteTooLong": "archive/tar",
- "tar.FileInfoHeader": "archive/tar",
- "tar.Header": "archive/tar",
- "tar.NewReader": "archive/tar",
- "tar.NewWriter": "archive/tar",
- "tar.Reader": "archive/tar",
- "tar.TypeBlock": "archive/tar",
- "tar.TypeChar": "archive/tar",
- "tar.TypeCont": "archive/tar",
- "tar.TypeDir": "archive/tar",
- "tar.TypeFifo": "archive/tar",
- "tar.TypeGNULongLink": "archive/tar",
- "tar.TypeGNULongName": "archive/tar",
- "tar.TypeGNUSparse": "archive/tar",
- "tar.TypeLink": "archive/tar",
- "tar.TypeReg": "archive/tar",
- "tar.TypeRegA": "archive/tar",
- "tar.TypeSymlink": "archive/tar",
- "tar.TypeXGlobalHeader": "archive/tar",
- "tar.TypeXHeader": "archive/tar",
- "tar.Writer": "archive/tar",
- "template.CSS": "html/template",
- "template.ErrAmbigContext": "html/template",
- "template.ErrBadHTML": "html/template",
- "template.ErrBranchEnd": "html/template",
- "template.ErrEndContext": "html/template",
- "template.ErrNoSuchTemplate": "html/template",
- "template.ErrOutputContext": "html/template",
- "template.ErrPartialCharset": "html/template",
- "template.ErrPartialEscape": "html/template",
- "template.ErrRangeLoopReentry": "html/template",
- "template.ErrSlashAmbig": "html/template",
- "template.Error": "html/template",
- "template.ErrorCode": "html/template",
- // "template.FuncMap" is ambiguous
- "template.HTML": "html/template",
- "template.HTMLAttr": "html/template",
- // "template.HTMLEscape" is ambiguous
- // "template.HTMLEscapeString" is ambiguous
- // "template.HTMLEscaper" is ambiguous
- "template.JS": "html/template",
- // "template.JSEscape" is ambiguous
- // "template.JSEscapeString" is ambiguous
- // "template.JSEscaper" is ambiguous
- "template.JSStr": "html/template",
- // "template.Must" is ambiguous
- // "template.New" is ambiguous
- "template.OK": "html/template",
- // "template.ParseFiles" is ambiguous
- // "template.ParseGlob" is ambiguous
- // "template.Template" is ambiguous
- "template.URL": "html/template",
- // "template.URLQueryEscaper" is ambiguous
- "testing.AllocsPerRun": "testing",
- "testing.B": "testing",
- "testing.Benchmark": "testing",
- "testing.BenchmarkResult": "testing",
- "testing.Cover": "testing",
- "testing.CoverBlock": "testing",
- "testing.InternalBenchmark": "testing",
- "testing.InternalExample": "testing",
- "testing.InternalTest": "testing",
- "testing.Main": "testing",
- "testing.PB": "testing",
- "testing.RegisterCover": "testing",
- "testing.RunBenchmarks": "testing",
- "testing.RunExamples": "testing",
- "testing.RunTests": "testing",
- "testing.Short": "testing",
- "testing.T": "testing",
- "testing.Verbose": "testing",
- "textproto.CanonicalMIMEHeaderKey": "net/textproto",
- "textproto.Conn": "net/textproto",
- "textproto.Dial": "net/textproto",
- "textproto.Error": "net/textproto",
- "textproto.MIMEHeader": "net/textproto",
- "textproto.NewConn": "net/textproto",
- "textproto.NewReader": "net/textproto",
- "textproto.NewWriter": "net/textproto",
- "textproto.Pipeline": "net/textproto",
- "textproto.ProtocolError": "net/textproto",
- "textproto.Reader": "net/textproto",
- "textproto.TrimBytes": "net/textproto",
- "textproto.TrimString": "net/textproto",
- "textproto.Writer": "net/textproto",
- "time.ANSIC": "time",
- "time.After": "time",
- "time.AfterFunc": "time",
- "time.April": "time",
- "time.August": "time",
- "time.Date": "time",
- "time.December": "time",
- "time.Duration": "time",
- "time.February": "time",
- "time.FixedZone": "time",
- "time.Friday": "time",
- "time.Hour": "time",
- "time.January": "time",
- "time.July": "time",
- "time.June": "time",
- "time.Kitchen": "time",
- "time.LoadLocation": "time",
- "time.Local": "time",
- "time.Location": "time",
- "time.March": "time",
- "time.May": "time",
- "time.Microsecond": "time",
- "time.Millisecond": "time",
- "time.Minute": "time",
- "time.Monday": "time",
- "time.Month": "time",
- "time.Nanosecond": "time",
- "time.NewTicker": "time",
- "time.NewTimer": "time",
- "time.November": "time",
- "time.Now": "time",
- "time.October": "time",
- "time.Parse": "time",
- "time.ParseDuration": "time",
- "time.ParseError": "time",
- "time.ParseInLocation": "time",
- "time.RFC1123": "time",
- "time.RFC1123Z": "time",
- "time.RFC3339": "time",
- "time.RFC3339Nano": "time",
- "time.RFC822": "time",
- "time.RFC822Z": "time",
- "time.RFC850": "time",
- "time.RubyDate": "time",
- "time.Saturday": "time",
- "time.Second": "time",
- "time.September": "time",
- "time.Since": "time",
- "time.Sleep": "time",
- "time.Stamp": "time",
- "time.StampMicro": "time",
- "time.StampMilli": "time",
- "time.StampNano": "time",
- "time.Sunday": "time",
- "time.Thursday": "time",
- "time.Tick": "time",
- "time.Ticker": "time",
- "time.Time": "time",
- "time.Timer": "time",
- "time.Tuesday": "time",
- "time.UTC": "time",
- "time.Unix": "time",
- "time.UnixDate": "time",
- "time.Wednesday": "time",
- "time.Weekday": "time",
- "tls.Certificate": "crypto/tls",
- "tls.Client": "crypto/tls",
- "tls.ClientAuthType": "crypto/tls",
- "tls.ClientSessionCache": "crypto/tls",
- "tls.ClientSessionState": "crypto/tls",
- "tls.Config": "crypto/tls",
- "tls.Conn": "crypto/tls",
- "tls.ConnectionState": "crypto/tls",
- "tls.CurveID": "crypto/tls",
- "tls.CurveP256": "crypto/tls",
- "tls.CurveP384": "crypto/tls",
- "tls.CurveP521": "crypto/tls",
- "tls.Dial": "crypto/tls",
- "tls.DialWithDialer": "crypto/tls",
- "tls.Listen": "crypto/tls",
- "tls.LoadX509KeyPair": "crypto/tls",
- "tls.NewLRUClientSessionCache": "crypto/tls",
- "tls.NewListener": "crypto/tls",
- "tls.NoClientCert": "crypto/tls",
- "tls.RequestClientCert": "crypto/tls",
- "tls.RequireAndVerifyClientCert": "crypto/tls",
- "tls.RequireAnyClientCert": "crypto/tls",
- "tls.Server": "crypto/tls",
- "tls.TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA": "crypto/tls",
- "tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256": "crypto/tls",
- "tls.TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA": "crypto/tls",
- "tls.TLS_ECDHE_ECDSA_WITH_RC4_128_SHA": "crypto/tls",
- "tls.TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls",
- "tls.TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA": "crypto/tls",
- "tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256": "crypto/tls",
- "tls.TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA": "crypto/tls",
- "tls.TLS_ECDHE_RSA_WITH_RC4_128_SHA": "crypto/tls",
- "tls.TLS_RSA_WITH_3DES_EDE_CBC_SHA": "crypto/tls",
- "tls.TLS_RSA_WITH_AES_128_CBC_SHA": "crypto/tls",
- "tls.TLS_RSA_WITH_AES_256_CBC_SHA": "crypto/tls",
- "tls.TLS_RSA_WITH_RC4_128_SHA": "crypto/tls",
- "tls.VerifyClientCertIfGiven": "crypto/tls",
- "tls.VersionSSL30": "crypto/tls",
- "tls.VersionTLS10": "crypto/tls",
- "tls.VersionTLS11": "crypto/tls",
- "tls.VersionTLS12": "crypto/tls",
- "tls.X509KeyPair": "crypto/tls",
- "token.ADD": "go/token",
- "token.ADD_ASSIGN": "go/token",
- "token.AND": "go/token",
- "token.AND_ASSIGN": "go/token",
- "token.AND_NOT": "go/token",
- "token.AND_NOT_ASSIGN": "go/token",
- "token.ARROW": "go/token",
- "token.ASSIGN": "go/token",
- "token.BREAK": "go/token",
- "token.CASE": "go/token",
- "token.CHAN": "go/token",
- "token.CHAR": "go/token",
- "token.COLON": "go/token",
- "token.COMMA": "go/token",
- "token.COMMENT": "go/token",
- "token.CONST": "go/token",
- "token.CONTINUE": "go/token",
- "token.DEC": "go/token",
- "token.DEFAULT": "go/token",
- "token.DEFER": "go/token",
- "token.DEFINE": "go/token",
- "token.ELLIPSIS": "go/token",
- "token.ELSE": "go/token",
- "token.EOF": "go/token",
- "token.EQL": "go/token",
- "token.FALLTHROUGH": "go/token",
- "token.FLOAT": "go/token",
- "token.FOR": "go/token",
- "token.FUNC": "go/token",
- "token.File": "go/token",
- "token.FileSet": "go/token",
- "token.GEQ": "go/token",
- "token.GO": "go/token",
- "token.GOTO": "go/token",
- "token.GTR": "go/token",
- "token.HighestPrec": "go/token",
- "token.IDENT": "go/token",
- "token.IF": "go/token",
- "token.ILLEGAL": "go/token",
- "token.IMAG": "go/token",
- "token.IMPORT": "go/token",
- "token.INC": "go/token",
- "token.INT": "go/token",
- "token.INTERFACE": "go/token",
- "token.LAND": "go/token",
- "token.LBRACE": "go/token",
- "token.LBRACK": "go/token",
- "token.LEQ": "go/token",
- "token.LOR": "go/token",
- "token.LPAREN": "go/token",
- "token.LSS": "go/token",
- "token.Lookup": "go/token",
- "token.LowestPrec": "go/token",
- "token.MAP": "go/token",
- "token.MUL": "go/token",
- "token.MUL_ASSIGN": "go/token",
- "token.NEQ": "go/token",
- "token.NOT": "go/token",
- "token.NewFileSet": "go/token",
- "token.NoPos": "go/token",
- "token.OR": "go/token",
- "token.OR_ASSIGN": "go/token",
- "token.PACKAGE": "go/token",
- "token.PERIOD": "go/token",
- "token.Pos": "go/token",
- "token.Position": "go/token",
- "token.QUO": "go/token",
- "token.QUO_ASSIGN": "go/token",
- "token.RANGE": "go/token",
- "token.RBRACE": "go/token",
- "token.RBRACK": "go/token",
- "token.REM": "go/token",
- "token.REM_ASSIGN": "go/token",
- "token.RETURN": "go/token",
- "token.RPAREN": "go/token",
- "token.SELECT": "go/token",
- "token.SEMICOLON": "go/token",
- "token.SHL": "go/token",
- "token.SHL_ASSIGN": "go/token",
- "token.SHR": "go/token",
- "token.SHR_ASSIGN": "go/token",
- "token.STRING": "go/token",
- "token.STRUCT": "go/token",
- "token.SUB": "go/token",
- "token.SUB_ASSIGN": "go/token",
- "token.SWITCH": "go/token",
- "token.TYPE": "go/token",
- "token.Token": "go/token",
- "token.UnaryPrec": "go/token",
- "token.VAR": "go/token",
- "token.XOR": "go/token",
- "token.XOR_ASSIGN": "go/token",
- "unicode.ASCII_Hex_Digit": "unicode",
- "unicode.Arabic": "unicode",
- "unicode.Armenian": "unicode",
- "unicode.Avestan": "unicode",
- "unicode.AzeriCase": "unicode",
- "unicode.Balinese": "unicode",
- "unicode.Bamum": "unicode",
- "unicode.Batak": "unicode",
- "unicode.Bengali": "unicode",
- "unicode.Bidi_Control": "unicode",
- "unicode.Bopomofo": "unicode",
- "unicode.Brahmi": "unicode",
- "unicode.Braille": "unicode",
- "unicode.Buginese": "unicode",
- "unicode.Buhid": "unicode",
- "unicode.C": "unicode",
- "unicode.Canadian_Aboriginal": "unicode",
- "unicode.Carian": "unicode",
- "unicode.CaseRange": "unicode",
- "unicode.CaseRanges": "unicode",
- "unicode.Categories": "unicode",
- "unicode.Cc": "unicode",
- "unicode.Cf": "unicode",
- "unicode.Chakma": "unicode",
- "unicode.Cham": "unicode",
- "unicode.Cherokee": "unicode",
- "unicode.Co": "unicode",
- "unicode.Common": "unicode",
- "unicode.Coptic": "unicode",
- "unicode.Cs": "unicode",
- "unicode.Cuneiform": "unicode",
- "unicode.Cypriot": "unicode",
- "unicode.Cyrillic": "unicode",
- "unicode.Dash": "unicode",
- "unicode.Deprecated": "unicode",
- "unicode.Deseret": "unicode",
- "unicode.Devanagari": "unicode",
- "unicode.Diacritic": "unicode",
- "unicode.Digit": "unicode",
- "unicode.Egyptian_Hieroglyphs": "unicode",
- "unicode.Ethiopic": "unicode",
- "unicode.Extender": "unicode",
- "unicode.FoldCategory": "unicode",
- "unicode.FoldScript": "unicode",
- "unicode.Georgian": "unicode",
- "unicode.Glagolitic": "unicode",
- "unicode.Gothic": "unicode",
- "unicode.GraphicRanges": "unicode",
- "unicode.Greek": "unicode",
- "unicode.Gujarati": "unicode",
- "unicode.Gurmukhi": "unicode",
- "unicode.Han": "unicode",
- "unicode.Hangul": "unicode",
- "unicode.Hanunoo": "unicode",
- "unicode.Hebrew": "unicode",
- "unicode.Hex_Digit": "unicode",
- "unicode.Hiragana": "unicode",
- "unicode.Hyphen": "unicode",
- "unicode.IDS_Binary_Operator": "unicode",
- "unicode.IDS_Trinary_Operator": "unicode",
- "unicode.Ideographic": "unicode",
- "unicode.Imperial_Aramaic": "unicode",
- "unicode.In": "unicode",
- "unicode.Inherited": "unicode",
- "unicode.Inscriptional_Pahlavi": "unicode",
- "unicode.Inscriptional_Parthian": "unicode",
- "unicode.Is": "unicode",
- "unicode.IsControl": "unicode",
- "unicode.IsDigit": "unicode",
- "unicode.IsGraphic": "unicode",
- "unicode.IsLetter": "unicode",
- "unicode.IsLower": "unicode",
- "unicode.IsMark": "unicode",
- "unicode.IsNumber": "unicode",
- "unicode.IsOneOf": "unicode",
- "unicode.IsPrint": "unicode",
- "unicode.IsPunct": "unicode",
- "unicode.IsSpace": "unicode",
- "unicode.IsSymbol": "unicode",
- "unicode.IsTitle": "unicode",
- "unicode.IsUpper": "unicode",
- "unicode.Javanese": "unicode",
- "unicode.Join_Control": "unicode",
- "unicode.Kaithi": "unicode",
- "unicode.Kannada": "unicode",
- "unicode.Katakana": "unicode",
- "unicode.Kayah_Li": "unicode",
- "unicode.Kharoshthi": "unicode",
- "unicode.Khmer": "unicode",
- "unicode.L": "unicode",
- "unicode.Lao": "unicode",
- "unicode.Latin": "unicode",
- "unicode.Lepcha": "unicode",
- "unicode.Letter": "unicode",
- "unicode.Limbu": "unicode",
- "unicode.Linear_B": "unicode",
- "unicode.Lisu": "unicode",
- "unicode.Ll": "unicode",
- "unicode.Lm": "unicode",
- "unicode.Lo": "unicode",
- "unicode.Logical_Order_Exception": "unicode",
- "unicode.Lower": "unicode",
- "unicode.LowerCase": "unicode",
- "unicode.Lt": "unicode",
- "unicode.Lu": "unicode",
- "unicode.Lycian": "unicode",
- "unicode.Lydian": "unicode",
- "unicode.M": "unicode",
- "unicode.Malayalam": "unicode",
- "unicode.Mandaic": "unicode",
- "unicode.Mark": "unicode",
- "unicode.MaxASCII": "unicode",
- "unicode.MaxCase": "unicode",
- "unicode.MaxLatin1": "unicode",
- "unicode.MaxRune": "unicode",
- "unicode.Mc": "unicode",
- "unicode.Me": "unicode",
- "unicode.Meetei_Mayek": "unicode",
- "unicode.Meroitic_Cursive": "unicode",
- "unicode.Meroitic_Hieroglyphs": "unicode",
- "unicode.Miao": "unicode",
- "unicode.Mn": "unicode",
- "unicode.Mongolian": "unicode",
- "unicode.Myanmar": "unicode",
- "unicode.N": "unicode",
- "unicode.Nd": "unicode",
- "unicode.New_Tai_Lue": "unicode",
- "unicode.Nko": "unicode",
- "unicode.Nl": "unicode",
- "unicode.No": "unicode",
- "unicode.Noncharacter_Code_Point": "unicode",
- "unicode.Number": "unicode",
- "unicode.Ogham": "unicode",
- "unicode.Ol_Chiki": "unicode",
- "unicode.Old_Italic": "unicode",
- "unicode.Old_Persian": "unicode",
- "unicode.Old_South_Arabian": "unicode",
- "unicode.Old_Turkic": "unicode",
- "unicode.Oriya": "unicode",
- "unicode.Osmanya": "unicode",
- "unicode.Other": "unicode",
- "unicode.Other_Alphabetic": "unicode",
- "unicode.Other_Default_Ignorable_Code_Point": "unicode",
- "unicode.Other_Grapheme_Extend": "unicode",
- "unicode.Other_ID_Continue": "unicode",
- "unicode.Other_ID_Start": "unicode",
- "unicode.Other_Lowercase": "unicode",
- "unicode.Other_Math": "unicode",
- "unicode.Other_Uppercase": "unicode",
- "unicode.P": "unicode",
- "unicode.Pattern_Syntax": "unicode",
- "unicode.Pattern_White_Space": "unicode",
- "unicode.Pc": "unicode",
- "unicode.Pd": "unicode",
- "unicode.Pe": "unicode",
- "unicode.Pf": "unicode",
- "unicode.Phags_Pa": "unicode",
- "unicode.Phoenician": "unicode",
- "unicode.Pi": "unicode",
- "unicode.Po": "unicode",
- "unicode.PrintRanges": "unicode",
- "unicode.Properties": "unicode",
- "unicode.Ps": "unicode",
- "unicode.Punct": "unicode",
- "unicode.Quotation_Mark": "unicode",
- "unicode.Radical": "unicode",
- "unicode.Range16": "unicode",
- "unicode.Range32": "unicode",
- "unicode.RangeTable": "unicode",
- "unicode.Rejang": "unicode",
- "unicode.ReplacementChar": "unicode",
- "unicode.Runic": "unicode",
- "unicode.S": "unicode",
- "unicode.STerm": "unicode",
- "unicode.Samaritan": "unicode",
- "unicode.Saurashtra": "unicode",
- "unicode.Sc": "unicode",
- "unicode.Scripts": "unicode",
- "unicode.Sharada": "unicode",
- "unicode.Shavian": "unicode",
- "unicode.SimpleFold": "unicode",
- "unicode.Sinhala": "unicode",
- "unicode.Sk": "unicode",
- "unicode.Sm": "unicode",
- "unicode.So": "unicode",
- "unicode.Soft_Dotted": "unicode",
- "unicode.Sora_Sompeng": "unicode",
- "unicode.Space": "unicode",
- "unicode.SpecialCase": "unicode",
- "unicode.Sundanese": "unicode",
- "unicode.Syloti_Nagri": "unicode",
- "unicode.Symbol": "unicode",
- "unicode.Syriac": "unicode",
- "unicode.Tagalog": "unicode",
- "unicode.Tagbanwa": "unicode",
- "unicode.Tai_Le": "unicode",
- "unicode.Tai_Tham": "unicode",
- "unicode.Tai_Viet": "unicode",
- "unicode.Takri": "unicode",
- "unicode.Tamil": "unicode",
- "unicode.Telugu": "unicode",
- "unicode.Terminal_Punctuation": "unicode",
- "unicode.Thaana": "unicode",
- "unicode.Thai": "unicode",
- "unicode.Tibetan": "unicode",
- "unicode.Tifinagh": "unicode",
- "unicode.Title": "unicode",
- "unicode.TitleCase": "unicode",
- "unicode.To": "unicode",
- "unicode.ToLower": "unicode",
- "unicode.ToTitle": "unicode",
- "unicode.ToUpper": "unicode",
- "unicode.TurkishCase": "unicode",
- "unicode.Ugaritic": "unicode",
- "unicode.Unified_Ideograph": "unicode",
- "unicode.Upper": "unicode",
- "unicode.UpperCase": "unicode",
- "unicode.UpperLower": "unicode",
- "unicode.Vai": "unicode",
- "unicode.Variation_Selector": "unicode",
- "unicode.Version": "unicode",
- "unicode.White_Space": "unicode",
- "unicode.Yi": "unicode",
- "unicode.Z": "unicode",
- "unicode.Zl": "unicode",
- "unicode.Zp": "unicode",
- "unicode.Zs": "unicode",
- "url.Error": "net/url",
- "url.EscapeError": "net/url",
- "url.Parse": "net/url",
- "url.ParseQuery": "net/url",
- "url.ParseRequestURI": "net/url",
- "url.QueryEscape": "net/url",
- "url.QueryUnescape": "net/url",
- "url.URL": "net/url",
- "url.User": "net/url",
- "url.UserPassword": "net/url",
- "url.Userinfo": "net/url",
- "url.Values": "net/url",
- "user.Current": "os/user",
- "user.Lookup": "os/user",
- "user.LookupId": "os/user",
- "user.UnknownUserError": "os/user",
- "user.UnknownUserIdError": "os/user",
- "user.User": "os/user",
- "utf16.Decode": "unicode/utf16",
- "utf16.DecodeRune": "unicode/utf16",
- "utf16.Encode": "unicode/utf16",
- "utf16.EncodeRune": "unicode/utf16",
- "utf16.IsSurrogate": "unicode/utf16",
- "utf8.DecodeLastRune": "unicode/utf8",
- "utf8.DecodeLastRuneInString": "unicode/utf8",
- "utf8.DecodeRune": "unicode/utf8",
- "utf8.DecodeRuneInString": "unicode/utf8",
- "utf8.EncodeRune": "unicode/utf8",
- "utf8.FullRune": "unicode/utf8",
- "utf8.FullRuneInString": "unicode/utf8",
- "utf8.MaxRune": "unicode/utf8",
- "utf8.RuneCount": "unicode/utf8",
- "utf8.RuneCountInString": "unicode/utf8",
- "utf8.RuneError": "unicode/utf8",
- "utf8.RuneLen": "unicode/utf8",
- "utf8.RuneSelf": "unicode/utf8",
- "utf8.RuneStart": "unicode/utf8",
- "utf8.UTFMax": "unicode/utf8",
- "utf8.Valid": "unicode/utf8",
- "utf8.ValidRune": "unicode/utf8",
- "utf8.ValidString": "unicode/utf8",
- "x509.CANotAuthorizedForThisName": "crypto/x509",
- "x509.CertPool": "crypto/x509",
- "x509.Certificate": "crypto/x509",
- "x509.CertificateInvalidError": "crypto/x509",
- "x509.CertificateRequest": "crypto/x509",
- "x509.ConstraintViolationError": "crypto/x509",
- "x509.CreateCertificate": "crypto/x509",
- "x509.CreateCertificateRequest": "crypto/x509",
- "x509.DSA": "crypto/x509",
- "x509.DSAWithSHA1": "crypto/x509",
- "x509.DSAWithSHA256": "crypto/x509",
- "x509.DecryptPEMBlock": "crypto/x509",
- "x509.ECDSA": "crypto/x509",
- "x509.ECDSAWithSHA1": "crypto/x509",
- "x509.ECDSAWithSHA256": "crypto/x509",
- "x509.ECDSAWithSHA384": "crypto/x509",
- "x509.ECDSAWithSHA512": "crypto/x509",
- "x509.EncryptPEMBlock": "crypto/x509",
- "x509.ErrUnsupportedAlgorithm": "crypto/x509",
- "x509.Expired": "crypto/x509",
- "x509.ExtKeyUsage": "crypto/x509",
- "x509.ExtKeyUsageAny": "crypto/x509",
- "x509.ExtKeyUsageClientAuth": "crypto/x509",
- "x509.ExtKeyUsageCodeSigning": "crypto/x509",
- "x509.ExtKeyUsageEmailProtection": "crypto/x509",
- "x509.ExtKeyUsageIPSECEndSystem": "crypto/x509",
- "x509.ExtKeyUsageIPSECTunnel": "crypto/x509",
- "x509.ExtKeyUsageIPSECUser": "crypto/x509",
- "x509.ExtKeyUsageMicrosoftServerGatedCrypto": "crypto/x509",
- "x509.ExtKeyUsageNetscapeServerGatedCrypto": "crypto/x509",
- "x509.ExtKeyUsageOCSPSigning": "crypto/x509",
- "x509.ExtKeyUsageServerAuth": "crypto/x509",
- "x509.ExtKeyUsageTimeStamping": "crypto/x509",
- "x509.HostnameError": "crypto/x509",
- "x509.IncompatibleUsage": "crypto/x509",
- "x509.IncorrectPasswordError": "crypto/x509",
- "x509.InvalidReason": "crypto/x509",
- "x509.IsEncryptedPEMBlock": "crypto/x509",
- "x509.KeyUsage": "crypto/x509",
- "x509.KeyUsageCRLSign": "crypto/x509",
- "x509.KeyUsageCertSign": "crypto/x509",
- "x509.KeyUsageContentCommitment": "crypto/x509",
- "x509.KeyUsageDataEncipherment": "crypto/x509",
- "x509.KeyUsageDecipherOnly": "crypto/x509",
- "x509.KeyUsageDigitalSignature": "crypto/x509",
- "x509.KeyUsageEncipherOnly": "crypto/x509",
- "x509.KeyUsageKeyAgreement": "crypto/x509",
- "x509.KeyUsageKeyEncipherment": "crypto/x509",
- "x509.MD2WithRSA": "crypto/x509",
- "x509.MD5WithRSA": "crypto/x509",
- "x509.MarshalECPrivateKey": "crypto/x509",
- "x509.MarshalPKCS1PrivateKey": "crypto/x509",
- "x509.MarshalPKIXPublicKey": "crypto/x509",
- "x509.NewCertPool": "crypto/x509",
- "x509.NotAuthorizedToSign": "crypto/x509",
- "x509.PEMCipher": "crypto/x509",
- "x509.PEMCipher3DES": "crypto/x509",
- "x509.PEMCipherAES128": "crypto/x509",
- "x509.PEMCipherAES192": "crypto/x509",
- "x509.PEMCipherAES256": "crypto/x509",
- "x509.PEMCipherDES": "crypto/x509",
- "x509.ParseCRL": "crypto/x509",
- "x509.ParseCertificate": "crypto/x509",
- "x509.ParseCertificateRequest": "crypto/x509",
- "x509.ParseCertificates": "crypto/x509",
- "x509.ParseDERCRL": "crypto/x509",
- "x509.ParseECPrivateKey": "crypto/x509",
- "x509.ParsePKCS1PrivateKey": "crypto/x509",
- "x509.ParsePKCS8PrivateKey": "crypto/x509",
- "x509.ParsePKIXPublicKey": "crypto/x509",
- "x509.PublicKeyAlgorithm": "crypto/x509",
- "x509.RSA": "crypto/x509",
- "x509.SHA1WithRSA": "crypto/x509",
- "x509.SHA256WithRSA": "crypto/x509",
- "x509.SHA384WithRSA": "crypto/x509",
- "x509.SHA512WithRSA": "crypto/x509",
- "x509.SignatureAlgorithm": "crypto/x509",
- "x509.SystemRootsError": "crypto/x509",
- "x509.TooManyIntermediates": "crypto/x509",
- "x509.UnhandledCriticalExtension": "crypto/x509",
- "x509.UnknownAuthorityError": "crypto/x509",
- "x509.UnknownPublicKeyAlgorithm": "crypto/x509",
- "x509.UnknownSignatureAlgorithm": "crypto/x509",
- "x509.VerifyOptions": "crypto/x509",
- "xml.Attr": "encoding/xml",
- "xml.CharData": "encoding/xml",
- "xml.Comment": "encoding/xml",
- "xml.CopyToken": "encoding/xml",
- "xml.Decoder": "encoding/xml",
- "xml.Directive": "encoding/xml",
- "xml.Encoder": "encoding/xml",
- "xml.EndElement": "encoding/xml",
- "xml.Escape": "encoding/xml",
- "xml.EscapeText": "encoding/xml",
- "xml.HTMLAutoClose": "encoding/xml",
- "xml.HTMLEntity": "encoding/xml",
- "xml.Header": "encoding/xml",
- "xml.Marshal": "encoding/xml",
- "xml.MarshalIndent": "encoding/xml",
- "xml.Marshaler": "encoding/xml",
- "xml.MarshalerAttr": "encoding/xml",
- "xml.Name": "encoding/xml",
- "xml.NewDecoder": "encoding/xml",
- "xml.NewEncoder": "encoding/xml",
- "xml.ProcInst": "encoding/xml",
- "xml.StartElement": "encoding/xml",
- "xml.SyntaxError": "encoding/xml",
- "xml.TagPathError": "encoding/xml",
- "xml.Token": "encoding/xml",
- "xml.Unmarshal": "encoding/xml",
- "xml.UnmarshalError": "encoding/xml",
- "xml.Unmarshaler": "encoding/xml",
- "xml.UnmarshalerAttr": "encoding/xml",
- "xml.UnsupportedTypeError": "encoding/xml",
- "zip.Compressor": "archive/zip",
- "zip.Decompressor": "archive/zip",
- "zip.Deflate": "archive/zip",
- "zip.ErrAlgorithm": "archive/zip",
- "zip.ErrChecksum": "archive/zip",
- "zip.ErrFormat": "archive/zip",
- "zip.File": "archive/zip",
- "zip.FileHeader": "archive/zip",
- "zip.FileInfoHeader": "archive/zip",
- "zip.NewReader": "archive/zip",
- "zip.NewWriter": "archive/zip",
- "zip.OpenReader": "archive/zip",
- "zip.ReadCloser": "archive/zip",
- "zip.Reader": "archive/zip",
- "zip.RegisterCompressor": "archive/zip",
- "zip.RegisterDecompressor": "archive/zip",
- "zip.Store": "archive/zip",
- "zip.Writer": "archive/zip",
- "zlib.BestCompression": "compress/zlib",
- "zlib.BestSpeed": "compress/zlib",
- "zlib.DefaultCompression": "compress/zlib",
- "zlib.ErrChecksum": "compress/zlib",
- "zlib.ErrDictionary": "compress/zlib",
- "zlib.ErrHeader": "compress/zlib",
- "zlib.NewReader": "compress/zlib",
- "zlib.NewReaderDict": "compress/zlib",
- "zlib.NewWriter": "compress/zlib",
- "zlib.NewWriterLevel": "compress/zlib",
- "zlib.NewWriterLevelDict": "compress/zlib",
- "zlib.NoCompression": "compress/zlib",
- "zlib.Writer": "compress/zlib",
-}
diff --git a/vendor/github.com/visualfc/gotools/types/types.go b/vendor/github.com/visualfc/gotools/types/types.go
deleted file mode 100644
index 1605adb..0000000
--- a/vendor/github.com/visualfc/gotools/types/types.go
+++ /dev/null
@@ -1,1064 +0,0 @@
-// Copyright 2011-2015 visualfc . All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package types
-
-import (
- "bytes"
- "fmt"
- "go/ast"
- "go/build"
- "go/parser"
- "go/printer"
- "go/token"
- "io/ioutil"
- "log"
- "os"
- "path/filepath"
- "regexp"
- "sort"
- "strconv"
- "strings"
- "time"
-
- "github.com/visualfc/gotools/command"
- "github.com/visualfc/gotools/stdlib"
- "golang.org/x/tools/go/buildutil"
- "golang.org/x/tools/go/gcimporter"
- "golang.org/x/tools/go/types"
-)
-
-var Command = &command.Command{
- Run: runTypes,
- UsageLine: "types",
- Short: "golang type util",
- Long: `golang type util`,
-}
-
-var (
- typesVerbose bool
- typesAllowBinary bool
- typesFilePos string
- typesFileStdin bool
- typesFindUse bool
- typesFindDef bool
- typesFindUseAll bool
- typesFindInfo bool
- typesFindDoc bool
-)
-
-//func init
-func init() {
- Command.Flag.BoolVar(&typesVerbose, "v", false, "verbose debugging")
- Command.Flag.BoolVar(&typesAllowBinary, "b", false, "import can be satisfied by a compiled package object without corresponding sources.")
- Command.Flag.StringVar(&typesFilePos, "pos", "", "file position \"file.go:pos\"")
- Command.Flag.BoolVar(&typesFileStdin, "stdin", false, "input file use stdin")
- Command.Flag.BoolVar(&typesFindInfo, "info", false, "find cursor info")
- Command.Flag.BoolVar(&typesFindDef, "def", false, "find cursor define")
- Command.Flag.BoolVar(&typesFindUse, "use", false, "find cursor usages")
- Command.Flag.BoolVar(&typesFindUseAll, "all", false, "find cursor all usages in GOPATH")
- Command.Flag.BoolVar(&typesFindDoc, "doc", false, "find cursor def doc")
-}
-
-type ObjKind int
-
-const (
- ObjNone ObjKind = iota
- ObjPkgName
- ObjTypeName
- ObjInterface
- ObjStruct
- ObjConst
- ObjVar
- ObjField
- ObjFunc
- ObjMethod
- ObjLabel
- ObjBuiltin
- ObjNil
-)
-
-var ObjKindName = []string{"none", "package",
- "type", "interface", "struct",
- "const", "var", "field",
- "func", "method",
- "label", "builtin", "nil"}
-
-func (k ObjKind) String() string {
- if k >= 0 && int(k) < len(ObjKindName) {
- return ObjKindName[k]
- }
- return "unkwnown"
-}
-
-var builtinInfoMap = map[string]string{
- "append": "func append(slice []Type, elems ...Type) []Type",
- "copy": "func copy(dst, src []Type) int",
- "delete": "func delete(m map[Type]Type1, key Type)",
- "len": "func len(v Type) int",
- "cap": "func cap(v Type) int",
- "make": "func make(Type, size IntegerType) Type",
- "new": "func new(Type) *Type",
- "complex": "func complex(r, i FloatType) ComplexType",
- "real": "func real(c ComplexType) FloatType",
- "imag": "func imag(c ComplexType) FloatType",
- "close": "func close(c chan<- Type)",
- "panic": "func panic(v interface{})",
- "recover": "func recover() interface{}",
- "print": "func print(args ...Type)",
- "println": "func println(args ...Type)",
- "error": "type error interface {Error() string}",
-}
-
-func builtinInfo(id string) string {
- if info, ok := builtinInfoMap[id]; ok {
- return "builtin " + info
- }
- return "builtin " + id
-}
-
-func simpleObjInfo(obj types.Object) string {
- pkg := obj.Pkg()
- s := simpleType(obj.String())
- if pkg != nil && pkg.Name() == "main" {
- return strings.Replace(s, simpleType(pkg.Path())+".", "", -1)
- }
- return s
-}
-
-func simpleType(src string) string {
- re, _ := regexp.Compile("[\\w\\./]+")
- return re.ReplaceAllStringFunc(src, func(s string) string {
- r := s
- if i := strings.LastIndex(s, "/"); i != -1 {
- r = s[i+1:]
- }
- if strings.Count(r, ".") > 1 {
- r = r[strings.Index(r, ".")+1:]
- }
- return r
- })
-}
-
-func runTypes(cmd *command.Command, args []string) error {
- if len(args) < 1 {
- cmd.Usage()
- return nil
- }
- if typesVerbose {
- now := time.Now()
- defer func() {
- log.Println("time", time.Now().Sub(now))
- }()
- }
- w := NewPkgWalker(&build.Default)
- var cursor *FileCursor
- if typesFilePos != "" {
- var cursorInfo FileCursor
- pos := strings.Index(typesFilePos, ":")
- if pos != -1 {
- cursorInfo.fileName = typesFilePos[:pos]
- if i, err := strconv.Atoi(typesFilePos[pos+1:]); err == nil {
- cursorInfo.cursorPos = i
- }
- }
- if typesFileStdin {
- src, err := ioutil.ReadAll(os.Stdin)
- if err == nil {
- cursorInfo.src = src
- }
- }
- cursor = &cursorInfo
- }
- for _, pkgName := range args {
- if pkgName == "." {
- pkgPath, err := os.Getwd()
- if err != nil {
- log.Fatalln(err)
- }
- pkgName = pkgPath
- }
- conf := &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: true}
- if cursor != nil {
- conf.Cursor = cursor
- conf.IgnoreFuncBodies = false
- conf.Info = &types.Info{
- Uses: make(map[*ast.Ident]types.Object),
- Defs: make(map[*ast.Ident]types.Object),
- Selections: make(map[*ast.SelectorExpr]*types.Selection),
- //Types: make(map[ast.Expr]types.TypeAndValue),
- //Scopes : make(map[ast.Node]*types.Scope)
- //Implicits : make(map[ast.Node]types.Object)
- }
- conf.XInfo = &types.Info{
- Uses: make(map[*ast.Ident]types.Object),
- Defs: make(map[*ast.Ident]types.Object),
- Selections: make(map[*ast.SelectorExpr]*types.Selection),
- }
- }
- pkg, err := w.Import("", pkgName, conf)
- if pkg == nil {
- log.Fatalln("error import path", err)
- }
- if cursor != nil && (typesFindInfo || typesFindDef || typesFindUse) {
- w.LookupCursor(pkg, conf, cursor)
- }
- }
- return nil
-}
-
-type FileCursor struct {
- pkg string
- fileName string
- fileDir string
- cursorPos int
- pos token.Pos
- src interface{}
- xtest bool
-}
-
-type PkgConfig struct {
- IgnoreFuncBodies bool
- AllowBinary bool
- WithTestFiles bool
- Cursor *FileCursor
- Pkg *types.Package
- XPkg *types.Package
- Info *types.Info
- XInfo *types.Info
- Files map[string]*ast.File
- TestFiles map[string]*ast.File
- XTestFiles map[string]*ast.File
-}
-
-func NewPkgWalker(context *build.Context) *PkgWalker {
- return &PkgWalker{
- context: context,
- fset: token.NewFileSet(),
- parsedFileCache: map[string]*ast.File{},
- imported: map[string]*types.Package{"unsafe": types.Unsafe},
- gcimporter: map[string]*types.Package{"unsafe": types.Unsafe},
- }
-}
-
-type PkgWalker struct {
- fset *token.FileSet
- context *build.Context
- current *types.Package
- importing types.Package
- parsedFileCache map[string]*ast.File
- imported map[string]*types.Package // packages already imported
- gcimporter map[string]*types.Package
-}
-
-func contains(list []string, s string) bool {
- for _, t := range list {
- if t == s {
- return true
- }
- }
- return false
-}
-
-func (w *PkgWalker) isBinaryPkg(pkg string) bool {
- return stdlib.IsStdPkg(pkg)
-}
-
-func (w *PkgWalker) importPath(path string, mode build.ImportMode) (*build.Package, error) {
- if filepath.IsAbs(path) {
- return w.context.ImportDir(path, 0)
- }
- if stdlib.IsStdPkg(path) {
- return stdlib.ImportStdPkg(w.context, path, mode)
- }
- return w.context.Import(path, "", mode)
-}
-
-func (w *PkgWalker) Import(parentDir string, name string, conf *PkgConfig) (pkg *types.Package, err error) {
- defer func() {
- err := recover()
- if err != nil && typesVerbose {
- log.Println(err)
- }
- }()
-
- if strings.HasPrefix(name, ".") && parentDir != "" {
- name = filepath.Join(parentDir, name)
- }
- pkg = w.imported[name]
- if pkg != nil {
- if pkg == &w.importing {
- return nil, fmt.Errorf("cycle importing package %q", name)
- }
- return pkg, nil
- }
-
- if typesVerbose {
- log.Println("parser pkg", name)
- }
-
- bp, err := w.importPath(name, 0)
- if err != nil {
- return nil, err
- }
-
- checkName := name
-
- if bp.ImportPath == "." {
- checkName = bp.Name
- } else {
- checkName = bp.ImportPath
- }
-
- if err != nil {
- return nil, err
- //if _, nogo := err.(*build.NoGoError); nogo {
- // return
- //}
- //return
- //log.Fatalf("pkg %q, dir %q: ScanDir: %v", name, info.Dir, err)
- }
-
- filenames := append(append([]string{}, bp.GoFiles...), bp.CgoFiles...)
- if conf.WithTestFiles {
- filenames = append(filenames, bp.TestGoFiles...)
- }
-
- if name == "runtime" {
- n := fmt.Sprintf("zgoos_%s.go", w.context.GOOS)
- if !contains(filenames, n) {
- filenames = append(filenames, n)
- }
-
- n = fmt.Sprintf("zgoarch_%s.go", w.context.GOARCH)
- if !contains(filenames, n) {
- filenames = append(filenames, n)
- }
- }
-
- parserFiles := func(filenames []string, cursor *FileCursor, xtest bool) (files []*ast.File) {
- for _, file := range filenames {
- var f *ast.File
- if cursor != nil && cursor.fileName == file {
- f, err = w.parseFile(bp.Dir, file, cursor.src)
- cursor.pos = token.Pos(w.fset.File(f.Pos()).Base()) + token.Pos(cursor.cursorPos)
- cursor.fileDir = bp.Dir
- cursor.xtest = xtest
- } else {
- f, err = w.parseFile(bp.Dir, file, nil)
- }
- if err != nil && typesVerbose {
- log.Printf("error parsing package %s: %s\n", name, err)
- }
- files = append(files, f)
- }
- return
- }
- files := parserFiles(filenames, conf.Cursor, false)
- xfiles := parserFiles(bp.XTestGoFiles, conf.Cursor, true)
-
- typesConf := types.Config{
- IgnoreFuncBodies: conf.IgnoreFuncBodies,
- FakeImportC: true,
- Packages: w.gcimporter,
- Import: func(imports map[string]*types.Package, name string) (pkg *types.Package, err error) {
- if pkg != nil {
- return pkg, nil
- }
- if conf.AllowBinary && w.isBinaryPkg(name) {
- pkg = w.gcimporter[name]
- if pkg != nil && pkg.Complete() {
- return
- }
- pkg, err = gcimporter.Import(imports, name)
- if pkg != nil && pkg.Complete() {
- w.gcimporter[name] = pkg
- return
- }
- }
- return w.Import(bp.Dir, name, &PkgConfig{IgnoreFuncBodies: true, AllowBinary: true, WithTestFiles: false})
- },
- Error: func(err error) {
- if typesVerbose {
- log.Println(err)
- }
- },
- }
- if pkg == nil {
- pkg, err = typesConf.Check(checkName, w.fset, files, conf.Info)
- conf.Pkg = pkg
- }
- w.imported[name] = pkg
-
- if len(xfiles) > 0 {
- xpkg, _ := typesConf.Check(checkName+"_test", w.fset, xfiles, conf.XInfo)
- w.imported[checkName+"_test"] = xpkg
- conf.XPkg = xpkg
- }
- return
-}
-
-func (w *PkgWalker) parseFile(dir, file string, src interface{}) (*ast.File, error) {
- filename := filepath.Join(dir, file)
- f, _ := w.parsedFileCache[filename]
- if f != nil {
- return f, nil
- }
-
- var err error
-
- // generate missing context-dependent files.
- if w.context != nil && file == fmt.Sprintf("zgoos_%s.go", w.context.GOOS) {
- src := fmt.Sprintf("package runtime; const theGoos = `%s`", w.context.GOOS)
- f, err = parser.ParseFile(w.fset, filename, src, 0)
- if err != nil {
- log.Fatalf("incorrect generated file: %s", err)
- }
- }
-
- if w.context != nil && file == fmt.Sprintf("zgoarch_%s.go", w.context.GOARCH) {
- src := fmt.Sprintf("package runtime; const theGoarch = `%s`", w.context.GOARCH)
- f, err = parser.ParseFile(w.fset, filename, src, 0)
- if err != nil {
- log.Fatalf("incorrect generated file: %s", err)
- }
- }
-
- if f == nil {
- flag := parser.AllErrors
- if typesFindDoc {
- flag |= parser.ParseComments
- }
- f, err = parser.ParseFile(w.fset, filename, src, flag)
- if err != nil {
- return f, err
- }
- }
-
- w.parsedFileCache[filename] = f
- return f, nil
-}
-
-func (w *PkgWalker) LookupCursor(pkg *types.Package, conf *PkgConfig, cursor *FileCursor) {
- is := w.CheckIsImport(cursor)
- if is != nil {
- if cursor.xtest {
- w.LookupImport(conf.XPkg, conf.XInfo, cursor, is)
- } else {
- w.LookupImport(conf.Pkg, conf.Info, cursor, is)
- }
- } else {
- w.LookupObjects(conf, cursor)
- }
-}
-
-func (w *PkgWalker) LookupImport(pkg *types.Package, pkgInfo *types.Info, cursor *FileCursor, is *ast.ImportSpec) {
- fpath, err := strconv.Unquote(is.Path.Value)
- if err != nil {
- return
- }
-
- if typesFindDef {
- fmt.Println(w.fset.Position(is.Pos()))
- }
-
- fbase := fpath
- pos := strings.LastIndexAny(fpath, "./-\\")
- if pos != -1 {
- fbase = fpath[pos+1:]
- }
-
- var fname string
- if is.Name != nil {
- fname = is.Name.Name
- } else {
- fname = fbase
- }
-
- if typesFindInfo {
- if fname == fpath {
- fmt.Printf("package %s\n", fname)
- } else {
- fmt.Printf("package %s (\"%s\")\n", fname, fpath)
- }
- }
-
- if !typesFindUse {
- return
- }
-
- fid := pkg.Path() + "." + fname
- var usages []int
- for id, obj := range pkgInfo.Uses {
- if obj != nil && obj.Id() == fid { //!= nil && cursorObj.Pos() == obj.Pos() {
- usages = append(usages, int(id.Pos()))
- }
- }
- (sort.IntSlice(usages)).Sort()
- for _, pos := range usages {
- fmt.Println(w.fset.Position(token.Pos(pos)))
- }
-}
-
-func parserObjKind(obj types.Object) (ObjKind, error) {
- var kind ObjKind
- switch t := obj.(type) {
- case *types.PkgName:
- kind = ObjPkgName
- case *types.Const:
- kind = ObjConst
- case *types.TypeName:
- kind = ObjTypeName
- switch t.Type().Underlying().(type) {
- case *types.Interface:
- kind = ObjInterface
- case *types.Struct:
- kind = ObjStruct
- }
- case *types.Var:
- kind = ObjVar
- if t.IsField() {
- kind = ObjField
- }
- case *types.Func:
- kind = ObjFunc
- if sig, ok := t.Type().(*types.Signature); ok {
- if sig.Recv() != nil {
- kind = ObjMethod
- }
- }
- case *types.Label:
- kind = ObjLabel
- case *types.Builtin:
- kind = ObjBuiltin
- case *types.Nil:
- kind = ObjNil
- default:
- return ObjNone, fmt.Errorf("unknown obj type %T", obj)
- }
- return kind, nil
-}
-
-func (w *PkgWalker) LookupStructFromField(info *types.Info, cursorPkg *types.Package, cursorObj types.Object, cursorPos token.Pos) types.Object {
- if info == nil {
- conf := &PkgConfig{
- IgnoreFuncBodies: true,
- AllowBinary: true,
- WithTestFiles: true,
- Info: &types.Info{
- Defs: make(map[*ast.Ident]types.Object),
- },
- }
- w.imported[cursorPkg.Path()] = nil
- pkg, _ := w.Import("", cursorPkg.Path(), conf)
- if pkg != nil {
- info = conf.Info
- }
- }
- for _, obj := range info.Defs {
- if obj == nil {
- continue
- }
- if _, ok := obj.(*types.TypeName); ok {
- if t, ok := obj.Type().Underlying().(*types.Struct); ok {
- for i := 0; i < t.NumFields(); i++ {
- if t.Field(i).Pos() == cursorPos {
- return obj
- }
- }
- }
- }
- }
- return nil
-}
-
-func (w *PkgWalker) lookupNamedField(named *types.Named, name string) *types.Named {
- if istruct, ok := named.Underlying().(*types.Struct); ok {
- for i := 0; i < istruct.NumFields(); i++ {
- field := istruct.Field(i)
- if field.Anonymous() {
- fieldType := orgType(field.Type())
- if typ, ok := fieldType.(*types.Named); ok {
- if na := w.lookupNamedField(typ, name); na != nil {
- return na
- }
- }
- } else {
- if field.Name() == name {
- return named
- }
- }
- }
- }
- return nil
-}
-
-func (w *PkgWalker) lookupNamedMethod(named *types.Named, name string) (types.Object, *types.Named) {
- if iface, ok := named.Underlying().(*types.Interface); ok {
- for i := 0; i < iface.NumMethods(); i++ {
- fn := iface.Method(i)
- if fn.Name() == name {
- return fn, named
- }
- }
- for i := 0; i < iface.NumEmbeddeds(); i++ {
- if obj, na := w.lookupNamedMethod(iface.Embedded(i), name); obj != nil {
- return obj, na
- }
- }
- return nil, nil
- }
- if istruct, ok := named.Underlying().(*types.Struct); ok {
- for i := 0; i < named.NumMethods(); i++ {
- fn := named.Method(i)
- if fn.Name() == name {
- return fn, named
- }
- }
- for i := 0; i < istruct.NumFields(); i++ {
- field := istruct.Field(i)
- if !field.Anonymous() {
- continue
- }
- if typ, ok := field.Type().(*types.Named); ok {
- if obj, na := w.lookupNamedMethod(typ, name); obj != nil {
- return obj, na
- }
- }
- }
- }
- return nil, nil
-}
-
-func IsSamePkg(a, b *types.Package) bool {
- if a == b {
- return true
- }
- if a == nil || b == nil {
- return false
- }
- return a.Path() == b.Path()
-}
-
-func IsSameObject(a, b types.Object) bool {
- if a == b {
- return true
- }
- if a == nil || b == nil {
- return false
- }
- var apath string
- var bpath string
- if a.Pkg() != nil {
- apath = a.Pkg().Path()
- }
- if b.Pkg() != nil {
- bpath = b.Pkg().Path()
- }
- if apath != bpath {
- return false
- }
- if a.Id() != b.Id() {
- return false
- }
- return a.String() == b.String()
-}
-
-func orgType(typ types.Type) types.Type {
- if pt, ok := typ.(*types.Pointer); ok {
- return pt.Elem()
- }
- return typ
-}
-
-func (w *PkgWalker) LookupObjects(conf *PkgConfig, cursor *FileCursor) {
- var cursorObj types.Object
- var cursorSelection *types.Selection
- var cursorObjIsDef bool
- //lookup defs
-
- var pkg *types.Package
- var pkgInfo *types.Info
- if cursor.xtest {
- pkgInfo = conf.XInfo
- pkg = conf.XPkg
- } else {
- pkgInfo = conf.Info
- pkg = conf.Pkg
- }
-
- _ = cursorObjIsDef
- if cursorObj == nil {
- for sel, obj := range pkgInfo.Selections {
- if cursor.pos >= sel.Sel.Pos() && cursor.pos <= sel.Sel.End() {
- cursorObj = obj.Obj()
- cursorSelection = obj
- break
- }
- }
- }
- if cursorObj == nil {
- for id, obj := range pkgInfo.Defs {
- if cursor.pos >= id.Pos() && cursor.pos <= id.End() {
- cursorObj = obj
- cursorObjIsDef = true
- break
- }
- }
- }
- _ = cursorSelection
- if cursorObj == nil {
- for id, obj := range pkgInfo.Uses {
- if cursor.pos >= id.Pos() && cursor.pos <= id.End() {
- cursorObj = obj
- break
- }
- }
- }
- if cursorObj == nil {
- return
- }
- kind, err := parserObjKind(cursorObj)
- if err != nil {
- log.Fatalln(err)
- }
-
- if kind == ObjField {
- if cursorObj.(*types.Var).Anonymous() {
- typ := orgType(cursorObj.Type())
- if named, ok := typ.(*types.Named); ok {
- cursorObj = named.Obj()
- }
- }
- }
- cursorPkg := cursorObj.Pkg()
- cursorPos := cursorObj.Pos()
- //var fieldTypeInfo *types.Info
- var fieldTypeObj types.Object
- // if cursorPkg == pkg {
- // fieldTypeInfo = pkgInfo
- // }
- cursorIsInterfaceMethod := false
- var cursorInterfaceTypeName string
- if kind == ObjMethod && cursorSelection != nil && cursorSelection.Recv() != nil {
- sig := cursorObj.(*types.Func).Type().Underlying().(*types.Signature)
- if _, ok := sig.Recv().Type().Underlying().(*types.Interface); ok {
- if named, ok := cursorSelection.Recv().(*types.Named); ok {
- obj, typ := w.lookupNamedMethod(named, cursorObj.Name())
- if obj != nil {
- cursorObj = obj
- }
- if typ != nil {
- cursorPkg = typ.Obj().Pkg()
- cursorInterfaceTypeName = typ.Obj().Name()
- }
- cursorIsInterfaceMethod = true
- }
- }
- } else if kind == ObjField && cursorSelection != nil {
- if recv := cursorSelection.Recv(); recv != nil {
- typ := orgType(recv)
- if typ != nil {
- if name, ok := typ.(*types.Named); ok {
- fieldTypeObj = name.Obj()
- na := w.lookupNamedField(name, cursorObj.Name())
- if na != nil {
- fieldTypeObj = na.Obj()
- }
- }
- }
- }
- }
- if cursorPkg != nil && cursorPkg != pkg &&
- kind != ObjPkgName && w.isBinaryPkg(cursorPkg.Path()) {
- conf := &PkgConfig{
- IgnoreFuncBodies: true,
- AllowBinary: true,
- WithTestFiles: true,
- Info: &types.Info{
- Defs: make(map[*ast.Ident]types.Object),
- },
- }
- pkg, _ := w.Import("", cursorPkg.Path(), conf)
- if pkg != nil {
- if cursorIsInterfaceMethod {
- for _, obj := range conf.Info.Defs {
- if obj == nil {
- continue
- }
- if fn, ok := obj.(*types.Func); ok {
- if fn.Name() == cursorObj.Name() {
- if sig, ok := fn.Type().Underlying().(*types.Signature); ok {
- if named, ok := sig.Recv().Type().(*types.Named); ok {
- if named.Obj() != nil && named.Obj().Name() == cursorInterfaceTypeName {
- cursorPos = obj.Pos()
- break
- }
- }
- }
- }
- }
- }
- } else if kind == ObjField && fieldTypeObj != nil {
- for _, obj := range conf.Info.Defs {
- if obj == nil {
- continue
- }
- if _, ok := obj.(*types.TypeName); ok {
- if IsSameObject(fieldTypeObj, obj) {
- if t, ok := obj.Type().Underlying().(*types.Struct); ok {
- for i := 0; i < t.NumFields(); i++ {
- if t.Field(i).Id() == cursorObj.Id() {
- cursorPos = t.Field(i).Pos()
- break
- }
- }
- }
- break
- }
- }
- }
- } else {
- for k, v := range conf.Info.Defs {
- if k != nil && v != nil && IsSameObject(v, cursorObj) {
- cursorPos = k.Pos()
- break
- }
- }
- }
- }
- // if kind == ObjField || cursorIsInterfaceMethod {
- // fieldTypeInfo = conf.Info
- // }
- }
- // if kind == ObjField {
- // fieldTypeObj = w.LookupStructFromField(fieldTypeInfo, cursorPkg, cursorObj, cursorPos)
- // }
- if typesFindDef {
- fmt.Println(w.fset.Position(cursorPos))
- }
- if typesFindInfo {
- if kind == ObjField && fieldTypeObj != nil {
- typeName := fieldTypeObj.Name()
- if fieldTypeObj.Pkg() != nil && fieldTypeObj.Pkg() != pkg {
- typeName = fieldTypeObj.Pkg().Name() + "." + fieldTypeObj.Name()
- }
- fmt.Println(typeName, simpleObjInfo(cursorObj))
- } else if kind == ObjBuiltin {
- fmt.Println(builtinInfo(cursorObj.Name()))
- } else if kind == ObjPkgName {
- fmt.Println(cursorObj.String())
- } else if cursorIsInterfaceMethod {
- fmt.Println(strings.Replace(simpleObjInfo(cursorObj), "(interface)", cursorPkg.Name()+"."+cursorInterfaceTypeName, 1))
- } else {
- fmt.Println(simpleObjInfo(cursorObj))
- }
- }
-
- if typesFindDoc && typesFindDef {
- pos := w.fset.Position(cursorPos)
- file := w.parsedFileCache[pos.Filename]
- if file != nil {
- line := pos.Line
- var group *ast.CommentGroup
- for _, v := range file.Comments {
- lastLine := w.fset.Position(v.End()).Line
- if lastLine == line || lastLine == line-1 {
- group = v
- } else if lastLine > line {
- break
- }
- }
- if group != nil {
- fmt.Println(group.Text())
- }
- }
- }
- if !typesFindUse {
- return
- }
-
- var usages []int
- if kind == ObjPkgName {
- for id, obj := range pkgInfo.Uses {
- if obj != nil && obj.Id() == cursorObj.Id() { //!= nil && cursorObj.Pos() == obj.Pos() {
- usages = append(usages, int(id.Pos()))
- }
- }
- } else {
- // for id, obj := range pkgInfo.Defs {
- // if obj == cursorObj { //!= nil && cursorObj.Pos() == obj.Pos() {
- // usages = append(usages, int(id.Pos()))
- // }
- // }
- for id, obj := range pkgInfo.Uses {
- if obj == cursorObj { //!= nil && cursorObj.Pos() == obj.Pos() {
- usages = append(usages, int(id.Pos()))
- }
- }
- }
- var pkg_path string
- var xpkg_path string
- if conf.Pkg != nil {
- pkg_path = conf.Pkg.Path()
- }
- if conf.XPkg != nil {
- xpkg_path = conf.XPkg.Path()
- }
-
- if cursorPkg != nil && (cursorPkg.Path() == pkg_path ||
- cursorPkg.Path() == xpkg_path) {
- usages = append(usages, int(cursorPos))
- }
-
- (sort.IntSlice(usages)).Sort()
- for _, pos := range usages {
- fmt.Println(w.fset.Position(token.Pos(pos)))
- }
- //check look for current pkg.object on pkg_test
- if typesFindUseAll || IsSamePkg(cursorPkg, conf.Pkg) {
- var addInfo *types.Info
- if conf.Cursor.xtest {
- addInfo = conf.Info
- } else {
- addInfo = conf.XInfo
- }
- if addInfo != nil && cursorPkg != nil {
- var usages []int
- // for id, obj := range addInfo.Defs {
- // if id != nil && obj != nil && obj.Id() == cursorObj.Id() {
- // usages = append(usages, int(id.Pos()))
- // }
- // }
- for k, v := range addInfo.Uses {
- if k != nil && v != nil && IsSameObject(v, cursorObj) {
- usages = append(usages, int(k.Pos()))
- }
- }
- (sort.IntSlice(usages)).Sort()
- for _, pos := range usages {
- fmt.Println(w.fset.Position(token.Pos(pos)))
- }
- }
- }
- if !typesFindUseAll {
- return
- }
-
- if cursorPkg == nil {
- return
- }
-
- var find_def_pkg string
- var uses_paths []string
- if cursorPkg.Path() != pkg_path && cursorPkg.Path() != xpkg_path {
- find_def_pkg = cursorPkg.Path()
- uses_paths = append(uses_paths, cursorPkg.Path())
- }
-
- buildutil.ForEachPackage(&build.Default, func(importPath string, err error) {
- if err != nil {
- return
- }
- if importPath == conf.Pkg.Path() {
- return
- }
- bp, err := w.importPath(importPath, 0)
- if err != nil {
- return
- }
- find := false
- if bp.ImportPath == cursorPkg.Path() {
- find = true
- } else {
- for _, v := range bp.Imports {
- if v == cursorObj.Pkg().Path() {
- find = true
- break
- }
- }
- }
- if find {
- for _, v := range uses_paths {
- if v == bp.ImportPath {
- return
- }
- }
- uses_paths = append(uses_paths, bp.ImportPath)
- }
- })
-
- w.imported = make(map[string]*types.Package)
- for _, v := range uses_paths {
- conf := &PkgConfig{
- IgnoreFuncBodies: false,
- AllowBinary: true,
- WithTestFiles: true,
- Info: &types.Info{
- Uses: make(map[*ast.Ident]types.Object),
- },
- XInfo: &types.Info{
- Uses: make(map[*ast.Ident]types.Object),
- },
- }
- w.imported[v] = nil
- var usages []int
- vpkg, _ := w.Import("", v, conf)
- if vpkg != nil && vpkg != pkg {
- if conf.Info != nil {
- for k, v := range conf.Info.Uses {
- if k != nil && v != nil && IsSameObject(v, cursorObj) {
- usages = append(usages, int(k.Pos()))
- }
- }
- }
- if conf.XInfo != nil {
- for k, v := range conf.XInfo.Uses {
- if k != nil && v != nil && IsSameObject(v, cursorObj) {
- usages = append(usages, int(k.Pos()))
- }
- }
- }
- }
- if v == find_def_pkg {
- usages = append(usages, int(cursorPos))
- }
- (sort.IntSlice(usages)).Sort()
- for _, pos := range usages {
- fmt.Println(w.fset.Position(token.Pos(pos)))
- }
- }
-}
-
-func (w *PkgWalker) CheckIsImport(cursor *FileCursor) *ast.ImportSpec {
- if cursor.fileDir == "" {
- return nil
- }
- file, _ := w.parseFile(cursor.fileDir, cursor.fileName, cursor.src)
- if file == nil {
- return nil
- }
- for _, is := range file.Imports {
- if inRange(is, cursor.pos) {
- return is
- }
- }
- return nil
-}
-
-func inRange(node ast.Node, p token.Pos) bool {
- if node == nil {
- return false
- }
- return p >= node.Pos() && p <= node.End()
-}
-
-func (w *PkgWalker) nodeString(node interface{}) string {
- if node == nil {
- return ""
- }
- var b bytes.Buffer
- printer.Fprint(&b, w.fset, node)
- return b.String()
-}
diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE
deleted file mode 100644
index 6a66aea..0000000
--- a/vendor/golang.org/x/sys/LICENSE
+++ /dev/null
@@ -1,27 +0,0 @@
-Copyright (c) 2009 The Go Authors. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/golang.org/x/sys/PATENTS b/vendor/golang.org/x/sys/PATENTS
deleted file mode 100644
index 7330990..0000000
--- a/vendor/golang.org/x/sys/PATENTS
+++ /dev/null
@@ -1,22 +0,0 @@
-Additional IP Rights Grant (Patents)
-
-"This implementation" means the copyrightable works distributed by
-Google as part of the Go project.
-
-Google hereby grants to You a perpetual, worldwide, non-exclusive,
-no-charge, royalty-free, irrevocable (except as stated in this section)
-patent license to make, have made, use, offer to sell, sell, import,
-transfer and otherwise run, modify and propagate the contents of this
-implementation of Go, where such license applies only to those patent
-claims, both currently owned or controlled by Google and acquired in
-the future, licensable by Google that are necessarily infringed by this
-implementation of Go. This grant does not include claims that would be
-infringed only as a consequence of further modification of this
-implementation. If you or your agent or exclusive licensee institute or
-order or agree to the institution of patent litigation against any
-entity (including a cross-claim or counterclaim in a lawsuit) alleging
-that this implementation of Go or any code incorporated within this
-implementation of Go constitutes direct or contributory patent
-infringement, or inducement of patent infringement, then any patent
-rights granted to you under this License for this implementation of Go
-shall terminate as of the date such litigation is filed.
diff --git a/vendor/golang.org/x/sys/unix/README.md b/vendor/golang.org/x/sys/unix/README.md
deleted file mode 100644
index bc6f603..0000000
--- a/vendor/golang.org/x/sys/unix/README.md
+++ /dev/null
@@ -1,173 +0,0 @@
-# Building `sys/unix`
-
-The sys/unix package provides access to the raw system call interface of the
-underlying operating system. See: https://godoc.org/golang.org/x/sys/unix
-
-Porting Go to a new architecture/OS combination or adding syscalls, types, or
-constants to an existing architecture/OS pair requires some manual effort;
-however, there are tools that automate much of the process.
-
-## Build Systems
-
-There are currently two ways we generate the necessary files. We are currently
-migrating the build system to use containers so the builds are reproducible.
-This is being done on an OS-by-OS basis. Please update this documentation as
-components of the build system change.
-
-### Old Build System (currently for `GOOS != "Linux" || GOARCH == "sparc64"`)
-
-The old build system generates the Go files based on the C header files
-present on your system. This means that files
-for a given GOOS/GOARCH pair must be generated on a system with that OS and
-architecture. This also means that the generated code can differ from system
-to system, based on differences in the header files.
-
-To avoid this, if you are using the old build system, only generate the Go
-files on an installation with unmodified header files. It is also important to
-keep track of which version of the OS the files were generated from (ex.
-Darwin 14 vs Darwin 15). This makes it easier to track the progress of changes
-and have each OS upgrade correspond to a single change.
-
-To build the files for your current OS and architecture, make sure GOOS and
-GOARCH are set correctly and run `mkall.sh`. This will generate the files for
-your specific system. Running `mkall.sh -n` shows the commands that will be run.
-
-Requirements: bash, perl, go
-
-### New Build System (currently for `GOOS == "Linux" && GOARCH != "sparc64"`)
-
-The new build system uses a Docker container to generate the go files directly
-from source checkouts of the kernel and various system libraries. This means
-that on any platform that supports Docker, all the files using the new build
-system can be generated at once, and generated files will not change based on
-what the person running the scripts has installed on their computer.
-
-The OS specific files for the new build system are located in the `${GOOS}`
-directory, and the build is coordinated by the `${GOOS}/mkall.go` program. When
-the kernel or system library updates, modify the Dockerfile at
-`${GOOS}/Dockerfile` to checkout the new release of the source.
-
-To build all the files under the new build system, you must be on an amd64/Linux
-system and have your GOOS and GOARCH set accordingly. Running `mkall.sh` will
-then generate all of the files for all of the GOOS/GOARCH pairs in the new build
-system. Running `mkall.sh -n` shows the commands that will be run.
-
-Requirements: bash, perl, go, docker
-
-## Component files
-
-This section describes the various files used in the code generation process.
-It also contains instructions on how to modify these files to add a new
-architecture/OS or to add additional syscalls, types, or constants. Note that
-if you are using the new build system, the scripts cannot be called normally.
-They must be called from within the docker container.
-
-### asm files
-
-The hand-written assembly file at `asm_${GOOS}_${GOARCH}.s` implements system
-call dispatch. There are three entry points:
-```
- func Syscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
- func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2, err uintptr)
- func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2, err uintptr)
-```
-The first and second are the standard ones; they differ only in how many
-arguments can be passed to the kernel. The third is for low-level use by the
-ForkExec wrapper. Unlike the first two, it does not call into the scheduler to
-let it know that a system call is running.
-
-When porting Go to an new architecture/OS, this file must be implemented for
-each GOOS/GOARCH pair.
-
-### mksysnum
-
-Mksysnum is a script located at `${GOOS}/mksysnum.pl` (or `mksysnum_${GOOS}.pl`
-for the old system). This script takes in a list of header files containing the
-syscall number declarations and parses them to produce the corresponding list of
-Go numeric constants. See `zsysnum_${GOOS}_${GOARCH}.go` for the generated
-constants.
-
-Adding new syscall numbers is mostly done by running the build on a sufficiently
-new installation of the target OS (or updating the source checkouts for the
-new build system). However, depending on the OS, you make need to update the
-parsing in mksysnum.
-
-### mksyscall.pl
-
-The `syscall.go`, `syscall_${GOOS}.go`, `syscall_${GOOS}_${GOARCH}.go` are
-hand-written Go files which implement system calls (for unix, the specific OS,
-or the specific OS/Architecture pair respectively) that need special handling
-and list `//sys` comments giving prototypes for ones that can be generated.
-
-The mksyscall.pl script takes the `//sys` and `//sysnb` comments and converts
-them into syscalls. This requires the name of the prototype in the comment to
-match a syscall number in the `zsysnum_${GOOS}_${GOARCH}.go` file. The function
-prototype can be exported (capitalized) or not.
-
-Adding a new syscall often just requires adding a new `//sys` function prototype
-with the desired arguments and a capitalized name so it is exported. However, if
-you want the interface to the syscall to be different, often one will make an
-unexported `//sys` prototype, an then write a custom wrapper in
-`syscall_${GOOS}.go`.
-
-### types files
-
-For each OS, there is a hand-written Go file at `${GOOS}/types.go` (or
-`types_${GOOS}.go` on the old system). This file includes standard C headers and
-creates Go type aliases to the corresponding C types. The file is then fed
-through godef to get the Go compatible definitions. Finally, the generated code
-is fed though mkpost.go to format the code correctly and remove any hidden or
-private identifiers. This cleaned-up code is written to
-`ztypes_${GOOS}_${GOARCH}.go`.
-
-The hardest part about preparing this file is figuring out which headers to
-include and which symbols need to be `#define`d to get the actual data
-structures that pass through to the kernel system calls. Some C libraries
-preset alternate versions for binary compatibility and translate them on the
-way in and out of system calls, but there is almost always a `#define` that can
-get the real ones.
-See `types_darwin.go` and `linux/types.go` for examples.
-
-To add a new type, add in the necessary include statement at the top of the
-file (if it is not already there) and add in a type alias line. Note that if
-your type is significantly different on different architectures, you may need
-some `#if/#elif` macros in your include statements.
-
-### mkerrors.sh
-
-This script is used to generate the system's various constants. This doesn't
-just include the error numbers and error strings, but also the signal numbers
-an a wide variety of miscellaneous constants. The constants come from the list
-of include files in the `includes_${uname}` variable. A regex then picks out
-the desired `#define` statements, and generates the corresponding Go constants.
-The error numbers and strings are generated from `#include `, and the
-signal numbers and strings are generated from `#include `. All of
-these constants are written to `zerrors_${GOOS}_${GOARCH}.go` via a C program,
-`_errors.c`, which prints out all the constants.
-
-To add a constant, add the header that includes it to the appropriate variable.
-Then, edit the regex (if necessary) to match the desired constant. Avoid making
-the regex too broad to avoid matching unintended constants.
-
-
-## Generated files
-
-### `zerror_${GOOS}_${GOARCH}.go`
-
-A file containing all of the system's generated error numbers, error strings,
-signal numbers, and constants. Generated by `mkerrors.sh` (see above).
-
-### `zsyscall_${GOOS}_${GOARCH}.go`
-
-A file containing all the generated syscalls for a specific GOOS and GOARCH.
-Generated by `mksyscall.pl` (see above).
-
-### `zsysnum_${GOOS}_${GOARCH}.go`
-
-A list of numeric constants for all the syscall number of the specific GOOS
-and GOARCH. Generated by mksysnum (see above).
-
-### `ztypes_${GOOS}_${GOARCH}.go`
-
-A file containing Go types for passing into (or returning from) syscalls.
-Generated by godefs and the types file (see above).
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_386.s b/vendor/golang.org/x/sys/unix/asm_darwin_386.s
deleted file mode 100644
index 8a72783..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s b/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
deleted file mode 100644
index 6321421..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
deleted file mode 100644
index 333242d..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm,darwin
-
-#include "textflag.h"
-
-//
-// System call support for ARM, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s b/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
deleted file mode 100644
index 97e0174..0000000
--- a/vendor/golang.org/x/sys/unix/asm_darwin_arm64.s
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-// +build arm64,darwin
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, Darwin
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s b/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
deleted file mode 100644
index d5ed672..0000000
--- a/vendor/golang.org/x/sys/unix/asm_dragonfly_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, DragonFly
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-64
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-88
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-112
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-64
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-88
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s b/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
deleted file mode 100644
index c9a0a26..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
deleted file mode 100644
index 3517247..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s b/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
deleted file mode 100644
index 9227c87..0000000
--- a/vendor/golang.org/x/sys/unix/asm_freebsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, FreeBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_386.s b/vendor/golang.org/x/sys/unix/asm_linux_386.s
deleted file mode 100644
index 4db2909..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_386.s
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for 386, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·socketcall(SB),NOSPLIT,$0-36
- JMP syscall·socketcall(SB)
-
-TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
- JMP syscall·rawsocketcall(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-28
- JMP syscall·seek(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s b/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
deleted file mode 100644
index 44e25c6..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for AMD64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
-
-TEXT ·gettimeofday(SB),NOSPLIT,$0-16
- JMP syscall·gettimeofday(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm.s b/vendor/golang.org/x/sys/unix/asm_linux_arm.s
deleted file mode 100644
index cf0b574..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for arm, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
-
-TEXT ·seek(SB),NOSPLIT,$0-32
- B syscall·seek(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s b/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
deleted file mode 100644
index 4be9bfe..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_arm64.s
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build arm64
-// +build !gccgo
-
-#include "textflag.h"
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- B syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s b/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
deleted file mode 100644
index 724e580..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_mips64x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips64 mips64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for mips64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s b/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
deleted file mode 100644
index 2ea4257..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_mipsx.s
+++ /dev/null
@@ -1,31 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips mipsle
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for mips, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s b/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
deleted file mode 100644
index 8d231fe..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_ppc64x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for ppc64, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- BR syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- BR syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- BR syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- BR syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s b/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
deleted file mode 100644
index 1188985..0000000
--- a/vendor/golang.org/x/sys/unix/asm_linux_s390x.s
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build s390x
-// +build linux
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for s390x, Linux
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- BR syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- BR syscall·Syscall6(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- BR syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- BR syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s b/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
deleted file mode 100644
index 48bdcd7..0000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
deleted file mode 100644
index 2ede05c..0000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s b/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
deleted file mode 100644
index e892857..0000000
--- a/vendor/golang.org/x/sys/unix/asm_netbsd_arm.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for ARM, NetBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- B syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- B syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- B syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- B syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- B syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s b/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
deleted file mode 100644
index 00576f3..0000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_386.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for 386, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-28
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-40
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-52
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-28
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-40
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
deleted file mode 100644
index 790ef77..0000000
--- a/vendor/golang.org/x/sys/unix/asm_openbsd_amd64.s
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System call support for AMD64, OpenBSD
-//
-
-// Just jump to package syscall's implementation for all these functions.
-// The runtime may know about them.
-
-TEXT ·Syscall(SB),NOSPLIT,$0-56
- JMP syscall·Syscall(SB)
-
-TEXT ·Syscall6(SB),NOSPLIT,$0-80
- JMP syscall·Syscall6(SB)
-
-TEXT ·Syscall9(SB),NOSPLIT,$0-104
- JMP syscall·Syscall9(SB)
-
-TEXT ·RawSyscall(SB),NOSPLIT,$0-56
- JMP syscall·RawSyscall(SB)
-
-TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
- JMP syscall·RawSyscall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s b/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
deleted file mode 100644
index ded8260..0000000
--- a/vendor/golang.org/x/sys/unix/asm_solaris_amd64.s
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-//
-// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go
-//
-
-TEXT ·sysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·sysvicall6(SB)
-
-TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/golang.org/x/sys/unix/bluetooth_linux.go b/vendor/golang.org/x/sys/unix/bluetooth_linux.go
deleted file mode 100644
index 6e32296..0000000
--- a/vendor/golang.org/x/sys/unix/bluetooth_linux.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Bluetooth sockets and messages
-
-package unix
-
-// Bluetooth Protocols
-const (
- BTPROTO_L2CAP = 0
- BTPROTO_HCI = 1
- BTPROTO_SCO = 2
- BTPROTO_RFCOMM = 3
- BTPROTO_BNEP = 4
- BTPROTO_CMTP = 5
- BTPROTO_HIDP = 6
- BTPROTO_AVDTP = 7
-)
-
-const (
- HCI_CHANNEL_RAW = 0
- HCI_CHANNEL_USER = 1
- HCI_CHANNEL_MONITOR = 2
- HCI_CHANNEL_CONTROL = 3
-)
-
-// Socketoption Level
-const (
- SOL_BLUETOOTH = 0x112
- SOL_HCI = 0x0
- SOL_L2CAP = 0x6
- SOL_RFCOMM = 0x12
- SOL_SCO = 0x11
-)
diff --git a/vendor/golang.org/x/sys/unix/constants.go b/vendor/golang.org/x/sys/unix/constants.go
deleted file mode 100644
index a96f0eb..0000000
--- a/vendor/golang.org/x/sys/unix/constants.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-const (
- R_OK = 0x4
- W_OK = 0x2
- X_OK = 0x1
-)
diff --git a/vendor/golang.org/x/sys/unix/dirent.go b/vendor/golang.org/x/sys/unix/dirent.go
deleted file mode 100644
index bd47581..0000000
--- a/vendor/golang.org/x/sys/unix/dirent.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris
-
-package unix
-
-import "unsafe"
-
-// readInt returns the size-bytes unsigned integer in native byte order at offset off.
-func readInt(b []byte, off, size uintptr) (u uint64, ok bool) {
- if len(b) < int(off+size) {
- return 0, false
- }
- if isBigEndian {
- return readIntBE(b[off:], size), true
- }
- return readIntLE(b[off:], size), true
-}
-
-func readIntBE(b []byte, size uintptr) uint64 {
- switch size {
- case 1:
- return uint64(b[0])
- case 2:
- _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[1]) | uint64(b[0])<<8
- case 4:
- _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[3]) | uint64(b[2])<<8 | uint64(b[1])<<16 | uint64(b[0])<<24
- case 8:
- _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[7]) | uint64(b[6])<<8 | uint64(b[5])<<16 | uint64(b[4])<<24 |
- uint64(b[3])<<32 | uint64(b[2])<<40 | uint64(b[1])<<48 | uint64(b[0])<<56
- default:
- panic("syscall: readInt with unsupported size")
- }
-}
-
-func readIntLE(b []byte, size uintptr) uint64 {
- switch size {
- case 1:
- return uint64(b[0])
- case 2:
- _ = b[1] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[0]) | uint64(b[1])<<8
- case 4:
- _ = b[3] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24
- case 8:
- _ = b[7] // bounds check hint to compiler; see golang.org/issue/14808
- return uint64(b[0]) | uint64(b[1])<<8 | uint64(b[2])<<16 | uint64(b[3])<<24 |
- uint64(b[4])<<32 | uint64(b[5])<<40 | uint64(b[6])<<48 | uint64(b[7])<<56
- default:
- panic("syscall: readInt with unsupported size")
- }
-}
-
-// ParseDirent parses up to max directory entries in buf,
-// appending the names to names. It returns the number of
-// bytes consumed from buf, the number of entries added
-// to names, and the new names slice.
-func ParseDirent(buf []byte, max int, names []string) (consumed int, count int, newnames []string) {
- origlen := len(buf)
- count = 0
- for max != 0 && len(buf) > 0 {
- reclen, ok := direntReclen(buf)
- if !ok || reclen > uint64(len(buf)) {
- return origlen, count, names
- }
- rec := buf[:reclen]
- buf = buf[reclen:]
- ino, ok := direntIno(rec)
- if !ok {
- break
- }
- if ino == 0 { // File absent in directory.
- continue
- }
- const namoff = uint64(unsafe.Offsetof(Dirent{}.Name))
- namlen, ok := direntNamlen(rec)
- if !ok || namoff+namlen > uint64(len(rec)) {
- break
- }
- name := rec[namoff : namoff+namlen]
- for i, c := range name {
- if c == 0 {
- name = name[:i]
- break
- }
- }
- // Check for useless names before allocating a string.
- if string(name) == "." || string(name) == ".." {
- continue
- }
- max--
- count++
- names = append(names, string(name))
- }
- return origlen - len(buf), count, names
-}
diff --git a/vendor/golang.org/x/sys/unix/endian_big.go b/vendor/golang.org/x/sys/unix/endian_big.go
deleted file mode 100644
index 5e92690..0000000
--- a/vendor/golang.org/x/sys/unix/endian_big.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-//
-// +build ppc64 s390x mips mips64
-
-package unix
-
-const isBigEndian = true
diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go
deleted file mode 100644
index 085df2d..0000000
--- a/vendor/golang.org/x/sys/unix/endian_little.go
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-//
-// +build 386 amd64 amd64p32 arm arm64 ppc64le mipsle mips64le
-
-package unix
-
-const isBigEndian = false
diff --git a/vendor/golang.org/x/sys/unix/env_unix.go b/vendor/golang.org/x/sys/unix/env_unix.go
deleted file mode 100644
index 45e281a..0000000
--- a/vendor/golang.org/x/sys/unix/env_unix.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Unix environment variables.
-
-package unix
-
-import "syscall"
-
-func Getenv(key string) (value string, found bool) {
- return syscall.Getenv(key)
-}
-
-func Setenv(key, value string) error {
- return syscall.Setenv(key, value)
-}
-
-func Clearenv() {
- syscall.Clearenv()
-}
-
-func Environ() []string {
- return syscall.Environ()
-}
diff --git a/vendor/golang.org/x/sys/unix/env_unset.go b/vendor/golang.org/x/sys/unix/env_unset.go
deleted file mode 100644
index 9222262..0000000
--- a/vendor/golang.org/x/sys/unix/env_unset.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build go1.4
-
-package unix
-
-import "syscall"
-
-func Unsetenv(key string) error {
- // This was added in Go 1.4.
- return syscall.Unsetenv(key)
-}
diff --git a/vendor/golang.org/x/sys/unix/flock.go b/vendor/golang.org/x/sys/unix/flock.go
deleted file mode 100644
index ce67a59..0000000
--- a/vendor/golang.org/x/sys/unix/flock.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// +build linux darwin freebsd openbsd netbsd dragonfly
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd
-
-package unix
-
-import "unsafe"
-
-// fcntl64Syscall is usually SYS_FCNTL, but is overridden on 32-bit Linux
-// systems by flock_linux_32bit.go to be SYS_FCNTL64.
-var fcntl64Syscall uintptr = SYS_FCNTL
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, errno := Syscall(fcntl64Syscall, fd, uintptr(cmd), uintptr(unsafe.Pointer(lk)))
- if errno == 0 {
- return nil
- }
- return errno
-}
diff --git a/vendor/golang.org/x/sys/unix/flock_linux_32bit.go b/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
deleted file mode 100644
index fc0e50e..0000000
--- a/vendor/golang.org/x/sys/unix/flock_linux_32bit.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// +build linux,386 linux,arm linux,mips linux,mipsle
-
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-func init() {
- // On 32-bit Linux systems, the fcntl syscall that matches Go's
- // Flock_t type is SYS_FCNTL64, not SYS_FCNTL.
- fcntl64Syscall = SYS_FCNTL64
-}
diff --git a/vendor/golang.org/x/sys/unix/gccgo.go b/vendor/golang.org/x/sys/unix/gccgo.go
deleted file mode 100644
index 94c8232..0000000
--- a/vendor/golang.org/x/sys/unix/gccgo.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-package unix
-
-import "syscall"
-
-// We can't use the gc-syntax .s files for gccgo. On the plus side
-// much of the functionality can be written directly in Go.
-
-//extern gccgoRealSyscall
-func realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r, errno uintptr)
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- syscall.Entersyscall()
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9)
- syscall.Exitsyscall()
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, 0, 0, 0, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
-
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) {
- r, errno := realSyscall(trap, a1, a2, a3, a4, a5, a6, 0, 0, 0)
- return r, 0, syscall.Errno(errno)
-}
diff --git a/vendor/golang.org/x/sys/unix/gccgo_c.c b/vendor/golang.org/x/sys/unix/gccgo_c.c
deleted file mode 100644
index 07f6be0..0000000
--- a/vendor/golang.org/x/sys/unix/gccgo_c.c
+++ /dev/null
@@ -1,41 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo
-
-#include
-#include
-#include
-
-#define _STRINGIFY2_(x) #x
-#define _STRINGIFY_(x) _STRINGIFY2_(x)
-#define GOSYM_PREFIX _STRINGIFY_(__USER_LABEL_PREFIX__)
-
-// Call syscall from C code because the gccgo support for calling from
-// Go to C does not support varargs functions.
-
-struct ret {
- uintptr_t r;
- uintptr_t err;
-};
-
-struct ret
-gccgoRealSyscall(uintptr_t trap, uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uintptr_t a5, uintptr_t a6, uintptr_t a7, uintptr_t a8, uintptr_t a9)
-{
- struct ret r;
-
- errno = 0;
- r.r = syscall(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9);
- r.err = errno;
- return r;
-}
-
-// Define the use function in C so that it is not inlined.
-
-extern void use(void *) __asm__ (GOSYM_PREFIX GOPKGPATH ".use") __attribute__((noinline));
-
-void
-use(void *p __attribute__ ((unused)))
-{
-}
diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
deleted file mode 100644
index bffe1a7..0000000
--- a/vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo,linux,amd64
-
-package unix
-
-import "syscall"
-
-//extern gettimeofday
-func realGettimeofday(*Timeval, *byte) int32
-
-func gettimeofday(tv *Timeval) (err syscall.Errno) {
- r := realGettimeofday(tv, nil)
- if r < 0 {
- return syscall.GetErrno()
- }
- return 0
-}
diff --git a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go b/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
deleted file mode 100644
index 5633269..0000000
--- a/vendor/golang.org/x/sys/unix/gccgo_linux_sparc64.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build gccgo,linux,sparc64
-
-package unix
-
-import "syscall"
-
-//extern sysconf
-func realSysconf(name int) int64
-
-func sysconf(name int) (n int64, err syscall.Errno) {
- r := realSysconf(name)
- if r < 0 {
- return 0, syscall.GetErrno()
- }
- return r, 0
-}
diff --git a/vendor/golang.org/x/sys/unix/mkall.sh b/vendor/golang.org/x/sys/unix/mkall.sh
deleted file mode 100644
index f0d6566..0000000
--- a/vendor/golang.org/x/sys/unix/mkall.sh
+++ /dev/null
@@ -1,179 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This script runs or (given -n) prints suggested commands to generate files for
-# the Architecture/OS specified by the GOARCH and GOOS environment variables.
-# See README.md for more information about how the build system works.
-
-GOOSARCH="${GOOS}_${GOARCH}"
-
-# defaults
-mksyscall="./mksyscall.pl"
-mkerrors="./mkerrors.sh"
-zerrors="zerrors_$GOOSARCH.go"
-mksysctl=""
-zsysctl="zsysctl_$GOOSARCH.go"
-mksysnum=
-mktypes=
-run="sh"
-cmd=""
-
-case "$1" in
--syscalls)
- for i in zsyscall*go
- do
- # Run the command line that appears in the first line
- # of the generated file to regenerate it.
- sed 1q $i | sed 's;^// ;;' | sh > _$i && gofmt < _$i > $i
- rm _$i
- done
- exit 0
- ;;
--n)
- run="cat"
- cmd="echo"
- shift
-esac
-
-case "$#" in
-0)
- ;;
-*)
- echo 'usage: mkall.sh [-n]' 1>&2
- exit 2
-esac
-
-if [[ "$GOOS" = "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
- # Use then new build system
- # Files generated through docker (use $cmd so you can Ctl-C the build or run)
- $cmd docker build --tag generate:$GOOS $GOOS
- $cmd docker run --interactive --tty --volume $(dirname "$(readlink -f "$0")"):/build generate:$GOOS
- exit
-fi
-
-GOOSARCH_in=syscall_$GOOSARCH.go
-case "$GOOSARCH" in
-_* | *_ | _)
- echo 'undefined $GOOS_$GOARCH:' "$GOOSARCH" 1>&2
- exit 1
- ;;
-darwin_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk macosx)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm)
- mkerrors="$mkerrors"
- mksysnum="./mksysnum_darwin.pl /usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-darwin_arm64)
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_darwin.pl $(xcrun --show-sdk-path --sdk iphoneos)/usr/include/sys/syscall.h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-dragonfly_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -dragonfly"
- mksysnum="curl -s 'http://gitweb.dragonflybsd.org/dragonfly.git/blob_plain/HEAD:/sys/kern/syscalls.master' | ./mksysnum_dragonfly.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_amd64)
- mkerrors="$mkerrors -m64"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-freebsd_arm)
- mkerrors="$mkerrors"
- mksyscall="./mksyscall.pl -l32 -arm"
- mksysnum="curl -s 'http://svn.freebsd.org/base/stable/10/sys/kern/syscalls.master' | ./mksysnum_freebsd.pl"
- # Let the type of C char be signed for making the bare syscall
- # API consistent across over platforms.
- mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
- ;;
-linux_sparc64)
- GOOSARCH_in=syscall_linux_sparc64.go
- unistd_h=/usr/include/sparc64-linux-gnu/asm/unistd.h
- mkerrors="$mkerrors -m64"
- mksysnum="./mksysnum_linux.pl $unistd_h"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-netbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -netbsd"
- mksysnum="curl -s 'http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_netbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_386)
- mkerrors="$mkerrors -m32"
- mksyscall="./mksyscall.pl -l32 -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-openbsd_amd64)
- mkerrors="$mkerrors -m64"
- mksyscall="./mksyscall.pl -openbsd"
- mksysctl="./mksysctl_openbsd.pl"
- zsysctl="zsysctl_openbsd.go"
- mksysnum="curl -s 'http://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master' | ./mksysnum_openbsd.pl"
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-solaris_amd64)
- mksyscall="./mksyscall_solaris.pl"
- mkerrors="$mkerrors -m64"
- mksysnum=
- mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- ;;
-*)
- echo 'unrecognized $GOOS_$GOARCH: ' "$GOOSARCH" 1>&2
- exit 1
- ;;
-esac
-
-(
- if [ -n "$mkerrors" ]; then echo "$mkerrors |gofmt >$zerrors"; fi
- case "$GOOS" in
- *)
- syscall_goos="syscall_$GOOS.go"
- case "$GOOS" in
- darwin | dragonfly | freebsd | netbsd | openbsd)
- syscall_goos="syscall_bsd.go $syscall_goos"
- ;;
- esac
- if [ -n "$mksyscall" ]; then echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go"; fi
- ;;
- esac
- if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
- if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
- if [ -n "$mktypes" ]; then
- echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go";
- fi
-) | $run
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
deleted file mode 100644
index d56eb43..0000000
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ /dev/null
@@ -1,549 +0,0 @@
-#!/usr/bin/env bash
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# Generate Go code listing errors and other #defined constant
-# values (ENAMETOOLONG etc.), by asking the preprocessor
-# about the definitions.
-
-unset LANG
-export LC_ALL=C
-export LC_CTYPE=C
-
-if test -z "$GOARCH" -o -z "$GOOS"; then
- echo 1>&2 "GOARCH or GOOS not defined in environment"
- exit 1
-fi
-
-# Check that we are using the new build system if we should
-if [[ "$GOOS" -eq "linux" ]] && [[ "$GOARCH" != "sparc64" ]]; then
- if [[ "$GOLANG_SYS_BUILD" -ne "docker" ]]; then
- echo 1>&2 "In the new build system, mkerrors should not be called directly."
- echo 1>&2 "See README.md"
- exit 1
- fi
-fi
-
-CC=${CC:-cc}
-
-if [[ "$GOOS" -eq "solaris" ]]; then
- # Assumes GNU versions of utilities in PATH.
- export PATH=/usr/gnu/bin:$PATH
-fi
-
-uname=$(uname)
-
-includes_Darwin='
-#define _DARWIN_C_SOURCE
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-includes_DragonFly='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-includes_FreeBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#if __FreeBSD__ >= 10
-#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10
-#undef SIOCAIFADDR
-#define SIOCAIFADDR _IOW(105, 26, struct oifaliasreq) // ifaliasreq contains if_data
-#undef SIOCSIFPHYADDR
-#define SIOCSIFPHYADDR _IOW(105, 70, struct oifaliasreq) // ifaliasreq contains if_data
-#endif
-'
-
-includes_Linux='
-#define _LARGEFILE_SOURCE
-#define _LARGEFILE64_SOURCE
-#ifndef __LP64__
-#define _FILE_OFFSET_BITS 64
-#endif
-#define _GNU_SOURCE
-
-// is broken on powerpc64, as it fails to include definitions of
-// these structures. We just include them copied from .
-#if defined(__powerpc__)
-struct sgttyb {
- char sg_ispeed;
- char sg_ospeed;
- char sg_erase;
- char sg_kill;
- short sg_flags;
-};
-
-struct tchars {
- char t_intrc;
- char t_quitc;
- char t_startc;
- char t_stopc;
- char t_eofc;
- char t_brkc;
-};
-
-struct ltchars {
- char t_suspc;
- char t_dsuspc;
- char t_rprntc;
- char t_flushc;
- char t_werasc;
- char t_lnextc;
-};
-#endif
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#ifndef MSG_FASTOPEN
-#define MSG_FASTOPEN 0x20000000
-#endif
-
-#ifndef PTRACE_GETREGS
-#define PTRACE_GETREGS 0xc
-#endif
-
-#ifndef PTRACE_SETREGS
-#define PTRACE_SETREGS 0xd
-#endif
-
-#ifndef SOL_NETLINK
-#define SOL_NETLINK 270
-#endif
-
-#ifdef SOL_BLUETOOTH
-// SPARC includes this in /usr/include/sparc64-linux-gnu/bits/socket.h
-// but it is already in bluetooth_linux.go
-#undef SOL_BLUETOOTH
-#endif
-
-// Certain constants are missing from the fs/crypto UAPI
-#define FS_KEY_DESC_PREFIX "fscrypt:"
-#define FS_KEY_DESC_PREFIX_SIZE 8
-#define FS_MAX_KEY_SIZE 64
-'
-
-includes_NetBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// Needed since refers to it...
-#define schedppq 1
-'
-
-includes_OpenBSD='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-// We keep some constants not supported in OpenBSD 5.5 and beyond for
-// the promise of compatibility.
-#define EMUL_ENABLED 0x1
-#define EMUL_NATIVE 0x2
-#define IPV6_FAITH 0x1d
-#define IPV6_OPTIONS 0x1
-#define IPV6_RTHDR_STRICT 0x1
-#define IPV6_SOCKOPT_RESERVED1 0x3
-#define SIOCGIFGENERIC 0xc020693a
-#define SIOCSIFGENERIC 0x80206939
-#define WALTSIG 0x4
-'
-
-includes_SunOS='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-
-
-includes='
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-'
-ccflags="$@"
-
-# Write go tool cgo -godefs input.
-(
- echo package unix
- echo
- echo '/*'
- indirect="includes_$(uname)"
- echo "${!indirect} $includes"
- echo '*/'
- echo 'import "C"'
- echo 'import "syscall"'
- echo
- echo 'const ('
-
- # The gcc command line prints all the #defines
- # it encounters while processing the input
- echo "${!indirect} $includes" | $CC -x c - -E -dM $ccflags |
- awk '
- $1 != "#define" || $2 ~ /\(/ || $3 == "" {next}
-
- $2 ~ /^E([ABCD]X|[BIS]P|[SD]I|S|FL)$/ {next} # 386 registers
- $2 ~ /^(SIGEV_|SIGSTKSZ|SIGRT(MIN|MAX))/ {next}
- $2 ~ /^(SCM_SRCRT)$/ {next}
- $2 ~ /^(MAP_FAILED)$/ {next}
- $2 ~ /^ELF_.*$/ {next}# contains ELF_ARCH, etc.
-
- $2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
- $2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
-
- $2 !~ /^ETH_/ &&
- $2 !~ /^EPROC_/ &&
- $2 !~ /^EQUIV_/ &&
- $2 !~ /^EXPR_/ &&
- $2 ~ /^E[A-Z0-9_]+$/ ||
- $2 ~ /^B[0-9_]+$/ ||
- $2 == "BOTHER" ||
- $2 ~ /^CI?BAUD(EX)?$/ ||
- $2 == "IBSHIFT" ||
- $2 ~ /^V[A-Z0-9]+$/ ||
- $2 ~ /^CS[A-Z0-9]/ ||
- $2 ~ /^I(SIG|CANON|CRNL|UCLC|EXTEN|MAXBEL|STRIP|UTF8)$/ ||
- $2 ~ /^IGN/ ||
- $2 ~ /^IX(ON|ANY|OFF)$/ ||
- $2 ~ /^IN(LCR|PCK)$/ ||
- $2 ~ /(^FLU?SH)|(FLU?SH$)/ ||
- $2 ~ /^C(LOCAL|READ|MSPAR|RTSCTS)$/ ||
- $2 == "BRKINT" ||
- $2 == "HUPCL" ||
- $2 == "PENDIN" ||
- $2 == "TOSTOP" ||
- $2 == "XCASE" ||
- $2 == "ALTWERASE" ||
- $2 == "NOKERNINFO" ||
- $2 ~ /^PAR/ ||
- $2 ~ /^SIG[^_]/ ||
- $2 ~ /^O[CNPFPL][A-Z]+[^_][A-Z]+$/ ||
- $2 ~ /^(NL|CR|TAB|BS|VT|FF)DLY$/ ||
- $2 ~ /^(NL|CR|TAB|BS|VT|FF)[0-9]$/ ||
- $2 ~ /^O?XTABS$/ ||
- $2 ~ /^TC[IO](ON|OFF)$/ ||
- $2 ~ /^IN_/ ||
- $2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
- $2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
- $2 ~ /^FALLOC_/ ||
- $2 == "ICMPV6_FILTER" ||
- $2 == "SOMAXCONN" ||
- $2 == "NAME_MAX" ||
- $2 == "IFNAMSIZ" ||
- $2 ~ /^CTL_(MAXNAME|NET|QUERY)$/ ||
- $2 ~ /^SYSCTL_VERS/ ||
- $2 ~ /^(MS|MNT)_/ ||
- $2 ~ /^TUN(SET|GET|ATTACH|DETACH)/ ||
- $2 ~ /^(O|F|E?FD|NAME|S|PTRACE|PT)_/ ||
- $2 ~ /^LINUX_REBOOT_CMD_/ ||
- $2 ~ /^LINUX_REBOOT_MAGIC[12]$/ ||
- $2 !~ "NLA_TYPE_MASK" &&
- $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P)_/ ||
- $2 ~ /^SIOC/ ||
- $2 ~ /^TIOC/ ||
- $2 ~ /^TCGET/ ||
- $2 ~ /^TCSET/ ||
- $2 ~ /^TC(FLSH|SBRKP?|XONC)$/ ||
- $2 !~ "RTF_BITS" &&
- $2 ~ /^(IFF|IFT|NET_RT|RTM|RTF|RTV|RTA|RTAX)_/ ||
- $2 ~ /^BIOC/ ||
- $2 ~ /^RUSAGE_(SELF|CHILDREN|THREAD)/ ||
- $2 ~ /^RLIMIT_(AS|CORE|CPU|DATA|FSIZE|LOCKS|MEMLOCK|MSGQUEUE|NICE|NOFILE|NPROC|RSS|RTPRIO|RTTIME|SIGPENDING|STACK)|RLIM_INFINITY/ ||
- $2 ~ /^PRIO_(PROCESS|PGRP|USER)/ ||
- $2 ~ /^CLONE_[A-Z_]+/ ||
- $2 !~ /^(BPF_TIMEVAL)$/ &&
- $2 ~ /^(BPF|DLT)_/ ||
- $2 ~ /^CLOCK_/ ||
- $2 ~ /^CAN_/ ||
- $2 ~ /^ALG_/ ||
- $2 ~ /^FS_(POLICY_FLAGS|KEY_DESC|ENCRYPTION_MODE|[A-Z0-9_]+_KEY_SIZE|IOC_(GET|SET)_ENCRYPTION)/ ||
- $2 ~ /^GRND_/ ||
- $2 ~ /^KEY_(SPEC|REQKEY_DEFL)_/ ||
- $2 ~ /^KEYCTL_/ ||
- $2 ~ /^SPLICE_/ ||
- $2 ~ /^(VM|VMADDR)_/ ||
- $2 !~ "WMESGLEN" &&
- $2 ~ /^W[A-Z0-9]+$/ ||
- $2 ~ /^BLK[A-Z]*(GET$|SET$|BUF$|PART$|SIZE)/ {printf("\t%s = C.%s\n", $2, $2)}
- $2 ~ /^__WCOREFLAG$/ {next}
- $2 ~ /^__W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", substr($2,3), $2)}
-
- {next}
- ' | sort
-
- echo ')'
-) >_const.go
-
-# Pull out the error names for later.
-errors=$(
- echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print $2 }' |
- sort
-)
-
-# Pull out the signal names for later.
-signals=$(
- echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort
-)
-
-# Again, writing regexps to a file.
-echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^E[A-Z0-9_]+$/ { print "^\t" $2 "[ \t]*=" }' |
- sort >_error.grep
-echo '#include ' | $CC -x c - -E -dM $ccflags |
- awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT)' |
- sort >_signal.grep
-
-echo '// mkerrors.sh' "$@"
-echo '// Code generated by the command above; see README.md. DO NOT EDIT.'
-echo
-echo "// +build ${GOARCH},${GOOS}"
-echo
-go tool cgo -godefs -- "$@" _const.go >_error.out
-cat _error.out | grep -vf _error.grep | grep -vf _signal.grep
-echo
-echo '// Errors'
-echo 'const ('
-cat _error.out | grep -f _error.grep | sed 's/=\(.*\)/= syscall.Errno(\1)/'
-echo ')'
-
-echo
-echo '// Signals'
-echo 'const ('
-cat _error.out | grep -f _signal.grep | sed 's/=\(.*\)/= syscall.Signal(\1)/'
-echo ')'
-
-# Run C program to print error and syscall strings.
-(
- echo -E "
-#include
-#include
-#include
-#include
-#include
-#include
-
-#define nelem(x) (sizeof(x)/sizeof((x)[0]))
-
-enum { A = 'A', Z = 'Z', a = 'a', z = 'z' }; // avoid need for single quotes below
-
-int errors[] = {
-"
- for i in $errors
- do
- echo -E ' '$i,
- done
-
- echo -E "
-};
-
-int signals[] = {
-"
- for i in $signals
- do
- echo -E ' '$i,
- done
-
- # Use -E because on some systems bash builtin interprets \n itself.
- echo -E '
-};
-
-static int
-intcmp(const void *a, const void *b)
-{
- return *(int*)a - *(int*)b;
-}
-
-int
-main(void)
-{
- int i, e;
- char buf[1024], *p;
-
- printf("\n\n// Error table\n");
- printf("var errors = [...]string {\n");
- qsort(errors, nelem(errors), sizeof errors[0], intcmp);
- for(i=0; i 0 && errors[i-1] == e)
- continue;
- strcpy(buf, strerror(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- printf("\n\n// Signal table\n");
- printf("var signals = [...]string {\n");
- qsort(signals, nelem(signals), sizeof signals[0], intcmp);
- for(i=0; i 0 && signals[i-1] == e)
- continue;
- strcpy(buf, strsignal(e));
- // lowercase first letter: Bad -> bad, but STREAM -> STREAM.
- if(A <= buf[0] && buf[0] <= Z && a <= buf[1] && buf[1] <= z)
- buf[0] += a - A;
- // cut trailing : number.
- p = strrchr(buf, ":"[0]);
- if(p)
- *p = '\0';
- printf("\t%d: \"%s\",\n", e, buf);
- }
- printf("}\n\n");
-
- return 0;
-}
-
-'
-) >_errors.c
-
-$CC $ccflags -o _errors _errors.c && $GORUN ./_errors && rm -f _errors.c _errors _const.go _error.grep _signal.grep _error.out
diff --git a/vendor/golang.org/x/sys/unix/mkpost.go b/vendor/golang.org/x/sys/unix/mkpost.go
deleted file mode 100644
index d3ff659..0000000
--- a/vendor/golang.org/x/sys/unix/mkpost.go
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-// mkpost processes the output of cgo -godefs to
-// modify the generated types. It is used to clean up
-// the sys API in an architecture specific manner.
-//
-// mkpost is run after cgo -godefs; see README.md.
-package main
-
-import (
- "bytes"
- "fmt"
- "go/format"
- "io/ioutil"
- "log"
- "os"
- "regexp"
-)
-
-func main() {
- // Get the OS and architecture (using GOARCH_TARGET if it exists)
- goos := os.Getenv("GOOS")
- goarch := os.Getenv("GOARCH_TARGET")
- if goarch == "" {
- goarch = os.Getenv("GOARCH")
- }
- // Check that we are using the new build system if we should be.
- if goos == "linux" && goarch != "sparc64" {
- if os.Getenv("GOLANG_SYS_BUILD") != "docker" {
- os.Stderr.WriteString("In the new build system, mkpost should not be called directly.\n")
- os.Stderr.WriteString("See README.md\n")
- os.Exit(1)
- }
- }
-
- b, err := ioutil.ReadAll(os.Stdin)
- if err != nil {
- log.Fatal(err)
- }
-
- // If we have empty Ptrace structs, we should delete them. Only s390x emits
- // nonempty Ptrace structs.
- ptraceRexexp := regexp.MustCompile(`type Ptrace((Psw|Fpregs|Per) struct {\s*})`)
- b = ptraceRexexp.ReplaceAll(b, nil)
-
- // Replace the control_regs union with a blank identifier for now.
- controlRegsRegex := regexp.MustCompile(`(Control_regs)\s+\[0\]uint64`)
- b = controlRegsRegex.ReplaceAll(b, []byte("_ [0]uint64"))
-
- // Remove fields that are added by glibc
- // Note that this is unstable as the identifers are private.
- removeFieldsRegex := regexp.MustCompile(`X__glibc\S*`)
- b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
-
- // We refuse to export private fields on s390x
- if goarch == "s390x" && goos == "linux" {
- // Remove cgo padding fields
- removeFieldsRegex := regexp.MustCompile(`Pad_cgo_\d+`)
- b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
-
- // Remove padding, hidden, or unused fields
- removeFieldsRegex = regexp.MustCompile(`X_\S+`)
- b = removeFieldsRegex.ReplaceAll(b, []byte("_"))
- }
-
- // Remove the first line of warning from cgo
- b = b[bytes.IndexByte(b, '\n')+1:]
- // Modify the command in the header to include:
- // mkpost, our own warning, and a build tag.
- replacement := fmt.Sprintf(`$1 | go run mkpost.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-// +build %s,%s`, goarch, goos)
- cgoCommandRegex := regexp.MustCompile(`(cgo -godefs .*)`)
- b = cgoCommandRegex.ReplaceAll(b, []byte(replacement))
-
- // gofmt
- b, err = format.Source(b)
- if err != nil {
- log.Fatal(err)
- }
-
- os.Stdout.Write(b)
-}
diff --git a/vendor/golang.org/x/sys/unix/mksyscall.pl b/vendor/golang.org/x/sys/unix/mksyscall.pl
deleted file mode 100644
index fb929b4..0000000
--- a/vendor/golang.org/x/sys/unix/mksyscall.pl
+++ /dev/null
@@ -1,328 +0,0 @@
-#!/usr/bin/env perl
-# Copyright 2009 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-# This program reads a file containing function prototypes
-# (like syscall_darwin.go) and generates system call bodies.
-# The prototypes are marked by lines beginning with "//sys"
-# and read like func declarations if //sys is replaced by func, but:
-# * The parameter lists must give a name for each argument.
-# This includes return parameters.
-# * The parameter lists must give a type for each argument:
-# the (x, y, z int) shorthand is not allowed.
-# * If the return parameter is an error number, it must be named errno.
-
-# A line beginning with //sysnb is like //sys, except that the
-# goroutine will not be suspended during the execution of the system
-# call. This must only be used for system calls which can never
-# block, as otherwise the system call could cause all goroutines to
-# hang.
-
-use strict;
-
-my $cmdline = "mksyscall.pl " . join(' ', @ARGV);
-my $errors = 0;
-my $_32bit = "";
-my $plan9 = 0;
-my $openbsd = 0;
-my $netbsd = 0;
-my $dragonfly = 0;
-my $arm = 0; # 64-bit value should use (even, odd)-pair
-my $tags = ""; # build tags
-
-if($ARGV[0] eq "-b32") {
- $_32bit = "big-endian";
- shift;
-} elsif($ARGV[0] eq "-l32") {
- $_32bit = "little-endian";
- shift;
-}
-if($ARGV[0] eq "-plan9") {
- $plan9 = 1;
- shift;
-}
-if($ARGV[0] eq "-openbsd") {
- $openbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-netbsd") {
- $netbsd = 1;
- shift;
-}
-if($ARGV[0] eq "-dragonfly") {
- $dragonfly = 1;
- shift;
-}
-if($ARGV[0] eq "-arm") {
- $arm = 1;
- shift;
-}
-if($ARGV[0] eq "-tags") {
- shift;
- $tags = $ARGV[0];
- shift;
-}
-
-if($ARGV[0] =~ /^-/) {
- print STDERR "usage: mksyscall.pl [-b32 | -l32] [-tags x,y] [file ...]\n";
- exit 1;
-}
-
-# Check that we are using the new build system if we should
-if($ENV{'GOOS'} eq "linux" && $ENV{'GOARCH'} ne "sparc64") {
- if($ENV{'GOLANG_SYS_BUILD'} ne "docker") {
- print STDERR "In the new build system, mksyscall should not be called directly.\n";
- print STDERR "See README.md\n";
- exit 1;
- }
-}
-
-
-sub parseparamlist($) {
- my ($list) = @_;
- $list =~ s/^\s*//;
- $list =~ s/\s*$//;
- if($list eq "") {
- return ();
- }
- return split(/\s*,\s*/, $list);
-}
-
-sub parseparam($) {
- my ($p) = @_;
- if($p !~ /^(\S*) (\S*)$/) {
- print STDERR "$ARGV:$.: malformed parameter: $p\n";
- $errors = 1;
- return ("xx", "int");
- }
- return ($1, $2);
-}
-
-my $text = "";
-while(<>) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, errno error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*((?i)SYS_[A-Z0-9_]+))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($func, $in, $out, $sysname) = ($2, $3, $4, $5);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # Try in vain to keep people from editing this file.
- # The theory is that they jump into the middle of the file
- # without reading the header.
- $text .= "// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\n";
-
- # Go function header.
- my $out_decl = @out ? sprintf(" (%s)", join(', ', @out)) : "";
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out_decl;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, $errvar = BytePtrFromString($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n *byte\n";
- $text .= "\t_p$n, _ = BytePtrFromString($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass dummy pointer in that case.
- # Used to pass nil, but some OSes or simulators reject write(fd, nil, 0).
- $text .= "\tvar _p$n unsafe.Pointer\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = unsafe.Pointer(\&${name}[0])\n\t}";
- $text .= " else {\n\t\t_p$n = unsafe.Pointer(&_zero)\n\t}";
- $text .= "\n";
- push @args, "uintptr(_p$n)", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && ($openbsd || $netbsd)) {
- push @args, "0";
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $dragonfly) {
- if ($func !~ /^extp(read|write)/i) {
- push @args, "0";
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } elsif($_32bit eq "little-endian") {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- } else {
- push @args, "uintptr($name)";
- }
- } elsif($type eq "int64" && $_32bit ne "") {
- if(@args % 2 && $arm) {
- # arm abi specifies 64-bit argument uses
- # (even, odd) pair
- push @args, "0"
- }
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name>>32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name>>32)";
- }
- } else {
- push @args, "uintptr($name)";
- }
- }
-
- # Determine which form to use; pad args with zeros.
- my $asm = "Syscall";
- if ($nonblock) {
- $asm = "RawSyscall";
- }
- if(@args <= 3) {
- while(@args < 3) {
- push @args, "0";
- }
- } elsif(@args <= 6) {
- $asm .= "6";
- while(@args < 6) {
- push @args, "0";
- }
- } elsif(@args <= 9) {
- $asm .= "9";
- while(@args < 9) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # System call number.
- if($sysname eq "") {
- $sysname = "SYS_$func";
- $sysname =~ s/([a-z])([A-Z])/${1}_$2/g; # turn FooBar into Foo_Bar
- $sysname =~ y/a-z/A-Z/;
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm($sysname, $args)";
-
- # Assign return values.
- my $body = "";
- my @ret = ("_", "_", "_");
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err" && !$plan9) {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } elsif($name eq "err" && $plan9) {
- $ret[0] = "r0";
- $ret[2] = "e1";
- next;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1" || $plan9) {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- $text .= $body;
-
- if ($plan9 && $ret[2] eq "e1") {
- $text .= "\tif int32(r0) == -1 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- } elsif ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = errnoErr(e1)\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n\n";
-}
-
-chomp $text;
-chomp $text;
-
-if($errors) {
- exit 1;
-}
-
-print <) {
- chomp;
- s/\s+/ /g;
- s/^\s+//;
- s/\s+$//;
- $package = $1 if !$package && /^package (\S+)$/;
- my $nonblock = /^\/\/sysnb /;
- next if !/^\/\/sys / && !$nonblock;
-
- # Line must be of the form
- # func Open(path string, mode int, perm int) (fd int, err error)
- # Split into name, in params, out params.
- if(!/^\/\/sys(nb)? (\w+)\(([^()]*)\)\s*(?:\(([^()]+)\))?\s*(?:=\s*(?:(\w*)\.)?(\w*))?$/) {
- print STDERR "$ARGV:$.: malformed //sys declaration\n";
- $errors = 1;
- next;
- }
- my ($nb, $func, $in, $out, $modname, $sysname) = ($1, $2, $3, $4, $5, $6);
-
- # Split argument lists on comma.
- my @in = parseparamlist($in);
- my @out = parseparamlist($out);
-
- # So file name.
- if($modname eq "") {
- $modname = "libc";
- }
-
- # System call name.
- if($sysname eq "") {
- $sysname = "$func";
- }
-
- # System call pointer variable name.
- my $sysvarname = "proc$sysname";
-
- my $strconvfunc = "BytePtrFromString";
- my $strconvtype = "*byte";
-
- $sysname =~ y/A-Z/a-z/; # All libc functions are lowercase.
-
- # Runtime import of function to allow cross-platform builds.
- $dynimports .= "//go:cgo_import_dynamic libc_${sysname} ${sysname} \"$modname.so\"\n";
- # Link symbol to proc address variable.
- $linknames .= "//go:linkname ${sysvarname} libc_${sysname}\n";
- # Library proc address variable.
- push @vars, $sysvarname;
-
- # Go function header.
- $out = join(', ', @out);
- if($out ne "") {
- $out = " ($out)";
- }
- if($text ne "") {
- $text .= "\n"
- }
- $text .= sprintf "func %s(%s)%s {\n", $func, join(', ', @in), $out;
-
- # Check if err return available
- my $errvar = "";
- foreach my $p (@out) {
- my ($name, $type) = parseparam($p);
- if($type eq "error") {
- $errvar = $name;
- last;
- }
- }
-
- # Prepare arguments to Syscall.
- my @args = ();
- my $n = 0;
- foreach my $p (@in) {
- my ($name, $type) = parseparam($p);
- if($type =~ /^\*/) {
- push @args, "uintptr(unsafe.Pointer($name))";
- } elsif($type eq "string" && $errvar ne "") {
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, $errvar = $strconvfunc($name)\n";
- $text .= "\tif $errvar != nil {\n\t\treturn\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type eq "string") {
- print STDERR "$ARGV:$.: $func uses string arguments, but has no error return\n";
- $text .= "\tvar _p$n $strconvtype\n";
- $text .= "\t_p$n, _ = $strconvfunc($name)\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))";
- $n++;
- } elsif($type =~ /^\[\](.*)/) {
- # Convert slice into pointer, length.
- # Have to be careful not to take address of &a[0] if len == 0:
- # pass nil in that case.
- $text .= "\tvar _p$n *$1\n";
- $text .= "\tif len($name) > 0 {\n\t\t_p$n = \&$name\[0]\n\t}\n";
- push @args, "uintptr(unsafe.Pointer(_p$n))", "uintptr(len($name))";
- $n++;
- } elsif($type eq "int64" && $_32bit ne "") {
- if($_32bit eq "big-endian") {
- push @args, "uintptr($name >> 32)", "uintptr($name)";
- } else {
- push @args, "uintptr($name)", "uintptr($name >> 32)";
- }
- } elsif($type eq "bool") {
- $text .= "\tvar _p$n uint32\n";
- $text .= "\tif $name {\n\t\t_p$n = 1\n\t} else {\n\t\t_p$n = 0\n\t}\n";
- push @args, "uintptr(_p$n)";
- $n++;
- } else {
- push @args, "uintptr($name)";
- }
- }
- my $nargs = @args;
-
- # Determine which form to use; pad args with zeros.
- my $asm = "sysvicall6";
- if ($nonblock) {
- $asm = "rawSysvicall6";
- }
- if(@args <= 6) {
- while(@args < 6) {
- push @args, "0";
- }
- } else {
- print STDERR "$ARGV:$.: too many arguments to system call\n";
- }
-
- # Actual call.
- my $args = join(', ', @args);
- my $call = "$asm(uintptr(unsafe.Pointer(&$sysvarname)), $nargs, $args)";
-
- # Assign return values.
- my $body = "";
- my $failexpr = "";
- my @ret = ("_", "_", "_");
- my @pout= ();
- my $do_errno = 0;
- for(my $i=0; $i<@out; $i++) {
- my $p = $out[$i];
- my ($name, $type) = parseparam($p);
- my $reg = "";
- if($name eq "err") {
- $reg = "e1";
- $ret[2] = $reg;
- $do_errno = 1;
- } else {
- $reg = sprintf("r%d", $i);
- $ret[$i] = $reg;
- }
- if($type eq "bool") {
- $reg = "$reg != 0";
- }
- if($type eq "int64" && $_32bit ne "") {
- # 64-bit number in r1:r0 or r0:r1.
- if($i+2 > @out) {
- print STDERR "$ARGV:$.: not enough registers for int64 return\n";
- }
- if($_32bit eq "big-endian") {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i, $i+1);
- } else {
- $reg = sprintf("int64(r%d)<<32 | int64(r%d)", $i+1, $i);
- }
- $ret[$i] = sprintf("r%d", $i);
- $ret[$i+1] = sprintf("r%d", $i+1);
- }
- if($reg ne "e1") {
- $body .= "\t$name = $type($reg)\n";
- }
- }
- if ($ret[0] eq "_" && $ret[1] eq "_" && $ret[2] eq "_") {
- $text .= "\t$call\n";
- } else {
- $text .= "\t$ret[0], $ret[1], $ret[2] := $call\n";
- }
- $text .= $body;
-
- if ($do_errno) {
- $text .= "\tif e1 != 0 {\n";
- $text .= "\t\terr = e1\n";
- $text .= "\t}\n";
- }
- $text .= "\treturn\n";
- $text .= "}\n";
-}
-
-if($errors) {
- exit 1;
-}
-
-print < "net.inet",
- "net.inet.ipproto" => "net.inet",
- "net.inet6.ipv6proto" => "net.inet6",
- "net.inet6.ipv6" => "net.inet6.ip6",
- "net.inet.icmpv6" => "net.inet6.icmp6",
- "net.inet6.divert6" => "net.inet6.divert",
- "net.inet6.tcp6" => "net.inet.tcp",
- "net.inet6.udp6" => "net.inet.udp",
- "mpls" => "net.mpls",
- "swpenc" => "vm.swapencrypt"
-);
-
-# Node mappings
-my %node_map = (
- "net.inet.ip.ifq" => "net.ifq",
- "net.inet.pfsync" => "net.pfsync",
- "net.mpls.ifq" => "net.ifq"
-);
-
-my $ctlname;
-my %mib = ();
-my %sysctl = ();
-my $node;
-
-sub debug() {
- print STDERR "$_[0]\n" if $debug;
-}
-
-# Walk the MIB and build a sysctl name to OID mapping.
-sub build_sysctl() {
- my ($node, $name, $oid) = @_;
- my %node = %{$node};
- my @oid = @{$oid};
-
- foreach my $key (sort keys %node) {
- my @node = @{$node{$key}};
- my $nodename = $name.($name ne '' ? '.' : '').$key;
- my @nodeoid = (@oid, $node[0]);
- if ($node[1] eq 'CTLTYPE_NODE') {
- if (exists $node_map{$nodename}) {
- $node = \%mib;
- $ctlname = $node_map{$nodename};
- foreach my $part (split /\./, $ctlname) {
- $node = \%{@{$$node{$part}}[2]};
- }
- } else {
- $node = $node[2];
- }
- &build_sysctl($node, $nodename, \@nodeoid);
- } elsif ($node[1] ne '') {
- $sysctl{$nodename} = \@nodeoid;
- }
- }
-}
-
-foreach my $ctl (@ctls) {
- $ctls{$ctl} = $ctl;
-}
-
-# Build MIB
-foreach my $header (@headers) {
- &debug("Processing $header...");
- open HEADER, "/usr/include/$header" ||
- print STDERR "Failed to open $header\n";
- while () {
- if ($_ =~ /^#define\s+(CTL_NAMES)\s+{/ ||
- $_ =~ /^#define\s+(CTL_(.*)_NAMES)\s+{/ ||
- $_ =~ /^#define\s+((.*)CTL_NAMES)\s+{/) {
- if ($1 eq 'CTL_NAMES') {
- # Top level.
- $node = \%mib;
- } else {
- # Node.
- my $nodename = lc($2);
- if ($header =~ /^netinet\//) {
- $ctlname = "net.inet.$nodename";
- } elsif ($header =~ /^netinet6\//) {
- $ctlname = "net.inet6.$nodename";
- } elsif ($header =~ /^net\//) {
- $ctlname = "net.$nodename";
- } else {
- $ctlname = "$nodename";
- $ctlname =~ s/^(fs|net|kern)_/$1\./;
- }
- if (exists $ctl_map{$ctlname}) {
- $ctlname = $ctl_map{$ctlname};
- }
- if (not exists $ctls{$ctlname}) {
- &debug("Ignoring $ctlname...");
- next;
- }
-
- # Walk down from the top of the MIB.
- $node = \%mib;
- foreach my $part (split /\./, $ctlname) {
- if (not exists $$node{$part}) {
- &debug("Missing node $part");
- $$node{$part} = [ 0, '', {} ];
- }
- $node = \%{@{$$node{$part}}[2]};
- }
- }
-
- # Populate current node with entries.
- my $i = -1;
- while (defined($_) && $_ !~ /^}/) {
- $_ = ;
- $i++ if $_ =~ /{.*}/;
- next if $_ !~ /{\s+"(\w+)",\s+(CTLTYPE_[A-Z]+)\s+}/;
- $$node{$1} = [ $i, $2, {} ];
- }
- }
- }
- close HEADER;
-}
-
-&build_sysctl(\%mib, "", []);
-
-print <){
- if(/^#define\s+SYS_(\w+)\s+([0-9]+)/){
- my $name = $1;
- my $num = $2;
- $name =~ y/a-z/A-Z/;
- print " SYS_$name = $num;"
- }
-}
-
-print <){
- if(/^([0-9]+)\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print <){
- if(/^([0-9]+)\s+\S+\s+STD\s+({ \S+\s+(\w+).*)$/){
- my $num = $1;
- my $proto = $2;
- my $name = "SYS_$3";
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
- if($name =~ /^SYS_CAP_+/ || $name =~ /^SYS___CAP_+/){
- next
- }
-
- print " $name = $num; // $proto\n";
-
- # We keep Capsicum syscall numbers for FreeBSD
- # 9-STABLE here because we are not sure whether they
- # are mature and stable.
- if($num == 513){
- print " SYS_CAP_NEW = 514 // { int cap_new(int fd, uint64_t rights); }\n";
- print " SYS_CAP_GETRIGHTS = 515 // { int cap_getrights(int fd, \\\n";
- print " SYS_CAP_ENTER = 516 // { int cap_enter(void); }\n";
- print " SYS_CAP_GETMODE = 517 // { int cap_getmode(u_int *modep); }\n";
- }
- }
-}
-
-print <){
- if($line =~ /^(.*)\\$/) {
- # Handle continuation
- $line = $1;
- $_ =~ s/^\s+//;
- $line .= $_;
- } else {
- # New line
- $line = $_;
- }
- next if $line =~ /\\$/;
- if($line =~ /^([0-9]+)\s+((STD)|(NOERR))\s+(RUMP\s+)?({\s+\S+\s*\*?\s*\|(\S+)\|(\S*)\|(\w+).*\s+})(\s+(\S+))?$/) {
- my $num = $1;
- my $proto = $6;
- my $compat = $8;
- my $name = "$7_$9";
-
- $name = "$7_$11" if $11 ne '';
- $name =~ y/a-z/A-Z/;
-
- if($compat eq '' || $compat eq '30' || $compat eq '50') {
- print " $name = $num; // $proto\n";
- }
- }
-}
-
-print <){
- if(/^([0-9]+)\s+STD\s+(NOLOCK\s+)?({ \S+\s+\*?(\w+).*)$/){
- my $num = $1;
- my $proto = $3;
- my $name = $4;
- $name =~ y/a-z/A-Z/;
-
- # There are multiple entries for enosys and nosys, so comment them out.
- if($name =~ /^SYS_E?NOSYS$/){
- $name = "// $name";
- }
- if($name eq 'SYS_SYS_EXIT'){
- $name = 'SYS_EXIT';
- }
-
- print " $name = $num; // $proto\n";
- }
-}
-
-print < uint64(len(b)) {
- return nil, nil, EINVAL
- }
- return h, b[cmsgAlignOf(SizeofCmsghdr):h.Len], nil
-}
-
-// UnixRights encodes a set of open file descriptors into a socket
-// control message for sending to another process.
-func UnixRights(fds ...int) []byte {
- datalen := len(fds) * 4
- b := make([]byte, CmsgSpace(datalen))
- h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
- h.Level = SOL_SOCKET
- h.Type = SCM_RIGHTS
- h.SetLen(CmsgLen(datalen))
- data := cmsgData(h)
- for _, fd := range fds {
- *(*int32)(data) = int32(fd)
- data = unsafe.Pointer(uintptr(data) + 4)
- }
- return b
-}
-
-// ParseUnixRights decodes a socket control message that contains an
-// integer array of open file descriptors from another process.
-func ParseUnixRights(m *SocketControlMessage) ([]int, error) {
- if m.Header.Level != SOL_SOCKET {
- return nil, EINVAL
- }
- if m.Header.Type != SCM_RIGHTS {
- return nil, EINVAL
- }
- fds := make([]int, len(m.Data)>>2)
- for i, j := 0, 0; i < len(m.Data); i += 4 {
- fds[j] = int(*(*int32)(unsafe.Pointer(&m.Data[i])))
- j++
- }
- return fds, nil
-}
diff --git a/vendor/golang.org/x/sys/unix/str.go b/vendor/golang.org/x/sys/unix/str.go
deleted file mode 100644
index 35ed664..0000000
--- a/vendor/golang.org/x/sys/unix/str.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-func itoa(val int) string { // do it here rather than with fmt to avoid dependency
- if val < 0 {
- return "-" + uitoa(uint(-val))
- }
- return uitoa(uint(val))
-}
-
-func uitoa(val uint) string {
- var buf [32]byte // big enough for int64
- i := len(buf) - 1
- for val >= 10 {
- buf[i] = byte(val%10 + '0')
- i--
- val /= 10
- }
- buf[i] = byte(val + '0')
- return string(buf[i:])
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall.go b/vendor/golang.org/x/sys/unix/syscall.go
deleted file mode 100644
index 85e3502..0000000
--- a/vendor/golang.org/x/sys/unix/syscall.go
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-// Package unix contains an interface to the low-level operating system
-// primitives. OS details vary depending on the underlying system, and
-// by default, godoc will display OS-specific documentation for the current
-// system. If you want godoc to display OS documentation for another
-// system, set $GOOS and $GOARCH to the desired system. For example, if
-// you want to view documentation for freebsd/arm on linux/amd64, set $GOOS
-// to freebsd and $GOARCH to arm.
-// The primary use of this package is inside other packages that provide a more
-// portable interface to the system, such as "os", "time" and "net". Use
-// those packages rather than this one if you can.
-// For details of the functions and data types in this package consult
-// the manuals for the appropriate operating system.
-// These calls return err == nil to indicate success; otherwise
-// err represents an operating system error describing the failure and
-// holds a value of type syscall.Errno.
-package unix // import "golang.org/x/sys/unix"
-
-// ByteSliceFromString returns a NUL-terminated slice of bytes
-// containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func ByteSliceFromString(s string) ([]byte, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, EINVAL
- }
- }
- a := make([]byte, len(s)+1)
- copy(a, s)
- return a, nil
-}
-
-// BytePtrFromString returns a pointer to a NUL-terminated array of
-// bytes containing the text of s. If s contains a NUL byte at any
-// location, it returns (nil, EINVAL).
-func BytePtrFromString(s string) (*byte, error) {
- a, err := ByteSliceFromString(s)
- if err != nil {
- return nil, err
- }
- return &a[0], nil
-}
-
-// Single-word zero for use when we need a valid pointer to 0 bytes.
-// See mkunix.pl.
-var _zero uintptr
-
-func (ts *Timespec) Unix() (sec int64, nsec int64) {
- return int64(ts.Sec), int64(ts.Nsec)
-}
-
-func (tv *Timeval) Unix() (sec int64, nsec int64) {
- return int64(tv.Sec), int64(tv.Usec) * 1000
-}
-
-func (ts *Timespec) Nano() int64 {
- return int64(ts.Sec)*1e9 + int64(ts.Nsec)
-}
-
-func (tv *Timeval) Nano() int64 {
- return int64(tv.Sec)*1e9 + int64(tv.Usec)*1000
-}
-
-func TimevalToNsec(tv Timeval) int64 { return int64(tv.Sec)*1e9 + int64(tv.Usec)*1e3 }
diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
deleted file mode 100644
index ccb29c7..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ /dev/null
@@ -1,614 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd netbsd openbsd
-
-// BSD system call wrappers shared by *BSD based systems
-// including OS X (Darwin) and FreeBSD. Like the other
-// syscall_*.go files it is compiled as Go code but also
-// used as input to mksyscall which parses the //sys
-// lines and generates system call stubs.
-
-package unix
-
-import (
- "runtime"
- "syscall"
- "unsafe"
-)
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 16 on BSD.
- if n < 0 || n > 1000 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // 64 bits should be enough. (32 bits isn't even on 386). Since the
- // actual system call is getdirentries64, 64 is a good guess.
- // TODO(rsc): Can we use a single global basep for all calls?
- var base = (*uintptr)(unsafe.Pointer(new(uint64)))
- return Getdirentries(fd, buf, base)
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
- sig := syscall.Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys Shutdown(s int, how int) (err error)
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet4
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Len = SizeofSockaddrInet6
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) || n == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = byte(3 + n) // 2 for Family, Len; 1 for NUL
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- return unsafe.Pointer(&sa.raw), _Socklen(sa.raw.Len), nil
-}
-
-func (sa *SockaddrDatalink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Index == 0 {
- return nil, 0, EINVAL
- }
- sa.raw.Len = sa.Len
- sa.raw.Family = AF_LINK
- sa.raw.Index = sa.Index
- sa.raw.Type = sa.Type
- sa.raw.Nlen = sa.Nlen
- sa.raw.Alen = sa.Alen
- sa.raw.Slen = sa.Slen
- for i := 0; i < len(sa.raw.Data); i++ {
- sa.raw.Data[i] = sa.Data[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrDatalink, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_LINK:
- pp := (*RawSockaddrDatalink)(unsafe.Pointer(rsa))
- sa := new(SockaddrDatalink)
- sa.Len = pp.Len
- sa.Family = pp.Family
- sa.Index = pp.Index
- sa.Type = pp.Type
- sa.Nlen = pp.Nlen
- sa.Alen = pp.Alen
- sa.Slen = pp.Slen
- for i := 0; i < len(sa.Data); i++ {
- sa.Data[i] = pp.Data[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- if pp.Len < 2 || pp.Len > SizeofSockaddrUnix {
- return nil, EINVAL
- }
- sa := new(SockaddrUnix)
-
- // Some BSDs include the trailing NUL in the length, whereas
- // others do not. Work around this by subtracting the leading
- // family and len. The path is then scanned to see if a NUL
- // terminator still exists within the length.
- n := int(pp.Len) - 2 // subtract leading Family, Len
- for i := 0; i < n; i++ {
- if pp.Path[i] == 0 {
- // found early NUL; assume Len included the NUL
- // or was overestimating.
- n = i
- break
- }
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- if runtime.GOOS == "darwin" && len == 0 {
- // Accepted socket has no address.
- // This is likely due to a bug in xnu kernels,
- // where instead of ECONNABORTED error socket
- // is accepted, but has no address.
- Close(nfd)
- return 0, nil, ECONNABORTED
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- // TODO(jsing): DragonFly has a "bug" (see issue 3349), which should be
- // reported upstream.
- if runtime.GOOS == "dragonfly" && rsa.Addr.Family == AF_UNSPEC && rsa.Addr.Len == 0 {
- rsa.Addr.Family = AF_UNIX
- rsa.Addr.Len = SizeofSockaddrUnix
- }
- return anyToSockaddr(&rsa)
-}
-
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-
-func GetsockoptByte(fd, level, opt int) (value byte, err error) {
- var n byte
- vallen := _Socklen(1)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return n, err
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-//sys kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error)
-
-func Kevent(kq int, changes, events []Kevent_t, timeout *Timespec) (n int, err error) {
- var change, event unsafe.Pointer
- if len(changes) > 0 {
- change = unsafe.Pointer(&changes[0])
- }
- if len(events) > 0 {
- event = unsafe.Pointer(&events[0])
- }
- return kevent(kq, change, len(changes), event, len(events), timeout)
-}
-
-//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
-
-// sysctlmib translates name to mib number and appends any additional args.
-func sysctlmib(name string, args ...int) ([]_C_int, error) {
- // Translate name to mib number.
- mib, err := nametomib(name)
- if err != nil {
- return nil, err
- }
-
- for _, a := range args {
- mib = append(mib, _C_int(a))
- }
-
- return mib, nil
-}
-
-func Sysctl(name string) (string, error) {
- return SysctlArgs(name)
-}
-
-func SysctlArgs(name string, args ...int) (string, error) {
- buf, err := SysctlRaw(name, args...)
- if err != nil {
- return "", err
- }
- n := len(buf)
-
- // Throw away terminating NUL.
- if n > 0 && buf[n-1] == '\x00' {
- n--
- }
- return string(buf[0:n]), nil
-}
-
-func SysctlUint32(name string) (uint32, error) {
- return SysctlUint32Args(name)
-}
-
-func SysctlUint32Args(name string, args ...int) (uint32, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return 0, err
- }
-
- n := uintptr(4)
- buf := make([]byte, 4)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return 0, err
- }
- if n != 4 {
- return 0, EIO
- }
- return *(*uint32)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlUint64(name string, args ...int) (uint64, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return 0, err
- }
-
- n := uintptr(8)
- buf := make([]byte, 8)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return 0, err
- }
- if n != 8 {
- return 0, EIO
- }
- return *(*uint64)(unsafe.Pointer(&buf[0])), nil
-}
-
-func SysctlRaw(name string, args ...int) ([]byte, error) {
- mib, err := sysctlmib(name, args...)
- if err != nil {
- return nil, err
- }
-
- // Find size.
- n := uintptr(0)
- if err := sysctl(mib, nil, &n, nil, 0); err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Read into buffer of that size.
- buf := make([]byte, n)
- if err := sysctl(mib, &buf[0], &n, nil, 0); err != nil {
- return nil, err
- }
-
- // The actual call may return less than the original reported required
- // size so ensure we deal with that.
- return buf[:n], nil
-}
-
-//sys utimes(path string, timeval *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) error {
- if tv == nil {
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- return utimes(path, nil)
- }
- // TODO: The BSDs can do utimensat with SYS_UTIMENSAT but it
- // isn't supported by darwin so this uses utimes instead
- if len(ts) != 2 {
- return EINVAL
- }
- // Not as efficient as it could be because Timespec and
- // Timeval have different types in the different OSes
- tv := [2]Timeval{
- NsecToTimeval(TimespecToNsec(ts[0])),
- NsecToTimeval(TimespecToNsec(ts[1])),
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys futimes(fd int, timeval *[2]Timeval) (err error)
-
-func Futimes(fd int, tv []Timeval) error {
- if tv == nil {
- return futimes(fd, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimes(fd, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// TODO: wrap
-// Acct(name nil-string) (err error)
-// Gethostuuid(uuid *byte, timeout *Timespec) (err error)
-// Madvise(addr *byte, len int, behav int) (err error)
-// Mprotect(addr *byte, len int, prot int) (err error)
-// Msync(addr *byte, len int, flags int) (err error)
-// Ptrace(req int, pid int, addr uintptr, data int) (ret uintptr, err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
deleted file mode 100644
index 7d91ac0..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ /dev/null
@@ -1,493 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Darwin system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- errorspkg "errors"
- "syscall"
- "unsafe"
-)
-
-const ImplementsGetwd = true
-
-func Getwd() (string, error) {
- buf := make([]byte, 2048)
- attrs, err := getAttrList(".", attrList{CommonAttr: attrCmnFullpath}, buf, 0)
- if err == nil && len(attrs) == 1 && len(attrs[0]) >= 2 {
- wd := string(attrs[0])
- // Sanity check that it's an absolute path and ends
- // in a null byte, which we then strip.
- if wd[0] == '/' && wd[len(wd)-1] == 0 {
- return wd[:len(wd)-1], nil
- }
- }
- // If pkg/os/getwd.go gets ENOTSUP, it will fall back to the
- // slow algorithm.
- return "", ENOTSUP
-}
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-func direntIno(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-func PtraceAttach(pid int) (err error) { return ptrace(PT_ATTACH, pid, 0, 0) }
-func PtraceDetach(pid int) (err error) { return ptrace(PT_DETACH, pid, 0, 0) }
-
-const (
- attrBitMapCount = 5
- attrCmnFullpath = 0x08000000
-)
-
-type attrList struct {
- bitmapCount uint16
- _ uint16
- CommonAttr uint32
- VolAttr uint32
- DirAttr uint32
- FileAttr uint32
- Forkattr uint32
-}
-
-func getAttrList(path string, attrList attrList, attrBuf []byte, options uint) (attrs [][]byte, err error) {
- if len(attrBuf) < 4 {
- return nil, errorspkg.New("attrBuf too small")
- }
- attrList.bitmapCount = attrBitMapCount
-
- var _p0 *byte
- _p0, err = BytePtrFromString(path)
- if err != nil {
- return nil, err
- }
-
- _, _, e1 := Syscall6(
- SYS_GETATTRLIST,
- uintptr(unsafe.Pointer(_p0)),
- uintptr(unsafe.Pointer(&attrList)),
- uintptr(unsafe.Pointer(&attrBuf[0])),
- uintptr(len(attrBuf)),
- uintptr(options),
- 0,
- )
- if e1 != 0 {
- return nil, e1
- }
- size := *(*uint32)(unsafe.Pointer(&attrBuf[0]))
-
- // dat is the section of attrBuf that contains valid data,
- // without the 4 byte length header. All attribute offsets
- // are relative to dat.
- dat := attrBuf
- if int(size) < len(attrBuf) {
- dat = dat[:size]
- }
- dat = dat[4:] // remove length prefix
-
- for i := uint32(0); int(i) < len(dat); {
- header := dat[i:]
- if len(header) < 8 {
- return attrs, errorspkg.New("truncated attribute header")
- }
- datOff := *(*int32)(unsafe.Pointer(&header[0]))
- attrLen := *(*uint32)(unsafe.Pointer(&header[4]))
- if datOff < 0 || uint32(datOff)+attrLen > uint32(len(dat)) {
- return attrs, errorspkg.New("truncated results; attrBuf too small")
- }
- end := uint32(datOff) + attrLen
- attrs = append(attrs, dat[datOff:end])
- i = end
- if r := i % 4; r != 0 {
- i += (4 - r)
- }
- }
- return
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT64, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Wrapped
- */
-
-//sys kill(pid int, signum int, posix int) (err error)
-
-func Kill(pid int, signum syscall.Signal) (err error) { return kill(pid, int(signum), 1) }
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exchangedata(path1 string, path2 string, options int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Fstatfs(fd int, stat *Statfs_t) (err error) = SYS_FSTATFS64
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) = SYS_GETDIRENTRIES64
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Getuid() (uid int)
-//sysnb Issetugid() (tainted bool)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sys Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setprivexec(flag int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys Statfs(path string, stat *Statfs_t) (err error) = SYS_STATFS64
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// sendfile
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go b/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
deleted file mode 100644
index c172a3d..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_386.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/386 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
deleted file mode 100644
index fc1e5a4..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_amd64.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/amd64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
deleted file mode 100644
index d286cf4..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm.go
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int32, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = int32(sec)
- tv.Usec = int32(usec)
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(*offset>>32), uintptr(unsafe.Pointer(&length)), 0, 0, 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
deleted file mode 100644
index c33905c..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_darwin_arm64.go
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm64,darwin
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 16384 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-//sysnb gettimeofday(tp *Timeval) (sec int64, usec int32, err error)
-func Gettimeofday(tv *Timeval) (err error) {
- // The tv passed to gettimeofday must be non-nil
- // but is otherwise unused. The answers come back
- // in the two registers.
- sec, usec, err := gettimeofday(tv)
- tv.Sec = sec
- tv.Usec = usec
- return err
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var length = uint64(count)
-
- _, _, e1 := Syscall6(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(unsafe.Pointer(&length)), 0, 0)
-
- written = int(length)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno) // sic
-
-// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
-// of darwin/arm64 the syscall is called sysctl instead of __sysctl.
-const SYS___SYSCTL = SYS_SYSCTL
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
deleted file mode 100644
index 7e0210f..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ /dev/null
@@ -1,425 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// DragonFly BSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- Rcf uint16
- Route [16]uint16
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-func direntIno(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
- namlen, ok := direntNamlen(buf)
- if !ok {
- return 0, false
- }
- return (16 + namlen + 1 + 7) &^ 7, true
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys extpread(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
- return extpread(fd, p, 0, offset)
-}
-
-//sys extpwrite(fd int, p []byte, flags int, offset int64) (n int, err error)
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
- return extpwrite(fd, p, 0, offset)
-}
-
-func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
-
-/*
- * Unimplemented
- * TODO(jsing): Update this list for DragonFly.
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
deleted file mode 100644
index da7cb79..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,dragonfly
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
deleted file mode 100644
index 077d1f3..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ /dev/null
@@ -1,666 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// FreeBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import "unsafe"
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [46]int8
- raw RawSockaddrDatalink
-}
-
-// Translate "kern.hostname" to []_C_int{0,1,2,3}.
-func nametomib(name string) (mib []_C_int, err error) {
- const siz = unsafe.Sizeof(mib[0])
-
- // NOTE(rsc): It seems strange to set the buffer to have
- // size CTL_MAXNAME+2 but use only CTL_MAXNAME
- // as the size. I don't know why the +2 is here, but the
- // kernel uses +2 for its own implementation of this function.
- // I am scared that if we don't include the +2 here, the kernel
- // will silently write 2 words farther than we specify
- // and we'll get memory corruption.
- var buf [CTL_MAXNAME + 2]_C_int
- n := uintptr(CTL_MAXNAME) * siz
-
- p := (*byte)(unsafe.Pointer(&buf[0]))
- bytes, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
-
- // Magic sysctl: "setting" 0.3 to a string name
- // lets you read back the array of integers form.
- if err = sysctl([]_C_int{0, 3}, p, &n, &bytes[0], uintptr(len(name))); err != nil {
- return nil, err
- }
- return buf[0 : n/siz], nil
-}
-
-func direntIno(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
-}
-
-//sysnb pipe() (r int, w int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- errno := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, errno
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-func Accept4(fd, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// Derive extattr namespace and attribute name
-
-func xattrnamespace(fullattr string) (ns int, attr string, err error) {
- s := -1
- for idx, val := range fullattr {
- if val == '.' {
- s = idx
- break
- }
- }
-
- if s == -1 {
- return -1, "", ENOATTR
- }
-
- namespace := fullattr[0:s]
- attr = fullattr[s+1:]
-
- switch namespace {
- case "user":
- return EXTATTR_NAMESPACE_USER, attr, nil
- case "system":
- return EXTATTR_NAMESPACE_SYSTEM, attr, nil
- default:
- return -1, "", ENOATTR
- }
-}
-
-func initxattrdest(dest []byte, idx int) (d unsafe.Pointer) {
- if len(dest) > idx {
- return unsafe.Pointer(&dest[idx])
- } else {
- return unsafe.Pointer(_zero)
- }
-}
-
-// FreeBSD implements its own syscalls to handle extended attributes
-
-func Getxattr(file string, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetFile(file, nsid, a, uintptr(d), destsize)
-}
-
-func Fgetxattr(fd int, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetFd(fd, nsid, a, uintptr(d), destsize)
-}
-
-func Lgetxattr(link string, attr string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsize := len(dest)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return -1, err
- }
-
- return ExtattrGetLink(link, nsid, a, uintptr(d), destsize)
-}
-
-// flags are unused on FreeBSD
-
-func Fsetxattr(fd int, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetFd(fd, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Setxattr(file string, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetFile(file, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Lsetxattr(link string, attr string, data []byte, flags int) (err error) {
- d := unsafe.Pointer(&data[0])
- datasiz := len(data)
-
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- _, err = ExtattrSetLink(link, nsid, a, uintptr(d), datasiz)
- return
-}
-
-func Removexattr(file string, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteFile(file, nsid, a)
- return
-}
-
-func Fremovexattr(fd int, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteFd(fd, nsid, a)
- return
-}
-
-func Lremovexattr(link string, attr string) (err error) {
- nsid, a, err := xattrnamespace(attr)
- if err != nil {
- return
- }
-
- err = ExtattrDeleteLink(link, nsid, a)
- return
-}
-
-func Listxattr(file string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- // FreeBSD won't allow you to list xattrs from multiple namespaces
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
-
- /* Errors accessing system attrs are ignored so that
- * we can implement the Linux-like behavior of omitting errors that
- * we don't have read permissions on
- *
- * Linux will still error if we ask for user attributes on a file that
- * we don't have read permissions on, so don't ignore those errors
- */
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-func Llistxattr(link string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
- destsiz := len(dest)
-
- s := 0
- var e error
- for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- e = nil
- continue
- } else if e != nil {
- return s, e
- }
-
- s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
- }
- d = initxattrdest(dest, s)
- }
-
- return s, e
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error)
-//sys ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error)
-//sys ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error)
-//sys ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error)
-//sys ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_POSIX_FADVISE
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sys Getdtablesize() (size int)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Undelete(path string) (err error)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-//sys accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error)
-
-/*
- * Unimplemented
- */
-// Profil
-// Sigaction
-// Sigprocmask
-// Getlogin
-// Sigpending
-// Sigaltstack
-// Ioctl
-// Reboot
-// Execve
-// Vfork
-// Sbrk
-// Sstk
-// Ovadvise
-// Mincore
-// Setitimer
-// Swapon
-// Select
-// Sigsuspend
-// Readv
-// Writev
-// Nfssvc
-// Getfh
-// Quotactl
-// Mount
-// Csops
-// Waitid
-// Add_profil
-// Kdebug_trace
-// Sigreturn
-// Mmap
-// Mlock
-// Munlock
-// Atsocket
-// Kqueue_from_portset_np
-// Kqueue_portset
-// Getattrlist
-// Setattrlist
-// Getdirentriesattr
-// Searchfs
-// Delete
-// Copyfile
-// Poll
-// Watchevent
-// Waitevent
-// Modwatch
-// Getxattr
-// Fgetxattr
-// Setxattr
-// Fsetxattr
-// Removexattr
-// Fremovexattr
-// Listxattr
-// Flistxattr
-// Fsctl
-// Initgroups
-// Posix_spawn
-// Nfsclnt
-// Fhopen
-// Minherit
-// Semsys
-// Msgsys
-// Shmsys
-// Semctl
-// Semget
-// Semop
-// Msgctl
-// Msgget
-// Msgsnd
-// Msgrcv
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Shm_open
-// Shm_unlink
-// Sem_open
-// Sem_close
-// Sem_unlink
-// Sem_wait
-// Sem_trywait
-// Sem_post
-// Sem_getvalue
-// Sem_init
-// Sem_destroy
-// Open_extended
-// Umask_extended
-// Stat_extended
-// Lstat_extended
-// Fstat_extended
-// Chmod_extended
-// Fchmod_extended
-// Access_extended
-// Settid
-// Gettid
-// Setsgroups
-// Getsgroups
-// Setwgroups
-// Getwgroups
-// Mkfifo_extended
-// Mkdir_extended
-// Identitysvc
-// Shared_region_check_np
-// Shared_region_map_np
-// __pthread_mutex_destroy
-// __pthread_mutex_init
-// __pthread_mutex_lock
-// __pthread_mutex_trylock
-// __pthread_mutex_unlock
-// __pthread_cond_init
-// __pthread_cond_destroy
-// __pthread_cond_broadcast
-// __pthread_cond_signal
-// Setsid_with_pid
-// __pthread_cond_timedwait
-// Aio_fsync
-// Aio_return
-// Aio_suspend
-// Aio_cancel
-// Aio_error
-// Aio_read
-// Aio_write
-// Lio_listio
-// __pthread_cond_wait
-// Iopolicysys
-// Mlockall
-// Munlockall
-// __pthread_kill
-// __pthread_sigmask
-// __sigwait
-// __disable_threadsignal
-// __pthread_markcancel
-// __pthread_canceled
-// __semwait_signal
-// Proc_info
-// Stat64_extended
-// Lstat64_extended
-// Fstat64_extended
-// __pthread_chdir
-// __pthread_fchdir
-// Audit
-// Auditon
-// Getauid
-// Setauid
-// Getaudit
-// Setaudit
-// Getaudit_addr
-// Setaudit_addr
-// Auditctl
-// Bsdthread_create
-// Bsdthread_terminate
-// Stack_snapshot
-// Bsdthread_register
-// Workq_open
-// Workq_ops
-// __mac_execve
-// __mac_syscall
-// __mac_get_file
-// __mac_set_file
-// __mac_get_link
-// __mac_set_link
-// __mac_get_proc
-// __mac_set_proc
-// __mac_get_fd
-// __mac_set_fd
-// __mac_get_pid
-// __mac_get_lcid
-// __mac_get_lctx
-// __mac_set_lctx
-// Setlcid
-// Read_nocancel
-// Write_nocancel
-// Open_nocancel
-// Close_nocancel
-// Wait4_nocancel
-// Recvmsg_nocancel
-// Sendmsg_nocancel
-// Recvfrom_nocancel
-// Accept_nocancel
-// Msync_nocancel
-// Fcntl_nocancel
-// Select_nocancel
-// Fsync_nocancel
-// Connect_nocancel
-// Sigsuspend_nocancel
-// Readv_nocancel
-// Writev_nocancel
-// Sendto_nocancel
-// Pread_nocancel
-// Pwrite_nocancel
-// Waitid_nocancel
-// Poll_nocancel
-// Msgsnd_nocancel
-// Msgrcv_nocancel
-// Sem_wait_nocancel
-// Aio_suspend_nocancel
-// __sigwait_nocancel
-// __semwait_signal_nocancel
-// __mac_mount
-// __mac_get_mount
-// __mac_getfsstat
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
deleted file mode 100644
index 6a0cd80..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int32(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
deleted file mode 100644
index e142540..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
deleted file mode 100644
index 5504cb1..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,freebsd
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return ts.Sec*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = nsec / 1e9
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- var writtenOut uint64 = 0
- _, _, e1 := Syscall9(SYS_SENDFILE, uintptr(infd), uintptr(outfd), uintptr(*offset), uintptr((*offset)>>32), uintptr(count), 0, uintptr(unsafe.Pointer(&writtenOut)), 0, 0)
-
- written = int(writtenOut)
-
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
deleted file mode 100644
index 77f9c54..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ /dev/null
@@ -1,1422 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Linux system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and
-// wrap it in our own nicer implementation.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-/*
- * Wrapped
- */
-
-func Access(path string, mode uint32) (err error) {
- return Faccessat(AT_FDCWD, path, mode, 0)
-}
-
-func Chmod(path string, mode uint32) (err error) {
- return Fchmodat(AT_FDCWD, path, mode, 0)
-}
-
-func Chown(path string, uid int, gid int) (err error) {
- return Fchownat(AT_FDCWD, path, uid, gid, 0)
-}
-
-func Creat(path string, mode uint32) (fd int, err error) {
- return Open(path, O_CREAT|O_WRONLY|O_TRUNC, mode)
-}
-
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
-
-// ioctl itself should not be exposed directly, but additional get/set
-// functions for specific types are permissible.
-
-// IoctlSetInt performs an ioctl operation which sets an integer value
-// on fd, using the specified request number.
-func IoctlSetInt(fd int, req uint, value int) (err error) {
- return ioctl(fd, req, uintptr(value))
-}
-
-// IoctlGetInt performs an ioctl operation which gets an integer value
-// from fd, using the specified request number.
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-//sys Linkat(olddirfd int, oldpath string, newdirfd int, newpath string, flags int) (err error)
-
-func Link(oldpath string, newpath string) (err error) {
- return Linkat(AT_FDCWD, oldpath, AT_FDCWD, newpath, 0)
-}
-
-func Mkdir(path string, mode uint32) (err error) {
- return Mkdirat(AT_FDCWD, path, mode)
-}
-
-func Mknod(path string, mode uint32, dev int) (err error) {
- return Mknodat(AT_FDCWD, path, mode, dev)
-}
-
-func Open(path string, mode int, perm uint32) (fd int, err error) {
- return openat(AT_FDCWD, path, mode|O_LARGEFILE, perm)
-}
-
-//sys openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-
-func Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error) {
- return openat(dirfd, path, flags|O_LARGEFILE, mode)
-}
-
-//sys ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
-
-func Ppoll(fds []PollFd, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- if len(fds) == 0 {
- return ppoll(nil, 0, timeout, sigmask)
- }
- return ppoll(&fds[0], len(fds), timeout, sigmask)
-}
-
-//sys Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
-
-func Readlink(path string, buf []byte) (n int, err error) {
- return Readlinkat(AT_FDCWD, path, buf)
-}
-
-func Rename(oldpath string, newpath string) (err error) {
- return Renameat(AT_FDCWD, oldpath, AT_FDCWD, newpath)
-}
-
-func Rmdir(path string) error {
- return Unlinkat(AT_FDCWD, path, AT_REMOVEDIR)
-}
-
-//sys Symlinkat(oldpath string, newdirfd int, newpath string) (err error)
-
-func Symlink(oldpath string, newpath string) (err error) {
- return Symlinkat(oldpath, AT_FDCWD, newpath)
-}
-
-func Unlink(path string) error {
- return Unlinkat(AT_FDCWD, path, 0)
-}
-
-//sys Unlinkat(dirfd int, path string, flags int) (err error)
-
-//sys utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) error {
- if tv == nil {
- err := utimensat(AT_FDCWD, path, nil, 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- var ts [2]Timespec
- ts[0] = NsecToTimespec(TimevalToNsec(tv[0]))
- ts[1] = NsecToTimespec(TimevalToNsec(tv[1]))
- err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- err := utimensat(AT_FDCWD, path, nil, 0)
- if err != ENOSYS {
- return err
- }
- return utimes(path, nil)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
- if err != ENOSYS {
- return err
- }
- // If the utimensat syscall isn't available (utimensat was added to Linux
- // in 2.6.22, Released, 8 July 2007) then fall back to utimes
- var tv [2]Timeval
- for i := 0; i < 2; i++ {
- tv[i] = NsecToTimeval(TimespecToNsec(ts[i]))
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
- if ts == nil {
- return utimensat(dirfd, path, nil, flags)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys futimesat(dirfd int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- if tv == nil {
- return futimesat(dirfd, pathp, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func Futimes(fd int, tv []Timeval) (err error) {
- // Believe it or not, this is the best we can do on Linux
- // (and is what glibc does).
- return Utimes("/proc/self/fd/"+itoa(fd), tv)
-}
-
-const ImplementsGetwd = true
-
-//sys Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
- var buf [PathMax]byte
- n, err := Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- // Getcwd returns the number of bytes written to buf, including the NUL.
- if n < 1 || n > len(buf) || buf[n-1] != 0 {
- return "", EINVAL
- }
- return string(buf[0 : n-1]), nil
-}
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- if err != nil {
- return nil, err
- }
- if n == 0 {
- return nil, nil
- }
-
- // Sanity check group count. Max is 1<<16 on Linux.
- if n < 0 || n > 1<<20 {
- return nil, EINVAL
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if err != nil {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-type WaitStatus uint32
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits. At least that's the idea.
-// There are various irregularities. For example, the
-// "continued" status is 0xFFFF, distinguishing itself
-// from stopped via the core dump bit.
-
-const (
- mask = 0x7F
- core = 0x80
- exited = 0x00
- stopped = 0x7F
- shift = 8
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != exited }
-
-func (w WaitStatus) Stopped() bool { return w&0xFF == stopped }
-
-func (w WaitStatus) Continued() bool { return w == 0xFFFF }
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) ExitStatus() int {
- if !w.Exited() {
- return -1
- }
- return int(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) Signal() syscall.Signal {
- if !w.Signaled() {
- return -1
- }
- return syscall.Signal(w & mask)
-}
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int {
- if w.StopSignal() != SIGTRAP {
- return -1
- }
- return int(w>>shift) >> 8
-}
-
-//sys wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
- var status _C_int
- wpid, err = wait4(pid, &status, options, rusage)
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return
-}
-
-func Mkfifo(path string, mode uint32) (err error) {
- return Mknod(path, mode|S_IFIFO, 0)
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-type SockaddrLinklayer struct {
- Protocol uint16
- Ifindex int
- Hatype uint16
- Pkttype uint8
- Halen uint8
- Addr [8]byte
- raw RawSockaddrLinklayer
-}
-
-func (sa *SockaddrLinklayer) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_PACKET
- sa.raw.Protocol = sa.Protocol
- sa.raw.Ifindex = int32(sa.Ifindex)
- sa.raw.Hatype = sa.Hatype
- sa.raw.Pkttype = sa.Pkttype
- sa.raw.Halen = sa.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrLinklayer, nil
-}
-
-type SockaddrNetlink struct {
- Family uint16
- Pad uint16
- Pid uint32
- Groups uint32
- raw RawSockaddrNetlink
-}
-
-func (sa *SockaddrNetlink) sockaddr() (unsafe.Pointer, _Socklen, error) {
- sa.raw.Family = AF_NETLINK
- sa.raw.Pad = sa.Pad
- sa.raw.Pid = sa.Pid
- sa.raw.Groups = sa.Groups
- return unsafe.Pointer(&sa.raw), SizeofSockaddrNetlink, nil
-}
-
-type SockaddrHCI struct {
- Dev uint16
- Channel uint16
- raw RawSockaddrHCI
-}
-
-func (sa *SockaddrHCI) sockaddr() (unsafe.Pointer, _Socklen, error) {
- sa.raw.Family = AF_BLUETOOTH
- sa.raw.Dev = sa.Dev
- sa.raw.Channel = sa.Channel
- return unsafe.Pointer(&sa.raw), SizeofSockaddrHCI, nil
-}
-
-// SockaddrCAN implements the Sockaddr interface for AF_CAN type sockets.
-// The RxID and TxID fields are used for transport protocol addressing in
-// (CAN_TP16, CAN_TP20, CAN_MCNET, and CAN_ISOTP), they can be left with
-// zero values for CAN_RAW and CAN_BCM sockets as they have no meaning.
-//
-// The SockaddrCAN struct must be bound to the socket file descriptor
-// using Bind before the CAN socket can be used.
-//
-// // Read one raw CAN frame
-// fd, _ := Socket(AF_CAN, SOCK_RAW, CAN_RAW)
-// addr := &SockaddrCAN{Ifindex: index}
-// Bind(fd, addr)
-// frame := make([]byte, 16)
-// Read(fd, frame)
-//
-// The full SocketCAN documentation can be found in the linux kernel
-// archives at: https://www.kernel.org/doc/Documentation/networking/can.txt
-type SockaddrCAN struct {
- Ifindex int
- RxID uint32
- TxID uint32
- raw RawSockaddrCAN
-}
-
-func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Ifindex < 0 || sa.Ifindex > 0x7fffffff {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_CAN
- sa.raw.Ifindex = int32(sa.Ifindex)
- rx := (*[4]byte)(unsafe.Pointer(&sa.RxID))
- for i := 0; i < 4; i++ {
- sa.raw.Addr[i] = rx[i]
- }
- tx := (*[4]byte)(unsafe.Pointer(&sa.TxID))
- for i := 0; i < 4; i++ {
- sa.raw.Addr[i+4] = tx[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
-}
-
-// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.
-// SockaddrALG enables userspace access to the Linux kernel's cryptography
-// subsystem. The Type and Name fields specify which type of hash or cipher
-// should be used with a given socket.
-//
-// To create a file descriptor that provides access to a hash or cipher, both
-// Bind and Accept must be used. Once the setup process is complete, input
-// data can be written to the socket, processed by the kernel, and then read
-// back as hash output or ciphertext.
-//
-// Here is an example of using an AF_ALG socket with SHA1 hashing.
-// The initial socket setup process is as follows:
-//
-// // Open a socket to perform SHA1 hashing.
-// fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)
-// addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"}
-// unix.Bind(fd, addr)
-// // Note: unix.Accept does not work at this time; must invoke accept()
-// // manually using unix.Syscall.
-// hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)
-//
-// Once a file descriptor has been returned from Accept, it may be used to
-// perform SHA1 hashing. The descriptor is not safe for concurrent use, but
-// may be re-used repeatedly with subsequent Write and Read operations.
-//
-// When hashing a small byte slice or string, a single Write and Read may
-// be used:
-//
-// // Assume hashfd is already configured using the setup process.
-// hash := os.NewFile(hashfd, "sha1")
-// // Hash an input string and read the results. Each Write discards
-// // previous hash state. Read always reads the current state.
-// b := make([]byte, 20)
-// for i := 0; i < 2; i++ {
-// io.WriteString(hash, "Hello, world.")
-// hash.Read(b)
-// fmt.Println(hex.EncodeToString(b))
-// }
-// // Output:
-// // 2ae01472317d1935a84797ec1983ae243fc6aa28
-// // 2ae01472317d1935a84797ec1983ae243fc6aa28
-//
-// For hashing larger byte slices, or byte streams such as those read from
-// a file or socket, use Sendto with MSG_MORE to instruct the kernel to update
-// the hash digest instead of creating a new one for a given chunk and finalizing it.
-//
-// // Assume hashfd and addr are already configured using the setup process.
-// hash := os.NewFile(hashfd, "sha1")
-// // Hash the contents of a file.
-// f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz")
-// b := make([]byte, 4096)
-// for {
-// n, err := f.Read(b)
-// if err == io.EOF {
-// break
-// }
-// unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)
-// }
-// hash.Read(b)
-// fmt.Println(hex.EncodeToString(b))
-// // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5
-//
-// For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html.
-type SockaddrALG struct {
- Type string
- Name string
- Feature uint32
- Mask uint32
- raw RawSockaddrALG
-}
-
-func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {
- // Leave room for NUL byte terminator.
- if len(sa.Type) > 13 {
- return nil, 0, EINVAL
- }
- if len(sa.Name) > 63 {
- return nil, 0, EINVAL
- }
-
- sa.raw.Family = AF_ALG
- sa.raw.Feat = sa.Feature
- sa.raw.Mask = sa.Mask
-
- typ, err := ByteSliceFromString(sa.Type)
- if err != nil {
- return nil, 0, err
- }
- name, err := ByteSliceFromString(sa.Name)
- if err != nil {
- return nil, 0, err
- }
-
- copy(sa.raw.Type[:], typ)
- copy(sa.raw.Name[:], name)
-
- return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil
-}
-
-// SockaddrVM implements the Sockaddr interface for AF_VSOCK type sockets.
-// SockaddrVM provides access to Linux VM sockets: a mechanism that enables
-// bidirectional communication between a hypervisor and its guest virtual
-// machines.
-type SockaddrVM struct {
- // CID and Port specify a context ID and port address for a VM socket.
- // Guests have a unique CID, and hosts may have a well-known CID of:
- // - VMADDR_CID_HYPERVISOR: refers to the hypervisor process.
- // - VMADDR_CID_HOST: refers to other processes on the host.
- CID uint32
- Port uint32
- raw RawSockaddrVM
-}
-
-func (sa *SockaddrVM) sockaddr() (unsafe.Pointer, _Socklen, error) {
- sa.raw.Family = AF_VSOCK
- sa.raw.Port = sa.Port
- sa.raw.Cid = sa.CID
-
- return unsafe.Pointer(&sa.raw), SizeofSockaddrVM, nil
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_NETLINK:
- pp := (*RawSockaddrNetlink)(unsafe.Pointer(rsa))
- sa := new(SockaddrNetlink)
- sa.Family = pp.Family
- sa.Pad = pp.Pad
- sa.Pid = pp.Pid
- sa.Groups = pp.Groups
- return sa, nil
-
- case AF_PACKET:
- pp := (*RawSockaddrLinklayer)(unsafe.Pointer(rsa))
- sa := new(SockaddrLinklayer)
- sa.Protocol = pp.Protocol
- sa.Ifindex = int(pp.Ifindex)
- sa.Hatype = pp.Hatype
- sa.Pkttype = pp.Pkttype
- sa.Halen = pp.Halen
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- if pp.Path[0] == 0 {
- // "Abstract" Unix domain socket.
- // Rewrite leading NUL as @ for textual display.
- // (This is the standard convention.)
- // Not friendly to overwrite in place,
- // but the callers below don't care.
- pp.Path[0] = '@'
- }
-
- // Assume path ends at NUL.
- // This is not technically the Linux semantics for
- // abstract Unix domain sockets--they are supposed
- // to be uninterpreted fixed-size binary blobs--but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_VSOCK:
- pp := (*RawSockaddrVM)(unsafe.Pointer(rsa))
- sa := &SockaddrVM{
- CID: pp.Cid,
- Port: pp.Port,
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if err != nil {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept4(fd, &rsa, &len, flags)
- if err != nil {
- return
- }
- if len > SizeofSockaddrAny {
- panic("RawSockaddrAny too small")
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInet4Addr(fd, level, opt int) (value [4]byte, err error) {
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&value[0]), &vallen)
- return value, err
-}
-
-func GetsockoptIPMreq(fd, level, opt int) (*IPMreq, error) {
- var value IPMreq
- vallen := _Socklen(SizeofIPMreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPMreqn(fd, level, opt int) (*IPMreqn, error) {
- var value IPMreqn
- vallen := _Socklen(SizeofIPMreqn)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6Mreq(fd, level, opt int) (*IPv6Mreq, error) {
- var value IPv6Mreq
- vallen := _Socklen(SizeofIPv6Mreq)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptIPv6MTUInfo(fd, level, opt int) (*IPv6MTUInfo, error) {
- var value IPv6MTUInfo
- vallen := _Socklen(SizeofIPv6MTUInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptICMPv6Filter(fd, level, opt int) (*ICMPv6Filter, error) {
- var value ICMPv6Filter
- vallen := _Socklen(SizeofICMPv6Filter)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptUcred(fd, level, opt int) (*Ucred, error) {
- var value Ucred
- vallen := _Socklen(SizeofUcred)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func GetsockoptTCPInfo(fd, level, opt int) (*TCPInfo, error) {
- var value TCPInfo
- vallen := _Socklen(SizeofTCPInfo)
- err := getsockopt(fd, level, opt, unsafe.Pointer(&value), &vallen)
- return &value, err
-}
-
-func SetsockoptIPMreqn(fd, level, opt int, mreq *IPMreqn) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), unsafe.Sizeof(*mreq))
-}
-
-// Keyctl Commands (http://man7.org/linux/man-pages/man2/keyctl.2.html)
-
-// KeyctlInt calls keyctl commands in which each argument is an int.
-// These commands are KEYCTL_REVOKE, KEYCTL_CHOWN, KEYCTL_CLEAR, KEYCTL_LINK,
-// KEYCTL_UNLINK, KEYCTL_NEGATE, KEYCTL_SET_REQKEY_KEYRING, KEYCTL_SET_TIMEOUT,
-// KEYCTL_ASSUME_AUTHORITY, KEYCTL_SESSION_TO_PARENT, KEYCTL_REJECT,
-// KEYCTL_INVALIDATE, and KEYCTL_GET_PERSISTENT.
-//sys KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) = SYS_KEYCTL
-
-// KeyctlBuffer calls keyctl commands in which the third and fourth
-// arguments are a buffer and its length, respectively.
-// These commands are KEYCTL_UPDATE, KEYCTL_READ, and KEYCTL_INSTANTIATE.
-//sys KeyctlBuffer(cmd int, arg2 int, buf []byte, arg5 int) (ret int, err error) = SYS_KEYCTL
-
-// KeyctlString calls keyctl commands which return a string.
-// These commands are KEYCTL_DESCRIBE and KEYCTL_GET_SECURITY.
-func KeyctlString(cmd int, id int) (string, error) {
- // We must loop as the string data may change in between the syscalls.
- // We could allocate a large buffer here to reduce the chance that the
- // syscall needs to be called twice; however, this is unnecessary as
- // the performance loss is negligible.
- var buffer []byte
- for {
- // Try to fill the buffer with data
- length, err := KeyctlBuffer(cmd, id, buffer, 0)
- if err != nil {
- return "", err
- }
-
- // Check if the data was written
- if length <= len(buffer) {
- // Exclude the null terminator
- return string(buffer[:length-1]), nil
- }
-
- // Make a bigger buffer if needed
- buffer = make([]byte, length)
- }
-}
-
-// Keyctl commands with special signatures.
-
-// KeyctlGetKeyringID implements the KEYCTL_GET_KEYRING_ID command.
-// See the full documentation at:
-// http://man7.org/linux/man-pages/man3/keyctl_get_keyring_ID.3.html
-func KeyctlGetKeyringID(id int, create bool) (ringid int, err error) {
- createInt := 0
- if create {
- createInt = 1
- }
- return KeyctlInt(KEYCTL_GET_KEYRING_ID, id, createInt, 0, 0)
-}
-
-// KeyctlSetperm implements the KEYCTL_SETPERM command. The perm value is the
-// key handle permission mask as described in the "keyctl setperm" section of
-// http://man7.org/linux/man-pages/man1/keyctl.1.html.
-// See the full documentation at:
-// http://man7.org/linux/man-pages/man3/keyctl_setperm.3.html
-func KeyctlSetperm(id int, perm uint32) error {
- _, err := KeyctlInt(KEYCTL_SETPERM, id, int(perm), 0, 0)
- return err
-}
-
-//sys keyctlJoin(cmd int, arg2 string) (ret int, err error) = SYS_KEYCTL
-
-// KeyctlJoinSessionKeyring implements the KEYCTL_JOIN_SESSION_KEYRING command.
-// See the full documentation at:
-// http://man7.org/linux/man-pages/man3/keyctl_join_session_keyring.3.html
-func KeyctlJoinSessionKeyring(name string) (ringid int, err error) {
- return keyctlJoin(KEYCTL_JOIN_SESSION_KEYRING, name)
-}
-
-//sys keyctlSearch(cmd int, arg2 int, arg3 string, arg4 string, arg5 int) (ret int, err error) = SYS_KEYCTL
-
-// KeyctlSearch implements the KEYCTL_SEARCH command.
-// See the full documentation at:
-// http://man7.org/linux/man-pages/man3/keyctl_search.3.html
-func KeyctlSearch(ringid int, keyType, description string, destRingid int) (id int, err error) {
- return keyctlSearch(KEYCTL_SEARCH, ringid, keyType, description, destRingid)
-}
-
-//sys keyctlIOV(cmd int, arg2 int, payload []Iovec, arg5 int) (err error) = SYS_KEYCTL
-
-// KeyctlInstantiateIOV implements the KEYCTL_INSTANTIATE_IOV command. This
-// command is similar to KEYCTL_INSTANTIATE, except that the payload is a slice
-// of Iovec (each of which represents a buffer) instead of a single buffer.
-// See the full documentation at:
-// http://man7.org/linux/man-pages/man3/keyctl_instantiate_iov.3.html
-func KeyctlInstantiateIOV(id int, payload []Iovec, ringid int) error {
- return keyctlIOV(KEYCTL_INSTANTIATE_IOV, id, payload, ringid)
-}
-
-//sys keyctlDH(cmd int, arg2 *KeyctlDHParams, buf []byte) (ret int, err error) = SYS_KEYCTL
-
-// KeyctlDHCompute implements the KEYCTL_DH_COMPUTE command. This command
-// computes a Diffie-Hellman shared secret based on the provide params. The
-// secret is written to the provided buffer and the returned size is the number
-// of bytes written (returning an error if there is insufficient space in the
-// buffer). If a nil buffer is passed in, this function returns the minimum
-// buffer length needed to store the appropriate data. Note that this differs
-// from KEYCTL_READ's behavior which always returns the requested payload size.
-// See the full documentation at:
-// http://man7.org/linux/man-pages/man3/keyctl_dh_compute.3.html
-func KeyctlDHCompute(params *KeyctlDHParams, buffer []byte) (size int, err error) {
- return keyctlDH(KEYCTL_DH_COMPUTE, params, buffer)
-}
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); err != nil {
- return
- }
- oobn = int(msg.Controllen)
- recvflags = int(msg.Flags)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- var err error
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*byte)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy byte
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Control = (*byte)(unsafe.Pointer(&oob[0]))
- msg.SetControllen(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-// BindToDevice binds the socket associated with fd to device.
-func BindToDevice(fd int, device string) (err error) {
- return SetsockoptString(fd, SOL_SOCKET, SO_BINDTODEVICE, device)
-}
-
-//sys ptrace(request int, pid int, addr uintptr, data uintptr) (err error)
-
-func ptracePeek(req int, pid int, addr uintptr, out []byte) (count int, err error) {
- // The peek requests are machine-size oriented, so we wrap it
- // to retrieve arbitrary-length data.
-
- // The ptrace syscall differs from glibc's ptrace.
- // Peeks returns the word in *data, not as the return value.
-
- var buf [sizeofPtr]byte
-
- // Leading edge. PEEKTEXT/PEEKDATA don't require aligned
- // access (PEEKUSER warns that it might), but if we don't
- // align our reads, we might straddle an unmapped page
- // boundary and not get the bytes leading up to the page
- // boundary.
- n := 0
- if addr%sizeofPtr != 0 {
- err = ptrace(req, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(out, buf[addr%sizeofPtr:])
- out = out[n:]
- }
-
- // Remainder.
- for len(out) > 0 {
- // We use an internal buffer to guarantee alignment.
- // It's not documented if this is necessary, but we're paranoid.
- err = ptrace(req, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copied := copy(out, buf[0:])
- n += copied
- out = out[copied:]
- }
-
- return n, nil
-}
-
-func PtracePeekText(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKTEXT, pid, addr, out)
-}
-
-func PtracePeekData(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKDATA, pid, addr, out)
-}
-
-func PtracePeekUser(pid int, addr uintptr, out []byte) (count int, err error) {
- return ptracePeek(PTRACE_PEEKUSR, pid, addr, out)
-}
-
-func ptracePoke(pokeReq int, peekReq int, pid int, addr uintptr, data []byte) (count int, err error) {
- // As for ptracePeek, we need to align our accesses to deal
- // with the possibility of straddling an invalid page.
-
- // Leading edge.
- n := 0
- if addr%sizeofPtr != 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr-addr%sizeofPtr, uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return 0, err
- }
- n += copy(buf[addr%sizeofPtr:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr-addr%sizeofPtr, word)
- if err != nil {
- return 0, err
- }
- data = data[n:]
- }
-
- // Interior.
- for len(data) > sizeofPtr {
- word := *((*uintptr)(unsafe.Pointer(&data[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += sizeofPtr
- data = data[sizeofPtr:]
- }
-
- // Trailing edge.
- if len(data) > 0 {
- var buf [sizeofPtr]byte
- err = ptrace(peekReq, pid, addr+uintptr(n), uintptr(unsafe.Pointer(&buf[0])))
- if err != nil {
- return n, err
- }
- copy(buf[0:], data)
- word := *((*uintptr)(unsafe.Pointer(&buf[0])))
- err = ptrace(pokeReq, pid, addr+uintptr(n), word)
- if err != nil {
- return n, err
- }
- n += len(data)
- }
-
- return n, nil
-}
-
-func PtracePokeText(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKETEXT, PTRACE_PEEKTEXT, pid, addr, data)
-}
-
-func PtracePokeData(pid int, addr uintptr, data []byte) (count int, err error) {
- return ptracePoke(PTRACE_POKEDATA, PTRACE_PEEKDATA, pid, addr, data)
-}
-
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
-}
-
-func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
-}
-
-func PtraceSetOptions(pid int, options int) (err error) {
- return ptrace(PTRACE_SETOPTIONS, pid, 0, uintptr(options))
-}
-
-func PtraceGetEventMsg(pid int) (msg uint, err error) {
- var data _C_long
- err = ptrace(PTRACE_GETEVENTMSG, pid, 0, uintptr(unsafe.Pointer(&data)))
- msg = uint(data)
- return
-}
-
-func PtraceCont(pid int, signal int) (err error) {
- return ptrace(PTRACE_CONT, pid, 0, uintptr(signal))
-}
-
-func PtraceSyscall(pid int, signal int) (err error) {
- return ptrace(PTRACE_SYSCALL, pid, 0, uintptr(signal))
-}
-
-func PtraceSingleStep(pid int) (err error) { return ptrace(PTRACE_SINGLESTEP, pid, 0, 0) }
-
-func PtraceAttach(pid int) (err error) { return ptrace(PTRACE_ATTACH, pid, 0, 0) }
-
-func PtraceDetach(pid int) (err error) { return ptrace(PTRACE_DETACH, pid, 0, 0) }
-
-//sys reboot(magic1 uint, magic2 uint, cmd int, arg string) (err error)
-
-func Reboot(cmd int) (err error) {
- return reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, cmd, "")
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- return Getdents(fd, buf)
-}
-
-func direntIno(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
- reclen, ok := direntReclen(buf)
- if !ok {
- return 0, false
- }
- return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
-}
-
-//sys mount(source string, target string, fstype string, flags uintptr, data *byte) (err error)
-
-func Mount(source string, target string, fstype string, flags uintptr, data string) (err error) {
- // Certain file systems get rather angry and EINVAL if you give
- // them an empty string of data, rather than NULL.
- if data == "" {
- return mount(source, target, fstype, flags, nil)
- }
- datap, err := BytePtrFromString(data)
- if err != nil {
- return err
- }
- return mount(source, target, fstype, flags, datap)
-}
-
-// Sendto
-// Recvfrom
-// Socketpair
-
-/*
- * Direct access
- */
-//sys Acct(path string) (err error)
-//sys AddKey(keyType string, description string, payload []byte, ringid int) (id int, err error)
-//sys Adjtimex(buf *Timex) (state int, err error)
-//sys Chdir(path string) (err error)
-//sys Chroot(path string) (err error)
-//sys ClockGettime(clockid int32, time *Timespec) (err error)
-//sys Close(fd int) (err error)
-//sys CopyFileRange(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Dup(oldfd int) (fd int, err error)
-//sys Dup3(oldfd int, newfd int, flags int) (err error)
-//sysnb EpollCreate(size int) (fd int, err error)
-//sysnb EpollCreate1(flag int) (fd int, err error)
-//sysnb EpollCtl(epfd int, op int, fd int, event *EpollEvent) (err error)
-//sys Eventfd(initval uint, flags int) (fd int, err error) = SYS_EVENTFD2
-//sys Exit(code int) = SYS_EXIT_GROUP
-//sys Faccessat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fallocate(fd int, mode uint32, off int64, len int64) (err error)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-//sys Fdatasync(fd int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fsync(fd int) (err error)
-//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
-//sysnb Getpgid(pid int) (pgid int, err error)
-
-func Getpgrp() (pid int) {
- pid, _ = Getpgid(0)
- return
-}
-
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sys Getrandom(buf []byte, flags int) (n int, err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettid() (tid int)
-//sys Getxattr(path string, attr string, dest []byte) (sz int, err error)
-//sys InotifyAddWatch(fd int, pathname string, mask uint32) (watchdesc int, err error)
-//sysnb InotifyInit1(flags int) (fd int, err error)
-//sysnb InotifyRmWatch(fd int, watchdesc uint32) (success int, err error)
-//sysnb Kill(pid int, sig syscall.Signal) (err error)
-//sys Klogctl(typ int, buf []byte) (n int, err error) = SYS_SYSLOG
-//sys Lgetxattr(path string, attr string, dest []byte) (sz int, err error)
-//sys Listxattr(path string, dest []byte) (sz int, err error)
-//sys Llistxattr(path string, dest []byte) (sz int, err error)
-//sys Lremovexattr(path string, attr string) (err error)
-//sys Lsetxattr(path string, attr string, data []byte, flags int) (err error)
-//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys PivotRoot(newroot string, putold string) (err error) = SYS_PIVOT_ROOT
-//sysnb prlimit(pid int, resource int, newlimit *Rlimit, old *Rlimit) (err error) = SYS_PRLIMIT64
-//sys Prctl(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uintptr) (err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Removexattr(path string, attr string) (err error)
-//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys RequestKey(keyType string, description string, callback string, destRingid int) (id int, err error)
-//sys Setdomainname(p []byte) (err error)
-//sys Sethostname(p []byte) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tv *Timeval) (err error)
-//sys Setns(fd int, nstype int) (err error)
-
-// issue 1435.
-// On linux Setuid and Setgid only affects the current thread, not the process.
-// This does not match what most callers expect so we must return an error
-// here rather than letting the caller think that the call succeeded.
-
-func Setuid(uid int) (err error) {
- return EOPNOTSUPP
-}
-
-func Setgid(uid int) (err error) {
- return EOPNOTSUPP
-}
-
-//sys Setpriority(which int, who int, prio int) (err error)
-//sys Setxattr(path string, attr string, data []byte, flags int) (err error)
-//sys Sync()
-//sysnb Sysinfo(info *Sysinfo_t) (err error)
-//sys Tee(rfd int, wfd int, len int, flags int) (n int64, err error)
-//sysnb Tgkill(tgid int, tid int, sig syscall.Signal) (err error)
-//sysnb Times(tms *Tms) (ticks uintptr, err error)
-//sysnb Umask(mask int) (oldmask int)
-//sysnb Uname(buf *Utsname) (err error)
-//sys Unmount(target string, flags int) (err error) = SYS_UMOUNT2
-//sys Unshare(flags int) (err error)
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys exitThread(code int) (err error) = SYS_EXIT
-//sys readlen(fd int, p *byte, np int) (n int, err error) = SYS_READ
-//sys writelen(fd int, p *byte, np int) (n int, err error) = SYS_WRITE
-
-// mmap varies by architecture; see syscall_linux_*.go.
-//sys munmap(addr uintptr, length uintptr) (err error)
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
-//sys Madvise(b []byte, advice int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Munlockall() (err error)
-
-// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
-// using the specified flags.
-func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
- n, _, errno := Syscall6(
- SYS_VMSPLICE,
- uintptr(fd),
- uintptr(unsafe.Pointer(&iovs[0])),
- uintptr(len(iovs)),
- uintptr(flags),
- 0,
- 0,
- )
- if errno != 0 {
- return 0, syscall.Errno(errno)
- }
-
- return int(n), nil
-}
-
-/*
- * Unimplemented
- */
-// AfsSyscall
-// Alarm
-// ArchPrctl
-// Brk
-// Capget
-// Capset
-// ClockGetres
-// ClockNanosleep
-// ClockSettime
-// Clone
-// CreateModule
-// DeleteModule
-// EpollCtlOld
-// EpollPwait
-// EpollWaitOld
-// Execve
-// Fgetxattr
-// Flistxattr
-// Fork
-// Fremovexattr
-// Fsetxattr
-// Futex
-// GetKernelSyms
-// GetMempolicy
-// GetRobustList
-// GetThreadArea
-// Getitimer
-// Getpmsg
-// IoCancel
-// IoDestroy
-// IoGetevents
-// IoSetup
-// IoSubmit
-// IoprioGet
-// IoprioSet
-// KexecLoad
-// LookupDcookie
-// Mbind
-// MigratePages
-// Mincore
-// ModifyLdt
-// Mount
-// MovePages
-// Mprotect
-// MqGetsetattr
-// MqNotify
-// MqOpen
-// MqTimedreceive
-// MqTimedsend
-// MqUnlink
-// Mremap
-// Msgctl
-// Msgget
-// Msgrcv
-// Msgsnd
-// Msync
-// Newfstatat
-// Nfsservctl
-// Personality
-// Pselect6
-// Ptrace
-// Putpmsg
-// QueryModule
-// Quotactl
-// Readahead
-// Readv
-// RemapFilePages
-// RestartSyscall
-// RtSigaction
-// RtSigpending
-// RtSigprocmask
-// RtSigqueueinfo
-// RtSigreturn
-// RtSigsuspend
-// RtSigtimedwait
-// SchedGetPriorityMax
-// SchedGetPriorityMin
-// SchedGetaffinity
-// SchedGetparam
-// SchedGetscheduler
-// SchedRrGetInterval
-// SchedSetaffinity
-// SchedSetparam
-// SchedYield
-// Security
-// Semctl
-// Semget
-// Semop
-// Semtimedop
-// SetMempolicy
-// SetRobustList
-// SetThreadArea
-// SetTidAddress
-// Shmat
-// Shmctl
-// Shmdt
-// Shmget
-// Sigaltstack
-// Signalfd
-// Swapoff
-// Swapon
-// Sysfs
-// TimerCreate
-// TimerDelete
-// TimerGetoverrun
-// TimerGettime
-// TimerSettime
-// Timerfd
-// Tkill (obsolete)
-// Tuxcall
-// Umount2
-// Uselib
-// Utimensat
-// Vfork
-// Vhangup
-// Vserver
-// Waitid
-// _Sysctl
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
deleted file mode 100644
index 2b881b9..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ /dev/null
@@ -1,399 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// TODO(rsc): Rewrite all nn(SP) references into name+(nn-8)(FP)
-// so that go vet can check that they are correct.
-
-// +build 386,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-// 64-bit file system and 32-bit uid calls
-// (386 default is 32-bit file system and 16-bit uid).
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64_64
-//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-//sysnb Getegid() (egid int) = SYS_GETEGID32
-//sysnb Geteuid() (euid int) = SYS_GETEUID32
-//sysnb Getgid() (gid int) = SYS_GETGID32
-//sysnb Getuid() (uid int) = SYS_GETUID32
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Pause() (err error)
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
- if errno != 0 {
- return 0, errno
- }
- return newoffset, nil
-}
-
-// Vsyscalls on amd64.
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-// On x86 Linux, all the socket calls go through an extra indirection,
-// I think because the 5-register system call interface can't handle
-// the 6-argument calls like sendto and recvfrom. Instead the
-// arguments to the underlying system call are the number below
-// and a pointer to an array of uintptr. We hide the pointer in the
-// socketcall assembly to avoid allocation on every system call.
-
-const (
- // see linux/net.h
- _SOCKET = 1
- _BIND = 2
- _CONNECT = 3
- _LISTEN = 4
- _ACCEPT = 5
- _GETSOCKNAME = 6
- _GETPEERNAME = 7
- _SOCKETPAIR = 8
- _SEND = 9
- _RECV = 10
- _SENDTO = 11
- _RECVFROM = 12
- _SHUTDOWN = 13
- _SETSOCKOPT = 14
- _GETSOCKOPT = 15
- _SENDMSG = 16
- _RECVMSG = 17
- _ACCEPT4 = 18
- _RECVMMSG = 19
- _SENDMMSG = 20
-)
-
-func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- fd, e := socketcall(_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
- fd, e := socketcall(_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETSOCKNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, e := rawsocketcall(_GETPEERNAME, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) (err error) {
- _, e := rawsocketcall(_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd)), 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_BIND, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, e := socketcall(_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func socket(domain int, typ int, proto int) (fd int, err error) {
- fd, e := rawsocketcall(_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, e := socketcall(_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, e := socketcall(_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), vallen, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- n, e := socketcall(_RECVFROM, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- _, e := socketcall(_SENDTO, uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen))
- if e != 0 {
- err = e
- }
- return
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- n, e := socketcall(_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags), 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Listen(s int, n int) (err error) {
- _, e := socketcall(_LISTEN, uintptr(s), uintptr(n), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Shutdown(s, how int) (err error) {
- _, e := socketcall(_SHUTDOWN, uintptr(s), uintptr(how), 0, 0, 0, 0)
- if e != 0 {
- err = e
- }
- return
-}
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(uint32(r.Eip)) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Eip = int32(pc) }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
deleted file mode 100644
index 9516a3f..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,linux
-
-package unix
-
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Gettimeofday(tv *Timeval) (err error) {
- errno := gettimeofday(tv)
- if errno != 0 {
- return errno
- }
- return nil
-}
-
-func Getpagesize() int { return 4096 }
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- errno := gettimeofday(&tv)
- if errno != 0 {
- return 0, errno
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Rip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Rip = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
deleted file mode 100644
index 21a4946..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,linux
-// +build !gccgo
-
-package unix
-
-import "syscall"
-
-//go:noescape
-func gettimeofday(tv *Timeval) (err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
deleted file mode 100644
index 71d8702..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ /dev/null
@@ -1,263 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,linux
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-// Underlying system call writes to newoffset via pointer.
-// Implemented in assembly to avoid allocation.
-func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno)
-
-func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- newoffset, errno := seek(fd, offset, whence)
- if errno != 0 {
- return 0, errno
- }
- return newoffset, nil
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error) = SYS_GETGROUPS32
-//sysnb setgroups(n int, list *_Gid_t) (err error) = SYS_SETGROUPS32
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb socketpair(domain int, typ int, flags int, fd *[2]int32) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-// 64-bit file system and 32-bit uid calls
-// (16-bit uid calls are not always supported in newer kernels)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error) = SYS_FCHOWN32
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sysnb Getegid() (egid int) = SYS_GETEGID32
-//sysnb Geteuid() (euid int) = SYS_GETEUID32
-//sysnb Getgid() (gid int) = SYS_GETGID32
-//sysnb Getuid() (uid int) = SYS_GETUID32
-//sysnb InotifyInit() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error) = SYS_LCHOWN32
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-//sys Setfsgid(gid int) (err error) = SYS_SETFSGID32
-//sys Setfsuid(uid int) (err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-
-// Vsyscalls on amd64.
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Pause() (err error)
-
-func Time(t *Time_t) (Time_t, error) {
- var tv Timeval
- err := Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-func Utime(path string, buf *Utimbuf) error {
- tv := []Timeval{
- {Sec: buf.Actime},
- {Sec: buf.Modtime},
- }
- return Utimes(path, tv)
-}
-
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-
-func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
- _, _, e1 := Syscall6(SYS_ARM_FADVISE64_64, uintptr(fd), uintptr(advice), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(pathp)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = e
- }
- return
-}
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_UGETRLIMIT
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-func (r *PtraceRegs) PC() uint64 { return uint64(r.Uregs[15]) }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Uregs[15] = uint32(pc) }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
deleted file mode 100644
index 4a13639..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm64,linux
-
-package unix
-
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatat(fd int, path string, stat *Stat_t, flags int) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sys Listen(s int, n int) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-
-func Stat(path string, stat *Stat_t) (err error) {
- return Fstatat(AT_FDCWD, path, stat, 0)
-}
-
-func Lchown(path string, uid int, gid int) (err error) {
- return Fchownat(AT_FDCWD, path, uid, gid, AT_SYMLINK_NOFOLLOW)
-}
-
-func Lstat(path string, stat *Stat_t) (err error) {
- return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
-}
-
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func Time(t *Time_t) (Time_t, error) {
- var tv Timeval
- err := Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-func Utime(path string, buf *Utimbuf) error {
- tv := []Timeval{
- {Sec: buf.Actime},
- {Sec: buf.Modtime},
- }
- return Utimes(path, tv)
-}
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Pc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Pc = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-func InotifyInit() (fd int, err error) {
- return InotifyInit1(0)
-}
-
-func Dup2(oldfd int, newfd int) (err error) {
- return Dup3(oldfd, newfd, 0)
-}
-
-func Pause() (err error) {
- _, _, e1 := Syscall6(SYS_PPOLL, 0, 0, 0, 0, 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// TODO(dfc): constants that should be in zsysnum_linux_arm64.go, remove
-// these when the deprecated syscalls that the syscall package relies on
-// are removed.
-const (
- SYS_GETPGRP = 1060
- SYS_UTIMES = 1037
- SYS_FUTIMESAT = 1066
- SYS_PAUSE = 1061
- SYS_USTAT = 1070
- SYS_UTIME = 1063
- SYS_LCHOWN = 1032
- SYS_TIME = 1062
- SYS_EPOLL_CREATE = 1042
- SYS_EPOLL_WAIT = 1069
-)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- var ts *Timespec
- if timeout >= 0 {
- ts = new(Timespec)
- *ts = NsecToTimespec(int64(timeout) * 1e6)
- }
- if len(fds) == 0 {
- return ppoll(nil, 0, ts, nil)
- }
- return ppoll(&fds[0], len(fds), ts, nil)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
deleted file mode 100644
index 73318e5..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ /dev/null
@@ -1,209 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips64 mips64le
-
-package unix
-
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS_PSELECT6
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- err = Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Ioperm(from int, num int, on int) (err error) {
- return ENOSYS
-}
-
-func Iopl(level int) (err error) {
- return ENOSYS
-}
-
-type stat_t struct {
- Dev uint32
- Pad0 [3]int32
- Ino uint64
- Mode uint32
- Nlink uint32
- Uid uint32
- Gid uint32
- Rdev uint32
- Pad1 [3]uint32
- Size int64
- Atime uint32
- Atime_nsec uint32
- Mtime uint32
- Mtime_nsec uint32
- Ctime uint32
- Ctime_nsec uint32
- Blksize uint32
- Pad2 uint32
- Blocks int64
-}
-
-//sys fstat(fd int, st *stat_t) (err error)
-//sys lstat(path string, st *stat_t) (err error)
-//sys stat(path string, st *stat_t) (err error)
-
-func Fstat(fd int, s *Stat_t) (err error) {
- st := &stat_t{}
- err = fstat(fd, st)
- fillStat_t(s, st)
- return
-}
-
-func Lstat(path string, s *Stat_t) (err error) {
- st := &stat_t{}
- err = lstat(path, st)
- fillStat_t(s, st)
- return
-}
-
-func Stat(path string, s *Stat_t) (err error) {
- st := &stat_t{}
- err = stat(path, st)
- fillStat_t(s, st)
- return
-}
-
-func fillStat_t(s *Stat_t, st *stat_t) {
- s.Dev = st.Dev
- s.Ino = st.Ino
- s.Mode = st.Mode
- s.Nlink = st.Nlink
- s.Uid = st.Uid
- s.Gid = st.Gid
- s.Rdev = st.Rdev
- s.Size = st.Size
- s.Atim = Timespec{int64(st.Atime), int64(st.Atime_nsec)}
- s.Mtim = Timespec{int64(st.Mtime), int64(st.Mtime_nsec)}
- s.Ctim = Timespec{int64(st.Ctime), int64(st.Ctime_nsec)}
- s.Blksize = st.Blksize
- s.Blocks = st.Blocks
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Epc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
deleted file mode 100644
index b83d93f..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ /dev/null
@@ -1,239 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build mips mipsle
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Ftruncate(fd int, length int64) (err error) = SYS_FTRUNCATE64
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getuid() (uid int)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error) = SYS_TRUNCATE64
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
-//sys Fstat(fd int, stat *Stat_t) (err error) = SYS_FSTAT64
-//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Pause() (err error)
-
-func Fstatfs(fd int, buf *Statfs_t) (err error) {
- _, _, e := Syscall(SYS_FSTATFS64, uintptr(fd), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = errnoErr(e)
- }
- return
-}
-
-func Statfs(path string, buf *Statfs_t) (err error) {
- p, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- _, _, e := Syscall(SYS_STATFS64, uintptr(unsafe.Pointer(p)), unsafe.Sizeof(*buf), uintptr(unsafe.Pointer(buf)))
- if e != 0 {
- err = errnoErr(e)
- }
- return
-}
-
-func Seek(fd int, offset int64, whence int) (off int64, err error) {
- _, _, e := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offset>>32), uintptr(offset), uintptr(unsafe.Pointer(&off)), uintptr(whence), 0)
- if e != 0 {
- err = errnoErr(e)
- }
- return
-}
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int32(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = int32(nsec / 1e9)
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error)
-
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- page := uintptr(offset / 4096)
- if offset != int64(page)*4096 {
- return 0, EINVAL
- }
- return mmap2(addr, length, prot, flags, fd, page)
-}
-
-const rlimInf32 = ^uint32(0)
-const rlimInf64 = ^uint64(0)
-
-type rlimit32 struct {
- Cur uint32
- Max uint32
-}
-
-//sysnb getrlimit(resource int, rlim *rlimit32) (err error) = SYS_GETRLIMIT
-
-func Getrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, nil, rlim)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- err = getrlimit(resource, &rl)
- if err != nil {
- return
- }
-
- if rl.Cur == rlimInf32 {
- rlim.Cur = rlimInf64
- } else {
- rlim.Cur = uint64(rl.Cur)
- }
-
- if rl.Max == rlimInf32 {
- rlim.Max = rlimInf64
- } else {
- rlim.Max = uint64(rl.Max)
- }
- return
-}
-
-//sysnb setrlimit(resource int, rlim *rlimit32) (err error) = SYS_SETRLIMIT
-
-func Setrlimit(resource int, rlim *Rlimit) (err error) {
- err = prlimit(0, resource, rlim, nil)
- if err != ENOSYS {
- return err
- }
-
- rl := rlimit32{}
- if rlim.Cur == rlimInf64 {
- rl.Cur = rlimInf32
- } else if rlim.Cur < uint64(rlimInf32) {
- rl.Cur = uint32(rlim.Cur)
- } else {
- return EINVAL
- }
- if rlim.Max == rlimInf64 {
- rl.Max = rlimInf32
- } else if rlim.Max < uint64(rlimInf32) {
- rl.Max = uint32(rlim.Max)
- } else {
- return EINVAL
- }
-
- return setrlimit(resource, &rl)
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Epc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Epc = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
-
-func Getpagesize() int { return 4096 }
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
deleted file mode 100644
index 60770f6..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build linux
-// +build ppc64 ppc64le
-
-package unix
-
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error) = SYS_UGETRLIMIT
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Ioperm(from int, num int, on int) (err error)
-//sys Iopl(level int) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error) = SYS_SYNC_FILE_RANGE2
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func Getpagesize() int { return 65536 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Time(t *Time_t) (tt Time_t, err error)
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Nip }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Nip = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
deleted file mode 100644
index 1708a4b..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ /dev/null
@@ -1,328 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build s390x,linux
-
-package unix
-
-import (
- "unsafe"
-)
-
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Fadvise(fd int, offset int64, length int64, advice int) (err error) = SYS_FADVISE64
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-
-func Getpagesize() int { return 4096 }
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- err = Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = nsec % 1e9 / 1e3
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, 0) // pipe2 is the same as pipe when flags are set to 0.
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-func Ioperm(from int, num int, on int) (err error) {
- return ENOSYS
-}
-
-func Iopl(level int) (err error) {
- return ENOSYS
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Psw.Addr }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.Addr = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-// Linux on s390x uses the old mmap interface, which requires arguments to be passed in a struct.
-// mmap2 also requires arguments to be passed in a struct; it is currently not exposed in .
-func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
- mmap_args := [6]uintptr{addr, length, uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset)}
- r0, _, e1 := Syscall(SYS_MMAP, uintptr(unsafe.Pointer(&mmap_args[0])), 0, 0)
- xaddr = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// On s390x Linux, all the socket calls go through an extra indirection.
-// The arguments to the underlying system call (SYS_SOCKETCALL) are the
-// number below and a pointer to an array of uintptr.
-const (
- // see linux/net.h
- netSocket = 1
- netBind = 2
- netConnect = 3
- netListen = 4
- netAccept = 5
- netGetSockName = 6
- netGetPeerName = 7
- netSocketPair = 8
- netSend = 9
- netRecv = 10
- netSendTo = 11
- netRecvFrom = 12
- netShutdown = 13
- netSetSockOpt = 14
- netGetSockOpt = 15
- netSendMsg = 16
- netRecvMsg = 17
- netAccept4 = 18
- netRecvMMsg = 19
- netSendMMsg = 20
-)
-
-func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (int, error) {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
- fd, _, err := Syscall(SYS_SOCKETCALL, netAccept, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(fd), nil
-}
-
-func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (int, error) {
- args := [4]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags)}
- fd, _, err := Syscall(SYS_SOCKETCALL, netAccept4, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(fd), nil
-}
-
-func getsockname(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
- _, _, err := RawSyscall(SYS_SOCKETCALL, netGetSockName, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func getpeername(s int, rsa *RawSockaddrAny, addrlen *_Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen))}
- _, _, err := RawSyscall(SYS_SOCKETCALL, netGetPeerName, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func socketpair(domain int, typ int, flags int, fd *[2]int32) error {
- args := [4]uintptr{uintptr(domain), uintptr(typ), uintptr(flags), uintptr(unsafe.Pointer(fd))}
- _, _, err := RawSyscall(SYS_SOCKETCALL, netSocketPair, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func bind(s int, addr unsafe.Pointer, addrlen _Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
- _, _, err := Syscall(SYS_SOCKETCALL, netBind, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func connect(s int, addr unsafe.Pointer, addrlen _Socklen) error {
- args := [3]uintptr{uintptr(s), uintptr(addr), uintptr(addrlen)}
- _, _, err := Syscall(SYS_SOCKETCALL, netConnect, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func socket(domain int, typ int, proto int) (int, error) {
- args := [3]uintptr{uintptr(domain), uintptr(typ), uintptr(proto)}
- fd, _, err := RawSyscall(SYS_SOCKETCALL, netSocket, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(fd), nil
-}
-
-func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) error {
- args := [5]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen))}
- _, _, err := Syscall(SYS_SOCKETCALL, netGetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) error {
- args := [4]uintptr{uintptr(s), uintptr(level), uintptr(name), uintptr(val)}
- _, _, err := Syscall(SYS_SOCKETCALL, netSetSockOpt, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func recvfrom(s int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (int, error) {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen))}
- n, _, err := Syscall(SYS_SOCKETCALL, netRecvFrom, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(n), nil
-}
-
-func sendto(s int, p []byte, flags int, to unsafe.Pointer, addrlen _Socklen) error {
- var base uintptr
- if len(p) > 0 {
- base = uintptr(unsafe.Pointer(&p[0]))
- }
- args := [6]uintptr{uintptr(s), base, uintptr(len(p)), uintptr(flags), uintptr(to), uintptr(addrlen)}
- _, _, err := Syscall(SYS_SOCKETCALL, netSendTo, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func recvmsg(s int, msg *Msghdr, flags int) (int, error) {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
- n, _, err := Syscall(SYS_SOCKETCALL, netRecvMsg, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(n), nil
-}
-
-func sendmsg(s int, msg *Msghdr, flags int) (int, error) {
- args := [3]uintptr{uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags)}
- n, _, err := Syscall(SYS_SOCKETCALL, netSendMsg, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return 0, err
- }
- return int(n), nil
-}
-
-func Listen(s int, n int) error {
- args := [2]uintptr{uintptr(s), uintptr(n)}
- _, _, err := Syscall(SYS_SOCKETCALL, netListen, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-func Shutdown(s, how int) error {
- args := [2]uintptr{uintptr(s), uintptr(how)}
- _, _, err := Syscall(SYS_SOCKETCALL, netShutdown, uintptr(unsafe.Pointer(&args)), 0)
- if err != 0 {
- return err
- }
- return nil
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
deleted file mode 100644
index 20b7454..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build sparc64,linux
-
-package unix
-
-import (
- "sync/atomic"
- "syscall"
-)
-
-//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, buf *Statfs_t) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (euid int)
-//sysnb Getgid() (gid int)
-//sysnb Getrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Getuid() (uid int)
-//sysnb InotifyInit() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Listen(s int, n int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error) = SYS_PREAD64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = SYS_PWRITE64
-//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
-//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
-//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
-//sys Setfsgid(gid int) (err error)
-//sys Setfsuid(uid int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sys Shutdown(fd int, how int) (err error)
-//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, buf *Statfs_t) (err error)
-//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error)
-//sys accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error)
-//sysnb getgroups(n int, list *_Gid_t) (nn int, err error)
-//sysnb setgroups(n int, list *_Gid_t) (err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error)
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error)
-//sysnb socket(domain int, typ int, proto int) (fd int, err error)
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error)
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sysnb getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error)
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error)
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error)
-
-func sysconf(name int) (n int64, err syscall.Errno)
-
-// pageSize caches the value of Getpagesize, since it can't change
-// once the system is booted.
-var pageSize int64 // accessed atomically
-
-func Getpagesize() int {
- n := atomic.LoadInt64(&pageSize)
- if n == 0 {
- n, _ = sysconf(_SC_PAGESIZE)
- atomic.StoreInt64(&pageSize, n)
- }
- return int(n)
-}
-
-func Ioperm(from int, num int, on int) (err error) {
- return ENOSYS
-}
-
-func Iopl(level int) (err error) {
- return ENOSYS
-}
-
-//sysnb Gettimeofday(tv *Timeval) (err error)
-
-func Time(t *Time_t) (tt Time_t, err error) {
- var tv Timeval
- err = Gettimeofday(&tv)
- if err != nil {
- return 0, err
- }
- if t != nil {
- *t = Time_t(tv.Sec)
- }
- return Time_t(tv.Sec), nil
-}
-
-//sys Utime(path string, buf *Utimbuf) (err error)
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Sec = nsec / 1e9
- tv.Usec = int32(nsec % 1e9 / 1e3)
- return
-}
-
-func (r *PtraceRegs) PC() uint64 { return r.Tpc }
-
-func (r *PtraceRegs) SetPC(pc uint64) { r.Tpc = pc }
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint64(length)
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sysnb pipe2(p *[2]_C_int, flags int) (err error)
-
-func Pipe2(p []int, flags int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe2(&pp, flags)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys poll(fds *PollFd, nfds int, timeout int) (n int, err error)
-
-func Poll(fds []PollFd, timeout int) (n int, err error) {
- if len(fds) == 0 {
- return poll(nil, 0, timeout)
- }
- return poll(&fds[0], len(fds), timeout)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
deleted file mode 100644
index 01f6a48..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ /dev/null
@@ -1,476 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// NetBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [12]int8
- raw RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func sysctlNodes(mib []_C_int) (nodes []Sysctlnode, err error) {
- var olen uintptr
-
- // Get a list of all sysctl nodes below the given MIB by performing
- // a sysctl for the given MIB with CTL_QUERY appended.
- mib = append(mib, CTL_QUERY)
- qnode := Sysctlnode{Flags: SYSCTL_VERS_1}
- qp := (*byte)(unsafe.Pointer(&qnode))
- sz := unsafe.Sizeof(qnode)
- if err = sysctl(mib, nil, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- // Now that we know the size, get the actual nodes.
- nodes = make([]Sysctlnode, olen/sz)
- np := (*byte)(unsafe.Pointer(&nodes[0]))
- if err = sysctl(mib, np, &olen, qp, sz); err != nil {
- return nil, err
- }
-
- return nodes, nil
-}
-
-func nametomib(name string) (mib []_C_int, err error) {
-
- // Split name into components.
- var parts []string
- last := 0
- for i := 0; i < len(name); i++ {
- if name[i] == '.' {
- parts = append(parts, name[last:i])
- last = i + 1
- }
- }
- parts = append(parts, name[last:])
-
- // Discover the nodes and construct the MIB OID.
- for partno, part := range parts {
- nodes, err := sysctlNodes(mib)
- if err != nil {
- return nil, err
- }
- for _, node := range nodes {
- n := make([]byte, 0)
- for i := range node.Name {
- if node.Name[i] != 0 {
- n = append(n, byte(node.Name[i]))
- }
- }
- if string(n) == part {
- mib = append(mib, _C_int(node.Num))
- break
- }
- }
- if len(mib) != partno+1 {
- return nil, EINVAL
- }
- }
-
- return mib, nil
-}
-
-func direntIno(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
-}
-
-//sysnb pipe() (fd1 int, fd2 int, err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- p[0], p[1], err = pipe()
- return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return -1, ENOSYS
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// ____semctl13
-// __clone
-// __fhopen40
-// __fhstat40
-// __fhstatvfs140
-// __fstat30
-// __getcwd
-// __getfh30
-// __getlogin
-// __lstat30
-// __mount50
-// __msgctl13
-// __msync13
-// __ntp_gettime30
-// __posix_chown
-// __posix_fadvise50
-// __posix_fchown
-// __posix_lchown
-// __posix_rename
-// __setlogin
-// __shmctl13
-// __sigaction_sigtramp
-// __sigaltstack14
-// __sigpending14
-// __sigprocmask14
-// __sigsuspend14
-// __sigtimedwait
-// __stat30
-// __syscall
-// __vfork14
-// _ksem_close
-// _ksem_destroy
-// _ksem_getvalue
-// _ksem_init
-// _ksem_open
-// _ksem_post
-// _ksem_trywait
-// _ksem_unlink
-// _ksem_wait
-// _lwp_continue
-// _lwp_create
-// _lwp_ctl
-// _lwp_detach
-// _lwp_exit
-// _lwp_getname
-// _lwp_getprivate
-// _lwp_kill
-// _lwp_park
-// _lwp_self
-// _lwp_setname
-// _lwp_setprivate
-// _lwp_suspend
-// _lwp_unpark
-// _lwp_unpark_all
-// _lwp_wait
-// _lwp_wakeup
-// _pset_bind
-// _sched_getaffinity
-// _sched_getparam
-// _sched_setaffinity
-// _sched_setparam
-// acct
-// aio_cancel
-// aio_error
-// aio_fsync
-// aio_read
-// aio_return
-// aio_suspend
-// aio_write
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// compat_09_ogetdomainname
-// compat_09_osetdomainname
-// compat_09_ouname
-// compat_10_omsgsys
-// compat_10_osemsys
-// compat_10_oshmsys
-// compat_12_fstat12
-// compat_12_getdirentries
-// compat_12_lstat12
-// compat_12_msync
-// compat_12_oreboot
-// compat_12_oswapon
-// compat_12_stat12
-// compat_13_sigaction13
-// compat_13_sigaltstack13
-// compat_13_sigpending13
-// compat_13_sigprocmask13
-// compat_13_sigreturn13
-// compat_13_sigsuspend13
-// compat_14___semctl
-// compat_14_msgctl
-// compat_14_shmctl
-// compat_16___sigaction14
-// compat_16___sigreturn14
-// compat_20_fhstatfs
-// compat_20_fstatfs
-// compat_20_getfsstat
-// compat_20_statfs
-// compat_30___fhstat30
-// compat_30___fstat13
-// compat_30___lstat13
-// compat_30___stat13
-// compat_30_fhopen
-// compat_30_fhstat
-// compat_30_fhstatvfs1
-// compat_30_getdents
-// compat_30_getfh
-// compat_30_ntp_gettime
-// compat_30_socket
-// compat_40_mount
-// compat_43_fstat43
-// compat_43_lstat43
-// compat_43_oaccept
-// compat_43_ocreat
-// compat_43_oftruncate
-// compat_43_ogetdirentries
-// compat_43_ogetdtablesize
-// compat_43_ogethostid
-// compat_43_ogethostname
-// compat_43_ogetkerninfo
-// compat_43_ogetpagesize
-// compat_43_ogetpeername
-// compat_43_ogetrlimit
-// compat_43_ogetsockname
-// compat_43_okillpg
-// compat_43_olseek
-// compat_43_ommap
-// compat_43_oquota
-// compat_43_orecv
-// compat_43_orecvfrom
-// compat_43_orecvmsg
-// compat_43_osend
-// compat_43_osendmsg
-// compat_43_osethostid
-// compat_43_osethostname
-// compat_43_osetrlimit
-// compat_43_osigblock
-// compat_43_osigsetmask
-// compat_43_osigstack
-// compat_43_osigvec
-// compat_43_otruncate
-// compat_43_owait
-// compat_43_stat43
-// execve
-// extattr_delete_fd
-// extattr_delete_file
-// extattr_delete_link
-// extattr_get_fd
-// extattr_get_file
-// extattr_get_link
-// extattr_list_fd
-// extattr_list_file
-// extattr_list_link
-// extattr_set_fd
-// extattr_set_file
-// extattr_set_link
-// extattrctl
-// fchroot
-// fdatasync
-// fgetxattr
-// fktrace
-// flistxattr
-// fork
-// fremovexattr
-// fsetxattr
-// fstatvfs1
-// fsync_range
-// getcontext
-// getitimer
-// getvfsstat
-// getxattr
-// ioctl
-// ktrace
-// lchflags
-// lchmod
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// lgetxattr
-// lio_listio
-// listxattr
-// llistxattr
-// lremovexattr
-// lseek
-// lsetxattr
-// lutimes
-// madvise
-// mincore
-// minherit
-// modctl
-// mq_close
-// mq_getattr
-// mq_notify
-// mq_open
-// mq_receive
-// mq_send
-// mq_setattr
-// mq_timedreceive
-// mq_timedsend
-// mq_unlink
-// mremap
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// ntp_adjtime
-// pmc_control
-// pmc_get_info
-// poll
-// pollts
-// preadv
-// profil
-// pselect
-// pset_assign
-// pset_create
-// pset_destroy
-// ptrace
-// pwritev
-// quotactl
-// rasctl
-// readv
-// reboot
-// removexattr
-// sa_enable
-// sa_preempt
-// sa_register
-// sa_setconcurrency
-// sa_stacks
-// sa_yield
-// sbrk
-// sched_yield
-// semconfig
-// semget
-// semop
-// setcontext
-// setitimer
-// setxattr
-// shmat
-// shmdt
-// shmget
-// sstk
-// statvfs1
-// swapctl
-// sysarch
-// syscall
-// timer_create
-// timer_delete
-// timer_getoverrun
-// timer_gettime
-// timer_settime
-// undelete
-// utrace
-// uuidgen
-// vadvise
-// vfork
-// writev
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
deleted file mode 100644
index afaca09..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
deleted file mode 100644
index a6ff04c..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int64(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
deleted file mode 100644
index 68a6969..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd_arm.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build arm,netbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = uint32(mode)
- k.Flags = uint32(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_no_getwd.go b/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
deleted file mode 100644
index 530792e..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_no_getwd.go
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build dragonfly freebsd netbsd openbsd
-
-package unix
-
-const ImplementsGetwd = false
-
-func Getwd() (string, error) { return "", ENOTSUP }
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
deleted file mode 100644
index c0d2b6c..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ /dev/null
@@ -1,287 +0,0 @@
-// Copyright 2009,2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// OpenBSD system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_bsd.go or syscall_unix.go.
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-type SockaddrDatalink struct {
- Len uint8
- Family uint8
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [24]int8
- raw RawSockaddrDatalink
-}
-
-func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-func nametomib(name string) (mib []_C_int, err error) {
-
- // Perform lookup via a binary search
- left := 0
- right := len(sysctlMib) - 1
- for {
- idx := left + (right-left)/2
- switch {
- case name == sysctlMib[idx].ctlname:
- return sysctlMib[idx].ctloid, nil
- case name > sysctlMib[idx].ctlname:
- left = idx + 1
- default:
- right = idx - 1
- }
- if left > right {
- break
- }
- }
- return nil, EINVAL
-}
-
-func direntIno(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Fileno), unsafe.Sizeof(Dirent{}.Fileno))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Namlen), unsafe.Sizeof(Dirent{}.Namlen))
-}
-
-//sysnb pipe(p *[2]_C_int) (err error)
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- err = pipe(&pp)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return
-}
-
-//sys getdents(fd int, buf []byte) (n int, err error)
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- return getdents(fd, buf)
-}
-
-// TODO
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- return -1, ENOSYS
-}
-
-func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
- var _p0 unsafe.Pointer
- var bufsize uintptr
- if len(buf) > 0 {
- _p0 = unsafe.Pointer(&buf[0])
- bufsize = unsafe.Sizeof(Statfs_t{}) * uintptr(len(buf))
- }
- r0, _, e1 := Syscall(SYS_GETFSSTAT, uintptr(_p0), bufsize, uintptr(flags))
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chflags(path string, flags int) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(from int, to int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchflags(fd int, flags int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Flock(fd int, how int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatfs(fd int, stat *Statfs_t) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sysnb Getegid() (egid int)
-//sysnb Geteuid() (uid int)
-//sysnb Getgid() (gid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgrp int)
-//sysnb Getpid() (pid int)
-//sysnb Getppid() (ppid int)
-//sys Getpriority(which int, who int) (prio int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Getsid(pid int) (sid int, err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Issetugid() (tainted bool)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Kqueue() (fd int, err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error)
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Revoke(path string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = SYS_LSEEK
-//sys Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error)
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Setlogin(name string) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Settimeofday(tp *Timeval) (err error)
-//sysnb Setuid(uid int) (err error)
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statfs(path string, stat *Statfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Umask(newmask int) (oldmask int)
-//sys Unlink(path string) (err error)
-//sys Unmount(path string, flags int) (err error)
-//sys write(fd int, p []byte) (n int, err error)
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys readlen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_READ
-//sys writelen(fd int, buf *byte, nbuf int) (n int, err error) = SYS_WRITE
-
-/*
- * Unimplemented
- */
-// __getcwd
-// __semctl
-// __syscall
-// __sysctl
-// adjfreq
-// break
-// clock_getres
-// clock_gettime
-// clock_settime
-// closefrom
-// execve
-// faccessat
-// fchmodat
-// fchownat
-// fcntl
-// fhopen
-// fhstat
-// fhstatfs
-// fork
-// fstatat
-// futimens
-// getfh
-// getgid
-// getitimer
-// getlogin
-// getresgid
-// getresuid
-// getrtable
-// getthrid
-// ioctl
-// ktrace
-// lfs_bmapv
-// lfs_markv
-// lfs_segclean
-// lfs_segwait
-// linkat
-// mincore
-// minherit
-// mkdirat
-// mkfifoat
-// mknodat
-// mount
-// mquery
-// msgctl
-// msgget
-// msgrcv
-// msgsnd
-// nfssvc
-// nnpfspioctl
-// openat
-// poll
-// preadv
-// profil
-// pwritev
-// quotactl
-// readlinkat
-// readv
-// reboot
-// renameat
-// rfork
-// sched_yield
-// semget
-// semop
-// setgroups
-// setitimer
-// setrtable
-// setsockopt
-// shmat
-// shmctl
-// shmdt
-// shmget
-// sigaction
-// sigaltstack
-// sigpending
-// sigprocmask
-// sigreturn
-// sigsuspend
-// symlinkat
-// sysarch
-// syscall
-// threxit
-// thrsigdivert
-// thrsleep
-// thrwakeup
-// unlinkat
-// utimensat
-// vfork
-// writev
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
deleted file mode 100644
index a66ddc5..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_386.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build 386,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = int64(nsec / 1e9)
- ts.Nsec = int32(nsec % 1e9)
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = int32(nsec % 1e9 / 1e3)
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint32(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint32(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
deleted file mode 100644
index 0776c1f..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,openbsd
-
-package unix
-
-func Getpagesize() int { return 4096 }
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = nsec / 1e9
- return
-}
-
-func SetKevent(k *Kevent_t, fd, mode, flags int) {
- k.Ident = uint64(fd)
- k.Filter = int16(mode)
- k.Flags = uint16(flags)
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (msghdr *Msghdr) SetControllen(length int) {
- msghdr.Controllen = uint32(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
deleted file mode 100644
index 4b8ddab..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ /dev/null
@@ -1,715 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Solaris system calls.
-// This file is compiled as ordinary Go code,
-// but it is also input to mksyscall,
-// which parses the //sys lines and generates system call stubs.
-// Note that sometimes we use a lowercase //sys name and wrap
-// it in our own nicer implementation, either here or in
-// syscall_solaris.go or syscall_unix.go.
-
-package unix
-
-import (
- "sync/atomic"
- "syscall"
- "unsafe"
-)
-
-// Implemented in runtime/syscall_solaris.go.
-type syscallFunc uintptr
-
-func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-
-type SockaddrDatalink struct {
- Family uint16
- Index uint16
- Type uint8
- Nlen uint8
- Alen uint8
- Slen uint8
- Data [244]int8
- raw RawSockaddrDatalink
-}
-
-func clen(n []byte) int {
- for i := 0; i < len(n); i++ {
- if n[i] == 0 {
- return i
- }
- }
- return len(n)
-}
-
-func direntIno(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
-}
-
-func direntReclen(buf []byte) (uint64, bool) {
- return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
-}
-
-func direntNamlen(buf []byte) (uint64, bool) {
- reclen, ok := direntReclen(buf)
- if !ok {
- return 0, false
- }
- return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
-}
-
-//sysnb pipe(p *[2]_C_int) (n int, err error)
-
-func Pipe(p []int) (err error) {
- if len(p) != 2 {
- return EINVAL
- }
- var pp [2]_C_int
- n, err := pipe(&pp)
- if n != 0 {
- return err
- }
- p[0] = int(pp[0])
- p[1] = int(pp[1])
- return nil
-}
-
-func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet4, nil
-}
-
-func (sa *SockaddrInet6) sockaddr() (unsafe.Pointer, _Socklen, error) {
- if sa.Port < 0 || sa.Port > 0xFFFF {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_INET6
- p := (*[2]byte)(unsafe.Pointer(&sa.raw.Port))
- p[0] = byte(sa.Port >> 8)
- p[1] = byte(sa.Port)
- sa.raw.Scope_id = sa.ZoneId
- for i := 0; i < len(sa.Addr); i++ {
- sa.raw.Addr[i] = sa.Addr[i]
- }
- return unsafe.Pointer(&sa.raw), SizeofSockaddrInet6, nil
-}
-
-func (sa *SockaddrUnix) sockaddr() (unsafe.Pointer, _Socklen, error) {
- name := sa.Name
- n := len(name)
- if n >= len(sa.raw.Path) {
- return nil, 0, EINVAL
- }
- sa.raw.Family = AF_UNIX
- for i := 0; i < n; i++ {
- sa.raw.Path[i] = int8(name[i])
- }
- // length is family (uint16), name, NUL.
- sl := _Socklen(2)
- if n > 0 {
- sl += _Socklen(n) + 1
- }
- if sa.raw.Path[0] == '@' {
- sa.raw.Path[0] = 0
- // Don't count trailing NUL for abstract address.
- sl--
- }
-
- return unsafe.Pointer(&sa.raw), sl, nil
-}
-
-//sys getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getsockname
-
-func Getsockname(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getsockname(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-const ImplementsGetwd = true
-
-//sys Getcwd(buf []byte) (n int, err error)
-
-func Getwd() (wd string, err error) {
- var buf [PathMax]byte
- // Getcwd will return an error if it failed for any reason.
- _, err = Getcwd(buf[0:])
- if err != nil {
- return "", err
- }
- n := clen(buf[:])
- if n < 1 {
- return "", EINVAL
- }
- return string(buf[:n]), nil
-}
-
-/*
- * Wrapped
- */
-
-//sysnb getgroups(ngid int, gid *_Gid_t) (n int, err error)
-//sysnb setgroups(ngid int, gid *_Gid_t) (err error)
-
-func Getgroups() (gids []int, err error) {
- n, err := getgroups(0, nil)
- // Check for error and sanity check group count. Newer versions of
- // Solaris allow up to 1024 (NGROUPS_MAX).
- if n < 0 || n > 1024 {
- if err != nil {
- return nil, err
- }
- return nil, EINVAL
- } else if n == 0 {
- return nil, nil
- }
-
- a := make([]_Gid_t, n)
- n, err = getgroups(n, &a[0])
- if n == -1 {
- return nil, err
- }
- gids = make([]int, n)
- for i, v := range a[0:n] {
- gids[i] = int(v)
- }
- return
-}
-
-func Setgroups(gids []int) (err error) {
- if len(gids) == 0 {
- return setgroups(0, nil)
- }
-
- a := make([]_Gid_t, len(gids))
- for i, v := range gids {
- a[i] = _Gid_t(v)
- }
- return setgroups(len(a), &a[0])
-}
-
-func ReadDirent(fd int, buf []byte) (n int, err error) {
- // Final argument is (basep *uintptr) and the syscall doesn't take nil.
- // TODO(rsc): Can we use a single global basep for all calls?
- return Getdents(fd, buf, new(uintptr))
-}
-
-// Wait status is 7 bits at bottom, either 0 (exited),
-// 0x7F (stopped), or a signal number that caused an exit.
-// The 0x80 bit is whether there was a core dump.
-// An extra number (exit code, signal causing a stop)
-// is in the high bits.
-
-type WaitStatus uint32
-
-const (
- mask = 0x7F
- core = 0x80
- shift = 8
-
- exited = 0
- stopped = 0x7F
-)
-
-func (w WaitStatus) Exited() bool { return w&mask == exited }
-
-func (w WaitStatus) ExitStatus() int {
- if w&mask != exited {
- return -1
- }
- return int(w >> shift)
-}
-
-func (w WaitStatus) Signaled() bool { return w&mask != stopped && w&mask != 0 }
-
-func (w WaitStatus) Signal() syscall.Signal {
- sig := syscall.Signal(w & mask)
- if sig == stopped || sig == 0 {
- return -1
- }
- return sig
-}
-
-func (w WaitStatus) CoreDump() bool { return w.Signaled() && w&core != 0 }
-
-func (w WaitStatus) Stopped() bool { return w&mask == stopped && syscall.Signal(w>>shift) != SIGSTOP }
-
-func (w WaitStatus) Continued() bool { return w&mask == stopped && syscall.Signal(w>>shift) == SIGSTOP }
-
-func (w WaitStatus) StopSignal() syscall.Signal {
- if !w.Stopped() {
- return -1
- }
- return syscall.Signal(w>>shift) & 0xFF
-}
-
-func (w WaitStatus) TrapCause() int { return -1 }
-
-//sys wait4(pid int32, statusp *_C_int, options int, rusage *Rusage) (wpid int32, err error)
-
-func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (int, error) {
- var status _C_int
- rpid, err := wait4(int32(pid), &status, options, rusage)
- wpid := int(rpid)
- if wpid == -1 {
- return wpid, err
- }
- if wstatus != nil {
- *wstatus = WaitStatus(status)
- }
- return wpid, nil
-}
-
-//sys gethostname(buf []byte) (n int, err error)
-
-func Gethostname() (name string, err error) {
- var buf [MaxHostNameLen]byte
- n, err := gethostname(buf[:])
- if n != 0 {
- return "", err
- }
- n = clen(buf[:])
- if n < 1 {
- return "", EFAULT
- }
- return string(buf[:n]), nil
-}
-
-//sys utimes(path string, times *[2]Timeval) (err error)
-
-func Utimes(path string, tv []Timeval) (err error) {
- if tv == nil {
- return utimes(path, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return utimes(path, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-//sys utimensat(fd int, path string, times *[2]Timespec, flag int) (err error)
-
-func UtimesNano(path string, ts []Timespec) error {
- if ts == nil {
- return utimensat(AT_FDCWD, path, nil, 0)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
-}
-
-func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
- if ts == nil {
- return utimensat(dirfd, path, nil, flags)
- }
- if len(ts) != 2 {
- return EINVAL
- }
- return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
-}
-
-//sys fcntl(fd int, cmd int, arg int) (val int, err error)
-
-// FcntlFlock performs a fcntl syscall for the F_GETLK, F_SETLK or F_SETLKW command.
-func FcntlFlock(fd uintptr, cmd int, lk *Flock_t) error {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procfcntl)), 3, uintptr(fd), uintptr(cmd), uintptr(unsafe.Pointer(lk)), 0, 0, 0)
- if e1 != 0 {
- return e1
- }
- return nil
-}
-
-//sys futimesat(fildes int, path *byte, times *[2]Timeval) (err error)
-
-func Futimesat(dirfd int, path string, tv []Timeval) error {
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- if tv == nil {
- return futimesat(dirfd, pathp, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(dirfd, pathp, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-// Solaris doesn't have an futimes function because it allows NULL to be
-// specified as the path for futimesat. However, Go doesn't like
-// NULL-style string interfaces, so this simple wrapper is provided.
-func Futimes(fd int, tv []Timeval) error {
- if tv == nil {
- return futimesat(fd, nil, nil)
- }
- if len(tv) != 2 {
- return EINVAL
- }
- return futimesat(fd, nil, (*[2]Timeval)(unsafe.Pointer(&tv[0])))
-}
-
-func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
- switch rsa.Addr.Family {
- case AF_UNIX:
- pp := (*RawSockaddrUnix)(unsafe.Pointer(rsa))
- sa := new(SockaddrUnix)
- // Assume path ends at NUL.
- // This is not technically the Solaris semantics for
- // abstract Unix domain sockets -- they are supposed
- // to be uninterpreted fixed-size binary blobs -- but
- // everyone uses this convention.
- n := 0
- for n < len(pp.Path) && pp.Path[n] != 0 {
- n++
- }
- bytes := (*[10000]byte)(unsafe.Pointer(&pp.Path[0]))[0:n]
- sa.Name = string(bytes)
- return sa, nil
-
- case AF_INET:
- pp := (*RawSockaddrInet4)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet4)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
-
- case AF_INET6:
- pp := (*RawSockaddrInet6)(unsafe.Pointer(rsa))
- sa := new(SockaddrInet6)
- p := (*[2]byte)(unsafe.Pointer(&pp.Port))
- sa.Port = int(p[0])<<8 + int(p[1])
- sa.ZoneId = pp.Scope_id
- for i := 0; i < len(sa.Addr); i++ {
- sa.Addr[i] = pp.Addr[i]
- }
- return sa, nil
- }
- return nil, EAFNOSUPPORT
-}
-
-//sys accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) = libsocket.accept
-
-func Accept(fd int) (nfd int, sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- nfd, err = accept(fd, &rsa, &len)
- if nfd == -1 {
- return
- }
- sa, err = anyToSockaddr(&rsa)
- if err != nil {
- Close(nfd)
- nfd = 0
- }
- return
-}
-
-//sys recvmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_recvmsg
-
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
- var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
- msg.Namelen = uint32(SizeofSockaddrAny)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // receive at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrightslen = int32(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = recvmsg(fd, &msg, flags); n == -1 {
- return
- }
- oobn = int(msg.Accrightslen)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendmsg(fd int, p, oob []byte, to Sockaddr, flags int) (err error) {
- _, err = SendmsgN(fd, p, oob, to, flags)
- return
-}
-
-//sys sendmsg(s int, msg *Msghdr, flags int) (n int, err error) = libsocket.__xnet_sendmsg
-
-func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error) {
- var ptr unsafe.Pointer
- var salen _Socklen
- if to != nil {
- ptr, salen, err = to.sockaddr()
- if err != nil {
- return 0, err
- }
- }
- var msg Msghdr
- msg.Name = (*byte)(unsafe.Pointer(ptr))
- msg.Namelen = uint32(salen)
- var iov Iovec
- if len(p) > 0 {
- iov.Base = (*int8)(unsafe.Pointer(&p[0]))
- iov.SetLen(len(p))
- }
- var dummy int8
- if len(oob) > 0 {
- // send at least one normal byte
- if len(p) == 0 {
- iov.Base = &dummy
- iov.SetLen(1)
- }
- msg.Accrightslen = int32(len(oob))
- }
- msg.Iov = &iov
- msg.Iovlen = 1
- if n, err = sendmsg(fd, &msg, flags); err != nil {
- return 0, err
- }
- if len(oob) > 0 && len(p) == 0 {
- n = 0
- }
- return n, nil
-}
-
-//sys acct(path *byte) (err error)
-
-func Acct(path string) (err error) {
- if len(path) == 0 {
- // Assume caller wants to disable accounting.
- return acct(nil)
- }
-
- pathp, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
- return acct(pathp)
-}
-
-/*
- * Expose the ioctl function
- */
-
-//sys ioctl(fd int, req uint, arg uintptr) (err error)
-
-func IoctlSetInt(fd int, req uint, value int) (err error) {
- return ioctl(fd, req, uintptr(value))
-}
-
-func IoctlSetWinsize(fd int, req uint, value *Winsize) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermios(fd int, req uint, value *Termios) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlSetTermio(fd int, req uint, value *Termio) (err error) {
- return ioctl(fd, req, uintptr(unsafe.Pointer(value)))
-}
-
-func IoctlGetInt(fd int, req uint) (int, error) {
- var value int
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return value, err
-}
-
-func IoctlGetWinsize(fd int, req uint) (*Winsize, error) {
- var value Winsize
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermios(fd int, req uint) (*Termios, error) {
- var value Termios
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-func IoctlGetTermio(fd int, req uint) (*Termio, error) {
- var value Termio
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&value)))
- return &value, err
-}
-
-/*
- * Exposed directly
- */
-//sys Access(path string, mode uint32) (err error)
-//sys Adjtime(delta *Timeval, olddelta *Timeval) (err error)
-//sys Chdir(path string) (err error)
-//sys Chmod(path string, mode uint32) (err error)
-//sys Chown(path string, uid int, gid int) (err error)
-//sys Chroot(path string) (err error)
-//sys Close(fd int) (err error)
-//sys Creat(path string, mode uint32) (fd int, err error)
-//sys Dup(fd int) (nfd int, err error)
-//sys Dup2(oldfd int, newfd int) (err error)
-//sys Exit(code int)
-//sys Fchdir(fd int) (err error)
-//sys Fchmod(fd int, mode uint32) (err error)
-//sys Fchmodat(dirfd int, path string, mode uint32, flags int) (err error)
-//sys Fchown(fd int, uid int, gid int) (err error)
-//sys Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error)
-//sys Fdatasync(fd int) (err error)
-//sys Fpathconf(fd int, name int) (val int, err error)
-//sys Fstat(fd int, stat *Stat_t) (err error)
-//sys Fstatvfs(fd int, vfsstat *Statvfs_t) (err error)
-//sys Getdents(fd int, buf []byte, basep *uintptr) (n int, err error)
-//sysnb Getgid() (gid int)
-//sysnb Getpid() (pid int)
-//sysnb Getpgid(pid int) (pgid int, err error)
-//sysnb Getpgrp() (pgid int, err error)
-//sys Geteuid() (euid int)
-//sys Getegid() (egid int)
-//sys Getppid() (ppid int)
-//sys Getpriority(which int, who int) (n int, err error)
-//sysnb Getrlimit(which int, lim *Rlimit) (err error)
-//sysnb Getrusage(who int, rusage *Rusage) (err error)
-//sysnb Gettimeofday(tv *Timeval) (err error)
-//sysnb Getuid() (uid int)
-//sys Kill(pid int, signum syscall.Signal) (err error)
-//sys Lchown(path string, uid int, gid int) (err error)
-//sys Link(path string, link string) (err error)
-//sys Listen(s int, backlog int) (err error) = libsocket.__xnet_llisten
-//sys Lstat(path string, stat *Stat_t) (err error)
-//sys Madvise(b []byte, advice int) (err error)
-//sys Mkdir(path string, mode uint32) (err error)
-//sys Mkdirat(dirfd int, path string, mode uint32) (err error)
-//sys Mkfifo(path string, mode uint32) (err error)
-//sys Mkfifoat(dirfd int, path string, mode uint32) (err error)
-//sys Mknod(path string, mode uint32, dev int) (err error)
-//sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error)
-//sys Mlock(b []byte) (err error)
-//sys Mlockall(flags int) (err error)
-//sys Mprotect(b []byte, prot int) (err error)
-//sys Munlock(b []byte) (err error)
-//sys Munlockall() (err error)
-//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
-//sys Open(path string, mode int, perm uint32) (fd int, err error)
-//sys Openat(dirfd int, path string, flags int, mode uint32) (fd int, err error)
-//sys Pathconf(path string, name int) (val int, err error)
-//sys Pause() (err error)
-//sys Pread(fd int, p []byte, offset int64) (n int, err error)
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error)
-//sys read(fd int, p []byte) (n int, err error)
-//sys Readlink(path string, buf []byte) (n int, err error)
-//sys Rename(from string, to string) (err error)
-//sys Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
-//sys Rmdir(path string) (err error)
-//sys Seek(fd int, offset int64, whence int) (newoffset int64, err error) = lseek
-//sysnb Setegid(egid int) (err error)
-//sysnb Seteuid(euid int) (err error)
-//sysnb Setgid(gid int) (err error)
-//sys Sethostname(p []byte) (err error)
-//sysnb Setpgid(pid int, pgid int) (err error)
-//sys Setpriority(which int, who int, prio int) (err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
-//sysnb Setrlimit(which int, lim *Rlimit) (err error)
-//sysnb Setsid() (pid int, err error)
-//sysnb Setuid(uid int) (err error)
-//sys Shutdown(s int, how int) (err error) = libsocket.shutdown
-//sys Stat(path string, stat *Stat_t) (err error)
-//sys Statvfs(path string, vfsstat *Statvfs_t) (err error)
-//sys Symlink(path string, link string) (err error)
-//sys Sync() (err error)
-//sysnb Times(tms *Tms) (ticks uintptr, err error)
-//sys Truncate(path string, length int64) (err error)
-//sys Fsync(fd int) (err error)
-//sys Ftruncate(fd int, length int64) (err error)
-//sys Umask(mask int) (oldmask int)
-//sysnb Uname(buf *Utsname) (err error)
-//sys Unmount(target string, flags int) (err error) = libc.umount
-//sys Unlink(path string) (err error)
-//sys Unlinkat(dirfd int, path string, flags int) (err error)
-//sys Ustat(dev int, ubuf *Ustat_t) (err error)
-//sys Utime(path string, buf *Utimbuf) (err error)
-//sys bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_bind
-//sys connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_connect
-//sys mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error)
-//sys munmap(addr uintptr, length uintptr) (err error)
-//sys sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) = libsocket.__xnet_sendto
-//sys socket(domain int, typ int, proto int) (fd int, err error) = libsocket.__xnet_socket
-//sysnb socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) = libsocket.__xnet_socketpair
-//sys write(fd int, p []byte) (n int, err error)
-//sys getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) = libsocket.__xnet_getsockopt
-//sysnb getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) = libsocket.getpeername
-//sys setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) = libsocket.setsockopt
-//sys recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) = libsocket.recvfrom
-
-func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procread)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procwrite)), 3, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf), 0, 0, 0)
- n = int(r0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-var mapper = &mmapper{
- active: make(map[*byte][]byte),
- mmap: mmap,
- munmap: munmap,
-}
-
-func Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- return mapper.Mmap(fd, offset, length, prot, flags)
-}
-
-func Munmap(b []byte) (err error) {
- return mapper.Munmap(b)
-}
-
-//sys sysconf(name int) (n int64, err error)
-
-// pageSize caches the value of Getpagesize, since it can't change
-// once the system is booted.
-var pageSize int64 // accessed atomically
-
-func Getpagesize() int {
- n := atomic.LoadInt64(&pageSize)
- if n == 0 {
- n, _ = sysconf(_SC_PAGESIZE)
- atomic.StoreInt64(&pageSize, n)
- }
- return int(n)
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
deleted file mode 100644
index 5aff62c..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build amd64,solaris
-
-package unix
-
-func TimespecToNsec(ts Timespec) int64 { return int64(ts.Sec)*1e9 + int64(ts.Nsec) }
-
-func NsecToTimespec(nsec int64) (ts Timespec) {
- ts.Sec = nsec / 1e9
- ts.Nsec = nsec % 1e9
- return
-}
-
-func NsecToTimeval(nsec int64) (tv Timeval) {
- nsec += 999 // round up to microsecond
- tv.Usec = nsec % 1e9 / 1e3
- tv.Sec = int64(nsec / 1e9)
- return
-}
-
-func (iov *Iovec) SetLen(length int) {
- iov.Len = uint64(length)
-}
-
-func (cmsg *Cmsghdr) SetLen(length int) {
- cmsg.Len = uint32(length)
-}
-
-func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- // TODO(aram): implement this, see issue 5847.
- panic("unimplemented")
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
deleted file mode 100644
index 3ed8a91..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ /dev/null
@@ -1,293 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-import (
- "runtime"
- "sync"
- "syscall"
- "unsafe"
-)
-
-var (
- Stdin = 0
- Stdout = 1
- Stderr = 2
-)
-
-const (
- darwin64Bit = runtime.GOOS == "darwin" && sizeofPtr == 8
- dragonfly64Bit = runtime.GOOS == "dragonfly" && sizeofPtr == 8
- netbsd32Bit = runtime.GOOS == "netbsd" && sizeofPtr == 4
- solaris64Bit = runtime.GOOS == "solaris" && sizeofPtr == 8
-)
-
-// Do the interface allocations only once for common
-// Errno values.
-var (
- errEAGAIN error = syscall.EAGAIN
- errEINVAL error = syscall.EINVAL
- errENOENT error = syscall.ENOENT
-)
-
-// errnoErr returns common boxed Errno values, to prevent
-// allocations at runtime.
-func errnoErr(e syscall.Errno) error {
- switch e {
- case 0:
- return nil
- case EAGAIN:
- return errEAGAIN
- case EINVAL:
- return errEINVAL
- case ENOENT:
- return errENOENT
- }
- return e
-}
-
-// Mmap manager, for use by operating system-specific implementations.
-
-type mmapper struct {
- sync.Mutex
- active map[*byte][]byte // active mappings; key is last byte in mapping
- mmap func(addr, length uintptr, prot, flags, fd int, offset int64) (uintptr, error)
- munmap func(addr uintptr, length uintptr) error
-}
-
-func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (data []byte, err error) {
- if length <= 0 {
- return nil, EINVAL
- }
-
- // Map the requested memory.
- addr, errno := m.mmap(0, uintptr(length), prot, flags, fd, offset)
- if errno != nil {
- return nil, errno
- }
-
- // Slice memory layout
- var sl = struct {
- addr uintptr
- len int
- cap int
- }{addr, length, length}
-
- // Use unsafe to turn sl into a []byte.
- b := *(*[]byte)(unsafe.Pointer(&sl))
-
- // Register mapping in m and return it.
- p := &b[cap(b)-1]
- m.Lock()
- defer m.Unlock()
- m.active[p] = b
- return b, nil
-}
-
-func (m *mmapper) Munmap(data []byte) (err error) {
- if len(data) == 0 || len(data) != cap(data) {
- return EINVAL
- }
-
- // Find the base of the mapping.
- p := &data[cap(data)-1]
- m.Lock()
- defer m.Unlock()
- b := m.active[p]
- if b == nil || &b[0] != &data[0] {
- return EINVAL
- }
-
- // Unmap the memory and update m.
- if errno := m.munmap(uintptr(unsafe.Pointer(&b[0])), uintptr(len(b))); errno != nil {
- return errno
- }
- delete(m.active, p)
- return nil
-}
-
-func Read(fd int, p []byte) (n int, err error) {
- n, err = read(fd, p)
- if raceenabled {
- if n > 0 {
- raceWriteRange(unsafe.Pointer(&p[0]), n)
- }
- if err == nil {
- raceAcquire(unsafe.Pointer(&ioSync))
- }
- }
- return
-}
-
-func Write(fd int, p []byte) (n int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- n, err = write(fd, p)
- if raceenabled && n > 0 {
- raceReadRange(unsafe.Pointer(&p[0]), n)
- }
- return
-}
-
-// For testing: clients can set this flag to force
-// creation of IPv6 sockets to return EAFNOSUPPORT.
-var SocketDisableIPv6 bool
-
-type Sockaddr interface {
- sockaddr() (ptr unsafe.Pointer, len _Socklen, err error) // lowercase; only we can define Sockaddrs
-}
-
-type SockaddrInet4 struct {
- Port int
- Addr [4]byte
- raw RawSockaddrInet4
-}
-
-type SockaddrInet6 struct {
- Port int
- ZoneId uint32
- Addr [16]byte
- raw RawSockaddrInet6
-}
-
-type SockaddrUnix struct {
- Name string
- raw RawSockaddrUnix
-}
-
-func Bind(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return bind(fd, ptr, n)
-}
-
-func Connect(fd int, sa Sockaddr) (err error) {
- ptr, n, err := sa.sockaddr()
- if err != nil {
- return err
- }
- return connect(fd, ptr, n)
-}
-
-func Getpeername(fd int) (sa Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if err = getpeername(fd, &rsa, &len); err != nil {
- return
- }
- return anyToSockaddr(&rsa)
-}
-
-func GetsockoptInt(fd, level, opt int) (value int, err error) {
- var n int32
- vallen := _Socklen(4)
- err = getsockopt(fd, level, opt, unsafe.Pointer(&n), &vallen)
- return int(n), err
-}
-
-func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
- var rsa RawSockaddrAny
- var len _Socklen = SizeofSockaddrAny
- if n, err = recvfrom(fd, p, flags, &rsa, &len); err != nil {
- return
- }
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(&rsa)
- }
- return
-}
-
-func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
- ptr, n, err := to.sockaddr()
- if err != nil {
- return err
- }
- return sendto(fd, p, flags, ptr, n)
-}
-
-func SetsockoptByte(fd, level, opt int, value byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value), 1)
-}
-
-func SetsockoptInt(fd, level, opt int, value int) (err error) {
- var n = int32(value)
- return setsockopt(fd, level, opt, unsafe.Pointer(&n), 4)
-}
-
-func SetsockoptInet4Addr(fd, level, opt int, value [4]byte) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&value[0]), 4)
-}
-
-func SetsockoptIPMreq(fd, level, opt int, mreq *IPMreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPMreq)
-}
-
-func SetsockoptIPv6Mreq(fd, level, opt int, mreq *IPv6Mreq) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(mreq), SizeofIPv6Mreq)
-}
-
-func SetsockoptICMPv6Filter(fd, level, opt int, filter *ICMPv6Filter) error {
- return setsockopt(fd, level, opt, unsafe.Pointer(filter), SizeofICMPv6Filter)
-}
-
-func SetsockoptLinger(fd, level, opt int, l *Linger) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(l), SizeofLinger)
-}
-
-func SetsockoptString(fd, level, opt int, s string) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(&[]byte(s)[0]), uintptr(len(s)))
-}
-
-func SetsockoptTimeval(fd, level, opt int, tv *Timeval) (err error) {
- return setsockopt(fd, level, opt, unsafe.Pointer(tv), unsafe.Sizeof(*tv))
-}
-
-func Socket(domain, typ, proto int) (fd int, err error) {
- if domain == AF_INET6 && SocketDisableIPv6 {
- return -1, EAFNOSUPPORT
- }
- fd, err = socket(domain, typ, proto)
- return
-}
-
-func Socketpair(domain, typ, proto int) (fd [2]int, err error) {
- var fdx [2]int32
- err = socketpair(domain, typ, proto, &fdx)
- if err == nil {
- fd[0] = int(fdx[0])
- fd[1] = int(fdx[1])
- }
- return
-}
-
-func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
- if raceenabled {
- raceReleaseMerge(unsafe.Pointer(&ioSync))
- }
- return sendfile(outfd, infd, offset, count)
-}
-
-var ioSync int64
-
-func CloseOnExec(fd int) { fcntl(fd, F_SETFD, FD_CLOEXEC) }
-
-func SetNonblock(fd int, nonblocking bool) (err error) {
- flag, err := fcntl(fd, F_GETFL, 0)
- if err != nil {
- return err
- }
- if nonblocking {
- flag |= O_NONBLOCK
- } else {
- flag &= ^O_NONBLOCK
- }
- _, err = fcntl(fd, F_SETFL, flag)
- return err
-}
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
deleted file mode 100644
index 4cb8e8e..0000000
--- a/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2016 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
-// +build !gccgo
-
-package unix
-
-import "syscall"
-
-func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno)
-func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
diff --git a/vendor/golang.org/x/sys/unix/types_darwin.go b/vendor/golang.org/x/sys/unix/types_darwin.go
deleted file mode 100644
index a350817..0000000
--- a/vendor/golang.org/x/sys/unix/types_darwin.go
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See README.md
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define __DARWIN_UNIX03 0
-#define KERNEL
-#define _DARWIN_USE_64_BIT_INODE
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-enum {
- sizeofPtr = sizeof(void*),
-};
-
-union sockaddr_all {
- struct sockaddr s1; // this one gets used for fields
- struct sockaddr_in s2; // these pad it out
- struct sockaddr_in6 s3;
- struct sockaddr_un s4;
- struct sockaddr_dl s5;
-};
-
-struct sockaddr_any {
- struct sockaddr addr;
- char pad[sizeof(union sockaddr_all) - sizeof(struct sockaddr)];
-};
-
-*/
-import "C"
-
-// Machine characteristics; for internal use.
-
-const (
- sizeofPtr = C.sizeofPtr
- sizeofShort = C.sizeof_short
- sizeofInt = C.sizeof_int
- sizeofLong = C.sizeof_long
- sizeofLongLong = C.sizeof_longlong
-)
-
-// Basic types
-
-type (
- _C_short C.short
- _C_int C.int
- _C_long C.long
- _C_long_long C.longlong
-)
-
-// Time
-
-type Timespec C.struct_timespec
-
-type Timeval C.struct_timeval
-
-type Timeval32 C.struct_timeval32
-
-// Processes
-
-type Rusage C.struct_rusage
-
-type Rlimit C.struct_rlimit
-
-type _Gid_t C.gid_t
-
-// Files
-
-type Stat_t C.struct_stat64
-
-type Statfs_t C.struct_statfs64
-
-type Flock_t C.struct_flock
-
-type Fstore_t C.struct_fstore
-
-type Radvisory_t C.struct_radvisory
-
-type Fbootstraptransfer_t C.struct_fbootstraptransfer
-
-type Log2phys_t C.struct_log2phys
-
-type Fsid C.struct_fsid
-
-type Dirent C.struct_dirent
-
-// Sockets
-
-type RawSockaddrInet4 C.struct_sockaddr_in
-
-type RawSockaddrInet6 C.struct_sockaddr_in6
-
-type RawSockaddrUnix C.struct_sockaddr_un
-
-type RawSockaddrDatalink C.struct_sockaddr_dl
-
-type RawSockaddr C.struct_sockaddr
-
-type RawSockaddrAny C.struct_sockaddr_any
-
-type _Socklen C.socklen_t
-
-type Linger C.struct_linger
-
-type Iovec C.struct_iovec
-
-type IPMreq C.struct_ip_mreq
-
-type IPv6Mreq C.struct_ipv6_mreq
-
-type Msghdr C.struct_msghdr
-
-type Cmsghdr C.struct_cmsghdr
-
-type Inet4Pktinfo C.struct_in_pktinfo
-
-type Inet6Pktinfo C.struct_in6_pktinfo
-
-type IPv6MTUInfo C.struct_ip6_mtuinfo
-
-type ICMPv6Filter C.struct_icmp6_filter
-
-const (
- SizeofSockaddrInet4 = C.sizeof_struct_sockaddr_in
- SizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
- SizeofSockaddrAny = C.sizeof_struct_sockaddr_any
- SizeofSockaddrUnix = C.sizeof_struct_sockaddr_un
- SizeofSockaddrDatalink = C.sizeof_struct_sockaddr_dl
- SizeofLinger = C.sizeof_struct_linger
- SizeofIPMreq = C.sizeof_struct_ip_mreq
- SizeofIPv6Mreq = C.sizeof_struct_ipv6_mreq
- SizeofMsghdr = C.sizeof_struct_msghdr
- SizeofCmsghdr = C.sizeof_struct_cmsghdr
- SizeofInet4Pktinfo = C.sizeof_struct_in_pktinfo
- SizeofInet6Pktinfo = C.sizeof_struct_in6_pktinfo
- SizeofIPv6MTUInfo = C.sizeof_struct_ip6_mtuinfo
- SizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
-)
-
-// Ptrace requests
-
-const (
- PTRACE_TRACEME = C.PT_TRACE_ME
- PTRACE_CONT = C.PT_CONTINUE
- PTRACE_KILL = C.PT_KILL
-)
-
-// Events (kqueue, kevent)
-
-type Kevent_t C.struct_kevent
-
-// Select
-
-type FdSet C.fd_set
-
-// Routing and interface messages
-
-const (
- SizeofIfMsghdr = C.sizeof_struct_if_msghdr
- SizeofIfData = C.sizeof_struct_if_data
- SizeofIfaMsghdr = C.sizeof_struct_ifa_msghdr
- SizeofIfmaMsghdr = C.sizeof_struct_ifma_msghdr
- SizeofIfmaMsghdr2 = C.sizeof_struct_ifma_msghdr2
- SizeofRtMsghdr = C.sizeof_struct_rt_msghdr
- SizeofRtMetrics = C.sizeof_struct_rt_metrics
-)
-
-type IfMsghdr C.struct_if_msghdr
-
-type IfData C.struct_if_data
-
-type IfaMsghdr C.struct_ifa_msghdr
-
-type IfmaMsghdr C.struct_ifma_msghdr
-
-type IfmaMsghdr2 C.struct_ifma_msghdr2
-
-type RtMsghdr C.struct_rt_msghdr
-
-type RtMetrics C.struct_rt_metrics
-
-// Berkeley packet filter
-
-const (
- SizeofBpfVersion = C.sizeof_struct_bpf_version
- SizeofBpfStat = C.sizeof_struct_bpf_stat
- SizeofBpfProgram = C.sizeof_struct_bpf_program
- SizeofBpfInsn = C.sizeof_struct_bpf_insn
- SizeofBpfHdr = C.sizeof_struct_bpf_hdr
-)
-
-type BpfVersion C.struct_bpf_version
-
-type BpfStat C.struct_bpf_stat
-
-type BpfProgram C.struct_bpf_program
-
-type BpfInsn C.struct_bpf_insn
-
-type BpfHdr C.struct_bpf_hdr
-
-// Terminal handling
-
-type Termios C.struct_termios
-
-// fchmodat-like syscalls.
-
-const (
- AT_FDCWD = C.AT_FDCWD
- AT_SYMLINK_NOFOLLOW = C.AT_SYMLINK_NOFOLLOW
-)
diff --git a/vendor/golang.org/x/sys/unix/types_dragonfly.go b/vendor/golang.org/x/sys/unix/types_dragonfly.go
deleted file mode 100644
index a818704..0000000
--- a/vendor/golang.org/x/sys/unix/types_dragonfly.go
+++ /dev/null
@@ -1,242 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build ignore
-
-/*
-Input to cgo -godefs. See README.md
-*/
-
-// +godefs map struct_in_addr [4]byte /* in_addr */
-// +godefs map struct_in6_addr [16]byte /* in6_addr */
-
-package unix
-
-/*
-#define KERNEL
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include