diff --git a/.dockerignore b/.dockerignore
index c9584465..82a738e4 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -3,6 +3,8 @@
/data/**
/test/**
Dockerfile*
+CHANGELOG.md
+README.md
*.md
.github/*
.github_build/*
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..88d7f652
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,11 @@
+# Core
+
+#### Core v16.7.2 > v16.8.0
+
+- Add purge_on_delete function
+- Mod updated dependencies
+- Mod updated API docs
+- Fix disabled session logging
+- Fix FFmpeg skills reload
+- Fix ignores processes with invalid references (thx Patron Ramakrishna Chillara)
+- Fix code scanning alerts
diff --git a/Dockerfile.bundle b/Dockerfile.bundle
index c5845205..e39da709 100644
--- a/Dockerfile.bundle
+++ b/Dockerfile.bundle
@@ -1,28 +1,14 @@
-ARG GOLANG_IMAGE=golang:1.18.2-alpine3.15
+ARG CORE_IMAGE=datarhei/base:alpine-core-latest
-ARG FFMPEG_IMAGE=datarhei/base:alpine-ffmpeg-3.15-4.4.2
+ARG FFMPEG_IMAGE=datarhei/base:alpine-ffmpeg-latest
-FROM $GOLANG_IMAGE as builder
-
-COPY . /dist/core
-
-RUN apk add \
- git \
- make && \
- cd /dist/core && \
- go version && \
- make release && \
- make import
+FROM $CORE_IMAGE as core
FROM $FFMPEG_IMAGE
-COPY --from=builder /dist/core/core /core/bin/core
-COPY --from=builder /dist/core/import /core/bin/import
-COPY --from=builder /dist/core/mime.types /core/mime.types
-COPY --from=builder /dist/core/run.sh /core/bin/run.sh
+COPY --from=core /core /core
-RUN ffmpeg -buildconf && \
- mkdir /core/config /core/data
+RUN ffmpeg -buildconf
ENV CORE_CONFIGFILE=/core/config/config.json
ENV CORE_STORAGE_DISK_DIR=/core/data
diff --git a/Jenkinsfile b/Jenkinsfile
deleted file mode 100644
index 1a1cfd47..00000000
--- a/Jenkinsfile
+++ /dev/null
@@ -1,18 +0,0 @@
-pipeline {
- agent any
- triggers {
- cron('H 0 * * 6')
- }
- options {
- buildDiscarder(logRotator(numToKeepStr: '5', artifactNumToKeepStr: '5'))
- }
- stages {
- stage('Build AMD64') {
- steps {
- sh 'docker build -f Dockerfile -t docker-registry.marathon.l4lb.thisdcos.directory:5000/core:amd64 .'
- sh 'docker push docker-registry.marathon.l4lb.thisdcos.directory:5000/core:amd64'
- sh 'docker rmi docker-registry.marathon.l4lb.thisdcos.directory:5000/core:amd64'
- }
- }
- }
-}
diff --git a/LICENSE b/LICENSE
index 261eeb9e..03cda208 100644
--- a/LICENSE
+++ b/LICENSE
@@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
- Copyright [yyyy] [name of copyright owner]
+ Copyright 2020 FOSS GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Makefile b/Makefile
index 6927c04a..9b525756 100644
--- a/Makefile
+++ b/Makefile
@@ -8,7 +8,7 @@ all: build
## build: Build core (default)
build:
- go build -o core$(OSARCH)
+ CGO_ENABLED=0 GOOS=linux GOARCH=${OSARCH} go build -o core${OSARCH}
## swagger: Update swagger API documentation (requires github.com/swaggo/swag)
swagger:
@@ -34,6 +34,7 @@ fmt:
update:
go get -u
@-$(MAKE) tidy
+ @-$(MAKE) vendor
## tidy: Tidy up go.mod
tidy:
@@ -53,7 +54,7 @@ lint:
## import: Build import binary
import:
- cd app/import && go build -o ../../import -ldflags="-s -w"
+ cd app/import && CGO_ENABLED=0 GOOS=linux GOARCH=${OSARCH} go build -o ../../import -ldflags="-s -w"
## coverage: Generate code coverage analysis
coverage:
@@ -66,13 +67,13 @@ commit: vet fmt lint test build
## release: Build a release binary of core
release:
- go build -o core -ldflags="-s -w -X github.com/datarhei/core/app.Commit=$(COMMIT) -X github.com/datarhei/core/app.Branch=$(BRANCH) -X github.com/datarhei/core/app.Build=$(BUILD)"
+ CGO_ENABLED=0 GOOS=linux GOARCH=${OSARCH} go build -o core -ldflags="-s -w -X github.com/datarhei/core/app.Commit=$(COMMIT) -X github.com/datarhei/core/app.Branch=$(BRANCH) -X github.com/datarhei/core/app.Build=$(BUILD)"
## docker: Build standard Docker image
docker:
docker build -t core:$(SHORTCOMMIT) .
-.PHONY: help build swagger test vet fmt vendor commit coverage lint release import
+.PHONY: help build swagger test vet fmt vendor commit coverage lint release import update
## help: Show all commands
help: Makefile
diff --git a/README.md b/README.md
index 5f648ca7..722e5ff9 100644
--- a/README.md
+++ b/README.md
@@ -1,24 +1,24 @@
# Core
-The cloud-native a/v media processor.
+The cloud-native audio/video processing API.
datarhei Core is management for FFmpeg processes without development effort. It is a central interface for mapping AV processes, is responsible for design and management, and provides all necessary interfaces to access the video content. The included control for FFmpeg can keep all used functions reliable and executable without the need for software developers to take care of it. In addition, process and resource limitation for all FFmpeg processes protects the host system from application overload. The overall system gives access to current process values (CPU, RAM) and complete control of system resources and loads with statistical access to process data and current and historical logs.
## Features
-- Unrestricted FFmpeg process management
-- Optimized for long-running tasks
-- In-Memory- and Disk-Filesystem for media assets
-- HTTP and RTMP services
-- Let's Encrypt for HTTPS and RTMPS
-- HLS/DASH Session tracking with bandwidth and current viewer limiters
-- Multiple resource limiters and monitoring
-- FFmpeg progress data
-- Metrics incl. Prometheus support
-- Logging and debugging for FFmpeg processes with history
-- Multiple auth. by JWT and Auth0
-- 100% JSON REST API (Swagger documented)
-- GraphQL for metrics, process, and progress data
+- Unrestricted FFmpeg process management
+- Optimized for long-running tasks
+- In-Memory- and Disk-Filesystem for media assets
+- HTTP and RTMP services
+- Let's Encrypt for HTTPS and RTMPS
+- HLS/DASH Session tracking with bandwidth and current viewer limiters
+- Multiple resource limiters and monitoring
+- FFmpeg progress data
+- Metrics incl. Prometheus support
+- Logging and debugging for FFmpeg processes with history
+- Multiple auth. by JWT and Auth0
+- 100% JSON REST API (Swagger documented)
+- GraphQL for metrics, process, and progress data
## Quick start
@@ -355,7 +355,7 @@ input addresses or the output addresses. These patterns are regular expressions
environment variables `CORE_FFMPEG_ACCESS_INPUT` and `CORE_FFMPEG_ACCESS_OUTPUT.` The expressions need to be space-separated, e.g.
`HTTPS?:// RTSP:// RTMP://`. If one of the lists is empty, then no restriction on input, resp. The output will be applied.
-Independently of the value of `CORE_FFMPEG_ACCESS_OUTPUT` there's a check that verifies that output can only be written to the specified `CORE_STORAGE_DISK_DIR` and works as follows: If the address has a protocol specifier other than `file:,` then no further checks will be applied. If the protocol is `file:` or no protocol specifier is given, the address is assumed to be a path that is checked against the path shown in `CORE_STORAGE_DISK_DIR.`
+Independently of the value of `CORE_FFMPEG_ACCESS_OUTPUT` there's a check that verifies that output can only be written to the specified `CORE_STORAGE_DISK_DIR` and works as follows: If the address has a protocol specifier other than `file:,` then no further checks will be applied. If the protocol is `file:` or no protocol specifier is given, the address is assumed to be a path that is checked against the path shown in `CORE_STORAGE_DISK_DIR.`
It will be rejected if the address is outside the `CORE_STORAGE_DISK_DIR` directory. Otherwise, the protocol `file:` will be prepended. If you give some expressions for `CORE_FFMPEG_ACCESS_OUTPUT,` you should also allow `file:.`
@@ -495,9 +495,9 @@ http http://localhost:8080/api/v3/process "Authorization: Bearer eyJhbGciOiJIUzI
| Method | Path | Description |
| ------ | --------------------- | -------------------------------------------------------------------------------------------------------------------- |
-| GET | /api/v3/config | Retrieve the current config without the override values from the environment variables. |
-| GET | /api/v3/config/active | Retrieve the current config with the override values from the environment variables are taken into account. |
-| PUT | /api/v3/config | Store a new config. Only some values are respected, and the new config will only be used after a restart. |
+| GET | /api/v3/config | Retrieve the current config without the override values from the environment variables. |
+| GET | /api/v3/config/active | Retrieve the current config with the override values from the environment variables are taken into account. |
+| PUT | /api/v3/config | Store a new config. Only some values are respected, and the new config will only be used after a restart. |
| GET | /api/v3/config/reload | Reload the config. The config will be re-read and validated from the store. It will cause a restart of all services. |
When retrieving the config via the API, critical values (such as passwords) will be disguised if not required otherwise.
@@ -531,7 +531,8 @@ With the process API call, you can manage different FFmpeg processes. A process
"cleanup": [{
"pattern": "(memfs|diskfs):...",
"max_files: "number,
- "max_file_age_seconds": "number"
+ "max_file_age_seconds": "number",
+ "purge_on_delete: "(true|false)"
}]
},
... list of outputs ...
@@ -556,7 +557,8 @@ permitted maximum age for the files matching that pattern. The pattern starts wi
which filesystem this rule is designated to. Then a [glob pattern](https://pkg.go.dev/path/filepath#Match) follows to
identify the files. If `max_files` is set to a number > 0, then the oldest files from the matching files will be deleted if
the list of matching files is longer than that number. If `max_file_age_seconds` is set to a number > 0, then all files
-that are older than this number of seconds from the matching files will be deleted.
+that are older than this number of seconds from the matching files will be deleted. If `purge_on_delete` is set to `true`,
+then all matching files will be deleted when the process is deleted.
The API calls are
@@ -975,5 +977,4 @@ Before committing changes, you should run `make commit` to ensure that the sourc
## License
-See the [LICENSE](./LICENSE) file for licensing information.
-
+datarhei/core is licensed under the Apache License 2.0
diff --git a/app/version.go b/app/version.go
index 931fd961..591e4b46 100644
--- a/app/version.go
+++ b/app/version.go
@@ -29,8 +29,8 @@ func (v versionInfo) MinorString() string {
// Version of the app
var Version = versionInfo{
Major: 16,
- Minor: 7,
- Patch: 2,
+ Minor: 8,
+ Patch: 0,
}
// Commit is the git commit the app is build from. It should be filled in during compilation
diff --git a/docs/docs.go b/docs/docs.go
index 93a2832d..acc0ca4c 100644
--- a/docs/docs.go
+++ b/docs/docs.go
@@ -1,32 +1,23 @@
-// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
-// This file was generated by swaggo/swag at
-// 2022-03-31 16:22:16.716974 +0200 CEST m=+0.265947626
-
+// Package docs GENERATED BY SWAG; DO NOT EDIT
+// This file was generated by swaggo/swag
package docs
-import (
- "bytes"
- "encoding/json"
- "strings"
+import "github.com/swaggo/swag"
- "github.com/alecthomas/template"
- "github.com/swaggo/swag"
-)
-
-var doc = `{
+const docTemplate = `{
"schemes": {{ marshal .Schemes }},
"swagger": "2.0",
"info": {
- "description": "{{.Description}}",
+ "description": "{{escape .Description}}",
"title": "{{.Title}}",
"contact": {
- "name": "datarheiCORE Support",
+ "name": "datarhei Core Support",
"url": "https://www.datarhei.com",
"email": "hello@datarhei.com"
},
"license": {
- "name": "???",
- "url": "nothing"
+ "name": "Apache 2.0",
+ "url": "https://github.com/datarhei/core/blob/main/LICENSE"
},
"version": "{{.Version}}"
},
@@ -70,7 +61,9 @@ var doc = `{
"summary": "Load GraphQL playground",
"operationId": "graph-playground",
"responses": {
- "200": {}
+ "200": {
+ "description": ""
+ }
}
}
},
@@ -787,9 +780,7 @@ var doc = `{
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -830,17 +821,13 @@ var doc = `{
"name": "data",
"in": "body",
"required": true,
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
}
],
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -1247,9 +1234,7 @@ var doc = `{
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -1297,17 +1282,13 @@ var doc = `{
"name": "data",
"in": "body",
"required": true,
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
}
],
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -1849,12 +1830,6 @@ var doc = `{
"schema": {
"$ref": "#/definitions/api.SessionsSummary"
}
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/api.Error"
- }
}
}
}
@@ -1886,12 +1861,6 @@ var doc = `{
"schema": {
"$ref": "#/definitions/api.SessionsActive"
}
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/api.Error"
- }
}
}
}
@@ -2233,14 +2202,12 @@ var doc = `{
"type": "string"
},
"input": {
- "type": "object",
"$ref": "#/definitions/api.AVstreamIO"
},
"looping": {
"type": "boolean"
},
"output": {
- "type": "object",
"$ref": "#/definitions/api.AVstreamIO"
},
"queue": {
@@ -2294,7 +2261,6 @@ var doc = `{
"type": "integer"
},
"version": {
- "type": "object",
"$ref": "#/definitions/api.Version"
}
}
@@ -2319,17 +2285,467 @@ var doc = `{
"api.Config": {
"type": "object",
"properties": {
- "client": {
+ "config": {
+ "$ref": "#/definitions/api.ConfigData"
+ },
+ "created_at": {
"type": "string"
},
- "token": {
+ "loaded_at": {
"type": "string"
},
- "url": {
+ "overrides": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "updated_at": {
"type": "string"
}
}
},
+ "api.ConfigData": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "api": {
+ "type": "object",
+ "properties": {
+ "access": {
+ "type": "object",
+ "properties": {
+ "http": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "https": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "auth": {
+ "type": "object",
+ "properties": {
+ "auth0": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "tenants": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/config.Auth0Tenant"
+ }
+ }
+ }
+ },
+ "disable_localhost": {
+ "type": "boolean"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "jwt": {
+ "type": "object",
+ "properties": {
+ "secret": {
+ "type": "string"
+ }
+ }
+ },
+ "password": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ }
+ },
+ "read_only": {
+ "type": "boolean"
+ }
+ }
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "db": {
+ "type": "object",
+ "properties": {
+ "dir": {
+ "type": "string"
+ }
+ }
+ },
+ "debug": {
+ "type": "object",
+ "properties": {
+ "force_gc": {
+ "type": "integer"
+ },
+ "profiling": {
+ "type": "boolean"
+ }
+ }
+ },
+ "ffmpeg": {
+ "type": "object",
+ "properties": {
+ "access": {
+ "type": "object",
+ "properties": {
+ "input": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "output": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "binary": {
+ "type": "string"
+ },
+ "log": {
+ "type": "object",
+ "properties": {
+ "max_history": {
+ "type": "integer"
+ },
+ "max_lines": {
+ "type": "integer"
+ }
+ }
+ },
+ "max_processes": {
+ "type": "integer"
+ }
+ }
+ },
+ "host": {
+ "type": "object",
+ "properties": {
+ "auto": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "log": {
+ "type": "object",
+ "properties": {
+ "level": {
+ "type": "string",
+ "enum": [
+ "debug",
+ "info",
+ "warn",
+ "error",
+ "silent"
+ ]
+ },
+ "max_lines": {
+ "type": "integer"
+ },
+ "topics": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "metrics": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "enable_prometheus": {
+ "type": "boolean"
+ },
+ "interval_sec": {
+ "description": "seconds",
+ "type": "integer"
+ },
+ "range_sec": {
+ "description": "seconds",
+ "type": "integer"
+ }
+ }
+ },
+ "name": {
+ "type": "string"
+ },
+ "playout": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "max_port": {
+ "type": "integer"
+ },
+ "min_port": {
+ "type": "integer"
+ }
+ }
+ },
+ "router": {
+ "type": "object",
+ "properties": {
+ "blocked_prefixes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "routes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "ui_path": {
+ "type": "string"
+ }
+ }
+ },
+ "rtmp": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "app": {
+ "type": "string"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "enable_tls": {
+ "type": "boolean"
+ },
+ "token": {
+ "type": "string"
+ }
+ }
+ },
+ "service": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "token": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ },
+ "sessions": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "ip_ignorelist": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "max_bitrate_mbit": {
+ "type": "integer"
+ },
+ "max_sessions": {
+ "type": "integer"
+ },
+ "persist": {
+ "type": "boolean"
+ },
+ "persist_interval_sec": {
+ "type": "integer"
+ },
+ "session_timeout_sec": {
+ "type": "integer"
+ }
+ }
+ },
+ "storage": {
+ "type": "object",
+ "properties": {
+ "cors": {
+ "type": "object",
+ "properties": {
+ "origins": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "disk": {
+ "type": "object",
+ "properties": {
+ "cache": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "max_file_size_mbytes": {
+ "type": "integer"
+ },
+ "max_size_mbytes": {
+ "type": "integer"
+ },
+ "ttl_seconds": {
+ "type": "integer"
+ },
+ "types": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "dir": {
+ "type": "string"
+ },
+ "max_size_mbytes": {
+ "type": "integer"
+ }
+ }
+ },
+ "memory": {
+ "type": "object",
+ "properties": {
+ "auth": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "password": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ }
+ },
+ "max_size_mbytes": {
+ "type": "integer"
+ },
+ "purge": {
+ "type": "boolean"
+ }
+ }
+ },
+ "mimetypes_file": {
+ "type": "string"
+ }
+ }
+ },
+ "tls": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "auto": {
+ "type": "boolean"
+ },
+ "cert_file": {
+ "type": "string"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "key_file": {
+ "type": "string"
+ }
+ }
+ },
+ "update_check": {
+ "type": "boolean"
+ },
+ "version": {
+ "type": "integer"
+ }
+ }
+ },
"api.ConfigError": {
"type": "object",
"additionalProperties": {
@@ -2376,22 +2792,16 @@ var doc = `{
"query": {
"type": "string"
},
- "variables": {
- "type": "object"
- }
+ "variables": {}
}
},
"api.GraphResponse": {
"type": "object",
"properties": {
- "data": {
- "type": "object"
- },
+ "data": {},
"errors": {
"type": "array",
- "items": {
- "type": "object"
- }
+ "items": {}
}
}
},
@@ -2433,9 +2843,6 @@ var doc = `{
}
}
},
- "api.Metadata": {
- "type": "object"
- },
"api.MetricsQuery": {
"type": "object",
"properties": {
@@ -2448,7 +2855,7 @@ var doc = `{
"$ref": "#/definitions/api.MetricsQueryMetric"
}
},
- "timeframe_sec": {
+ "timerange_sec": {
"type": "integer"
}
}
@@ -2470,11 +2877,17 @@ var doc = `{
"api.MetricsResponse": {
"type": "object",
"properties": {
+ "interval_sec": {
+ "type": "integer"
+ },
"metrics": {
"type": "array",
"items": {
"$ref": "#/definitions/api.MetricsResponseMetric"
}
+ },
+ "timerange_sec": {
+ "type": "integer"
}
}
},
@@ -2493,23 +2906,29 @@ var doc = `{
"values": {
"type": "array",
"items": {
- "type": "array",
- "items": {
- "type": "number"
- }
+ "$ref": "#/definitions/api.MetricsResponseValue"
}
}
}
},
+ "api.MetricsResponseValue": {
+ "type": "object",
+ "properties": {
+ "ts": {
+ "type": "string"
+ },
+ "value": {
+ "type": "number"
+ }
+ }
+ },
"api.PlayoutStatus": {
"type": "object",
"properties": {
"aqueue": {
"type": "integer"
},
- "debug": {
- "type": "object"
- },
+ "debug": {},
"drop": {
"type": "integer"
},
@@ -2529,14 +2948,12 @@ var doc = `{
"type": "string"
},
"input": {
- "type": "object",
"$ref": "#/definitions/api.PlayoutStatusIO"
},
"looping": {
"type": "boolean"
},
"output": {
- "type": "object",
"$ref": "#/definitions/api.PlayoutStatusIO"
},
"queue": {
@@ -2546,7 +2963,6 @@ var doc = `{
"type": "integer"
},
"swap": {
- "type": "object",
"$ref": "#/definitions/api.PlayoutStatusSwap"
},
"url": {
@@ -2672,7 +3088,6 @@ var doc = `{
"type": "object",
"properties": {
"config": {
- "type": "object",
"$ref": "#/definitions/api.ProcessConfig"
},
"created_at": {
@@ -2681,19 +3096,14 @@ var doc = `{
"id": {
"type": "string"
},
- "metadata": {
- "type": "object",
- "$ref": "#/definitions/api.Metadata"
- },
+ "metadata": {},
"reference": {
"type": "string"
},
"report": {
- "type": "object",
"$ref": "#/definitions/api.ProcessReport"
},
"state": {
- "type": "object",
"$ref": "#/definitions/api.ProcessState"
},
"type": {
@@ -2704,10 +3114,8 @@ var doc = `{
"api.ProcessConfig": {
"type": "object",
"required": [
- "id",
"input",
- "output",
- "type"
+ "output"
],
"properties": {
"autostart": {
@@ -2723,7 +3131,6 @@ var doc = `{
}
},
"limits": {
- "type": "object",
"$ref": "#/definitions/api.ProcessConfigLimits"
},
"options": {
@@ -2753,7 +3160,8 @@ var doc = `{
"type": {
"type": "string",
"enum": [
- "ffmpeg"
+ "ffmpeg",
+ ""
]
}
}
@@ -2761,13 +3169,18 @@ var doc = `{
"api.ProcessConfigIO": {
"type": "object",
"required": [
- "address",
- "id"
+ "address"
],
"properties": {
"address": {
"type": "string"
},
+ "cleanup": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/api.ProcessConfigIOCleanup"
+ }
+ },
"id": {
"type": "string"
},
@@ -2779,6 +3192,26 @@ var doc = `{
}
}
},
+ "api.ProcessConfigIOCleanup": {
+ "type": "object",
+ "required": [
+ "pattern"
+ ],
+ "properties": {
+ "max_file_age_seconds": {
+ "type": "integer"
+ },
+ "max_files": {
+ "type": "integer"
+ },
+ "pattern": {
+ "type": "string"
+ },
+ "purge_on_delete": {
+ "type": "boolean"
+ }
+ }
+ },
"api.ProcessConfigLimits": {
"type": "object",
"properties": {
@@ -2870,7 +3303,6 @@ var doc = `{
"type": "string"
},
"progress": {
- "type": "object",
"$ref": "#/definitions/api.Progress"
},
"reconnect_seconds": {
@@ -2938,7 +3370,6 @@ var doc = `{
},
"avstream": {
"description": "avstream",
- "type": "object",
"$ref": "#/definitions/api.AVstream"
},
"bitrate_kbit": {
@@ -3091,11 +3522,9 @@ var doc = `{
"type": "object",
"properties": {
"active": {
- "type": "object",
"$ref": "#/definitions/api.SessionSummaryActive"
},
"summary": {
- "type": "object",
"$ref": "#/definitions/api.SessionSummarySummary"
}
}
@@ -3406,9 +3835,11 @@ var doc = `{
"type": "boolean"
},
"interval_sec": {
+ "description": "seconds",
"type": "integer"
},
"range_sec": {
+ "description": "seconds",
"type": "integer"
}
}
@@ -3444,6 +3875,9 @@ var doc = `{
"additionalProperties": {
"type": "string"
}
+ },
+ "ui_path": {
+ "type": "string"
}
}
},
@@ -3481,7 +3915,7 @@ var doc = `{
}
}
},
- "stats": {
+ "sessions": {
"type": "object",
"properties": {
"enable": {
@@ -3608,6 +4042,9 @@ var doc = `{
}
}
},
+ "update_check": {
+ "type": "boolean"
+ },
"version": {
"type": "integer"
}
@@ -3919,49 +4356,18 @@ var doc = `{
}
}`
-type swaggerInfo struct {
- Version string
- Host string
- BasePath string
- Schemes []string
- Title string
- Description string
-}
-
// SwaggerInfo holds exported Swagger Info so clients can modify it
-var SwaggerInfo = swaggerInfo{
- Version: "6.0",
- Host: "",
- BasePath: "/",
- Schemes: []string{},
- Title: "datarhei Core API",
- Description: "Expose REST API for the datarheiCORE",
-}
-
-type s struct{}
-
-func (s *s) ReadDoc() string {
- sInfo := SwaggerInfo
- sInfo.Description = strings.Replace(sInfo.Description, "\n", "\\n", -1)
-
- t, err := template.New("swagger_info").Funcs(template.FuncMap{
- "marshal": func(v interface{}) string {
- a, _ := json.Marshal(v)
- return string(a)
- },
- }).Parse(doc)
- if err != nil {
- return doc
- }
-
- var tpl bytes.Buffer
- if err := t.Execute(&tpl, sInfo); err != nil {
- return doc
- }
-
- return tpl.String()
+var SwaggerInfo = &swag.Spec{
+ Version: "3.0",
+ Host: "",
+ BasePath: "/",
+ Schemes: []string{},
+ Title: "datarhei Core API",
+ Description: "Expose REST API for the datarhei Core",
+ InfoInstanceName: "swagger",
+ SwaggerTemplate: docTemplate,
}
func init() {
- swag.Register(swag.Name, &s{})
+ swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
}
diff --git a/docs/swagger.json b/docs/swagger.json
index 8e57b655..b18a10a7 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -4,15 +4,15 @@
"description": "Expose REST API for the datarhei Core",
"title": "datarhei Core API",
"contact": {
- "name": "datarhei.com",
+ "name": "datarhei Core Support",
"url": "https://www.datarhei.com",
- "email": "support@datarhei.com"
+ "email": "hello@datarhei.com"
},
"license": {
- "name": "Apache License Version 2.0",
+ "name": "Apache 2.0",
"url": "https://github.com/datarhei/core/blob/main/LICENSE"
},
- "version": "6.0"
+ "version": "3.0"
},
"basePath": "/",
"paths": {
@@ -53,7 +53,9 @@
"summary": "Load GraphQL playground",
"operationId": "graph-playground",
"responses": {
- "200": {}
+ "200": {
+ "description": ""
+ }
}
}
},
@@ -770,9 +772,7 @@
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -813,17 +813,13 @@
"name": "data",
"in": "body",
"required": true,
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
}
],
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -1230,9 +1226,7 @@
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -1280,17 +1274,13 @@
"name": "data",
"in": "body",
"required": true,
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
}
],
"responses": {
"200": {
"description": "OK",
- "schema": {
- "$ref": "#/definitions/api.Metadata"
- }
+ "schema": {}
},
"400": {
"description": "Bad Request",
@@ -1832,12 +1822,6 @@
"schema": {
"$ref": "#/definitions/api.SessionsSummary"
}
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/api.Error"
- }
}
}
}
@@ -1869,12 +1853,6 @@
"schema": {
"$ref": "#/definitions/api.SessionsActive"
}
- },
- "404": {
- "description": "Not Found",
- "schema": {
- "$ref": "#/definitions/api.Error"
- }
}
}
}
@@ -2216,14 +2194,12 @@
"type": "string"
},
"input": {
- "type": "object",
"$ref": "#/definitions/api.AVstreamIO"
},
"looping": {
"type": "boolean"
},
"output": {
- "type": "object",
"$ref": "#/definitions/api.AVstreamIO"
},
"queue": {
@@ -2277,7 +2253,6 @@
"type": "integer"
},
"version": {
- "type": "object",
"$ref": "#/definitions/api.Version"
}
}
@@ -2302,17 +2277,467 @@
"api.Config": {
"type": "object",
"properties": {
- "client": {
+ "config": {
+ "$ref": "#/definitions/api.ConfigData"
+ },
+ "created_at": {
"type": "string"
},
- "token": {
+ "loaded_at": {
"type": "string"
},
- "url": {
+ "overrides": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "updated_at": {
"type": "string"
}
}
},
+ "api.ConfigData": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "api": {
+ "type": "object",
+ "properties": {
+ "access": {
+ "type": "object",
+ "properties": {
+ "http": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "https": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "auth": {
+ "type": "object",
+ "properties": {
+ "auth0": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "tenants": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/config.Auth0Tenant"
+ }
+ }
+ }
+ },
+ "disable_localhost": {
+ "type": "boolean"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "jwt": {
+ "type": "object",
+ "properties": {
+ "secret": {
+ "type": "string"
+ }
+ }
+ },
+ "password": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ }
+ },
+ "read_only": {
+ "type": "boolean"
+ }
+ }
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "db": {
+ "type": "object",
+ "properties": {
+ "dir": {
+ "type": "string"
+ }
+ }
+ },
+ "debug": {
+ "type": "object",
+ "properties": {
+ "force_gc": {
+ "type": "integer"
+ },
+ "profiling": {
+ "type": "boolean"
+ }
+ }
+ },
+ "ffmpeg": {
+ "type": "object",
+ "properties": {
+ "access": {
+ "type": "object",
+ "properties": {
+ "input": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "output": {
+ "type": "object",
+ "properties": {
+ "allow": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "block": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ },
+ "binary": {
+ "type": "string"
+ },
+ "log": {
+ "type": "object",
+ "properties": {
+ "max_history": {
+ "type": "integer"
+ },
+ "max_lines": {
+ "type": "integer"
+ }
+ }
+ },
+ "max_processes": {
+ "type": "integer"
+ }
+ }
+ },
+ "host": {
+ "type": "object",
+ "properties": {
+ "auto": {
+ "type": "boolean"
+ },
+ "name": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "id": {
+ "type": "string"
+ },
+ "log": {
+ "type": "object",
+ "properties": {
+ "level": {
+ "type": "string",
+ "enum": [
+ "debug",
+ "info",
+ "warn",
+ "error",
+ "silent"
+ ]
+ },
+ "max_lines": {
+ "type": "integer"
+ },
+ "topics": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "metrics": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "enable_prometheus": {
+ "type": "boolean"
+ },
+ "interval_sec": {
+ "description": "seconds",
+ "type": "integer"
+ },
+ "range_sec": {
+ "description": "seconds",
+ "type": "integer"
+ }
+ }
+ },
+ "name": {
+ "type": "string"
+ },
+ "playout": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "max_port": {
+ "type": "integer"
+ },
+ "min_port": {
+ "type": "integer"
+ }
+ }
+ },
+ "router": {
+ "type": "object",
+ "properties": {
+ "blocked_prefixes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "routes": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "string"
+ }
+ },
+ "ui_path": {
+ "type": "string"
+ }
+ }
+ },
+ "rtmp": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "app": {
+ "type": "string"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "enable_tls": {
+ "type": "boolean"
+ },
+ "token": {
+ "type": "string"
+ }
+ }
+ },
+ "service": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "token": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ },
+ "sessions": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "ip_ignorelist": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "max_bitrate_mbit": {
+ "type": "integer"
+ },
+ "max_sessions": {
+ "type": "integer"
+ },
+ "persist": {
+ "type": "boolean"
+ },
+ "persist_interval_sec": {
+ "type": "integer"
+ },
+ "session_timeout_sec": {
+ "type": "integer"
+ }
+ }
+ },
+ "storage": {
+ "type": "object",
+ "properties": {
+ "cors": {
+ "type": "object",
+ "properties": {
+ "origins": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "disk": {
+ "type": "object",
+ "properties": {
+ "cache": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "max_file_size_mbytes": {
+ "type": "integer"
+ },
+ "max_size_mbytes": {
+ "type": "integer"
+ },
+ "ttl_seconds": {
+ "type": "integer"
+ },
+ "types": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "dir": {
+ "type": "string"
+ },
+ "max_size_mbytes": {
+ "type": "integer"
+ }
+ }
+ },
+ "memory": {
+ "type": "object",
+ "properties": {
+ "auth": {
+ "type": "object",
+ "properties": {
+ "enable": {
+ "type": "boolean"
+ },
+ "password": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ }
+ },
+ "max_size_mbytes": {
+ "type": "integer"
+ },
+ "purge": {
+ "type": "boolean"
+ }
+ }
+ },
+ "mimetypes_file": {
+ "type": "string"
+ }
+ }
+ },
+ "tls": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "auto": {
+ "type": "boolean"
+ },
+ "cert_file": {
+ "type": "string"
+ },
+ "enable": {
+ "type": "boolean"
+ },
+ "key_file": {
+ "type": "string"
+ }
+ }
+ },
+ "update_check": {
+ "type": "boolean"
+ },
+ "version": {
+ "type": "integer"
+ }
+ }
+ },
"api.ConfigError": {
"type": "object",
"additionalProperties": {
@@ -2359,22 +2784,16 @@
"query": {
"type": "string"
},
- "variables": {
- "type": "object"
- }
+ "variables": {}
}
},
"api.GraphResponse": {
"type": "object",
"properties": {
- "data": {
- "type": "object"
- },
+ "data": {},
"errors": {
"type": "array",
- "items": {
- "type": "object"
- }
+ "items": {}
}
}
},
@@ -2416,9 +2835,6 @@
}
}
},
- "api.Metadata": {
- "type": "object"
- },
"api.MetricsQuery": {
"type": "object",
"properties": {
@@ -2431,7 +2847,7 @@
"$ref": "#/definitions/api.MetricsQueryMetric"
}
},
- "timeframe_sec": {
+ "timerange_sec": {
"type": "integer"
}
}
@@ -2453,11 +2869,17 @@
"api.MetricsResponse": {
"type": "object",
"properties": {
+ "interval_sec": {
+ "type": "integer"
+ },
"metrics": {
"type": "array",
"items": {
"$ref": "#/definitions/api.MetricsResponseMetric"
}
+ },
+ "timerange_sec": {
+ "type": "integer"
}
}
},
@@ -2476,23 +2898,29 @@
"values": {
"type": "array",
"items": {
- "type": "array",
- "items": {
- "type": "number"
- }
+ "$ref": "#/definitions/api.MetricsResponseValue"
}
}
}
},
+ "api.MetricsResponseValue": {
+ "type": "object",
+ "properties": {
+ "ts": {
+ "type": "string"
+ },
+ "value": {
+ "type": "number"
+ }
+ }
+ },
"api.PlayoutStatus": {
"type": "object",
"properties": {
"aqueue": {
"type": "integer"
},
- "debug": {
- "type": "object"
- },
+ "debug": {},
"drop": {
"type": "integer"
},
@@ -2512,14 +2940,12 @@
"type": "string"
},
"input": {
- "type": "object",
"$ref": "#/definitions/api.PlayoutStatusIO"
},
"looping": {
"type": "boolean"
},
"output": {
- "type": "object",
"$ref": "#/definitions/api.PlayoutStatusIO"
},
"queue": {
@@ -2529,7 +2955,6 @@
"type": "integer"
},
"swap": {
- "type": "object",
"$ref": "#/definitions/api.PlayoutStatusSwap"
},
"url": {
@@ -2655,7 +3080,6 @@
"type": "object",
"properties": {
"config": {
- "type": "object",
"$ref": "#/definitions/api.ProcessConfig"
},
"created_at": {
@@ -2664,19 +3088,14 @@
"id": {
"type": "string"
},
- "metadata": {
- "type": "object",
- "$ref": "#/definitions/api.Metadata"
- },
+ "metadata": {},
"reference": {
"type": "string"
},
"report": {
- "type": "object",
"$ref": "#/definitions/api.ProcessReport"
},
"state": {
- "type": "object",
"$ref": "#/definitions/api.ProcessState"
},
"type": {
@@ -2687,10 +3106,8 @@
"api.ProcessConfig": {
"type": "object",
"required": [
- "id",
"input",
- "output",
- "type"
+ "output"
],
"properties": {
"autostart": {
@@ -2706,7 +3123,6 @@
}
},
"limits": {
- "type": "object",
"$ref": "#/definitions/api.ProcessConfigLimits"
},
"options": {
@@ -2736,7 +3152,8 @@
"type": {
"type": "string",
"enum": [
- "ffmpeg"
+ "ffmpeg",
+ ""
]
}
}
@@ -2744,13 +3161,18 @@
"api.ProcessConfigIO": {
"type": "object",
"required": [
- "address",
- "id"
+ "address"
],
"properties": {
"address": {
"type": "string"
},
+ "cleanup": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/api.ProcessConfigIOCleanup"
+ }
+ },
"id": {
"type": "string"
},
@@ -2762,6 +3184,26 @@
}
}
},
+ "api.ProcessConfigIOCleanup": {
+ "type": "object",
+ "required": [
+ "pattern"
+ ],
+ "properties": {
+ "max_file_age_seconds": {
+ "type": "integer"
+ },
+ "max_files": {
+ "type": "integer"
+ },
+ "pattern": {
+ "type": "string"
+ },
+ "purge_on_delete": {
+ "type": "boolean"
+ }
+ }
+ },
"api.ProcessConfigLimits": {
"type": "object",
"properties": {
@@ -2853,7 +3295,6 @@
"type": "string"
},
"progress": {
- "type": "object",
"$ref": "#/definitions/api.Progress"
},
"reconnect_seconds": {
@@ -2921,7 +3362,6 @@
},
"avstream": {
"description": "avstream",
- "type": "object",
"$ref": "#/definitions/api.AVstream"
},
"bitrate_kbit": {
@@ -3074,11 +3514,9 @@
"type": "object",
"properties": {
"active": {
- "type": "object",
"$ref": "#/definitions/api.SessionSummaryActive"
},
"summary": {
- "type": "object",
"$ref": "#/definitions/api.SessionSummarySummary"
}
}
@@ -3389,9 +3827,11 @@
"type": "boolean"
},
"interval_sec": {
+ "description": "seconds",
"type": "integer"
},
"range_sec": {
+ "description": "seconds",
"type": "integer"
}
}
@@ -3427,6 +3867,9 @@
"additionalProperties": {
"type": "string"
}
+ },
+ "ui_path": {
+ "type": "string"
}
}
},
@@ -3464,7 +3907,7 @@
}
}
},
- "stats": {
+ "sessions": {
"type": "object",
"properties": {
"enable": {
@@ -3591,6 +4034,9 @@
}
}
},
+ "update_check": {
+ "type": "boolean"
+ },
"version": {
"type": "integer"
}
@@ -3900,4 +4346,4 @@
"type": "basic"
}
}
-}
+}
\ No newline at end of file
diff --git a/docs/swagger.yaml b/docs/swagger.yaml
index 5df7e0c2..0dca2262 100644
--- a/docs/swagger.yaml
+++ b/docs/swagger.yaml
@@ -16,12 +16,10 @@ definitions:
type: string
input:
$ref: '#/definitions/api.AVstreamIO'
- type: object
looping:
type: boolean
output:
$ref: '#/definitions/api.AVstreamIO'
- type: object
queue:
type: integer
type: object
@@ -57,7 +55,6 @@ definitions:
type: integer
version:
$ref: '#/definitions/api.Version'
- type: object
type: object
api.Command:
properties:
@@ -73,13 +70,305 @@ definitions:
type: object
api.Config:
properties:
- client:
+ config:
+ $ref: '#/definitions/api.ConfigData'
+ created_at:
type: string
- token:
+ loaded_at:
type: string
- url:
+ overrides:
+ items:
+ type: string
+ type: array
+ updated_at:
type: string
type: object
+ api.ConfigData:
+ properties:
+ address:
+ type: string
+ api:
+ properties:
+ access:
+ properties:
+ http:
+ properties:
+ allow:
+ items:
+ type: string
+ type: array
+ block:
+ items:
+ type: string
+ type: array
+ type: object
+ https:
+ properties:
+ allow:
+ items:
+ type: string
+ type: array
+ block:
+ items:
+ type: string
+ type: array
+ type: object
+ type: object
+ auth:
+ properties:
+ auth0:
+ properties:
+ enable:
+ type: boolean
+ tenants:
+ items:
+ $ref: '#/definitions/config.Auth0Tenant'
+ type: array
+ type: object
+ disable_localhost:
+ type: boolean
+ enable:
+ type: boolean
+ jwt:
+ properties:
+ secret:
+ type: string
+ type: object
+ password:
+ type: string
+ username:
+ type: string
+ type: object
+ read_only:
+ type: boolean
+ type: object
+ created_at:
+ type: string
+ db:
+ properties:
+ dir:
+ type: string
+ type: object
+ debug:
+ properties:
+ force_gc:
+ type: integer
+ profiling:
+ type: boolean
+ type: object
+ ffmpeg:
+ properties:
+ access:
+ properties:
+ input:
+ properties:
+ allow:
+ items:
+ type: string
+ type: array
+ block:
+ items:
+ type: string
+ type: array
+ type: object
+ output:
+ properties:
+ allow:
+ items:
+ type: string
+ type: array
+ block:
+ items:
+ type: string
+ type: array
+ type: object
+ type: object
+ binary:
+ type: string
+ log:
+ properties:
+ max_history:
+ type: integer
+ max_lines:
+ type: integer
+ type: object
+ max_processes:
+ type: integer
+ type: object
+ host:
+ properties:
+ auto:
+ type: boolean
+ name:
+ items:
+ type: string
+ type: array
+ type: object
+ id:
+ type: string
+ log:
+ properties:
+ level:
+ enum:
+ - debug
+ - info
+ - warn
+ - error
+ - silent
+ type: string
+ max_lines:
+ type: integer
+ topics:
+ items:
+ type: string
+ type: array
+ type: object
+ metrics:
+ properties:
+ enable:
+ type: boolean
+ enable_prometheus:
+ type: boolean
+ interval_sec:
+ description: seconds
+ type: integer
+ range_sec:
+ description: seconds
+ type: integer
+ type: object
+ name:
+ type: string
+ playout:
+ properties:
+ enable:
+ type: boolean
+ max_port:
+ type: integer
+ min_port:
+ type: integer
+ type: object
+ router:
+ properties:
+ blocked_prefixes:
+ items:
+ type: string
+ type: array
+ routes:
+ additionalProperties:
+ type: string
+ type: object
+ ui_path:
+ type: string
+ type: object
+ rtmp:
+ properties:
+ address:
+ type: string
+ app:
+ type: string
+ enable:
+ type: boolean
+ enable_tls:
+ type: boolean
+ token:
+ type: string
+ type: object
+ service:
+ properties:
+ enable:
+ type: boolean
+ token:
+ type: string
+ url:
+ type: string
+ type: object
+ sessions:
+ properties:
+ enable:
+ type: boolean
+ ip_ignorelist:
+ items:
+ type: string
+ type: array
+ max_bitrate_mbit:
+ type: integer
+ max_sessions:
+ type: integer
+ persist:
+ type: boolean
+ persist_interval_sec:
+ type: integer
+ session_timeout_sec:
+ type: integer
+ type: object
+ storage:
+ properties:
+ cors:
+ properties:
+ origins:
+ items:
+ type: string
+ type: array
+ type: object
+ disk:
+ properties:
+ cache:
+ properties:
+ enable:
+ type: boolean
+ max_file_size_mbytes:
+ type: integer
+ max_size_mbytes:
+ type: integer
+ ttl_seconds:
+ type: integer
+ types:
+ items:
+ type: string
+ type: array
+ type: object
+ dir:
+ type: string
+ max_size_mbytes:
+ type: integer
+ type: object
+ memory:
+ properties:
+ auth:
+ properties:
+ enable:
+ type: boolean
+ password:
+ type: string
+ username:
+ type: string
+ type: object
+ max_size_mbytes:
+ type: integer
+ purge:
+ type: boolean
+ type: object
+ mimetypes_file:
+ type: string
+ type: object
+ tls:
+ properties:
+ address:
+ type: string
+ auto:
+ type: boolean
+ cert_file:
+ type: string
+ enable:
+ type: boolean
+ key_file:
+ type: string
+ type: object
+ update_check:
+ type: boolean
+ version:
+ type: integer
+ type: object
api.ConfigError:
additionalProperties:
items:
@@ -110,16 +399,13 @@ definitions:
properties:
query:
type: string
- variables:
- type: object
+ variables: {}
type: object
api.GraphResponse:
properties:
- data:
- type: object
+ data: {}
errors:
- items:
- type: object
+ items: {}
type: array
type: object
api.JWT:
@@ -147,8 +433,6 @@ definitions:
- password
- username
type: object
- api.Metadata:
- type: object
api.MetricsQuery:
properties:
interval_sec:
@@ -157,7 +441,7 @@ definitions:
items:
$ref: '#/definitions/api.MetricsQueryMetric'
type: array
- timeframe_sec:
+ timerange_sec:
type: integer
type: object
api.MetricsQueryMetric:
@@ -171,10 +455,14 @@ definitions:
type: object
api.MetricsResponse:
properties:
+ interval_sec:
+ type: integer
metrics:
items:
$ref: '#/definitions/api.MetricsResponseMetric'
type: array
+ timerange_sec:
+ type: integer
type: object
api.MetricsResponseMetric:
properties:
@@ -186,17 +474,21 @@ definitions:
type: string
values:
items:
- items:
- type: number
- type: array
+ $ref: '#/definitions/api.MetricsResponseValue'
type: array
type: object
+ api.MetricsResponseValue:
+ properties:
+ ts:
+ type: string
+ value:
+ type: number
+ type: object
api.PlayoutStatus:
properties:
aqueue:
type: integer
- debug:
- type: object
+ debug: {}
drop:
type: integer
dup:
@@ -211,19 +503,16 @@ definitions:
type: string
input:
$ref: '#/definitions/api.PlayoutStatusIO'
- type: object
looping:
type: boolean
output:
$ref: '#/definitions/api.PlayoutStatusIO'
- type: object
queue:
type: integer
stream:
type: integer
swap:
$ref: '#/definitions/api.PlayoutStatusSwap'
- type: object
url:
type: string
type: object
@@ -307,22 +596,17 @@ definitions:
properties:
config:
$ref: '#/definitions/api.ProcessConfig'
- type: object
created_at:
type: integer
id:
type: string
- metadata:
- $ref: '#/definitions/api.Metadata'
- type: object
+ metadata: {}
reference:
type: string
report:
$ref: '#/definitions/api.ProcessReport'
- type: object
state:
$ref: '#/definitions/api.ProcessState'
- type: object
type:
type: string
type: object
@@ -338,7 +622,6 @@ definitions:
type: array
limits:
$ref: '#/definitions/api.ProcessConfigLimits'
- type: object
options:
items:
type: string
@@ -358,17 +641,20 @@ definitions:
type:
enum:
- ffmpeg
+ - ""
type: string
required:
- - id
- input
- output
- - type
type: object
api.ProcessConfigIO:
properties:
address:
type: string
+ cleanup:
+ items:
+ $ref: '#/definitions/api.ProcessConfigIOCleanup'
+ type: array
id:
type: string
options:
@@ -377,7 +663,19 @@ definitions:
type: array
required:
- address
- - id
+ type: object
+ api.ProcessConfigIOCleanup:
+ properties:
+ max_file_age_seconds:
+ type: integer
+ max_files:
+ type: integer
+ pattern:
+ type: string
+ purge_on_delete:
+ type: boolean
+ required:
+ - pattern
type: object
api.ProcessConfigLimits:
properties:
@@ -440,7 +738,6 @@ definitions:
type: string
progress:
$ref: '#/definitions/api.Progress'
- type: object
reconnect_seconds:
type: integer
runtime_seconds:
@@ -486,7 +783,6 @@ definitions:
avstream:
$ref: '#/definitions/api.AVstream'
description: avstream
- type: object
bitrate_kbit:
description: kbit/s
type: number
@@ -589,10 +885,8 @@ definitions:
properties:
active:
$ref: '#/definitions/api.SessionSummaryActive'
- type: object
summary:
$ref: '#/definitions/api.SessionSummarySummary'
- type: object
type: object
api.SessionSummaryActive:
properties:
@@ -795,8 +1089,10 @@ definitions:
enable_prometheus:
type: boolean
interval_sec:
+ description: seconds
type: integer
range_sec:
+ description: seconds
type: integer
type: object
name:
@@ -820,6 +1116,8 @@ definitions:
additionalProperties:
type: string
type: object
+ ui_path:
+ type: string
type: object
rtmp:
properties:
@@ -843,7 +1141,7 @@ definitions:
url:
type: string
type: object
- stats:
+ sessions:
properties:
enable:
type: boolean
@@ -925,6 +1223,8 @@ definitions:
key_file:
type: string
type: object
+ update_check:
+ type: boolean
version:
type: integer
type: object
@@ -1114,14 +1414,14 @@ definitions:
info:
contact:
email: hello@datarhei.com
- name: datarheiCORE Support
+ name: datarhei Core Support
url: https://www.datarhei.com
- description: Expose REST API for the datarheiCORE
+ description: Expose REST API for the datarhei Core
license:
- name: ???
- url: nothing
+ name: Apache 2.0
+ url: https://github.com/datarhei/core/blob/main/LICENSE
title: datarhei Core API
- version: "6.0"
+ version: "3.0"
paths:
/{path}:
get:
@@ -1173,7 +1473,8 @@ paths:
produces:
- text/html
responses:
- "200": {}
+ "200":
+ description: ""
security:
- ApiKeyAuth: []
summary: Load GraphQL playground
@@ -1639,8 +1940,7 @@ paths:
responses:
"200":
description: OK
- schema:
- $ref: '#/definitions/api.Metadata'
+ schema: {}
"400":
description: Bad Request
schema:
@@ -1667,15 +1967,13 @@ paths:
in: body
name: data
required: true
- schema:
- $ref: '#/definitions/api.Metadata'
+ schema: {}
produces:
- application/json
responses:
"200":
description: OK
- schema:
- $ref: '#/definitions/api.Metadata'
+ schema: {}
"400":
description: Bad Request
schema:
@@ -1943,8 +2241,7 @@ paths:
responses:
"200":
description: OK
- schema:
- $ref: '#/definitions/api.Metadata'
+ schema: {}
"400":
description: Bad Request
schema:
@@ -1977,15 +2274,13 @@ paths:
in: body
name: data
required: true
- schema:
- $ref: '#/definitions/api.Metadata'
+ schema: {}
produces:
- application/json
responses:
"200":
description: OK
- schema:
- $ref: '#/definitions/api.Metadata'
+ schema: {}
"400":
description: Bad Request
schema:
@@ -2340,10 +2635,6 @@ paths:
description: Sessions summary
schema:
$ref: '#/definitions/api.SessionsSummary'
- "404":
- description: Not Found
- schema:
- $ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: Get a summary of all active and past sessions
@@ -2364,10 +2655,6 @@ paths:
description: Active sessions listing
schema:
$ref: '#/definitions/api.SessionsActive'
- "404":
- description: Not Found
- schema:
- $ref: '#/definitions/api.Error'
security:
- ApiKeyAuth: []
summary: Get a minimal summary of all active sessions
diff --git a/ffmpeg/skills/v4l2.go b/ffmpeg/skills/v4l2.go
index 5d5a174c..7f7cd954 100644
--- a/ffmpeg/skills/v4l2.go
+++ b/ffmpeg/skills/v4l2.go
@@ -17,10 +17,7 @@ func DevicesV4L() ([]HWDevice, error) {
cmd := exec.Command("v4l2-ctl", "--list-devices")
cmd.Env = []string{}
cmd.Stdout = buf
- err := cmd.Run()
- if err != nil {
- return devices, err
- }
+ cmd.Run()
devices = parseV4LDevices(buf)
diff --git a/go.mod b/go.mod
index 0f64663f..a31c7422 100644
--- a/go.mod
+++ b/go.mod
@@ -3,41 +3,37 @@ module github.com/datarhei/core
go 1.16
require (
- github.com/99designs/gqlgen v0.17.1
- github.com/agnivade/levenshtein v1.1.1 // indirect
+ github.com/99designs/gqlgen v0.17.9
github.com/alecthomas/jsonschema v0.0.0-20211228220459-151e3c21f49d
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
github.com/atrox/haikunatorgo/v2 v2.0.1
github.com/datarhei/joy4 v0.0.0-20210125162555-2102a8289cce
+ github.com/go-openapi/spec v0.20.6 // indirect
github.com/go-openapi/swag v0.21.1 // indirect
- github.com/go-playground/validator/v10 v10.10.1
- github.com/golang-jwt/jwt/v4 v4.3.0
+ github.com/go-playground/validator/v10 v10.11.0
+ github.com/golang-jwt/jwt/v4 v4.4.1
github.com/google/uuid v1.3.0
- github.com/gorilla/websocket v1.5.0 // indirect
- github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/iancoleman/orderedmap v0.2.0 // indirect
github.com/joho/godotenv v1.4.0
- github.com/labstack/echo/v4 v4.7.0
+ github.com/labstack/echo/v4 v4.7.2
github.com/lithammer/shortuuid/v4 v4.0.0
- github.com/lufia/plan9stats v0.0.0-20220305071607-d0b38dbe16db // indirect
- github.com/mattn/go-colorable v0.1.12 // indirect
+ github.com/lufia/plan9stats v0.0.0-20220517141722-cf486979b281 // indirect
github.com/mattn/go-isatty v0.0.14
- github.com/mitchellh/mapstructure v1.4.3 // indirect
+ github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/prep/average v0.0.0-20200506183628-d26c465f48c3
- github.com/prometheus/client_golang v1.12.1
- github.com/shirou/gopsutil/v3 v3.22.2
- github.com/stretchr/testify v1.7.0
- github.com/swaggo/echo-swagger v1.3.0
- github.com/swaggo/swag v1.8.0
- github.com/tklauser/go-sysconf v0.3.10 // indirect
- github.com/vektah/gqlparser/v2 v2.4.1
+ github.com/prometheus/client_golang v1.12.2
+ github.com/prometheus/common v0.34.0 // indirect
+ github.com/shirou/gopsutil/v3 v3.22.4
+ github.com/stretchr/testify v1.7.1
+ github.com/swaggo/echo-swagger v1.3.2
+ github.com/swaggo/swag v1.8.2
+ github.com/tklauser/numcpus v0.5.0 // indirect
+ github.com/vektah/gqlparser/v2 v2.4.4
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonschema v1.2.0
- golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70
- golang.org/x/mod v0.5.1
- golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
- golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 // indirect
- golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 // indirect
- google.golang.org/protobuf v1.27.1 // indirect
+ golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
+ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
+ golang.org/x/net v0.0.0-20220526153639-5463443f8c37 // indirect
+ golang.org/x/time v0.0.0-20220411224347-583f2d630306 // indirect
)
diff --git a/go.sum b/go.sum
index acec596d..62c911bf 100644
--- a/go.sum
+++ b/go.sum
@@ -31,20 +31,17 @@ cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohl
cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs=
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
-github.com/99designs/gqlgen v0.17.1 h1:i2qQMPKHQjHgBWYIpO4TsaQpPqMHCPK1+h95ipvH8VU=
-github.com/99designs/gqlgen v0.17.1/go.mod h1:K5fzLKwtph+FFgh9j7nFbRUdBKvTcGnsta51fsMTn3o=
+github.com/99designs/gqlgen v0.17.9 h1:0XvE3nMaTaLYq7XbBz1MY0t9BFcntydlt1zzNa4eY+4=
+github.com/99designs/gqlgen v0.17.9/go.mod h1:PThAZAK9t2pAat7g8QdSI4dCBMOhBO+t2qj+0jvDqps=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/KyleBanks/depth v1.2.1 h1:5h8fQADFrWtarTdtDudMmGsC7GPbOAu6RVB3ffsVFHc=
github.com/KyleBanks/depth v1.2.1/go.mod h1:jzSb9d0L43HxTQfT+oSA1EEp2q+ne2uh6XgeJcm8brE=
-github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
-github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs=
github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
-github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/alecthomas/jsonschema v0.0.0-20211228220459-151e3c21f49d h1:4BQNwS4T13UU3Yee4GfzZH3Q9SNpKeJvLigfw8fDjX0=
@@ -83,7 +80,6 @@ github.com/datarhei/joy4 v0.0.0-20210125162555-2102a8289cce/go.mod h1:Jcw/6jZDQQ
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
@@ -97,18 +93,22 @@ github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2
github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
+github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
+github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY=
github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0=
github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY=
github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg=
-github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs=
github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns=
-github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M=
+github.com/go-openapi/jsonreference v0.20.0 h1:MYlu0sBgChmCfJxxUKZ8g1cPWFOB37YSZqewK7OKeyA=
+github.com/go-openapi/jsonreference v0.20.0/go.mod h1:Ag74Ico3lPc+zR+qjn4XBUmXymS4zJbYVCZmcgkasdo=
github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I=
+github.com/go-openapi/spec v0.20.6 h1:ich1RQ3WDbfoeTqTAb+5EIxNmpKVJZWBNah9RAT0jIQ=
+github.com/go-openapi/spec v0.20.6/go.mod h1:2OpW+JddWPrpXSCIX8eOx7lZ5iyuWj3RYR6VaaBKcWA=
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
github.com/go-openapi/swag v0.21.1 h1:wm0rhTb5z7qpJRHBdPOMuY4QjVUMbF6/kwoYeRAOrKU=
@@ -119,14 +119,14 @@ github.com/go-playground/locales v0.14.0 h1:u50s323jtVGugKlcYeyzC0etD1HifMjqmJqb
github.com/go-playground/locales v0.14.0/go.mod h1:sawfccIbzZTqEDETgFXqTho0QybSa7l++s0DH+LDiLs=
github.com/go-playground/universal-translator v0.18.0 h1:82dyy6p4OuJq4/CByFNOn/jYrnRPArHwAcmLoJZxyho=
github.com/go-playground/universal-translator v0.18.0/go.mod h1:UvRDBj+xPUEGrFYl+lu/H90nyDXpg0fqeB/AQUGNTVA=
-github.com/go-playground/validator/v10 v10.10.1 h1:uA0+amWMiglNZKZ9FJRKUAe9U3RX91eVn1JYXMWt7ig=
-github.com/go-playground/validator/v10 v10.10.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
+github.com/go-playground/validator/v10 v10.11.0 h1:0W+xRM511GY47Yy3bZUbJVitCNg2BOGlCyvTqsp/xIw=
+github.com/go-playground/validator/v10 v10.11.0/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
-github.com/golang-jwt/jwt/v4 v4.3.0 h1:kHL1vqdqWNfATmA0FNMdmZNMyZI1U6O31X4rlIPoBog=
-github.com/golang-jwt/jwt/v4 v4.3.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
+github.com/golang-jwt/jwt/v4 v4.4.1 h1:pC5DB52sCeK48Wlb9oPcdhnjkz1TKt1D/P7WKJ0kUcQ=
+github.com/golang-jwt/jwt/v4 v4.4.1/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
@@ -167,8 +167,9 @@ github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o=
github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
+github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -185,7 +186,6 @@ github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@@ -223,10 +223,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
-github.com/labstack/echo/v4 v4.1.14/go.mod h1:Q5KZ1vD3V5FEzjM79hjwVrC3ABr7F5IdM23bXQMRDGg=
-github.com/labstack/echo/v4 v4.7.0 h1:8wHgZhoE9OT1NSLw6sfrX7ZGpWMtO5Zlfr68+BIo180=
-github.com/labstack/echo/v4 v4.7.0/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
-github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
+github.com/labstack/echo/v4 v4.7.2 h1:Kv2/p8OaQ+M6Ex4eGimg9b9e6icoxA42JSlOR3msKtI=
+github.com/labstack/echo/v4 v4.7.2/go.mod h1:xkCDAdFCIf8jsFQ5NnbK7oqaF/yU1A1X20Ltm0OvSks=
github.com/labstack/gommon v0.3.1 h1:OomWaJXm7xR6L1HmEtGyQf26TEn7V6X88mktX9kee9o=
github.com/labstack/gommon v0.3.1/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM=
github.com/leodido/go-urn v1.2.1 h1:BqpAaACuzVSgi/VLzGZIobT2z4v53pjosyNd9Yv6n/w=
@@ -235,31 +233,25 @@ github.com/lithammer/shortuuid/v4 v4.0.0 h1:QRbbVkfgNippHOS8PXDkti4NaWeyYfcBTHtw
github.com/lithammer/shortuuid/v4 v4.0.0/go.mod h1:Zs8puNcrvf2rV9rTH51ZLLcj7ZXqQI3lv67aw4KiB1Y=
github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
-github.com/lufia/plan9stats v0.0.0-20220305071607-d0b38dbe16db h1:QT3DrSQsMWGKZMArbkP9FlS2ZnPLA2z8D7fU+G3BZ3o=
-github.com/lufia/plan9stats v0.0.0-20220305071607-d0b38dbe16db/go.mod h1:VgrrWVwBO2+6XKn8ypT3WUqvoxCa8R2M5to2tRzGovI=
+github.com/lufia/plan9stats v0.0.0-20220517141722-cf486979b281 h1:aczX6NMOtt6L4YT0fQvKkDK6LZEtdOso9sUH89V1+P0=
+github.com/lufia/plan9stats v0.0.0-20220517141722-cf486979b281/go.mod h1:lc+czkgO/8F7puNki5jk8QyujbfK1LOT7Wl0ON2hxyk=
github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
-github.com/matryer/moq v0.2.3 h1:Q06vEqnBYjjfx5KKgHfYRKE/lvlRu+Nj+xodG4YdHnU=
-github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE=
-github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
+github.com/matryer/moq v0.2.7 h1:RtpiPUM8L7ZSCbSwK+QcZH/E9tgqAkFjKQxsRs25b4w=
+github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk=
github.com/mattn/go-colorable v0.1.11/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
-github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
-github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
-github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
-github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
+github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
@@ -268,7 +260,6 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE=
github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U=
github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
@@ -289,8 +280,9 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M=
github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
-github.com/prometheus/client_golang v1.12.1 h1:ZiaPsmm9uiBeaSMRznKsCDNtPCS0T3JVDGF+06gjBzk=
github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
+github.com/prometheus/client_golang v1.12.2 h1:51L9cDoUHVrXx4zWYlcLQIZ+d+VXHgqnYKkIuq4g/34=
+github.com/prometheus/client_golang v1.12.2/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@@ -299,8 +291,9 @@ github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6T
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
-github.com/prometheus/common v0.32.1 h1:hWIdL3N2HoUx3B8j3YN9mWor0qhY/NlEKZEaXxuIRh4=
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
+github.com/prometheus/common v0.34.0 h1:RBmGO9d/FVjqHT0yUGQwBJhkwKV+wPCn7KGpvfab0uE=
+github.com/prometheus/common v0.34.0/go.mod h1:gB3sOl7P0TvJabZpLY5uQMpUqRCPPCyRLCZYc7JZTNE=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU=
@@ -316,8 +309,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/shirou/gopsutil/v3 v3.22.2 h1:wCrArWFkHYIdDxx/FSfF5RB4dpJYW6t7rcp3+zL8uks=
-github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY=
+github.com/shirou/gopsutil/v3 v3.22.4 h1:srAQaiX6jX/cYL6q29aE0m8lOskT9CurZ9N61YR3yoI=
+github.com/shirou/gopsutil/v3 v3.22.4/go.mod h1:D01hZJ4pVHPpCTZ3m3T2+wDF2YAGfd+H4ifUguaQzHM=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo=
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
@@ -331,32 +324,30 @@ github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UV
github.com/stretchr/testify v1.3.1-0.20190311161405-34c6fa2dc709/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/swaggo/echo-swagger v1.3.0 h1:xxL/4jbCY4Z3udUvqOas+IpTMKbxrKdEKwtS7He0Qhg=
-github.com/swaggo/echo-swagger v1.3.0/go.mod h1:snY6MlGK+pQAfJNEfX5qaOzt/QuM/WINVxGgQaZVJgg=
+github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/swaggo/echo-swagger v1.3.2 h1:D+3BNl8JMC6pKhA+egjh4LGI0jNesqlt77WahTHfTXQ=
+github.com/swaggo/echo-swagger v1.3.2/go.mod h1:Sjj0O7Puf939HXhxhfZdR49MIrtcg3mLgdg3/qVcbyw=
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 h1:+iNTcqQJy0OZ5jk6a5NLib47eqXK8uYcPX+O4+cBpEM=
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
-github.com/swaggo/swag v1.7.9/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU=
-github.com/swaggo/swag v1.8.0 h1:80NNhvpJcuItNpBDqgJwDuKlMmaZ/OATOzhG3bhcM3w=
-github.com/swaggo/swag v1.8.0/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU=
-github.com/tklauser/go-sysconf v0.3.9/go.mod h1:11DU/5sG7UexIrp/O6g35hrWzu0JxlwQ3LSFUzyeuhs=
+github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
+github.com/swaggo/swag v1.8.2 h1:D4aBiVS2a65zhyk3WFqOUz7Rz0sOaUcgeErcid5uGL4=
+github.com/swaggo/swag v1.8.2/go.mod h1:jMLeXOOmYyjk8PvHTsXBdrubsNd9gUJTTCzL5iBnseg=
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
github.com/tklauser/go-sysconf v0.3.10/go.mod h1:C8XykCvCb+Gn0oNCWPIlcb0RuglQTYaQ2hGm7jmxEFk=
-github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8=
-github.com/tklauser/numcpus v0.4.0 h1:E53Dm1HjH1/R2/aoCtXtPgzmElmn51aOkhCFSuZq//o=
github.com/tklauser/numcpus v0.4.0/go.mod h1:1+UI3pD8NW14VMwdgJNJ1ESk2UnwhAnz5hMwiKKqXCQ=
-github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
+github.com/tklauser/numcpus v0.5.0 h1:ooe7gN0fg6myJ0EKoTAf5hebTZrH52px3New/D9iJ+A=
+github.com/tklauser/numcpus v0.5.0/go.mod h1:OGzpTxpcIMNGYQdit2BYL1pvk/dSOaJWjKoflh+RQjo=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
+github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4=
+github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
-github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
-github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
github.com/valyala/fasttemplate v1.2.1 h1:TVEnxayobAdVkhQfrfes2IzOB6o+z4roRkPF52WA1u4=
github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ=
-github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
-github.com/vektah/gqlparser/v2 v2.4.1 h1:QOyEn8DAPMUMARGMeshKDkDgNmVoEaEGiDB0uWxcSlQ=
-github.com/vektah/gqlparser/v2 v2.4.1/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
+github.com/vektah/gqlparser/v2 v2.4.4 h1:rh9hwZ5Jx9cCq88zXz2YHKmuQBuwY1JErHU8GywFdwE=
+github.com/vektah/gqlparser/v2 v2.4.4/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo=
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
@@ -364,6 +355,8 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHo
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -381,13 +374,13 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.0.0-20220131195533-30dcbda58838/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70 h1:syTAU9FwmvzEoIYMqcPHOcVm4H3U5u90WsvuYgwpETU=
-golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM=
+golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -419,8 +412,9 @@ golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzB
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -456,14 +450,17 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220225172249-27dd8689420f h1:oA4XRj0qtSt8Yo1Zms0CUlsT3KG69V2UGQWPBxujDmc=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220526153639-5463443f8c37 h1:lUkvobShwKsOesNfWWlCS5q7fnbG1MEliIzwu886fn8=
+golang.org/x/net v0.0.0-20220526153639-5463443f8c37/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -478,7 +475,6 @@ golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5h
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -487,15 +483,12 @@ golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -520,17 +513,16 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210816074244-15123e1e1f71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211103235746-7861aae1554b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220204135822-1c1b9b1eba6a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7 h1:8IVLkfbr2cLhv0a/vKq4UFUcJym8RmDoDboxCFWEjYE=
-golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
+golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -545,8 +537,8 @@ golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxb
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.0.0-20220224211638-0e9765cccd65 h1:M73Iuj3xbbb9Uk1DYhzydthsj6oOd6l9bpuFcNoUvTs=
-golang.org/x/time v0.0.0-20220224211638-0e9765cccd65/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20220411224347-583f2d630306 h1:+gHMid33q6pen7kv9xvT+JRinntgeXO2AeZVd0AWD3w=
+golang.org/x/time v0.0.0-20220411224347-583f2d630306/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -587,11 +579,11 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE=
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
-golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
+golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=
+golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -672,8 +664,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ=
-google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
diff --git a/http/api/probe.go b/http/api/probe.go
index b116f9ac..92c58325 100644
--- a/http/api/probe.go
+++ b/http/api/probe.go
@@ -17,11 +17,11 @@ type ProbeIO struct {
Type string `json:"type"`
Codec string `json:"codec"`
Coder string `json:"coder"`
- Bitrate json.Number `json:"bitrate_kbps"`
- Duration json.Number `json:"duration_sec"`
+ Bitrate json.Number `json:"bitrate_kbps" swaggertype:"number"`
+ Duration json.Number `json:"duration_sec" swaggertype:"number"`
// video
- FPS json.Number `json:"fps"`
+ FPS json.Number `json:"fps" swaggertype:"number"`
Pixfmt string `json:"pix_fmt"`
Width uint64 `json:"width"`
Height uint64 `json:"height"`
diff --git a/http/api/process.go b/http/api/process.go
index dec2dfbf..5054dbc1 100644
--- a/http/api/process.go
+++ b/http/api/process.go
@@ -29,9 +29,10 @@ type ProcessConfigIO struct {
}
type ProcessConfigIOCleanup struct {
- Pattern string `json:"pattern" validate:"required"`
- MaxFiles uint `json:"max_files"`
- MaxFileAge uint `json:"max_file_age_seconds"`
+ Pattern string `json:"pattern" validate:"required"`
+ MaxFiles uint `json:"max_files"`
+ MaxFileAge uint `json:"max_file_age_seconds"`
+ PurgeOnDelete bool `json:"purge_on_delete"`
}
type ProcessConfigLimits struct {
@@ -91,9 +92,10 @@ func (cfg *ProcessConfig) Marshal() *app.Config {
for _, c := range x.Cleanup {
output.Cleanup = append(output.Cleanup, app.ConfigIOCleanup{
- Pattern: c.Pattern,
- MaxFiles: c.MaxFiles,
- MaxFileAge: c.MaxFileAge,
+ Pattern: c.Pattern,
+ MaxFiles: c.MaxFiles,
+ MaxFileAge: c.MaxFileAge,
+ PurgeOnDelete: c.PurgeOnDelete,
})
}
@@ -237,7 +239,7 @@ type ProcessState struct {
LastLog string `json:"last_logline"`
Progress *Progress `json:"progress"`
Memory uint64 `json:"memory_bytes"`
- CPU json.Number `json:"cpu_usage"`
+ CPU json.Number `json:"cpu_usage" swaggertype:"number"`
Command []string `json:"command"`
}
diff --git a/http/api/progress.go b/http/api/progress.go
index 3f58a1c2..bb0b1a4d 100644
--- a/http/api/progress.go
+++ b/http/api/progress.go
@@ -20,15 +20,15 @@ type ProgressIO struct {
Codec string `json:"codec"`
Coder string `json:"coder"`
Frame uint64 `json:"frame"`
- FPS json.Number `json:"fps"`
+ FPS json.Number `json:"fps" swaggertype:"number"`
Packet uint64 `json:"packet"`
- PPS json.Number `json:"pps"`
- Size uint64 `json:"size_kb"` // kbytes
- Bitrate json.Number `json:"bitrate_kbit"` // kbit/s
+ PPS json.Number `json:"pps" swaggertype:"number"`
+ Size uint64 `json:"size_kb"` // kbytes
+ Bitrate json.Number `json:"bitrate_kbit" swaggertype:"number"` // kbit/s
// Video
Pixfmt string `json:"pix_fmt,omitempty"`
- Quantizer json.Number `json:"q,omitempty"`
+ Quantizer json.Number `json:"q,omitempty" swaggertype:"number"`
Width uint64 `json:"width,omitempty"`
Height uint64 `json:"height,omitempty"`
@@ -81,12 +81,12 @@ type Progress struct {
Output []ProgressIO `json:"outputs"`
Frame uint64 `json:"frame"`
Packet uint64 `json:"packet"`
- FPS json.Number `json:"fps"`
- Quantizer json.Number `json:"q"`
+ FPS json.Number `json:"fps" swaggertype:"number"`
+ Quantizer json.Number `json:"q" swaggertype:"number"`
Size uint64 `json:"size_kb"` // kbytes
- Time json.Number `json:"time"`
- Bitrate json.Number `json:"bitrate_kbit"` // kbit/s
- Speed json.Number `json:"speed"`
+ Time json.Number `json:"time" swaggertype:"number"`
+ Bitrate json.Number `json:"bitrate_kbit" swaggertype:"number"` // kbit/s
+ Speed json.Number `json:"speed" swaggertype:"number"`
Drop uint64 `json:"drop"`
Dup uint64 `json:"dup"`
}
diff --git a/http/api/session.go b/http/api/session.go
index 123c81b6..8f3b6a18 100644
--- a/http/api/session.go
+++ b/http/api/session.go
@@ -30,8 +30,8 @@ type Session struct {
Extra string `json:"extra"`
RxBytes uint64 `json:"bytes_rx"`
TxBytes uint64 `json:"bytes_tx"`
- RxBitrate json.Number `json:"bandwidth_rx_kbit"` // kbit/s
- TxBitrate json.Number `json:"bandwidth_tx_kbit"` // kbit/s
+ RxBitrate json.Number `json:"bandwidth_rx_kbit" swaggertype:"number"` // kbit/s
+ TxBitrate json.Number `json:"bandwidth_tx_kbit" swaggertype:"number"` // kbit/s
}
func (s *Session) Unmarshal(sess session.Session) {
@@ -51,11 +51,11 @@ func (s *Session) Unmarshal(sess session.Session) {
type SessionSummaryActive struct {
SessionList []Session `json:"list"`
Sessions uint64 `json:"sessions"`
- RxBitrate json.Number `json:"bandwidth_rx_mbit"` // mbit/s
- TxBitrate json.Number `json:"bandwidth_tx_mbit"` // mbit/s
+ RxBitrate json.Number `json:"bandwidth_rx_mbit" swaggertype:"number"` // mbit/s
+ TxBitrate json.Number `json:"bandwidth_tx_mbit" swaggertype:"number"` // mbit/s
MaxSessions uint64 `json:"max_sessions"`
- MaxRxBitrate json.Number `json:"max_bandwidth_rx_mbit"` // mbit/s
- MaxTxBitrate json.Number `json:"max_bandwidth_tx_mbit"` // mbit/s
+ MaxRxBitrate json.Number `json:"max_bandwidth_rx_mbit" swaggertype:"number"` // mbit/s
+ MaxTxBitrate json.Number `json:"max_bandwidth_tx_mbit" swaggertype:"number"` // mbit/s
}
// SessionSummarySummary represents the summary (history) of all finished sessions
diff --git a/http/handler/api/diskfs.go b/http/handler/api/diskfs.go
index a88c2edf..b5b741aa 100644
--- a/http/handler/api/diskfs.go
+++ b/http/handler/api/diskfs.go
@@ -2,6 +2,7 @@ package api
import (
"net/http"
+ "path/filepath"
"sort"
"github.com/datarhei/core/http/api"
@@ -64,6 +65,8 @@ func (h *DiskFSHandler) GetFile(c echo.Context) error {
c.Response().Header().Set("Last-Modified", stat.ModTime().UTC().Format("Mon, 02 Jan 2006 15:04:05 GMT"))
if path, ok := stat.IsLink(); ok {
+ path = filepath.Clean("/" + path)
+
if path[0] == '/' {
path = path[1:]
}
diff --git a/http/handler/api/session.go b/http/handler/api/session.go
index 48c6472c..cbc6b145 100644
--- a/http/handler/api/session.go
+++ b/http/handler/api/session.go
@@ -31,7 +31,6 @@ func NewSession(registry session.Registry) *SessionHandler {
// @Security ApiKeyAuth
// @Param collectors query string false "Comma separated list of collectors"
// @Success 200 {object} api.SessionsSummary "Sessions summary"
-// @Failure 404 {object} api.Error
// @Router /api/v3/session [get]
func (s *SessionHandler) Summary(c echo.Context) error {
collectors := strings.Split(util.DefaultQuery(c, "collectors", ""), ",")
@@ -39,13 +38,8 @@ func (s *SessionHandler) Summary(c echo.Context) error {
sessionsSummary := make(api.SessionsSummary)
for _, name := range collectors {
- collector := s.registry.Collector(name)
- if collector == nil {
- return api.Err(http.StatusNotFound, "Unknown collector", "Registered collectors are: %s", strings.Join(s.registry.Collectors(), ", "))
- }
-
summary := api.SessionSummary{}
- summary.Unmarshal(collector.Summary())
+ summary.Unmarshal(s.registry.Summary(name))
sessionsSummary[name] = summary
}
@@ -61,7 +55,6 @@ func (s *SessionHandler) Summary(c echo.Context) error {
// @Security ApiKeyAuth
// @Param collectors query string false "Comma separated list of collectors"
// @Success 200 {object} api.SessionsActive "Active sessions listing"
-// @Failure 404 {object} api.Error
// @Router /api/v3/session/active [get]
func (s *SessionHandler) Active(c echo.Context) error {
collectors := strings.Split(util.DefaultQuery(c, "collectors", ""), ",")
@@ -69,14 +62,10 @@ func (s *SessionHandler) Active(c echo.Context) error {
sessionsActive := make(api.SessionsActive)
for _, name := range collectors {
- collector := s.registry.Collector(name)
- if collector == nil {
- return api.Err(http.StatusNotFound, "Unknown collector", "Registered collectors are: %s", strings.Join(s.registry.Collectors(), ", "))
- }
+ sessions := s.registry.Active(name)
+ active := []api.Session{}
- sessions := collector.Active()
-
- active := make([]api.Session, len(sessions))
+ active = make([]api.Session, len(sessions))
for i, s := range sessions {
active[i].Unmarshal(s)
diff --git a/http/handler/diskfs.go b/http/handler/diskfs.go
index abb05fbd..30e93e25 100644
--- a/http/handler/diskfs.go
+++ b/http/handler/diskfs.go
@@ -69,6 +69,8 @@ func (h *DiskFSHandler) GetFile(c echo.Context) error {
c.Response().Header().Set("Last-Modified", stat.ModTime().UTC().Format("Mon, 02 Jan 2006 15:04:05 GMT"))
if path, ok := stat.IsLink(); ok {
+ path = filepath.Clean("/" + path)
+
if path[0] == '/' {
path = path[1:]
}
diff --git a/http/handler/memfs.go b/http/handler/memfs.go
index 7fce2a2e..56aa94f7 100644
--- a/http/handler/memfs.go
+++ b/http/handler/memfs.go
@@ -2,6 +2,7 @@ package handler
import (
"net/http"
+ "path/filepath"
"github.com/datarhei/core/http/api"
"github.com/datarhei/core/http/handler/util"
@@ -51,6 +52,8 @@ func (h *MemFSHandler) GetFile(c echo.Context) error {
c.Response().Header().Set("Last-Modified", stat.ModTime().UTC().Format("Mon, 02 Jan 2006 15:04:05 GMT"))
if path, ok := stat.IsLink(); ok {
+ path = filepath.Clean("/" + path)
+
if path[0] == '/' {
path = path[1:]
}
diff --git a/http/middleware/session/HLS.go b/http/middleware/session/HLS.go
index cfbcd55e..934659ba 100644
--- a/http/middleware/session/HLS.go
+++ b/http/middleware/session/HLS.go
@@ -55,7 +55,11 @@ func NewHLSWithConfig(config HLSConfig) echo.MiddlewareFunc {
}
if config.EgressCollector == nil {
- config.EgressCollector = DefaultHTTPConfig.Collector
+ config.EgressCollector = DefaultHLSConfig.EgressCollector
+ }
+
+ if config.IngressCollector == nil {
+ config.IngressCollector = DefaultHLSConfig.IngressCollector
}
hls := hls{
diff --git a/http/server.go b/http/server.go
index 2dc17a3f..2cb7765b 100644
--- a/http/server.go
+++ b/http/server.go
@@ -1,13 +1,13 @@
// @title datarhei Core API
-// @version 6.0
-// @description Expose REST API for the datarheiCORE
+// @version 3.0
+// @description Expose REST API for the datarhei Core
-// @contact.name datarheiCORE Support
+// @contact.name datarhei Core Support
// @contact.url https://www.datarhei.com
// @contact.email hello@datarhei.com
-// @license.name ???
-// @license.url nothing
+// @license.name Apache 2.0
+// @license.url https://github.com/datarhei/core/blob/main/LICENSE
// @BasePath /
diff --git a/io/fs/disk.go b/io/fs/disk.go
index e444cef5..62d9b295 100644
--- a/io/fs/disk.go
+++ b/io/fs/disk.go
@@ -204,17 +204,13 @@ func (fs *diskFilesystem) Files() int64 {
}
func (fs *diskFilesystem) Symlink(oldname, newname string) error {
- if !filepath.IsAbs(oldname) {
- return nil
- }
-
- oldname = filepath.Join(fs.dir, oldname)
+ oldname = filepath.Join(fs.dir, filepath.Clean("/"+oldname))
if !filepath.IsAbs(newname) {
return nil
}
- newname = filepath.Join(fs.dir, newname)
+ newname = filepath.Join(fs.dir, filepath.Clean("/"+newname))
err := os.Symlink(oldname, newname)
@@ -222,11 +218,7 @@ func (fs *diskFilesystem) Symlink(oldname, newname string) error {
}
func (fs *diskFilesystem) Open(path string) File {
- if !filepath.IsAbs(path) {
- return nil
- }
-
- path = filepath.Join(fs.dir, path)
+ path = filepath.Join(fs.dir, filepath.Clean("/"+path))
f, err := os.Open(path)
if err != nil {
@@ -243,16 +235,7 @@ func (fs *diskFilesystem) Open(path string) File {
}
func (fs *diskFilesystem) Store(path string, r io.Reader) (int64, bool, error) {
- if !filepath.IsAbs(path) {
- return -1, false, fmt.Errorf("Invalid path")
- }
-
- path = filepath.Join(fs.dir, path)
-
- // Check that we're not leaving our base directory
- if !strings.HasPrefix(path, fs.dir) {
- return -1, false, fmt.Errorf("Invalid path")
- }
+ path = filepath.Join(fs.dir, filepath.Clean("/"+path))
replace := true
@@ -283,11 +266,7 @@ func (fs *diskFilesystem) Store(path string, r io.Reader) (int64, bool, error) {
}
func (fs *diskFilesystem) Delete(path string) int64 {
- if !filepath.IsAbs(path) {
- return -1
- }
-
- path = filepath.Join(fs.dir, path)
+ path = filepath.Join(fs.dir, filepath.Clean("/"+path))
finfo, err := os.Stat(path)
if err != nil {
diff --git a/log/log.go b/log/log.go
index dc3f0d15..be226028 100644
--- a/log/log.go
+++ b/log/log.go
@@ -270,7 +270,13 @@ func (e *Event) WithField(key string, value interface{}) Logger {
})
}
+const maxFields = 1024
+
func (e *Event) WithFields(f Fields) Logger {
+ if maxFields-len(e.Data)-len(f) < 0 {
+ return e
+ }
+
data := make(Fields, len(e.Data)+len(f))
for k, v := range e.Data {
data[k] = v
diff --git a/restream/app/process.go b/restream/app/process.go
index 58aa99e6..c844d1ad 100644
--- a/restream/app/process.go
+++ b/restream/app/process.go
@@ -3,9 +3,10 @@ package app
import "github.com/datarhei/core/process"
type ConfigIOCleanup struct {
- Pattern string `json:"pattern"`
- MaxFiles uint `json:"max_files"`
- MaxFileAge uint `json:"max_file_age_seconds"`
+ Pattern string `json:"pattern"`
+ MaxFiles uint `json:"max_files"`
+ MaxFileAge uint `json:"max_file_age_seconds"`
+ PurgeOnDelete bool `json:"purge_on_delete"`
}
type ConfigIO struct {
diff --git a/restream/fs/fs.go b/restream/fs/fs.go
index da4f387c..d06c8f81 100644
--- a/restream/fs/fs.go
+++ b/restream/fs/fs.go
@@ -16,9 +16,10 @@ type Config struct {
}
type Pattern struct {
- Pattern string
- MaxFiles uint
- MaxFileAge time.Duration
+ Pattern string
+ MaxFiles uint
+ MaxFileAge time.Duration
+ PurgeOnDelete bool
}
type Filesystem interface {
@@ -116,7 +117,11 @@ func (fs *filesystem) UnsetCleanup(id string) {
fs.cleanupLock.Lock()
defer fs.cleanupLock.Unlock()
+ patterns, _ := fs.cleanupPatterns[id]
+
delete(fs.cleanupPatterns, id)
+
+ fs.purge(patterns)
}
func (fs *filesystem) cleanup() {
@@ -150,6 +155,20 @@ func (fs *filesystem) cleanup() {
}
}
+func (fs *filesystem) purge(patterns []Pattern) {
+ for _, pattern := range patterns {
+ if !pattern.PurgeOnDelete {
+ continue
+ }
+
+ files := fs.Filesystem.List(pattern.Pattern)
+ for _, f := range files {
+ fs.logger.Debug().WithField("path", f.Name()).Log("Purging file")
+ fs.Filesystem.Delete(f.Name())
+ }
+ }
+}
+
func (fs *filesystem) cleanupTicker(ctx context.Context, interval time.Duration) {
ticker := time.NewTicker(interval)
defer ticker.Stop()
diff --git a/restream/restream.go b/restream/restream.go
index 9f8b1d69..cc427831 100644
--- a/restream/restream.go
+++ b/restream/restream.go
@@ -63,6 +63,7 @@ type Config struct {
}
type task struct {
+ valid bool
id string // ID of the task/process
reference string
process *app.Process
@@ -188,7 +189,9 @@ func (r *restream) Stop() {
// altering their order such that on a subsequent
// Start() they will get restarted.
for id, t := range r.tasks {
- t.ffmpeg.Stop()
+ if t.ffmpeg != nil {
+ t.ffmpeg.Stop()
+ }
r.unsetCleanup(id)
}
@@ -221,6 +224,10 @@ func (r *restream) observe(ctx context.Context, interval time.Duration) {
// Stop all tasks that write to disk
r.lock.Lock()
for id, t := range r.tasks {
+ if !t.valid {
+ continue
+ }
+
if !t.usesDisk {
continue
}
@@ -244,8 +251,7 @@ func (r *restream) load() error {
return err
}
- r.metadata = data.Metadata.System
- r.tasks = make(map[string]*task)
+ tasks := make(map[string]*task)
for id, process := range data.Process {
t := &task{
@@ -259,11 +265,11 @@ func (r *restream) load() error {
// Replace all placeholders in the config
r.resolvePlaceholders(t.config, r.fs.diskfs.Base(), r.fs.memfs.Base())
- r.tasks[id] = t
+ tasks[id] = t
}
for id, userdata := range data.Metadata.Process {
- t, ok := r.tasks[id]
+ t, ok := tasks[id]
if !ok {
continue
}
@@ -274,20 +280,23 @@ func (r *restream) load() error {
// Now that all tasks are defined and all placeholders are
// replaced, we can resolve references and validate the
// inputs and outputs.
- for _, t := range r.tasks {
- err := r.resolveAddresses(t.config)
+ for _, t := range tasks {
+ err := r.resolveAddresses(tasks, t.config)
if err != nil {
- return err
+ r.logger.Warn().WithField("id", t.id).WithError(err).Log("Ignoring")
+ continue
}
t.usesDisk, err = r.validateConfig(t.config)
if err != nil {
- return err
+ r.logger.Warn().WithField("id", t.id).WithError(err).Log("Ignoring")
+ continue
}
err = r.setPlayoutPorts(t)
if err != nil {
- return err
+ r.logger.Warn().WithField("id", t.id).WithError(err).Log("Ignoring")
+ continue
}
t.command = r.createCommand(t.config)
@@ -306,8 +315,12 @@ func (r *restream) load() error {
}
t.ffmpeg = ffmpeg
+ t.valid = true
}
+ r.tasks = tasks
+ r.metadata = data.Metadata.System
+
return nil
}
@@ -399,7 +412,7 @@ func (r *restream) createTask(config *app.Config) (*task, error) {
r.resolvePlaceholders(t.config, r.fs.diskfs.Base(), r.fs.memfs.Base())
- err := r.resolveAddresses(t.config)
+ err := r.resolveAddresses(r.tasks, t.config)
if err != nil {
return nil, err
}
@@ -430,6 +443,7 @@ func (r *restream) createTask(config *app.Config) (*task, error) {
}
t.ffmpeg = ffmpeg
+ t.valid = true
return t, nil
}
@@ -440,17 +454,19 @@ func (r *restream) setCleanup(id string, config *app.Config) {
if strings.HasPrefix(c.Pattern, "memfs:") {
r.fs.memfs.SetCleanup(id, []rfs.Pattern{
{
- Pattern: strings.TrimPrefix(c.Pattern, "memfs:"),
- MaxFiles: c.MaxFiles,
- MaxFileAge: time.Duration(c.MaxFileAge) * time.Second,
+ Pattern: strings.TrimPrefix(c.Pattern, "memfs:"),
+ MaxFiles: c.MaxFiles,
+ MaxFileAge: time.Duration(c.MaxFileAge) * time.Second,
+ PurgeOnDelete: c.PurgeOnDelete,
},
})
} else if strings.HasPrefix(c.Pattern, "diskfs:") {
r.fs.memfs.SetCleanup(id, []rfs.Pattern{
{
- Pattern: strings.TrimPrefix(c.Pattern, "diskfs:"),
- MaxFiles: c.MaxFiles,
- MaxFileAge: time.Duration(c.MaxFileAge) * time.Second,
+ Pattern: strings.TrimPrefix(c.Pattern, "diskfs:"),
+ MaxFiles: c.MaxFiles,
+ MaxFileAge: time.Duration(c.MaxFileAge) * time.Second,
+ PurgeOnDelete: c.PurgeOnDelete,
},
})
}
@@ -754,10 +770,10 @@ func (r *restream) validateOutputAddress(address, basedir string) (string, bool,
return "file:" + address, true, nil
}
-func (r *restream) resolveAddresses(config *app.Config) error {
+func (r *restream) resolveAddresses(tasks map[string]*task, config *app.Config) error {
for i, input := range config.Input {
// Resolve any references
- address, err := r.resolveAddress(config.ID, input.Address)
+ address, err := r.resolveAddress(tasks, config.ID, input.Address)
if err != nil {
return fmt.Errorf("reference error for '#%s:%s': %w", config.ID, input.ID, err)
}
@@ -770,7 +786,7 @@ func (r *restream) resolveAddresses(config *app.Config) error {
return nil
}
-func (r *restream) resolveAddress(id, address string) (string, error) {
+func (r *restream) resolveAddress(tasks map[string]*task, id, address string) (string, error) {
re := regexp.MustCompile(`^#(.+):output=(.+)`)
if len(address) == 0 {
@@ -790,7 +806,7 @@ func (r *restream) resolveAddress(id, address string) (string, error) {
return address, fmt.Errorf("self-reference not possible (%s)", address)
}
- task, ok := r.tasks[matches[1]]
+ task, ok := tasks[matches[1]]
if !ok {
return address, fmt.Errorf("unknown process '%s' (%s)", matches[1], address)
}
@@ -886,6 +902,10 @@ func (r *restream) startProcess(id string) error {
return fmt.Errorf("unknown process ID (%s)", id)
}
+ if !task.valid {
+ return fmt.Errorf("invalid process definition")
+ }
+
status := task.ffmpeg.Status()
if task.process.Order == "start" && status.Order == "start" {
@@ -953,6 +973,10 @@ func (r *restream) restartProcess(id string) error {
return fmt.Errorf("unknown process ID (%s)", id)
}
+ if !task.valid {
+ return fmt.Errorf("invalid process definition")
+ }
+
if task.process.Order == "stop" {
return nil
}
@@ -982,11 +1006,13 @@ func (r *restream) reloadProcess(id string) error {
return fmt.Errorf("unknown process ID (%s)", id)
}
+ t.valid = false
+
t.config = t.process.Config.Clone()
r.resolvePlaceholders(t.config, r.fs.diskfs.Base(), r.fs.memfs.Base())
- err := r.resolveAddresses(t.config)
+ err := r.resolveAddresses(r.tasks, t.config)
if err != nil {
return err
}
@@ -1024,6 +1050,7 @@ func (r *restream) reloadProcess(id string) error {
}
t.ffmpeg = ffmpeg
+ t.valid = true
if order == "start" {
r.startProcess(id)
@@ -1043,6 +1070,10 @@ func (r *restream) GetProcessState(id string) (*app.State, error) {
return state, fmt.Errorf("unknown process ID (%s)", id)
}
+ if !task.valid {
+ return state, fmt.Errorf("invalid process definition")
+ }
+
status := task.ffmpeg.Status()
state.Order = task.process.Order
@@ -1100,6 +1131,10 @@ func (r *restream) GetProcessLog(id string) (*app.Log, error) {
return &app.Log{}, fmt.Errorf("unknown process ID (%s)", id)
}
+ if !task.valid {
+ return &app.Log{}, fmt.Errorf("invalid process definition")
+ }
+
log := &app.Log{}
current := task.parser.Report()
@@ -1150,6 +1185,10 @@ func (r *restream) Probe(id string) app.Probe {
r.lock.RUnlock()
+ if !task.valid {
+ return appprobe
+ }
+
var command []string
// Copy global options
@@ -1210,6 +1249,10 @@ func (r *restream) GetPlayout(id, inputid string) (string, error) {
return "", fmt.Errorf("unknown process ID '%s'", id)
}
+ if !task.valid {
+ return "", fmt.Errorf("Invalid process definition")
+ }
+
port, ok := task.playout[inputid]
if !ok {
return "", fmt.Errorf("no playout for input ID '%s' and process '%s'", inputid, id)
diff --git a/session/registry.go b/session/registry.go
index ddb86ec9..94517f3c 100644
--- a/session/registry.go
+++ b/session/registry.go
@@ -24,12 +24,26 @@ type Config struct {
// The Registry interface
type Registry interface {
+ // Register returns a new collector from conf and registers it under the id and error is nil. In case of error
+ // the returned collector is nil and the error is not nil.
Register(id string, conf CollectorConfig) (Collector, error)
+
+ // Unregister unregisters the collector with the ID, returns error if the ID is not registered
Unregister(id string) error
+
+ // UnregisterAll unregisters al registered collectors
UnregisterAll()
+
+ // Collectors returns an array of all registered IDs
Collectors() []string
+
+ // Collector returns the collector with the ID, or nil if the ID is not registered
Collector(id string) Collector
+
+ // Summary returns the summary from a collector with the ID, or an empty summary if the ID is not registered
Summary(id string) Summary
+
+ // Active returns the active sessions from a collector with the ID, or an empty list if the ID is not registered
Active(id string) []Session
}
diff --git a/vendor/github.com/99designs/gqlgen/.gitignore b/vendor/github.com/99designs/gqlgen/.gitignore
index 9fb9693d..31346424 100644
--- a/vendor/github.com/99designs/gqlgen/.gitignore
+++ b/vendor/github.com/99designs/gqlgen/.gitignore
@@ -14,3 +14,4 @@
.idea/
*.test
*.out
+gqlgen
diff --git a/vendor/github.com/99designs/gqlgen/CHANGELOG.md b/vendor/github.com/99designs/gqlgen/CHANGELOG.md
index af09f4bf..8dd7eb99 100644
--- a/vendor/github.com/99designs/gqlgen/CHANGELOG.md
+++ b/vendor/github.com/99designs/gqlgen/CHANGELOG.md
@@ -5,12 +5,416 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
-## [Unreleased](https://github.com/99designs/gqlgen/compare/v0.17.1...HEAD)
+## [Unreleased](https://github.com/99designs/gqlgen/compare/v0.17.7...HEAD)
+
+## [v0.17.7](https://github.com/99designs/gqlgen/compare/v0.17.6...v0.17.7) - 2022-05-24
+- 2b1dff1b release v0.17.7
+
+- b2087f94 Update module dependencies (#2192)
+
+
8825ac46 Fix misprint (#2187)
+
+* Fix misprint
+
+* Fix misprint
+
+* Re-generate
+
+
+
+- 41daa5d8 fix #2190](https://github.com/99designs/gqlgen/issues/2190) - don't use backslash for "embed" paths on windows ([#2191)
+
+- 0cce5544 Update Changelog
+
+- 26644541 v0.17.6 postrelease bump
+
+
+
+
+
+
+## [v0.17.6](https://github.com/99designs/gqlgen/compare/v0.17.5...v0.17.6) - 2022-05-23
+- 358d45dc release v0.17.6
+
+- 7c95938c Improve operation error handling (#2184)
+
+- 2526f687 Correct identation (#2182)
+
+f7bf453c Bump dset from 3.1.1 to 3.1.2 in /integration (#2176)
+
+Bumps [dset](https://github.com/lukeed/dset) from 3.1.1 to 3.1.2.
+- [Release notes](https://github.com/lukeed/dset/releases)
+- [Commits](https://github.com/lukeed/dset/compare/v3.1.1...v3.1.2)
+
+---
+updated-dependencies:
+- dependency-name: dset
+ dependency-type: indirect
+...
+
+
+
+4cdf7026 Update getting-started.md (#2157)
+
+Fix getting-started missing fields resolver config
+
+
+
+- eef7bfaa fix: prevents goroutine leak at websocket transport (#2168)
+
+- b8ec51d8 go: update gqlparser to latest (#2149)
+
+- ec3e597e Fix docs bug in field collection (#2141)
+
+f6b35231 Add argument to WebsocketErrorFunc (#2124)
+
+* Add argument to WebsocketErrorFunc
+
+to determine whether the error ocured on read or write to the websocket.
+
+* Wrap websocket error
+
+
+
+- 0f016df3 Fix invalid query parameter for playground subscription endpoint (#2148)
+
+fb5751ab use "embed" in generated code (#2119)
+
+* use "embed" in generated code
+
+* don't use embed for builtins
+
+* working poc
+
+* handle no embeddable sources
+
+* fix dir
+
+* comment
+
+* add test for embedding
+
+* improve error handling
+
+
+
+d38911f1 Allow absolute https://github.com/99designs/gqlgens to the GraphQL playground (#2142)
+
+* Allow absolute URLs to the GraphQL playground
+
+* Add test for playground URLs
+
+* Close res.Body in playground test
+
+
+
+3228f36f Update getting-started.md (#2140)
+
+* Update getting-started.md
+
+function rand.Int requires two parameters and returns two value in golang version 1.18.1.
+
+* Highlight the package used so people don't pick crypto/rand
+
+* Revert to original
+
+* Remove extra space
+
+
+
+33fe0b9b Update package.json (#2138)
+
+I added `graphql-ws` because there is no graphql-ws in package.json
+
+
+
+f8e837b8 Use MultipartReader to parse file uploads (#2135)
+
+Use a streaming MultipartReader to parse requests with file
+uploads. The GraphQL multipart request specification guarantees
+that the operations and map form fields will come first.
+
+There are two reasons motivating this change:
+
+- This allows for file uploads without specifying a specific
+ filename.
+- This avoids unnecessary copies for requests with more than one
+ file. Go's ParseForm already copies the request's body into
+ memory or on disk. We were also doing this manually as a second
+ step.
+
+
+
+- 05bfc1fb Upddate Changelog
+
+- 62f694f0 v0.17.5 postrelease bump
+
+
+
+
+
+
+## [v0.17.5](https://github.com/99designs/gqlgen/compare/v0.17.4...v0.17.5) - 2022-04-29
+- fd97e74e release v0.17.5
+
+9250f9ac Feature: Add FTV1 Support via Handler (#2132)
+
+* initial support for ftv1 traces via handler
+
+* remove testing json extension
+
+* remove binary from commit and add to .gitignore
+
+* updating go.mod
+
+* updating examples go.sum
+
+* rerunning generate within the examples folder
+
+
+
+fce3a11a feat: added graphql.UnmarshalInputFromContext (#2131)
+
+* feat: added graphql.UnmarshalInputFromContext
+
+* chore: run go generate for _examples
+
+* fix: apply suggestions from code review
+
+
+* fix: update error cases
+
+* fix: fixed unit-test by update root_.gotpl
+
+* fix: apply suggestions from code review
+
+* fix: update graphql/input.go
+
+
+
+6a24e881 update instructions to specify package of Role (#2130)
+
+Can't compile with the example unless I also include `model.` for Role.
+
+
+
+- ccfa245b Ignore protobuf files in coverage (#2133)
+
+- 0465dcb1 Update federation.md (#2129)
+
+- 8f0631dc Update Changelog
+
+- 41611560 v0.17.4 postrelease bump
+
+
+
+
+
+
+## [v0.17.4](https://github.com/99designs/gqlgen/compare/v0.17.3...v0.17.4) - 2022-04-25
+- d6de831a release v0.17.4
+
+2a2a3dcb Feature: Adds Federation 2 Support (#2115)
+
+* fed2 rough support
+
+* autodetection of fed2
+
+* adding basic tests for changes
+
+* fixing docs
+
+* Update plugin/federation/federation.go
+
+* removing custom scalar since it was causing issues
+
+* fixing lint test
+
+* should fix for real this time
+
+* fixing test failures
+
+
+
+77260e88 shorten some generated code (#2120)
+
+* shorten some generated code
+
+* generate examples
+
+
+
+4da17e1c update modules except mapstructure (#2118)
+
+* Update modules
+
+
+* Update modules except for mapstructure
+
+
+* Try to update to v1.3.1
+
+
+
+- cddbf02d Update Changelog file
+
+- 8f80f4ef v0.17.3 postrelease bump
+
+
+
+
+
+
+## [v0.17.3](https://github.com/99designs/gqlgen/compare/v0.17.2...v0.17.3) - 2022-04-20
+- 0bb262d1 release v0.17.3
+
+8d0bd22a Update gqlparser (#2109)
+
+* Update gqlparser
+
+
+* Update tests to be NoError
+
+
+
+ec0dea88 Fix the ability of websockets to get errors (#2097)
+
+Because DispatchOperation creates tempResponseContext,
+which is passed into Exec, which is then used in _Subscription to
+generate the next function. Inside the various subscription functions
+when generating next the context was captured there.
+
+Which means later when the returned function from DispatchOperation is
+called. The responseContext which accumulates the errors is the
+tempResponseContext which we no longer have access to to read the errors
+out of it.
+
+Instead add a context to next() so that it can be passed through and
+accumulated the errors as expected.
+
+Added a unit test for this as well.
+
+
+
+e3f04b42 Change the error message to be consumer targeted (#2096)
+
+* Change the error message to be slightly more clear
+
+* Rebase on updated origin/master.
+
+Fix the test to not be sensitive to array ordering.
+Re-generate on master as there was a schema change.
+
+
+
+5a497649 Fix websocket subscriptions to not double close. (#2095)
+
+We were closing at the end of the loop and also in the defer.
+
+
+
+- a15a9bfd Update test.yml to be valid
+
+a1538928 Use Github API to update the docs (#2101)
+
+* Use Github API to update the docs
+
+Instead of a hard-coded version of the docs we want to realease, this
+uses the Github API to get the last 20 versions and publish those. This
+will allow any script invoking this to make sure to always have the
+latest version of the docs
+
+* Reinstate set -e
+
+
+
+- 3bf437c2 Update golangci-lint (#2103)
+
+12c6d0bf Fix misprint (#2102)
+
+* Fix misprint
+
+* Update websocket_graphql_transport_ws.go
+
+
+
+9f5fad13 Bump minimist from 1.2.5 to 1.2.6 in /integration (#2085)
+
+Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
+- [Release notes](https://github.com/substack/minimist/releases)
+- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)
+
+---
+updated-dependencies:
+- dependency-name: minimist
+ dependency-type: indirect
+...
+
+
+
+035e1d6e Add AllowedMethods field to transport.Options (#2080)
+
+* Add AllowedMethods field to transport.Options
+
+to enable users to specify allowed HTTP methods.
+
+* Update graphql/handler/transport/options.go
+
+
+
+- f0fdb116 Add instructions for enabling autobinding (#2079)
+
+12b0b385 Bump Playground version (#2078)
+
+* update playground
+
+* enables tabs
+
+* update shas
+
+
+
+1324c3ff Merge pull request #2062 from a8m/childfield
+
+graphql: add FieldContext.Child field function and enable it in codegen
+
+
+
+- bf9caeae graphql: add FieldContext.ChildArgs field and enable it in codegen
+
+- 36fb3dc6 codegen: allow binding methods with optional variadic arguments (#2066)
+
+- fba5edd4 Update Changelog
+
+- 48b2b7e1 v0.17.2 postrelease bump
+
+
+
+
+
+
+## [v0.17.2](https://github.com/99designs/gqlgen/compare/v0.17.1...v0.17.2) - 2022-03-21
+- 1f04d38a release v0.17.2
+
+- 87fc5f22 Fix #1961](https://github.com/99designs/gqlgen/issues/1961) for Go 1.18 ([#2052)
+
+- f85d59d3 fixed modelgen test schema (#2032)
+
+- d873ff8b v0.17.1 postrelease bump
+
+
+
+
+
## [v0.17.1](https://github.com/99designs/gqlgen/compare/v0.17.0...v0.17.1) - 2022-03-02
+- 5ea50aee release v0.17.1
+
+- a493a423 Prepare for new release
+
9f520a28 Update golangci-lint and fix resource leak (#2024)
* Fix golangci-lint in CI
diff --git a/vendor/github.com/99designs/gqlgen/api/generate.go b/vendor/github.com/99designs/gqlgen/api/generate.go
index 6a85cd94..6619dd5c 100644
--- a/vendor/github.com/99designs/gqlgen/api/generate.go
+++ b/vendor/github.com/99designs/gqlgen/api/generate.go
@@ -2,6 +2,7 @@ package api
import (
"fmt"
+ "regexp"
"syscall"
"github.com/99designs/gqlgen/codegen"
@@ -24,7 +25,20 @@ func Generate(cfg *config.Config, option ...Option) error {
}
plugins = append(plugins, resolvergen.New())
if cfg.Federation.IsDefined() {
- plugins = append([]plugin.Plugin{federation.New()}, plugins...)
+ if cfg.Federation.Version == 0 { // default to using the user's choice of version, but if unset, try to sort out which federation version to use
+ urlRegex := regexp.MustCompile(`(?s)@link.*\(.*url:.*?"(.*?)"[^)]+\)`) // regex to grab the url of a link directive, should it exist
+
+ // check the sources, and if one is marked as federation v2, we mark the entirety to be generated using that format
+ for _, v := range cfg.Sources {
+ cfg.Federation.Version = 1
+ urlString := urlRegex.FindStringSubmatch(v.Input)
+ if urlString != nil && urlString[1] == "https://specs.apollo.dev/federation/v2.0" {
+ cfg.Federation.Version = 2
+ break
+ }
+ }
+ }
+ plugins = append([]plugin.Plugin{federation.New(cfg.Federation.Version)}, plugins...)
}
for _, o := range option {
diff --git a/vendor/github.com/99designs/gqlgen/codegen/args.go b/vendor/github.com/99designs/gqlgen/codegen/args.go
index 8c08d924..0fd30fff 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/args.go
+++ b/vendor/github.com/99designs/gqlgen/codegen/args.go
@@ -73,11 +73,15 @@ func (b *builder) buildArg(obj *Object, arg *ast.ArgumentDefinition) (*FieldArgu
return &newArg, nil
}
-func (b *builder) bindArgs(field *Field, params *types.Tuple) ([]*FieldArgument, error) {
- var newArgs []*FieldArgument
-
+func (b *builder) bindArgs(field *Field, sig *types.Signature, params *types.Tuple) ([]*FieldArgument, error) {
+ n := params.Len()
+ newArgs := make([]*FieldArgument, 0, len(field.Args))
+ // Accept variadic methods (i.e. have optional parameters).
+ if params.Len() > len(field.Args) && sig.Variadic() {
+ n = len(field.Args)
+ }
nextArg:
- for j := 0; j < params.Len(); j++ {
+ for j := 0; j < n; j++ {
param := params.At(j)
for _, oldArg := range field.Args {
if strings.EqualFold(oldArg.Name, param.Name()) {
diff --git a/vendor/github.com/99designs/gqlgen/codegen/config/package.go b/vendor/github.com/99designs/gqlgen/codegen/config/package.go
index a9645938..faacd149 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/config/package.go
+++ b/vendor/github.com/99designs/gqlgen/codegen/config/package.go
@@ -12,6 +12,7 @@ import (
type PackageConfig struct {
Filename string `yaml:"filename,omitempty"`
Package string `yaml:"package,omitempty"`
+ Version int `yaml:"version,omitempty"`
}
func (c *PackageConfig) ImportPath() string {
diff --git a/vendor/github.com/99designs/gqlgen/codegen/data.go b/vendor/github.com/99designs/gqlgen/codegen/data.go
index e12fb104..592140ae 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/data.go
+++ b/vendor/github.com/99designs/gqlgen/codegen/data.go
@@ -2,7 +2,10 @@ package codegen
import (
"fmt"
+ "os"
+ "path/filepath"
"sort"
+ "strings"
"github.com/vektah/gqlparser/v2/ast"
@@ -30,6 +33,26 @@ type Data struct {
QueryRoot *Object
MutationRoot *Object
SubscriptionRoot *Object
+ AugmentedSources []AugmentedSource
+}
+
+func (d *Data) HasEmbeddableSources() bool {
+ hasEmbeddableSources := false
+ for _, s := range d.AugmentedSources {
+ if s.Embeddable {
+ hasEmbeddableSources = true
+ }
+ }
+ return hasEmbeddableSources
+}
+
+// AugmentedSource contains extra information about graphql schema files which is not known directly from the Config.Sources data
+type AugmentedSource struct {
+ // path relative to Config.Exec.Filename
+ RelativePath string
+ Embeddable bool
+ BuiltIn bool
+ Source string
}
type builder struct {
@@ -147,6 +170,31 @@ func BuildData(cfg *config.Config) (*Data, error) {
// otherwise show a generic error message
return nil, fmt.Errorf("invalid types were encountered while traversing the go source code, this probably means the invalid code generated isnt correct. add try adding -v to debug")
}
+ aSources := []AugmentedSource{}
+ for _, s := range cfg.Sources {
+ wd, err := os.Getwd()
+ if err != nil {
+ return nil, fmt.Errorf("failed to get working directory: %w", err)
+ }
+ outputDir := cfg.Exec.Dir()
+ sourcePath := filepath.Join(wd, s.Name)
+ relative, err := filepath.Rel(outputDir, sourcePath)
+ if err != nil {
+ return nil, fmt.Errorf("failed to compute path of %s relative to %s: %w", sourcePath, outputDir, err)
+ }
+ relative = filepath.ToSlash(relative)
+ embeddable := true
+ if strings.HasPrefix(relative, "..") || s.BuiltIn {
+ embeddable = false
+ }
+ aSources = append(aSources, AugmentedSource{
+ RelativePath: relative,
+ Embeddable: embeddable,
+ BuiltIn: s.BuiltIn,
+ Source: s.Input,
+ })
+ }
+ s.AugmentedSources = aSources
return &s, nil
}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/directives.gotpl b/vendor/github.com/99designs/gqlgen/codegen/directives.gotpl
index e6d2455f..23bcf0f8 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/directives.gotpl
+++ b/vendor/github.com/99designs/gqlgen/codegen/directives.gotpl
@@ -70,7 +70,7 @@ func (ec *executionContext) _mutationMiddleware(ctx context.Context, obj *ast.Op
{{ end }}
{{ if .Directives.LocationDirectives "SUBSCRIPTION" }}
-func (ec *executionContext) _subscriptionMiddleware(ctx context.Context, obj *ast.OperationDefinition, next func(ctx context.Context) (interface{}, error)) func() graphql.Marshaler {
+func (ec *executionContext) _subscriptionMiddleware(ctx context.Context, obj *ast.OperationDefinition, next func(ctx context.Context) (interface{}, error)) func(ctx context.Context) graphql.Marshaler {
for _, d := range obj.Directives {
switch d.Name {
{{- range $directive := .Directives.LocationDirectives "SUBSCRIPTION" }}
@@ -80,7 +80,7 @@ func (ec *executionContext) _subscriptionMiddleware(ctx context.Context, obj *as
args, err := ec.{{ $directive.ArgsFunc }}(ctx,rawArgs)
if err != nil {
ec.Error(ctx, err)
- return func() graphql.Marshaler {
+ return func(ctx context.Context) graphql.Marshaler {
return graphql.Null
}
}
@@ -98,15 +98,15 @@ func (ec *executionContext) _subscriptionMiddleware(ctx context.Context, obj *as
tmp, err := next(ctx)
if err != nil {
ec.Error(ctx, err)
- return func() graphql.Marshaler {
+ return func(ctx context.Context) graphql.Marshaler {
return graphql.Null
}
}
- if data, ok := tmp.(func() graphql.Marshaler); ok {
+ if data, ok := tmp.(func(ctx context.Context) graphql.Marshaler); ok {
return data
}
ec.Errorf(ctx, `unexpected type %T from directive, should be graphql.Marshaler`, tmp)
- return func() graphql.Marshaler {
+ return func(ctx context.Context) graphql.Marshaler {
return graphql.Null
}
}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/field.go b/vendor/github.com/99designs/gqlgen/codegen/field.go
index 867215e5..7914cd0e 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/field.go
+++ b/vendor/github.com/99designs/gqlgen/codegen/field.go
@@ -179,8 +179,8 @@ func (b *builder) bindField(obj *Object, f *Field) (errret error) {
params = types.NewTuple(vars...)
}
- // Try to match target function's arguments with GraphQL field arguments
- newArgs, err := b.bindArgs(f, params)
+ // Try to match target function's arguments with GraphQL field arguments.
+ newArgs, err := b.bindArgs(f, sig, params)
if err != nil {
return fmt.Errorf("%s:%d: %w", pos.Filename, pos.Line, err)
}
@@ -483,6 +483,14 @@ func (f *Field) ArgsFunc() string {
return "field_" + f.Object.Definition.Name + "_" + f.Name + "_args"
}
+func (f *Field) FieldContextFunc() string {
+ return "fieldContext_" + f.Object.Definition.Name + "_" + f.Name
+}
+
+func (f *Field) ChildFieldContextFunc(name string) string {
+ return "fieldContext_" + f.TypeReference.Definition.Name + "_" + name
+}
+
func (f *Field) ResolverType() string {
if !f.IsResolver {
return ""
@@ -549,7 +557,7 @@ func (f *Field) CallArgs() string {
}
for _, arg := range f.Args {
- args = append(args, "args["+strconv.Quote(arg.Name)+"].("+templates.CurrentImports.LookupType(arg.TypeReference.GO)+")")
+ args = append(args, "fc.Args["+strconv.Quote(arg.Name)+"].("+templates.CurrentImports.LookupType(arg.TypeReference.GO)+")")
}
return strings.Join(args, ", ")
diff --git a/vendor/github.com/99designs/gqlgen/codegen/field.gotpl b/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
index 0c6becae..e47b958d 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
+++ b/vendor/github.com/99designs/gqlgen/codegen/field.gotpl
@@ -1,34 +1,21 @@
{{- range $object := .Objects }}{{- range $field := $object.Fields }}
-func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Context, field graphql.CollectedField{{ if not $object.Root }}, obj {{$object.Reference | ref}}{{end}}) (ret {{ if $object.Stream }}func(){{ end }}graphql.Marshaler) {
+func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Context, field graphql.CollectedField{{ if not $object.Root }}, obj {{$object.Reference | ref}}{{end}}) (ret {{ if $object.Stream }}func(ctx context.Context){{ end }}graphql.Marshaler) {
{{- $null := "graphql.Null" }}
{{- if $object.Stream }}
{{- $null = "nil" }}
{{- end }}
+ fc, err := ec.{{ $field.FieldContextFunc }}(ctx, field)
+ if err != nil {
+ return {{ $null }}
+ }
+ ctx = graphql.WithFieldContext(ctx, fc)
defer func () {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = {{ $null }}
}
}()
- fc := &graphql.FieldContext{
- Object: {{$object.Name|quote}},
- Field: field,
- Args: nil,
- IsMethod: {{or $field.IsMethod $field.IsResolver}},
- IsResolver: {{ $field.IsResolver }},
- }
-
- ctx = graphql.WithFieldContext(ctx, fc)
- {{- if $field.Args }}
- rawArgs := field.ArgumentMap(ec.Variables)
- args, err := ec.{{ $field.ArgsFunc }}(ctx,rawArgs)
- if err != nil {
- ec.Error(ctx, err)
- return {{ $null }}
- }
- fc.Args = args
- {{- end }}
{{- if $.AllDirectives.LocationDirectives "FIELD" }}
resTmp := ec._fieldMiddleware(ctx, {{if $object.Root}}nil{{else}}obj{{end}}, func(rctx context.Context) (interface{}, error) {
{{ template "field" $field }}
@@ -51,18 +38,22 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex
return {{ $null }}
}
{{- if $object.Stream }}
- return func() graphql.Marshaler {
- res, ok := <-resTmp.(<-chan {{$field.TypeReference.GO | ref}})
- if !ok {
+ return func(ctx context.Context) graphql.Marshaler {
+ select {
+ case res, ok := <-resTmp.(<-chan {{$field.TypeReference.GO | ref}}):
+ if !ok {
+ return nil
+ }
+ return graphql.WriterFunc(func(w io.Writer) {
+ w.Write([]byte{'{'})
+ graphql.MarshalString(field.Alias).MarshalGQL(w)
+ w.Write([]byte{':'})
+ ec.{{ $field.TypeReference.MarshalFunc }}(ctx, field.Selections, res).MarshalGQL(w)
+ w.Write([]byte{'}'})
+ })
+ case <-ctx.Done():
return nil
}
- return graphql.WriterFunc(func(w io.Writer) {
- w.Write([]byte{'{'})
- graphql.MarshalString(field.Alias).MarshalGQL(w)
- w.Write([]byte{':'})
- ec.{{ $field.TypeReference.MarshalFunc }}(ctx, field.Selections, res).MarshalGQL(w)
- w.Write([]byte{'}'})
- })
}
{{- else }}
res := resTmp.({{$field.TypeReference.GO | ref}})
@@ -71,6 +62,44 @@ func (ec *executionContext) _{{$object.Name}}_{{$field.Name}}(ctx context.Contex
{{- end }}
}
+func (ec *executionContext) {{ $field.FieldContextFunc }}(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
+ fc = &graphql.FieldContext{
+ Object: {{quote $field.Object.Name}},
+ Field: field,
+ IsMethod: {{or $field.IsMethod $field.IsResolver}},
+ IsResolver: {{ $field.IsResolver }},
+ Child: func (ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
+ {{- if not $field.TypeReference.Definition.Fields }}
+ return nil, errors.New("field of type {{ $field.TypeReference.Definition.Name }} does not have child fields")
+ {{- else if ne $field.TypeReference.Definition.Kind "OBJECT" }}
+ return nil, errors.New("FieldContext.Child cannot be called on type {{ $field.TypeReference.Definition.Kind }}")
+ {{- else }}
+ switch field.Name {
+ {{- range $f := $field.TypeReference.Definition.Fields }}
+ case "{{ $f.Name }}":
+ return ec.{{ $field.ChildFieldContextFunc $f.Name }}(ctx, field)
+ {{- end }}
+ }
+ return nil, fmt.Errorf("no field named %q was found under type {{ $field.TypeReference.Definition.Name }}", field.Name)
+ {{- end }}
+ },
+ }
+ {{- if $field.Args }}
+ defer func () {
+ if r := recover(); r != nil {
+ err = ec.Recover(ctx, r)
+ ec.Error(ctx, err)
+ }
+ }()
+ ctx = graphql.WithFieldContext(ctx, fc)
+ if fc.Args, err = ec.{{ $field.ArgsFunc }}(ctx, field.ArgumentMap(ec.Variables)); err != nil {
+ ec.Error(ctx, err)
+ return
+ }
+ {{- end }}
+ return fc, nil
+}
+
{{- end }}{{- end}}
{{ define "field" }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl b/vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl
index bf59dacc..0998c775 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl
+++ b/vendor/github.com/99designs/gqlgen/codegen/generated!.gotpl
@@ -7,6 +7,7 @@
{{ reserveImport "sync/atomic" }}
{{ reserveImport "errors" }}
{{ reserveImport "bytes" }}
+{{ reserveImport "embed" }}
{{ reserveImport "github.com/vektah/gqlparser/v2" "gqlparser" }}
{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }}
@@ -135,6 +136,13 @@
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
rc := graphql.GetOperationContext(ctx)
ec := executionContext{rc, e}
+ inputUnmarshalMap := graphql.BuildUnmarshalerMap(
+ {{- range $input := .Inputs -}}
+ {{ if not $input.HasUnmarshal }}
+ ec.unmarshalInput{{ $input.Name }},
+ {{- end }}
+ {{- end }}
+ )
first := true
switch rc.Operation.Operation {
@@ -142,6 +150,7 @@
return func(ctx context.Context) *graphql.Response {
if !first { return nil }
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
{{ if .Directives.LocationDirectives "QUERY" -}}
data := ec._queryMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
return ec._{{.QueryRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
@@ -162,6 +171,7 @@
return func(ctx context.Context) *graphql.Response {
if !first { return nil }
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
{{ if .Directives.LocationDirectives "MUTATION" -}}
data := ec._mutationMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
return ec._{{.MutationRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
@@ -190,7 +200,7 @@
var buf bytes.Buffer
return func(ctx context.Context) *graphql.Response {
buf.Reset()
- data := next()
+ data := next(ctx)
if data == nil {
return nil
@@ -226,9 +236,22 @@
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
}
+ {{if .HasEmbeddableSources }}
+ //go:embed{{- range $source := .AugmentedSources }}{{if $source.Embeddable}} {{$source.RelativePath|quote}}{{end}}{{- end }}
+ var sourcesFS embed.FS
+
+ func sourceData(filename string) string {
+ data, err := sourcesFS.ReadFile(filename)
+ if err != nil {
+ panic(fmt.Sprintf("codegen problem: %s not available", filename))
+ }
+ return string(data)
+ }
+ {{- end }}
+
var sources = []*ast.Source{
- {{- range $source := .Config.Sources }}
- {Name: {{$source.Name|quote}}, Input: {{$source.Input|rawQuote}}, BuiltIn: {{$source.BuiltIn}}},
+ {{- range $source := .AugmentedSources }}
+ {Name: {{$source.RelativePath|quote}}, Input: {{if (not $source.Embeddable)}}{{$source.Source|rawQuote}}{{else}}sourceData({{$source.RelativePath|quote}}){{end}}, BuiltIn: {{$source.BuiltIn}}},
{{- end }}
}
var parsedSchema = gqlparser.MustLoadSchema(sources...)
diff --git a/vendor/github.com/99designs/gqlgen/codegen/object.gotpl b/vendor/github.com/99designs/gqlgen/codegen/object.gotpl
index 8cb9d28c..1fbdface 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/object.gotpl
+++ b/vendor/github.com/99designs/gqlgen/codegen/object.gotpl
@@ -3,7 +3,7 @@
var {{ $object.Name|lcFirst}}Implementors = {{$object.Implementors}}
{{- if .Stream }}
-func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.SelectionSet) func() graphql.Marshaler {
+func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.SelectionSet) func(ctx context.Context) graphql.Marshaler {
fields := graphql.CollectFields(ec.OperationContext, sel, {{$object.Name|lcFirst}}Implementors)
ctx = graphql.WithFieldContext(ctx, &graphql.FieldContext{
Object: {{$object.Name|quote}},
@@ -80,13 +80,12 @@ func (ec *executionContext) _{{$object.Name}}(ctx context.Context, sel ast.Selec
{{end}}
})
{{- else }}
- innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
- return ec._{{$object.Name}}_{{$field.Name}}(ctx, field{{if not $object.Root}}, obj{{end}})
- }
{{if $object.Root}}
- out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, innerFunc)
+ out.Values[i] = ec.OperationContext.RootResolverMiddleware(innerCtx, func(ctx context.Context) (res graphql.Marshaler) {
+ return ec._{{$object.Name}}_{{$field.Name}}(ctx, field)
+ })
{{else}}
- out.Values[i] = innerFunc(ctx)
+ out.Values[i] = ec._{{$object.Name}}_{{$field.Name}}(ctx, field, obj)
{{end}}
{{- if $field.TypeReference.GQL.NonNull }}
diff --git a/vendor/github.com/99designs/gqlgen/codegen/root_.gotpl b/vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
index 13d77961..aeab219a 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
+++ b/vendor/github.com/99designs/gqlgen/codegen/root_.gotpl
@@ -7,6 +7,7 @@
{{ reserveImport "sync/atomic" }}
{{ reserveImport "errors" }}
{{ reserveImport "bytes" }}
+{{ reserveImport "embed" }}
{{ reserveImport "github.com/vektah/gqlparser/v2" "gqlparser" }}
{{ reserveImport "github.com/vektah/gqlparser/v2/ast" }}
@@ -102,6 +103,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
rc := graphql.GetOperationContext(ctx)
ec := executionContext{rc, e}
+ inputUnmarshalMap := graphql.BuildUnmarshalerMap(
+ {{- range $input := .Inputs -}}
+ {{ if not $input.HasUnmarshal }}
+ ec.unmarshalInput{{ $input.Name }},
+ {{- end }}
+ {{- end }}
+ )
first := true
switch rc.Operation.Operation {
@@ -109,6 +117,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
return func(ctx context.Context) *graphql.Response {
if !first { return nil }
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
{{ if .Directives.LocationDirectives "QUERY" -}}
data := ec._queryMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
return ec._{{.QueryRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
@@ -129,6 +138,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
return func(ctx context.Context) *graphql.Response {
if !first { return nil }
first = false
+ ctx = graphql.WithUnmarshalerMap(ctx, inputUnmarshalMap)
{{ if .Directives.LocationDirectives "MUTATION" -}}
data := ec._mutationMiddleware(ctx, rc.Operation, func(ctx context.Context) (interface{}, error){
return ec._{{.MutationRoot.Name}}(ctx, rc.Operation.SelectionSet), nil
@@ -157,7 +167,7 @@ func (e *executableSchema) Exec(ctx context.Context) graphql.ResponseHandler {
var buf bytes.Buffer
return func(ctx context.Context) *graphql.Response {
buf.Reset()
- data := next()
+ data := next(ctx)
if data == nil {
return nil
@@ -193,9 +203,23 @@ func (ec *executionContext) introspectType(name string) (*introspection.Type, er
return introspection.WrapTypeFromDef(parsedSchema, parsedSchema.Types[name]), nil
}
+
+{{if .HasEmbeddableSources }}
+//go:embed{{- range $source := .AugmentedSources }}{{if $source.Embeddable}} {{$source.RelativePath|quote}}{{end}}{{- end }}
+var sourcesFS embed.FS
+
+func sourceData(filename string) string {
+ data, err := sourcesFS.ReadFile(filename)
+ if err != nil {
+ panic(fmt.Sprintf("codegen problem: %s not available", filename))
+ }
+ return string(data)
+}
+{{- end}}
+
var sources = []*ast.Source{
-{{- range $source := .Config.Sources }}
- {Name: {{$source.Name|quote}}, Input: {{$source.Input|rawQuote}}, BuiltIn: {{$source.BuiltIn}}},
+{{- range $source := .AugmentedSources }}
+ {Name: {{$source.RelativePath|quote}}, Input: {{if (not $source.Embeddable)}}{{$source.Source|rawQuote}}{{else}}sourceData({{$source.RelativePath|quote}}){{end}}, BuiltIn: {{$source.BuiltIn}}},
{{- end }}
}
var parsedSchema = gqlparser.MustLoadSchema(sources...)
diff --git a/vendor/github.com/99designs/gqlgen/codegen/type.gotpl b/vendor/github.com/99designs/gqlgen/codegen/type.gotpl
index 1fc6319c..d5c39195 100644
--- a/vendor/github.com/99designs/gqlgen/codegen/type.gotpl
+++ b/vendor/github.com/99designs/gqlgen/codegen/type.gotpl
@@ -151,7 +151,7 @@
if v == nil {
{{- if $type.GQL.NonNull }}
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
{{- end }}
return graphql.Null
@@ -174,7 +174,7 @@
{{- if $type.GQL.NonNull }}
if res == graphql.Null {
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
- ec.Errorf(ctx, "must not be null")
+ ec.Errorf(ctx, "the requested element is null which the schema does not allow")
}
}
{{- end }}
diff --git a/vendor/github.com/99designs/gqlgen/go.mod b/vendor/github.com/99designs/gqlgen/go.mod
index 1c00f90c..77ce6214 100644
--- a/vendor/github.com/99designs/gqlgen/go.mod
+++ b/vendor/github.com/99designs/gqlgen/go.mod
@@ -3,22 +3,20 @@ module github.com/99designs/gqlgen
go 1.16
require (
- github.com/gorilla/websocket v1.4.2
- github.com/hashicorp/golang-lru v0.5.0
+ github.com/gorilla/websocket v1.5.0
+ github.com/hashicorp/golang-lru v0.5.4
github.com/kevinmbeaulieu/eq-go v1.0.0
github.com/logrusorgru/aurora/v3 v3.0.0
- github.com/matryer/moq v0.2.3
- github.com/mattn/go-colorable v0.1.4
- github.com/mattn/go-isatty v0.0.12
- github.com/mitchellh/mapstructure v1.2.3
- github.com/stretchr/testify v1.4.0
- github.com/urfave/cli/v2 v2.3.0
- github.com/vektah/gqlparser/v2 v2.4.0
- golang.org/x/tools v0.1.9
- gopkg.in/yaml.v2 v2.2.8
+ github.com/matryer/moq v0.2.7
+ github.com/mattn/go-colorable v0.1.12
+ github.com/mattn/go-isatty v0.0.14
+ github.com/mitchellh/mapstructure v1.3.1
+ github.com/stretchr/testify v1.7.1
+ github.com/urfave/cli/v2 v2.8.1
+ github.com/vektah/gqlparser/v2 v2.4.4
+ golang.org/x/tools v0.1.10
+ google.golang.org/protobuf v1.28.0
+ gopkg.in/yaml.v2 v2.4.0
)
-require (
- github.com/agnivade/levenshtein v1.1.0 // indirect
- github.com/cpuguy83/go-md2man/v2 v2.0.1 // indirect
-)
+require github.com/agnivade/levenshtein v1.1.1 // indirect
diff --git a/vendor/github.com/99designs/gqlgen/go.sum b/vendor/github.com/99designs/gqlgen/go.sum
index e1dc912c..3c4db5f7 100644
--- a/vendor/github.com/99designs/gqlgen/go.sum
+++ b/vendor/github.com/99designs/gqlgen/go.sum
@@ -1,12 +1,11 @@
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
-github.com/agnivade/levenshtein v1.1.0 h1:n6qGwyHG61v3ABce1rPVZklEYRT8NFpCMrpZdBUbYGM=
-github.com/agnivade/levenshtein v1.1.0/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
+github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
+github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q=
github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE=
-github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -14,10 +13,13 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
-github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc=
-github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
-github.com/hashicorp/golang-lru v0.5.0 h1:CL2msUPvZTLb5O648aiLNJw3hnBxN2+1Jq8rCOH9wdo=
-github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
+github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc=
+github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
+github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
github.com/kevinmbeaulieu/eq-go v1.0.0 h1:AQgYHURDOmnVJ62jnEk0W/7yFKEn+Lv8RHN6t7mB0Zo=
github.com/kevinmbeaulieu/eq-go v1.0.0/go.mod h1:G3S8ajA56gKBZm4UB9AOyoOS37JO3roToPzKNM8dtdM=
github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI=
@@ -27,73 +29,77 @@ github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/logrusorgru/aurora/v3 v3.0.0 h1:R6zcoZZbvVcGMvDCKo45A9U/lzYyzl5NfYIvznmDfE4=
github.com/logrusorgru/aurora/v3 v3.0.0/go.mod h1:vsR12bk5grlLvLXAYrBsb5Oc/N+LxAlxggSjiwMnCUc=
-github.com/matryer/moq v0.2.3 h1:Q06vEqnBYjjfx5KKgHfYRKE/lvlRu+Nj+xodG4YdHnU=
-github.com/matryer/moq v0.2.3/go.mod h1:9RtPYjTnH1bSBIkpvtHkFN7nbWAnO7oRpdJkEIn6UtE=
-github.com/mattn/go-colorable v0.1.4 h1:snbPLB8fVfU9iwbbo30TPtbLRzwWu6aJS6Xh4eaaviA=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
-github.com/mitchellh/mapstructure v1.2.3 h1:f/MjBEBDLttYCGfRaKBbKSRVF5aV2O6fnBpzknuE3jU=
-github.com/mitchellh/mapstructure v1.2.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/matryer/moq v0.2.7 h1:RtpiPUM8L7ZSCbSwK+QcZH/E9tgqAkFjKQxsRs25b4w=
+github.com/matryer/moq v0.2.7/go.mod h1:kITsx543GOENm48TUAQyJ9+SAvFSr7iGQXPoth/VUBk=
+github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
+github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
+github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
+github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
+github.com/mitchellh/mapstructure v1.3.1 h1:cCBH2gTD2K0OtLlv/Y5H01VQCqmlDxz30kS5Y5bqfLA=
+github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
-github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
-github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
-github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
-github.com/vektah/gqlparser/v2 v2.4.0 h1:EmA4dw9mqHm0j6Xzb9T21hOrp3oXmxnS40vwki70DZU=
-github.com/vektah/gqlparser/v2 v2.4.0/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
-github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
+github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
+github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+github.com/urfave/cli/v2 v2.8.1 h1:CGuYNZF9IKZY/rfBe3lJpccSoIY1ytfvmgQT90cNOl4=
+github.com/urfave/cli/v2 v2.8.1/go.mod h1:Z41J9TPoffeoqP0Iza0YbAhGvymRdZAd2uPmZ5JxRdY=
+github.com/vektah/gqlparser/v2 v2.4.4 h1:rh9hwZ5Jx9cCq88zXz2YHKmuQBuwY1JErHU8GywFdwE=
+github.com/vektah/gqlparser/v2 v2.4.4/go.mod h1:flJWIR04IMQPGz+BXLrORkrARBxv/rtyIAFvd/MceW0=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
-golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38=
+golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
+golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
+golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20200815165600-90abf76919f3/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
-golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8=
golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU=
+golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=
+golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15 h1:YR8cESwS4TdDjEe65xsg0ogRM/Nc3DYOhEAlW+xobZo=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10=
gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
+gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
diff --git a/vendor/github.com/99designs/gqlgen/graphql/context_field.go b/vendor/github.com/99designs/gqlgen/graphql/context_field.go
index c06118b2..1f9a6e88 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/context_field.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/context_field.go
@@ -30,6 +30,25 @@ type FieldContext struct {
IsMethod bool
// IsResolver indicates if the field has a user-specified resolver
IsResolver bool
+ // Child allows getting a child FieldContext by its field collection description.
+ // Note that, the returned child FieldContext represents the context as it was
+ // before the execution of the field resolver. For example:
+ //
+ // srv.AroundFields(func(ctx context.Context, next graphql.Resolver) (interface{}, error) {
+ // fc := graphql.GetFieldContext(ctx)
+ // op := graphql.GetOperationContext(ctx)
+ // collected := graphql.CollectFields(opCtx, fc.Field.Selections, []string{"User"})
+ //
+ // child, err := fc.Child(ctx, collected[0])
+ // if err != nil {
+ // return nil, err
+ // }
+ // fmt.Println("child context %q with args: %v", child.Field.Name, child.Args)
+ //
+ // return next(ctx)
+ // })
+ //
+ Child func(context.Context, CollectedField) (*FieldContext, error)
}
type FieldStats struct {
diff --git a/vendor/github.com/99designs/gqlgen/graphql/executor/executor.go b/vendor/github.com/99designs/gqlgen/graphql/executor/executor.go
index 95a28031..d2d1a7dc 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/executor/executor.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/executor/executor.go
@@ -67,7 +67,9 @@ func (e *Executor) CreateOperationContext(ctx context.Context, params *graphql.R
rc.Operation = rc.Doc.Operations.ForName(params.OperationName)
if rc.Operation == nil {
- return rc, gqlerror.List{gqlerror.Errorf("operation %s not found", params.OperationName)}
+ err := gqlerror.Errorf("operation %s not found", params.OperationName)
+ errcode.Set(err, errcode.ValidationFailed)
+ return rc, gqlerror.List{err}
}
var err *gqlerror.Error
@@ -178,6 +180,13 @@ func (e *Executor) parseQuery(ctx context.Context, stats *graphql.Stats, query s
stats.Parsing.End = graphql.Now()
stats.Validation.Start = graphql.Now()
+
+ if len(doc.Operations) == 0 {
+ err = gqlerror.Errorf("no operation provided")
+ errcode.Set(err, errcode.ValidationFailed)
+ return nil, gqlerror.List{err}
+ }
+
listErr := validator.Validate(e.es.Schema(), doc)
if len(listErr) != 0 {
for _, e := range listErr {
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler.go b/vendor/github.com/99designs/gqlgen/graphql/handler.go
index 92116597..b76381f4 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler.go
@@ -27,6 +27,7 @@ type (
OperationName string `json:"operationName"`
Variables map[string]interface{} `json:"variables"`
Extensions map[string]interface{} `json:"extensions"`
+ Headers http.Header `json:"headers"`
ReadTime TraceTiming `json:"-"`
}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
index 3874eef4..c3ecc883 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_form.go
@@ -7,7 +7,6 @@ import (
"mime"
"net/http"
"os"
- "strings"
"github.com/99designs/gqlgen/graphql"
)
@@ -64,133 +63,145 @@ func (f MultipartForm) Do(w http.ResponseWriter, r *http.Request, exec graphql.G
return
}
r.Body = http.MaxBytesReader(w, r.Body, f.maxUploadSize())
- if err = r.ParseMultipartForm(f.maxMemory()); err != nil {
+ defer r.Body.Close()
+
+ mr, err := r.MultipartReader()
+ if err != nil {
w.WriteHeader(http.StatusUnprocessableEntity)
- if strings.Contains(err.Error(), "request body too large") {
- writeJsonError(w, "failed to parse multipart form, request body too large")
- return
- }
writeJsonError(w, "failed to parse multipart form")
return
}
- defer r.Body.Close()
+
+ part, err := mr.NextPart()
+ if err != nil || part.FormName() != "operations" {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonError(w, "first part must be operations")
+ return
+ }
var params graphql.RawParams
-
- if err = jsonDecode(strings.NewReader(r.Form.Get("operations")), ¶ms); err != nil {
+ if err = jsonDecode(part, ¶ms); err != nil {
w.WriteHeader(http.StatusUnprocessableEntity)
writeJsonError(w, "operations form field could not be decoded")
return
}
+ part, err = mr.NextPart()
+ if err != nil || part.FormName() != "map" {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonError(w, "second part must be map")
+ return
+ }
+
uploadsMap := map[string][]string{}
- if err = json.Unmarshal([]byte(r.Form.Get("map")), &uploadsMap); err != nil {
+ if err = json.NewDecoder(part).Decode(&uploadsMap); err != nil {
w.WriteHeader(http.StatusUnprocessableEntity)
writeJsonError(w, "map form field could not be decoded")
return
}
- var upload graphql.Upload
- for key, paths := range uploadsMap {
+ for {
+ part, err = mr.NextPart()
+ if err == io.EOF {
+ break
+ } else if err != nil {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonErrorf(w, "failed to parse part")
+ return
+ }
+
+ key := part.FormName()
+ filename := part.FileName()
+ contentType := part.Header.Get("Content-Type")
+
+ paths := uploadsMap[key]
if len(paths) == 0 {
w.WriteHeader(http.StatusUnprocessableEntity)
writeJsonErrorf(w, "invalid empty operations paths list for key %s", key)
return
}
- file, header, err := r.FormFile(key)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to get key %s from form", key)
- return
- }
- defer file.Close()
+ delete(uploadsMap, key)
- if len(paths) == 1 {
- upload = graphql.Upload{
- File: file,
- Size: header.Size,
- Filename: header.Filename,
- ContentType: header.Header.Get("Content-Type"),
- }
-
- if err := params.AddUpload(upload, key, paths[0]); err != nil {
+ var upload graphql.Upload
+ if r.ContentLength < f.maxMemory() {
+ fileBytes, err := ioutil.ReadAll(part)
+ if err != nil {
w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonGraphqlError(w, err)
+ writeJsonErrorf(w, "failed to read file for key %s", key)
return
}
+ for _, path := range paths {
+ upload = graphql.Upload{
+ File: &bytesReader{s: &fileBytes, i: 0, prevRune: -1},
+ Size: int64(len(fileBytes)),
+ Filename: filename,
+ ContentType: contentType,
+ }
+
+ if err := params.AddUpload(upload, key, path); err != nil {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonGraphqlError(w, err)
+ return
+ }
+ }
} else {
- if r.ContentLength < f.maxMemory() {
- fileBytes, err := ioutil.ReadAll(file)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to read file for key %s", key)
- return
- }
- for _, path := range paths {
- upload = graphql.Upload{
- File: &bytesReader{s: &fileBytes, i: 0, prevRune: -1},
- Size: header.Size,
- Filename: header.Filename,
- ContentType: header.Header.Get("Content-Type"),
- }
-
- if err := params.AddUpload(upload, key, path); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonGraphqlError(w, err)
- return
- }
- }
- } else {
- tmpFile, err := ioutil.TempFile(os.TempDir(), "gqlgen-")
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to create temp file for key %s", key)
- return
- }
- tmpName := tmpFile.Name()
- defer func() {
- _ = os.Remove(tmpName)
- }()
- _, err = io.Copy(tmpFile, file)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- if err := tmpFile.Close(); err != nil {
- writeJsonErrorf(w, "failed to copy to temp file and close temp file for key %s", key)
- return
- }
- writeJsonErrorf(w, "failed to copy to temp file for key %s", key)
- return
- }
+ tmpFile, err := ioutil.TempFile(os.TempDir(), "gqlgen-")
+ if err != nil {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonErrorf(w, "failed to create temp file for key %s", key)
+ return
+ }
+ tmpName := tmpFile.Name()
+ defer func() {
+ _ = os.Remove(tmpName)
+ }()
+ fileSize, err := io.Copy(tmpFile, part)
+ if err != nil {
+ w.WriteHeader(http.StatusUnprocessableEntity)
if err := tmpFile.Close(); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to close temp file for key %s", key)
+ writeJsonErrorf(w, "failed to copy to temp file and close temp file for key %s", key)
return
}
- for _, path := range paths {
- pathTmpFile, err := os.Open(tmpName)
- if err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonErrorf(w, "failed to open temp file for key %s", key)
- return
- }
- defer pathTmpFile.Close()
- upload = graphql.Upload{
- File: pathTmpFile,
- Size: header.Size,
- Filename: header.Filename,
- ContentType: header.Header.Get("Content-Type"),
- }
+ writeJsonErrorf(w, "failed to copy to temp file for key %s", key)
+ return
+ }
+ if err := tmpFile.Close(); err != nil {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonErrorf(w, "failed to close temp file for key %s", key)
+ return
+ }
+ for _, path := range paths {
+ pathTmpFile, err := os.Open(tmpName)
+ if err != nil {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonErrorf(w, "failed to open temp file for key %s", key)
+ return
+ }
+ defer pathTmpFile.Close()
+ upload = graphql.Upload{
+ File: pathTmpFile,
+ Size: fileSize,
+ Filename: filename,
+ ContentType: contentType,
+ }
- if err := params.AddUpload(upload, key, path); err != nil {
- w.WriteHeader(http.StatusUnprocessableEntity)
- writeJsonGraphqlError(w, err)
- return
- }
+ if err := params.AddUpload(upload, key, path); err != nil {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonGraphqlError(w, err)
+ return
}
}
}
}
+ for key := range uploadsMap {
+ w.WriteHeader(http.StatusUnprocessableEntity)
+ writeJsonErrorf(w, "failed to get key %s from form", key)
+ return
+ }
+
+ params.Headers = r.Header
+
params.ReadTime = graphql.TraceTiming{
Start: start,
End: graphql.Now(),
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
index d97c89c6..0ba58100 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_get.go
@@ -32,6 +32,7 @@ func (h GET) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecut
raw := &graphql.RawParams{
Query: r.URL.Query().Get("query"),
OperationName: r.URL.Query().Get("operationName"),
+ Headers: r.Header,
}
raw.ReadTime.Start = graphql.Now()
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go
index deefeb38..99c31571 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/http_post.go
@@ -36,6 +36,9 @@ func (h POST) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecu
writeJsonErrorf(w, "json body could not be decoded: "+err.Error())
return
}
+
+ params.Headers = r.Header
+
params.ReadTime = graphql.TraceTiming{
Start: start,
End: graphql.Now(),
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go
index 6b725ff3..5d7f4b88 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/options.go
@@ -2,12 +2,16 @@ package transport
import (
"net/http"
+ "strings"
"github.com/99designs/gqlgen/graphql"
)
// Options responds to http OPTIONS and HEAD requests
-type Options struct{}
+type Options struct {
+ // AllowedMethods is a list of allowed HTTP methods.
+ AllowedMethods []string
+}
var _ graphql.Transport = Options{}
@@ -18,9 +22,16 @@ func (o Options) Supports(r *http.Request) bool {
func (o Options) Do(w http.ResponseWriter, r *http.Request, exec graphql.GraphExecutor) {
switch r.Method {
case http.MethodOptions:
- w.Header().Set("Allow", "OPTIONS, GET, POST")
+ w.Header().Set("Allow", o.allowedMethods())
w.WriteHeader(http.StatusOK)
case http.MethodHead:
w.WriteHeader(http.StatusMethodNotAllowed)
}
}
+
+func (o Options) allowedMethods() string {
+ if len(o.AllowedMethods) == 0 {
+ return "OPTIONS, GET, POST"
+ }
+ return strings.Join(o.AllowedMethods, ", ")
+}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go
index 28480a40..51b1104c 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket.go
@@ -49,7 +49,24 @@ type (
var errReadTimeout = errors.New("read timeout")
-var _ graphql.Transport = Websocket{}
+type WebsocketError struct {
+ Err error
+
+ // IsReadError flags whether the error occurred on read or write to the websocket
+ IsReadError bool
+}
+
+func (e WebsocketError) Error() string {
+ if e.IsReadError {
+ return fmt.Sprintf("websocket read: %v", e.Err)
+ }
+ return fmt.Sprintf("websocket write: %v", e.Err)
+}
+
+var (
+ _ graphql.Transport = Websocket{}
+ _ error = WebsocketError{}
+)
func (t Websocket) Supports(r *http.Request) bool {
return r.Header.Get("Upgrade") != ""
@@ -94,9 +111,12 @@ func (t Websocket) Do(w http.ResponseWriter, r *http.Request, exec graphql.Graph
conn.run()
}
-func (c *wsConnection) handlePossibleError(err error) {
+func (c *wsConnection) handlePossibleError(err error, isReadError bool) {
if c.ErrorFunc != nil && err != nil {
- c.ErrorFunc(c.ctx, err)
+ c.ErrorFunc(c.ctx, WebsocketError{
+ Err: err,
+ IsReadError: isReadError,
+ })
}
}
@@ -181,7 +201,7 @@ func (c *wsConnection) init() bool {
func (c *wsConnection) write(msg *message) {
c.mu.Lock()
- c.handlePossibleError(c.me.Send(msg))
+ c.handlePossibleError(c.me.Send(msg), false)
c.mu.Unlock()
}
@@ -227,7 +247,7 @@ func (c *wsConnection) run() {
if err != nil {
// If the connection got closed by us, don't report the error
if !errors.Is(err, net.ErrClosed) {
- c.handlePossibleError(err)
+ c.handlePossibleError(err, true)
}
return
}
@@ -358,12 +378,8 @@ func (c *wsConnection) subscribe(start time.Time, msg *message) {
c.sendResponse(msg.id, response)
}
- c.complete(msg.id)
- c.mu.Lock()
- delete(c.active, msg.id)
- c.mu.Unlock()
- cancel()
+ // complete and context cancel comes from the defer
}()
}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go
index 9b82082a..bfb12541 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphql_transport_ws.go
@@ -7,7 +7,7 @@ import (
"github.com/gorilla/websocket"
)
-// https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
+// https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md
const (
graphqltransportwsSubprotocol = "graphql-transport-ws"
diff --git a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go
index 49ed1ee8..d690cec4 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/handler/transport/websocket_graphqlws.go
@@ -7,7 +7,7 @@ import (
"github.com/gorilla/websocket"
)
-// https://github.com/apollographql/subscriptions-transport-ws/blob/master/PROTOCOL.md
+// https://github.com/enisdenjo/graphql-ws/blob/master/PROTOCOL.md
const (
graphqlwsSubprotocol = "graphql-ws"
diff --git a/vendor/github.com/99designs/gqlgen/graphql/input.go b/vendor/github.com/99designs/gqlgen/graphql/input.go
new file mode 100644
index 00000000..88c3efaa
--- /dev/null
+++ b/vendor/github.com/99designs/gqlgen/graphql/input.go
@@ -0,0 +1,55 @@
+package graphql
+
+import (
+ "context"
+ "errors"
+ "reflect"
+)
+
+const unmarshalInputCtx key = "unmarshal_input_context"
+
+// BuildUnmarshalerMap returns a map of unmarshal functions of the ExecutableContext
+// to use with the WithUnmarshalerMap function.
+func BuildUnmarshalerMap(unmarshaler ...interface{}) map[reflect.Type]reflect.Value {
+ maps := make(map[reflect.Type]reflect.Value)
+ for _, v := range unmarshaler {
+ ft := reflect.TypeOf(v)
+ if ft.Kind() == reflect.Func {
+ maps[ft.Out(0)] = reflect.ValueOf(v)
+ }
+ }
+
+ return maps
+}
+
+// WithUnmarshalerMap returns a new context with a map from input types to their unmarshaler functions.
+func WithUnmarshalerMap(ctx context.Context, maps map[reflect.Type]reflect.Value) context.Context {
+ return context.WithValue(ctx, unmarshalInputCtx, maps)
+}
+
+// UnmarshalInputFromContext allows unmarshaling input object from a context.
+func UnmarshalInputFromContext(ctx context.Context, raw, v interface{}) error {
+ m, ok := ctx.Value(unmarshalInputCtx).(map[reflect.Type]reflect.Value)
+ if m == nil || !ok {
+ return errors.New("graphql: the input context is empty")
+ }
+
+ rv := reflect.ValueOf(v)
+ if rv.Kind() != reflect.Ptr || rv.IsNil() {
+ return errors.New("graphql: input must be a non-nil pointer")
+ }
+ if fn, ok := m[rv.Elem().Type()]; ok {
+ res := fn.Call([]reflect.Value{
+ reflect.ValueOf(ctx),
+ reflect.ValueOf(raw),
+ })
+ if err := res[1].Interface(); err != nil {
+ return err.(error)
+ }
+
+ rv.Elem().Set(res[0])
+ return nil
+ }
+
+ return errors.New("graphql: no unmarshal function found")
+}
diff --git a/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go b/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go
index 1b04a20d..d356729e 100644
--- a/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go
+++ b/vendor/github.com/99designs/gqlgen/graphql/playground/playground.go
@@ -3,6 +3,7 @@ package playground
import (
"html/template"
"net/http"
+ "net/url"
)
var page = template.Must(template.New("graphiql").Parse(`
@@ -36,14 +37,20 @@ var page = template.Must(template.New("graphiql").Parse(`
>
@@ -224,7 +239,7 @@ window.onload = function() {
deepLinking: {{.DeepLinking}},
docExpansion: "{{.DocExpansion}}",
persistAuthorization: {{.PersistAuthorization}},
- dom_id: "{{.DomID}}",
+ dom_id: "#{{.DomID}}",
validatorUrl: null,
presets: [
SwaggerUIBundle.presets.apis,
diff --git a/vendor/github.com/swaggo/swag/Makefile b/vendor/github.com/swaggo/swag/Makefile
index fa679d87..d1a98171 100644
--- a/vendor/github.com/swaggo/swag/Makefile
+++ b/vendor/github.com/swaggo/swag/Makefile
@@ -13,7 +13,7 @@ GOPATH:=$(shell $(GOCMD) env GOPATH)
u := $(if $(update),-u)
BINARY_NAME:=swag
-PACKAGES:=$(shell $(GOLIST) github.com/swaggo/swag github.com/swaggo/swag/cmd/swag github.com/swaggo/swag/gen)
+PACKAGES:=$(shell $(GOLIST) github.com/swaggo/swag github.com/swaggo/swag/cmd/swag github.com/swaggo/swag/gen github.com/swaggo/swag/format)
GOFILES:=$(shell find . -name "*.go" -type f)
export GO111MODULE := on
@@ -63,9 +63,9 @@ deps:
$(GOGET) golang.org/x/tools/go/loader
.PHONY: devel-deps
-devel-deps:
+devel-deps:
GO111MODULE=off $(GOGET) -v -u \
- golang.org/x/lint/golint
+ golang.org/x/lint/golint
.PHONY: lint
lint: devel-deps
@@ -91,4 +91,4 @@ fmt-check:
.PHONY: view-covered
view-covered:
$(GOTEST) -coverprofile=cover.out $(TARGET)
- $(GOCMD) tool cover -html=cover.out
\ No newline at end of file
+ $(GOCMD) tool cover -html=cover.out
diff --git a/vendor/github.com/swaggo/swag/README.md b/vendor/github.com/swaggo/swag/README.md
index 06724e37..84239d11 100644
--- a/vendor/github.com/swaggo/swag/README.md
+++ b/vendor/github.com/swaggo/swag/README.md
@@ -9,7 +9,7 @@
[](https://goreportcard.com/report/github.com/swaggo/swag)
[](https://codebeat.co/projects/github-com-swaggo-swag-master)
[](https://godoc.org/github.com/swaggo/swag)
-[](#backers)
+[](#backers)
[](#sponsors) [](https://app.fossa.io/projects/git%2Bgithub.com%2Fswaggo%2Fswag?ref=badge_shield)
[](https://github.com/swaggo/swag/releases)
@@ -30,9 +30,10 @@ Swag converts Go annotations to Swagger Documentation 2.0. We've created a varie
- [Descriptions over multiple lines](#descriptions-over-multiple-lines)
- [User defined structure with an array type](#user-defined-structure-with-an-array-type)
- [Model composition in response](#model-composition-in-response)
- - [Add a headers in response](#add-a-headers-in-response)
+ - [Add a headers in response](#add-a-headers-in-response)
- [Use multiple path params](#use-multiple-path-params)
- [Example value of struct](#example-value-of-struct)
+ - [SchemaExample of body](#schemaexample-of-body)
- [Description of struct](#description-of-struct)
- [Use swaggertype tag to supported custom type](#use-swaggertype-tag-to-supported-custom-type)
- [Use global overrides to support a custom type](#use-global-overrides-to-support-a-custom-type)
@@ -192,7 +193,7 @@ import (
"github.com/gin-gonic/gin"
"github.com/swaggo/files"
"github.com/swaggo/gin-swagger"
-
+
"./docs" // docs is generated by Swag CLI, you have to import it.
)
@@ -211,7 +212,7 @@ func main() {
docs.SwaggerInfo.Host = "petstore.swagger.io"
docs.SwaggerInfo.BasePath = "/v2"
docs.SwaggerInfo.Schemes = []string{"http", "https"}
-
+
r := gin.New()
// use ginSwagger middleware to serve the API docs
@@ -297,10 +298,10 @@ $ swag init
## The swag formatter
-The Swag Comments can be automatically formatted, just like 'go fmt'.
+The Swag Comments can be automatically formatted, just like 'go fmt'.
Find the result of formatting [here](https://github.com/swaggo/swag/tree/master/example/celler).
-Usage:
+Usage:
```shell
swag fmt
```
@@ -382,7 +383,7 @@ When a short string in your documentation is insufficient, or you need images, c
| annotation | description |
|-------------|----------------------------------------------------------------------------------------------------------------------------|
| description | A verbose explanation of the operation behavior. |
-| description.markdown | A short description of the application. The description will be read from a file named like endpointname.md| // @description.file endpoint.description.markdown |
+| description.markdown | A short description of the application. The description will be read from a file. E.g. `@description.markdown details` will load `details.md`| // @description.file endpoint.description.markdown |
| id | A unique string used to identify the operation. Must be unique among all API operations. |
| tags | A list of tags to each API operation that separated by commas. |
| summary | A short summary of what the operation does. |
@@ -443,21 +444,21 @@ Besides that, `swag` also accepts aliases for some MIME Types as follows:
| annotation | description | parameters | example |
|------------|-------------|------------|---------|
| securitydefinitions.basic | [Basic](https://swagger.io/docs/specification/2-0/authentication/basic-authentication/) auth. | | // @securityDefinitions.basic BasicAuth |
-| securitydefinitions.apikey | [API key](https://swagger.io/docs/specification/2-0/authentication/api-keys/) auth. | in, name | // @securityDefinitions.apikey ApiKeyAuth |
-| securitydefinitions.oauth2.application | [OAuth2 application](https://swagger.io/docs/specification/authentication/oauth2/) auth. | tokenUrl, scope | // @securitydefinitions.oauth2.application OAuth2Application |
-| securitydefinitions.oauth2.implicit | [OAuth2 implicit](https://swagger.io/docs/specification/authentication/oauth2/) auth. | authorizationUrl, scope | // @securitydefinitions.oauth2.implicit OAuth2Implicit |
-| securitydefinitions.oauth2.password | [OAuth2 password](https://swagger.io/docs/specification/authentication/oauth2/) auth. | tokenUrl, scope | // @securitydefinitions.oauth2.password OAuth2Password |
-| securitydefinitions.oauth2.accessCode | [OAuth2 access code](https://swagger.io/docs/specification/authentication/oauth2/) auth. | tokenUrl, authorizationUrl, scope | // @securitydefinitions.oauth2.accessCode OAuth2AccessCode |
+| securitydefinitions.apikey | [API key](https://swagger.io/docs/specification/2-0/authentication/api-keys/) auth. | in, name, description | // @securityDefinitions.apikey ApiKeyAuth |
+| securitydefinitions.oauth2.application | [OAuth2 application](https://swagger.io/docs/specification/authentication/oauth2/) auth. | tokenUrl, scope, description | // @securitydefinitions.oauth2.application OAuth2Application |
+| securitydefinitions.oauth2.implicit | [OAuth2 implicit](https://swagger.io/docs/specification/authentication/oauth2/) auth. | authorizationUrl, scope, description | // @securitydefinitions.oauth2.implicit OAuth2Implicit |
+| securitydefinitions.oauth2.password | [OAuth2 password](https://swagger.io/docs/specification/authentication/oauth2/) auth. | tokenUrl, scope, description | // @securitydefinitions.oauth2.password OAuth2Password |
+| securitydefinitions.oauth2.accessCode | [OAuth2 access code](https://swagger.io/docs/specification/authentication/oauth2/) auth. | tokenUrl, authorizationUrl, scope, description | // @securitydefinitions.oauth2.accessCode OAuth2AccessCode |
-| parameters annotation | example |
-|-----------------------|----------------------------------------------------------|
-| in | // @in header |
-| name | // @name Authorization |
-| tokenUrl | // @tokenUrl https://example.com/oauth/token |
-| authorizationurl | // @authorizationurl https://example.com/oauth/authorize |
-| scope.hoge | // @scope.write Grants write access |
-
+| parameters annotation | example |
+|---------------------------------|-------------------------------------------------------------------------|
+| in | // @in header |
+| name | // @name Authorization |
+| tokenUrl | // @tokenUrl https://example.com/oauth/token |
+| authorizationurl | // @authorizationurl https://example.com/oauth/authorize |
+| scope.hoge | // @scope.write Grants write access |
+| description | // @description OAuth protects our entity endpoints |
## Attribute
@@ -468,6 +469,7 @@ Besides that, `swag` also accepts aliases for some MIME Types as follows:
// @Param string query string false "string valid" minlength(5) maxlength(10)
// @Param int query int false "int valid" minimum(1) maximum(10)
// @Param default query string false "string default" default(A)
+// @Param example query string false "string example" example(string)
// @Param collection query []string false "string collection" collectionFormat(multi)
// @Param extensions query []string false "string collection" extensions(x-example=test,x-nullable)
```
@@ -476,7 +478,7 @@ It also works for the struct fields:
```go
type Foo struct {
- Bar string `minLength:"4" maxLength:"16"`
+ Bar string `minLength:"4" maxLength:"16" example:"random string"`
Baz int `minimum:"10" maximum:"20" default:"15"`
Qux []string `enums:"foo,bar,baz"`
}
@@ -486,7 +488,7 @@ type Foo struct {
Field Name | Type | Description
---|:---:|---
-validate | `string` | Determines the validation for the parameter. Possible values are: `required`.
+validate | `string` | Determines the validation for the parameter. Possible values are: `required`.
default | * | Declares the value of the parameter that the server will use if none is provided, for example a "count" to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: "default" has no meaning for required parameters.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined [`type`](#parameterType) for this parameter.
maximum | `number` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2.
minimum | `number` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3.
@@ -496,6 +498,7 @@ Field Name | Type | Description
enums | [\*] | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1.
format | `string` | The extending format for the previously mentioned [`type`](#parameterType). See [Data Type Formats](https://swagger.io/specification/v2/#dataTypeFormat) for further details.
collectionFormat | `string` |Determines the format of the array if type array is used. Possible values are: - `csv` - comma separated values `foo,bar`.
- `ssv` - space separated values `foo bar`.
- `tsv` - tab separated values `foo\tbar`.
- `pipes` - pipe separated values
foo|bar
. - `multi` - corresponds to multiple parameter instances instead of multiple values for a single instance `foo=bar&foo=baz`. This is valid only for parameters [`in`](#parameterIn) "query" or "formData".
Default value is `csv`.
+example | * | Declares the example for the parameter value
extensions | `string` | Add extension to parameters.
### Future
@@ -511,7 +514,7 @@ Field Name | Type | Description
### Descriptions over multiple lines
-You can add descriptions spanning multiple lines in either the general api description or routes definitions like so:
+You can add descriptions spanning multiple lines in either the general api description or routes definitions like so:
```go
// @description This is the first line
@@ -560,7 +563,7 @@ type Order struct { //in `proto` package
@success 200 {object} jsonresult.JSONResult{data=[]string} "desc"
```
-- overriding multiple fields. field will be added if not exists
+- overriding multiple fields. field will be added if not exists
```go
@success 200 {object} jsonresult.JSONResult{data1=string,data2=[]string,data3=proto.Order,data4=[]proto.Order} "desc"
```
@@ -613,6 +616,12 @@ type Account struct {
}
```
+### SchemaExample of body
+
+```go
+// @Param email body string true "message/rfc822" SchemaExample(Subject: Testmail\r\n\r\nBody Message\r\n)
+```
+
### Description of struct
```go
@@ -744,7 +753,7 @@ Rendered:
"id": "integer"
}
```
-
+
### Use swaggerignore tag to exclude a field
@@ -813,6 +822,14 @@ Make it AND condition
// @Security OAuth2Application[write, admin]
```
+Make it OR condition
+
+```go
+// @Security ApiKeyAuth || firebase
+// @Security OAuth2Application[write, admin] || APIKeyAuth
+```
+
+
### Add a description for enum items
```go
diff --git a/vendor/github.com/swaggo/swag/README_zh-CN.md b/vendor/github.com/swaggo/swag/README_zh-CN.md
index 06ba5257..75dbbcee 100644
--- a/vendor/github.com/swaggo/swag/README_zh-CN.md
+++ b/vendor/github.com/swaggo/swag/README_zh-CN.md
@@ -348,8 +348,8 @@ swag fmt -d ./ --exclude ./internal
| license.url | 用于API的许可证的URL。 必须采用网址格式。 | // @license.url http://www.apache.org/licenses/LICENSE-2.0.html |
| host | 运行API的主机(主机名或IP地址)。 | // @host localhost:8080 |
| BasePath | 运行API的基本路径。 | // @BasePath /api/v1 |
-| accept | API 可以使用的 MIME 类型列表。 请注意,Accept 仅影响具有请求正文的操作,例如 POST、PUT 和 PATCH。 值必须如“[Mime类型](#mime-types)”中所述。 | // @accept json |
-| produce | API可以生成的MIME类型的列表。值必须如“[Mime类型](#mime-types)”中所述。 | // @produce json |
+| accept | API 可以使用的 MIME 类型列表。 请注意,Accept 仅影响具有请求正文的操作,例如 POST、PUT 和 PATCH。 值必须如“[Mime类型](#mime类型)”中所述。 | // @accept json |
+| produce | API可以生成的MIME类型的列表。值必须如“[Mime类型](#mime类型)”中所述。 | // @produce json |
| query.collection.format | 请求URI query里数组参数的默认格式:csv,multi,pipes,tsv,ssv。 如果未设置,则默认为csv。 | // @query.collection.format multi |
| schemes | 用空格分隔的请求的传输协议。 | // @schemes http https |
| x-name | 扩展的键必须以x-开头,并且只能使用json值 | // @x-example-key {"key": "value"} |
@@ -377,8 +377,8 @@ Example [celler/controller](https://github.com/swaggo/swag/tree/master/example/c
| id | 用于标识操作的唯一字符串。在所有API操作中必须唯一。 |
| tags | 每个API操作的标签列表,以逗号分隔。 |
| summary | 该操作的简短摘要。 |
-| accept | API 可以使用的 MIME 类型列表。 请注意,Accept 仅影响具有请求正文的操作,例如 POST、PUT 和 PATCH。 值必须如“[Mime类型](#mime-types)”中所述。 |
-| produce | API可以生成的MIME类型的列表。值必须如“[Mime类型](#mime-types)”中所述。 |
+| accept | API 可以使用的 MIME 类型列表。 请注意,Accept 仅影响具有请求正文的操作,例如 POST、PUT 和 PATCH。 值必须如“[Mime类型](#mime类型)”中所述。 |
+| produce | API可以生成的MIME类型的列表。值必须如“[Mime类型](#mime类型)”中所述。 |
| param | 用空格分隔的参数。`param name`,`param type`,`data type`,`is mandatory?`,`comment` `attribute(optional)` |
| security | 每个API操作的[安全性](#安全性)。 |
| success | 以空格分隔的成功响应。`return code`,`{param type}`,`data type`,`comment` |
diff --git a/vendor/github.com/swaggo/swag/field_parser.go b/vendor/github.com/swaggo/swag/field_parser.go
index b5cf2624..a00b490d 100644
--- a/vendor/github.com/swaggo/swag/field_parser.go
+++ b/vendor/github.com/swaggo/swag/field_parser.go
@@ -10,10 +10,17 @@ import (
"sync"
"unicode"
+ "github.com/go-openapi/jsonreference"
"github.com/go-openapi/spec"
)
-var _ FieldParser = &tagBaseFieldParser{}
+var _ FieldParser = &tagBaseFieldParser{p: nil, field: nil, tag: ""}
+
+const (
+ requiredLabel = "required"
+ swaggerTypeTag = "swaggertype"
+ swaggerIgnoreTag = "swaggerignore"
+)
type tagBaseFieldParser struct {
p *Parser
@@ -22,46 +29,47 @@ type tagBaseFieldParser struct {
}
func newTagBaseFieldParser(p *Parser, field *ast.Field) FieldParser {
- ps := &tagBaseFieldParser{
+ fieldParser := tagBaseFieldParser{
p: p,
field: field,
+ tag: "",
}
- if ps.field.Tag != nil {
- ps.tag = reflect.StructTag(strings.Replace(field.Tag.Value, "`", "", -1))
+ if fieldParser.field.Tag != nil {
+ fieldParser.tag = reflect.StructTag(strings.ReplaceAll(field.Tag.Value, "`", ""))
}
- return ps
+ return &fieldParser
}
-func (ps *tagBaseFieldParser) ShouldSkip() (bool, error) {
+func (ps *tagBaseFieldParser) ShouldSkip() bool {
// Skip non-exported fields.
if !ast.IsExported(ps.field.Names[0].Name) {
- return true, nil
+ return true
}
if ps.field.Tag == nil {
- return false, nil
+ return false
}
- ignoreTag := ps.tag.Get("swaggerignore")
+ ignoreTag := ps.tag.Get(swaggerIgnoreTag)
if strings.EqualFold(ignoreTag, "true") {
- return true, nil
+ return true
}
// json:"tag,hoge"
- name := strings.TrimSpace(strings.Split(ps.tag.Get("json"), ",")[0])
+ name := strings.TrimSpace(strings.Split(ps.tag.Get(jsonTag), ",")[0])
if name == "-" {
- return true, nil
+ return true
}
- return false, nil
+ return false
}
func (ps *tagBaseFieldParser) FieldName() (string, error) {
var name string
if ps.field.Tag != nil {
// json:"tag,hoge"
- name = strings.TrimSpace(strings.Split(ps.tag.Get("json"), ",")[0])
+ name = strings.TrimSpace(strings.Split(ps.tag.Get(jsonTag), ",")[0])
if name != "" {
return name, nil
@@ -79,34 +87,40 @@ func (ps *tagBaseFieldParser) FieldName() (string, error) {
}
func toSnakeCase(in string) string {
- runes := []rune(in)
- length := len(runes)
+ var (
+ runes = []rune(in)
+ length = len(runes)
+ out []rune
+ )
- var out []rune
- for i := 0; i < length; i++ {
- if i > 0 && unicode.IsUpper(runes[i]) &&
- ((i+1 < length && unicode.IsLower(runes[i+1])) || unicode.IsLower(runes[i-1])) {
+ for idx := 0; idx < length; idx++ {
+ if idx > 0 && unicode.IsUpper(runes[idx]) &&
+ ((idx+1 < length && unicode.IsLower(runes[idx+1])) || unicode.IsLower(runes[idx-1])) {
out = append(out, '_')
}
- out = append(out, unicode.ToLower(runes[i]))
+
+ out = append(out, unicode.ToLower(runes[idx]))
}
return string(out)
}
func toLowerCamelCase(in string) string {
- runes := []rune(in)
+ var flag bool
- var out []rune
- flag := false
+ out := make([]rune, len(in))
+
+ runes := []rune(in)
for i, curr := range runes {
if (i == 0 && unicode.IsUpper(curr)) || (flag && unicode.IsUpper(curr)) {
- out = append(out, unicode.ToLower(curr))
+ out[i] = unicode.ToLower(curr)
flag = true
- } else {
- out = append(out, curr)
- flag = false
+
+ continue
}
+
+ out[i] = curr
+ flag = false
}
return string(out)
@@ -117,7 +131,7 @@ func (ps *tagBaseFieldParser) CustomSchema() (*spec.Schema, error) {
return nil, nil
}
- typeTag := ps.tag.Get("swaggertype")
+ typeTag := ps.tag.Get(swaggerTypeTag)
if typeTag != "" {
return BuildCustomSchema(strings.Split(typeTag, ","))
}
@@ -126,7 +140,6 @@ func (ps *tagBaseFieldParser) CustomSchema() (*spec.Schema, error) {
}
type structField struct {
- desc string
schemaType string
arrayType string
formatType string
@@ -138,11 +151,8 @@ type structField struct {
maxItems *int64
minItems *int64
exampleValue interface{}
- defaultValue interface{}
- extensions map[string]interface{}
enums []interface{}
enumVarNames []interface{}
- readOnly bool
unique bool
}
@@ -155,32 +165,42 @@ func splitNotWrapped(s string, sep rune) []string {
'{': '}',
}
- result := make([]string, 0)
- current := ""
- var openCount = 0
- var openChar rune
+ var (
+ result = make([]string, 0)
+ current = strings.Builder{}
+ openCount = 0
+ openChar rune
+ )
+
for _, char := range s {
- if openChar == 0 && openCloseMap[char] != 0 {
+ switch {
+ case openChar == 0 && openCloseMap[char] != 0:
openChar = char
+
openCount++
- current += string(char)
- } else if char == openChar {
+
+ current.WriteRune(char)
+ case char == openChar:
openCount++
- current = current + string(char)
- } else if openCount > 0 && char == openCloseMap[openChar] {
+
+ current.WriteRune(char)
+ case openCount > 0 && char == openCloseMap[openChar]:
openCount--
- current += string(char)
- } else if openCount == 0 && char == sep {
- result = append(result, current)
+
+ current.WriteRune(char)
+ case openCount == 0 && char == sep:
+ result = append(result, current.String())
+
openChar = 0
- current = ""
- } else {
- current += string(char)
+
+ current = strings.Builder{}
+ default:
+ current.WriteRune(char)
}
}
- if current != "" {
- result = append(result, current)
+ if current.String() != "" {
+ result = append(result, current.String())
}
return result
@@ -196,157 +216,110 @@ func (ps *tagBaseFieldParser) ComplementSchema(schema *spec.Schema) error {
if ps.field.Doc != nil {
schema.Description = strings.TrimSpace(ps.field.Doc.Text())
}
+
if schema.Description == "" && ps.field.Comment != nil {
schema.Description = strings.TrimSpace(ps.field.Comment.Text())
}
+
return nil
}
- structField := &structField{
+ field := &structField{
schemaType: types[0],
formatType: ps.tag.Get(formatTag),
- readOnly: ps.tag.Get(readOnlyTag) == "true",
}
if len(types) > 1 && (types[0] == ARRAY || types[0] == OBJECT) {
- structField.arrayType = types[1]
+ field.arrayType = types[1]
}
- if ps.field.Doc != nil {
- structField.desc = strings.TrimSpace(ps.field.Doc.Text())
- }
- if structField.desc == "" && ps.field.Comment != nil {
- structField.desc = strings.TrimSpace(ps.field.Comment.Text())
+ jsonTagValue := ps.tag.Get(jsonTag)
+
+ bindingTagValue := ps.tag.Get(bindingTag)
+ if bindingTagValue != "" {
+ parseValidTags(bindingTagValue, field)
}
- jsonTag := ps.tag.Get(jsonTag)
- // json:"name,string" or json:",string"
-
- exampleTag, ok := ps.tag.Lookup(exampleTag)
- if ok {
- structField.exampleValue = exampleTag
- if !strings.Contains(jsonTag, ",string") {
- example, err := defineTypeOfExample(structField.schemaType, structField.arrayType, exampleTag)
- if err != nil {
- return err
- }
- structField.exampleValue = example
- }
+ validateTagValue := ps.tag.Get(validateTag)
+ if validateTagValue != "" {
+ parseValidTags(validateTagValue, field)
}
- bindingTag := ps.tag.Get(bindingTag)
- if bindingTag != "" {
- ps.parseValidTags(bindingTag, structField)
- }
-
- validateTag := ps.tag.Get(validateTag)
- if validateTag != "" {
- ps.parseValidTags(validateTag, structField)
- }
-
- extensionsTag := ps.tag.Get(extensionsTag)
- if extensionsTag != "" {
- structField.extensions = map[string]interface{}{}
- for _, val := range splitNotWrapped(extensionsTag, ',') {
- parts := strings.SplitN(val, "=", 2)
- if len(parts) == 2 {
- structField.extensions[parts[0]] = parts[1]
- } else {
- if len(parts[0]) > 0 && string(parts[0][0]) == "!" {
- structField.extensions[parts[0][1:]] = false
- } else {
- structField.extensions[parts[0]] = true
- }
- }
- }
- }
-
- enumsTag := ps.tag.Get(enumsTag)
- if enumsTag != "" {
- enumType := structField.schemaType
- if structField.schemaType == ARRAY {
- enumType = structField.arrayType
- }
-
- structField.enums = nil
- for _, e := range strings.Split(enumsTag, ",") {
- value, err := defineType(enumType, e)
- if err != nil {
- return err
- }
- structField.enums = append(structField.enums, value)
- }
- }
- varnamesTag := ps.tag.Get("x-enum-varnames")
- if varnamesTag != "" {
- if structField.extensions == nil {
- structField.extensions = map[string]interface{}{}
- }
- varNames := strings.Split(varnamesTag, ",")
- if len(varNames) != len(structField.enums) {
- return fmt.Errorf("invalid count of x-enum-varnames. expected %d, got %d", len(structField.enums), len(varNames))
- }
- structField.enumVarNames = nil
- for _, v := range varNames {
- structField.enumVarNames = append(structField.enumVarNames, v)
- }
- structField.extensions["x-enum-varnames"] = structField.enumVarNames
- }
- defaultTag := ps.tag.Get(defaultTag)
- if defaultTag != "" {
- value, err := defineType(structField.schemaType, defaultTag)
+ enumsTagValue := ps.tag.Get(enumsTag)
+ if enumsTagValue != "" {
+ err := parseEnumTags(enumsTagValue, field)
if err != nil {
return err
}
- structField.defaultValue = value
}
- if IsNumericType(structField.schemaType) || IsNumericType(structField.arrayType) {
+ if IsNumericType(field.schemaType) || IsNumericType(field.arrayType) {
maximum, err := getFloatTag(ps.tag, maximumTag)
if err != nil {
return err
}
+
if maximum != nil {
- structField.maximum = maximum
+ field.maximum = maximum
}
minimum, err := getFloatTag(ps.tag, minimumTag)
if err != nil {
return err
}
+
if minimum != nil {
- structField.minimum = minimum
+ field.minimum = minimum
}
multipleOf, err := getFloatTag(ps.tag, multipleOfTag)
if err != nil {
return err
}
+
if multipleOf != nil {
- structField.multipleOf = multipleOf
+ field.multipleOf = multipleOf
}
}
- if structField.schemaType == STRING || structField.arrayType == STRING {
- maxLength, err := getIntTag(ps.tag, "maxLength")
+ if field.schemaType == STRING || field.arrayType == STRING {
+ maxLength, err := getIntTag(ps.tag, maxLengthTag)
if err != nil {
return err
}
- if maxLength != nil {
- structField.maxLength = maxLength
- }
- minLength, err := getIntTag(ps.tag, "minLength")
+ if maxLength != nil {
+ field.maxLength = maxLength
+ }
+
+ minLength, err := getIntTag(ps.tag, minLengthTag)
if err != nil {
return err
}
+
if minLength != nil {
- structField.minLength = minLength
+ field.minLength = minLength
+ }
+ }
+
+ // json:"name,string" or json:",string"
+ exampleTagValue, ok := ps.tag.Lookup(exampleTag)
+ if ok {
+ field.exampleValue = exampleTagValue
+
+ if !strings.Contains(jsonTagValue, ",string") {
+ example, err := defineTypeOfExample(field.schemaType, field.arrayType, exampleTagValue)
+ if err != nil {
+ return err
+ }
+
+ field.exampleValue = example
}
}
// perform this after setting everything else (min, max, etc...)
- if strings.Contains(jsonTag, ",string") { // @encoding/json: "It applies only to fields of string, floating point, integer, or boolean types."
+ if strings.Contains(jsonTagValue, ",string") {
+ // @encoding/json: "It applies only to fields of string, floating point, integer, or boolean types."
defaultValues := map[string]string{
// Zero Values as string
STRING: "",
@@ -355,51 +328,103 @@ func (ps *tagBaseFieldParser) ComplementSchema(schema *spec.Schema) error {
NUMBER: "0",
}
- defaultValue, ok := defaultValues[structField.schemaType]
+ defaultValue, ok := defaultValues[field.schemaType]
if ok {
- structField.schemaType = STRING
+ field.schemaType = STRING
+ *schema = *PrimitiveSchema(field.schemaType)
- if structField.exampleValue == nil {
+ if field.exampleValue == nil {
// if exampleValue is not defined by the user,
// we will force an example with a correct value
// (eg: int->"0", bool:"false")
- structField.exampleValue = defaultValue
+ field.exampleValue = defaultValue
}
}
}
- if structField.schemaType == STRING && types[0] != STRING {
- *schema = *PrimitiveSchema(structField.schemaType)
+ if ps.field.Doc != nil {
+ schema.Description = strings.TrimSpace(ps.field.Doc.Text())
}
- schema.Description = structField.desc
- schema.ReadOnly = structField.readOnly
+ if schema.Description == "" && ps.field.Comment != nil {
+ schema.Description = strings.TrimSpace(ps.field.Comment.Text())
+ }
+
+ schema.ReadOnly = ps.tag.Get(readOnlyTag) == "true"
+
if !reflect.ValueOf(schema.Ref).IsZero() && schema.ReadOnly {
schema.AllOf = []spec.Schema{*spec.RefSchema(schema.Ref.String())}
- schema.Ref = spec.Ref{} // clear out existing ref
+ schema.Ref = spec.Ref{
+ Ref: jsonreference.Ref{
+ HasFullURL: false,
+ HasURLPathOnly: false,
+ HasFragmentOnly: false,
+ HasFileScheme: false,
+ HasFullFilePath: false,
+ },
+ } // clear out existing ref
}
- schema.Default = structField.defaultValue
- schema.Example = structField.exampleValue
- if structField.schemaType != ARRAY {
- schema.Format = structField.formatType
+
+ defaultTagValue := ps.tag.Get(defaultTag)
+ if defaultTagValue != "" {
+ value, err := defineType(field.schemaType, defaultTagValue)
+ if err != nil {
+ return err
+ }
+
+ schema.Default = value
}
- schema.Extensions = structField.extensions
+
+ schema.Example = field.exampleValue
+
+ if field.schemaType != ARRAY {
+ schema.Format = field.formatType
+ }
+
+ extensionsTagValue := ps.tag.Get(extensionsTag)
+ if extensionsTagValue != "" {
+ schema.Extensions = setExtensionParam(extensionsTagValue)
+ }
+
+ varNamesTag := ps.tag.Get("x-enum-varnames")
+ if varNamesTag != "" {
+ if schema.Extensions == nil {
+ schema.Extensions = map[string]interface{}{}
+ }
+
+ varNames := strings.Split(varNamesTag, ",")
+ if len(varNames) != len(field.enums) {
+ return fmt.Errorf("invalid count of x-enum-varnames. expected %d, got %d", len(field.enums), len(varNames))
+ }
+
+ field.enumVarNames = nil
+
+ for _, v := range varNames {
+ field.enumVarNames = append(field.enumVarNames, v)
+ }
+
+ schema.Extensions["x-enum-varnames"] = field.enumVarNames
+ }
+
eleSchema := schema
- if structField.schemaType == ARRAY {
+
+ if field.schemaType == ARRAY {
// For Array only
- schema.MaxItems = structField.maxItems
- schema.MinItems = structField.minItems
- schema.UniqueItems = structField.unique
+ schema.MaxItems = field.maxItems
+ schema.MinItems = field.minItems
+ schema.UniqueItems = field.unique
eleSchema = schema.Items.Schema
- eleSchema.Format = structField.formatType
+ eleSchema.Format = field.formatType
}
- eleSchema.Maximum = structField.maximum
- eleSchema.Minimum = structField.minimum
- eleSchema.MultipleOf = structField.multipleOf
- eleSchema.MaxLength = structField.maxLength
- eleSchema.MinLength = structField.minLength
- eleSchema.Enum = structField.enums
+
+ eleSchema.Maximum = field.maximum
+ eleSchema.Minimum = field.minimum
+ eleSchema.MultipleOf = field.multipleOf
+ eleSchema.MaxLength = field.maxLength
+ eleSchema.MinLength = field.minLength
+ eleSchema.Enum = field.enums
+
return nil
}
@@ -439,7 +464,7 @@ func (ps *tagBaseFieldParser) IsRequired() (bool, error) {
bindingTag := ps.tag.Get(bindingTag)
if bindingTag != "" {
for _, val := range strings.Split(bindingTag, ",") {
- if val == "required" {
+ if val == requiredLabel {
return true, nil
}
}
@@ -448,7 +473,7 @@ func (ps *tagBaseFieldParser) IsRequired() (bool, error) {
validateTag := ps.tag.Get(validateTag)
if validateTag != "" {
for _, val := range strings.Split(validateTag, ",") {
- if val == "required" {
+ if val == requiredLabel {
return true, nil
}
}
@@ -457,27 +482,24 @@ func (ps *tagBaseFieldParser) IsRequired() (bool, error) {
return false, nil
}
-func (ps *tagBaseFieldParser) parseValidTags(validTag string, sf *structField) {
+func parseValidTags(validTag string, sf *structField) {
// `validate:"required,max=10,min=1"`
// ps. required checked by IsRequired().
for _, val := range strings.Split(validTag, ",") {
var (
- valKey string
valValue string
+ keyVal = strings.Split(val, "=")
)
- kv := strings.Split(val, "=")
- switch len(kv) {
+
+ switch len(keyVal) {
case 1:
- valKey = kv[0]
case 2:
- valKey = kv[0]
- valValue = kv[1]
+ valValue = strings.ReplaceAll(strings.ReplaceAll(keyVal[1], utf8HexComma, ","), utf8Pipe, "|")
default:
continue
}
- valValue = strings.Replace(strings.Replace(valValue, utf8HexComma, ",", -1), utf8Pipe, "|", -1)
- switch valKey {
+ switch keyVal[0] {
case "max", "lte":
sf.setMax(valValue)
case "min", "gte":
@@ -497,6 +519,26 @@ func (ps *tagBaseFieldParser) parseValidTags(validTag string, sf *structField) {
}
}
+func parseEnumTags(enumTag string, field *structField) error {
+ enumType := field.schemaType
+ if field.schemaType == ARRAY {
+ enumType = field.arrayType
+ }
+
+ field.enums = nil
+
+ for _, e := range strings.Split(enumTag, ",") {
+ value, err := defineType(enumType, e)
+ if err != nil {
+ return err
+ }
+
+ field.enums = append(field.enums, value)
+ }
+
+ return nil
+}
+
func (sf *structField) setOneOf(valValue string) {
if len(sf.enums) != 0 {
return
@@ -513,6 +555,7 @@ func (sf *structField) setOneOf(valValue string) {
if err != nil {
continue
}
+
sf.enums = append(sf.enums, value)
}
}
@@ -522,6 +565,7 @@ func (sf *structField) setMin(valValue string) {
if err != nil {
return
}
+
switch sf.schemaType {
case INTEGER, NUMBER:
sf.minimum = &value
@@ -539,6 +583,7 @@ func (sf *structField) setMax(valValue string) {
if err != nil {
return
}
+
switch sf.schemaType {
case INTEGER, NUMBER:
sf.maximum = &value
@@ -558,25 +603,30 @@ const (
// These code copy from
// https://github.com/go-playground/validator/blob/d4271985b44b735c6f76abc7a06532ee997f9476/baked_in.go#L207
-// ---
+// ---.
var oneofValsCache = map[string][]string{}
var oneofValsCacheRWLock = sync.RWMutex{}
var splitParamsRegex = regexp.MustCompile(`'[^']*'|\S+`)
-func parseOneOfParam2(s string) []string {
+func parseOneOfParam2(param string) []string {
oneofValsCacheRWLock.RLock()
- values, ok := oneofValsCache[s]
+ values, ok := oneofValsCache[param]
oneofValsCacheRWLock.RUnlock()
+
if !ok {
oneofValsCacheRWLock.Lock()
- values = splitParamsRegex.FindAllString(s, -1)
+ values = splitParamsRegex.FindAllString(param, -1)
+
for i := 0; i < len(values); i++ {
- values[i] = strings.Replace(values[i], "'", "", -1)
+ values[i] = strings.ReplaceAll(values[i], "'", "")
}
- oneofValsCache[s] = values
+
+ oneofValsCache[param] = values
+
oneofValsCacheRWLock.Unlock()
}
+
return values
}
-// ---
+// ---.
diff --git a/vendor/github.com/swaggo/swag/formater.go b/vendor/github.com/swaggo/swag/formater.go
deleted file mode 100644
index 1c903f48..00000000
--- a/vendor/github.com/swaggo/swag/formater.go
+++ /dev/null
@@ -1,326 +0,0 @@
-package swag
-
-import (
- "bytes"
- "crypto/md5"
- "fmt"
- "go/ast"
- goparser "go/parser"
- "go/token"
- "io"
- "io/ioutil"
- "log"
- "os"
- "path/filepath"
- "regexp"
- "runtime"
- "strings"
- "text/tabwriter"
-)
-
-const splitTag = "&*"
-
-// Formater implements a formater for Go source files.
-type Formater struct {
- // debugging output goes here
- debug Debugger
-
- // excludes excludes dirs and files in SearchDir
- excludes map[string]struct{}
-
- mainFile string
-}
-
-// NewFormater create a new formater instance.
-func NewFormater() *Formater {
- formater := &Formater{
- debug: log.New(os.Stdout, "", log.LstdFlags),
- excludes: make(map[string]struct{}),
- }
- return formater
-}
-
-// FormatAPI format the swag comment.
-func (f *Formater) FormatAPI(searchDir, excludeDir, mainFile string) error {
- searchDirs := strings.Split(searchDir, ",")
- for _, searchDir := range searchDirs {
- if _, err := os.Stat(searchDir); os.IsNotExist(err) {
- return fmt.Errorf("dir: %s does not exist", searchDir)
- }
- }
- for _, fi := range strings.Split(excludeDir, ",") {
- fi = strings.TrimSpace(fi)
- if fi != "" {
- fi = filepath.Clean(fi)
- f.excludes[fi] = struct{}{}
- }
- }
-
- // parse main.go
- absMainAPIFilePath, err := filepath.Abs(filepath.Join(searchDirs[0], mainFile))
- if err != nil {
- return err
- }
- err = f.FormatMain(absMainAPIFilePath)
- if err != nil {
- return err
- }
- f.mainFile = mainFile
-
- err = f.formatMultiSearchDir(searchDirs)
- if err != nil {
- return err
- }
-
- return nil
-}
-
-func (f *Formater) formatMultiSearchDir(searchDirs []string) error {
- for _, searchDir := range searchDirs {
- f.debug.Printf("Format API Info, search dir:%s", searchDir)
-
- err := filepath.Walk(searchDir, f.visit)
- if err != nil {
- return err
- }
- }
- return nil
-}
-
-func (f *Formater) visit(path string, fileInfo os.FileInfo, err error) error {
- if err := walkWith(f.excludes, false)(path, fileInfo); err != nil {
- return err
- } else if fileInfo.IsDir() {
- // skip if file is folder
- return nil
- }
-
- if strings.HasSuffix(strings.ToLower(path), "_test.go") || filepath.Ext(path) != ".go" {
- // skip if file not has suffix "*.go"
- return nil
- }
- if strings.HasSuffix(strings.ToLower(path), f.mainFile) {
- // skip main file
- return nil
- }
-
- err = f.FormatFile(path)
- if err != nil {
- return fmt.Errorf("ParseFile error:%+v", err)
- }
- return nil
-}
-
-// FormatMain format the main.go comment.
-func (f *Formater) FormatMain(mainFilepath string) error {
- fileSet := token.NewFileSet()
- astFile, err := goparser.ParseFile(fileSet, mainFilepath, nil, goparser.ParseComments)
- if err != nil {
- return fmt.Errorf("cannot format file, err: %w path : %s ", err, mainFilepath)
- }
- var (
- formatedComments = bytes.Buffer{}
- // CommentCache
- oldCommentsMap = make(map[string]string)
- )
-
- if astFile.Comments != nil {
- for _, comment := range astFile.Comments {
- formatFuncDoc(comment.List, &formatedComments, oldCommentsMap)
- }
- }
-
- return writeFormatedComments(mainFilepath, formatedComments, oldCommentsMap)
-}
-
-// FormatFile format the swag comment in go function.
-func (f *Formater) FormatFile(filepath string) error {
- fileSet := token.NewFileSet()
- astFile, err := goparser.ParseFile(fileSet, filepath, nil, goparser.ParseComments)
- if err != nil {
- return fmt.Errorf("cannot format file, err: %w path : %s ", err, filepath)
- }
-
- var (
- formatedComments = bytes.Buffer{}
- // CommentCache
- oldCommentsMap = make(map[string]string)
- )
-
- for _, astDescription := range astFile.Decls {
- astDeclaration, ok := astDescription.(*ast.FuncDecl)
- if ok && astDeclaration.Doc != nil && astDeclaration.Doc.List != nil {
- formatFuncDoc(astDeclaration.Doc.List, &formatedComments, oldCommentsMap)
- }
- }
-
- return writeFormatedComments(filepath, formatedComments, oldCommentsMap)
-}
-
-func writeFormatedComments(filepath string, formatedComments bytes.Buffer, oldCommentsMap map[string]string) error {
- // Replace the file
- // Read the file
- srcBytes, err := ioutil.ReadFile(filepath)
- if err != nil {
- return fmt.Errorf("cannot open file, err: %w path : %s ", err, filepath)
- }
- replaceSrc := string(srcBytes)
- newComments := strings.Split(formatedComments.String(), "\n")
- for _, e := range newComments {
- commentSplit := strings.Split(e, splitTag)
- if len(commentSplit) == 2 {
- commentHash, commentContent := commentSplit[0], commentSplit[1]
-
- if !isBlankComment(commentContent) {
- replaceSrc = strings.Replace(replaceSrc, oldCommentsMap[commentHash], commentContent, 1)
- }
- }
- }
- return writeBack(filepath, []byte(replaceSrc), srcBytes)
-}
-
-func formatFuncDoc(commentList []*ast.Comment, formatedComments io.Writer, oldCommentsMap map[string]string) {
- tabw := tabwriter.NewWriter(formatedComments, 0, 0, 2, ' ', 0)
-
- for _, comment := range commentList {
- commentLine := comment.Text
- if isSwagComment(commentLine) || isBlankComment(commentLine) {
- cmd5 := fmt.Sprintf("%x", md5.Sum([]byte(commentLine)))
-
- // Find the separator and replace to \t
- c := separatorFinder(commentLine, '\t')
- oldCommentsMap[cmd5] = commentLine
-
- // md5 + splitTag + srcCommentLine
- // eg. xxx&*@Description get struct array
- _, _ = fmt.Fprintln(tabw, cmd5+splitTag+c)
- }
- }
- // format by tabwriter
- _ = tabw.Flush()
-}
-
-// Check of @Param @Success @Failure @Response @Header
-var specialTagForSplit = map[string]byte{
- paramAttr: 1,
- successAttr: 1,
- failureAttr: 1,
- responseAttr: 1,
- headerAttr: 1,
-}
-
-var skipChar = map[byte]byte{
- '"': 1,
- '(': 1,
- '{': 1,
- '[': 1,
-}
-
-var skipCharEnd = map[byte]byte{
- '"': 1,
- ')': 1,
- '}': 1,
- ']': 1,
-}
-
-func separatorFinder(comment string, rp byte) string {
- commentBytes := []byte(comment)
- commentLine := strings.TrimSpace(strings.TrimLeft(comment, "/"))
- if len(commentLine) == 0 {
- return ""
- }
- attribute := strings.Fields(commentLine)[0]
- attrLen := strings.Index(comment, attribute) + len(attribute)
- attribute = strings.ToLower(attribute)
- var i = attrLen
-
- if _, ok := specialTagForSplit[attribute]; ok {
- var skipFlag bool
- for ; i < len(commentBytes); i++ {
- if !skipFlag && commentBytes[i] == ' ' {
- j := i
- for j < len(commentBytes) && commentBytes[j] == ' ' {
- j++
- }
- commentBytes = replaceRange(commentBytes, i, j, rp)
- }
- if _, ok := skipChar[commentBytes[i]]; ok && !skipFlag {
- skipFlag = true
- } else if _, ok := skipCharEnd[commentBytes[i]]; ok && skipFlag {
- skipFlag = false
- }
- }
- } else {
- for i < len(commentBytes) && commentBytes[i] == ' ' {
- i++
- }
- if i >= len(commentBytes) {
- return comment
- }
- commentBytes = replaceRange(commentBytes, attrLen, i, rp)
- }
- return string(commentBytes)
-}
-
-func replaceRange(s []byte, start, end int, new byte) []byte {
- if start > end || end < 1 {
- return s
- }
- if end > len(s) {
- end = len(s)
- }
- s = append(s[:start], s[end-1:]...)
- s[start] = new
- return s
-}
-
-var swagCommentExpression = regexp.MustCompile("@[A-z]+")
-
-func isSwagComment(comment string) bool {
- return swagCommentExpression.MatchString(strings.ToLower(comment))
-}
-
-func isBlankComment(comment string) bool {
- lc := strings.TrimSpace(comment)
- return len(lc) == 0
-}
-
-// writeBack write to file
-func writeBack(filepath string, src, old []byte) error {
- // make a temporary backup before overwriting original
- bakname, err := backupFile(filepath+".", old, 0644)
- if err != nil {
- return err
- }
- err = ioutil.WriteFile(filepath, src, 0644)
- if err != nil {
- _ = os.Rename(bakname, filepath)
- return err
- }
- _ = os.Remove(bakname)
- return nil
-}
-
-const chmodSupported = runtime.GOOS != "windows"
-
-// backupFile writes data to a new file named filename with permissions perm,
-// with 0 {
+ i += skipLen
+ }
+ } else if body[i] == ' ' {
+ j := i
+ for ; j < len(body) && body[j] == ' '; j++ {
+ }
+ body = replaceRange(body, i, j, "\t")
+ }
+ }
+ }
+ return body
+}
+
+func replaceRange(s string, start, end int, new string) string {
+ return s[:start] + new + s[end:]
+}
+
+var swagCommentLineExpression = regexp.MustCompile(`^\/\/\s+(@[\S.]+)\s*(.*)`)
+
+func swagComment(comment string) (string, string, bool) {
+ matches := swagCommentLineExpression.FindStringSubmatch(comment)
+ if matches == nil {
+ return "", "", false
+ }
+ return matches[1], matches[2], true
+}
diff --git a/vendor/github.com/swaggo/swag/go.mod b/vendor/github.com/swaggo/swag/go.mod
index 8db0956e..99823bab 100644
--- a/vendor/github.com/swaggo/swag/go.mod
+++ b/vendor/github.com/swaggo/swag/go.mod
@@ -1,16 +1,15 @@
module github.com/swaggo/swag
-go 1.17
+go 1.18
require (
github.com/KyleBanks/depth v1.2.1
- github.com/agiledragon/gomonkey/v2 v2.3.1
github.com/ghodss/yaml v1.0.0
+ github.com/go-openapi/jsonreference v0.19.6
github.com/go-openapi/spec v0.20.4
- github.com/otiai10/copy v1.7.0
github.com/stretchr/testify v1.7.0
github.com/urfave/cli/v2 v2.3.0
- golang.org/x/tools v0.1.7
+ golang.org/x/tools v0.1.10
)
require (
@@ -19,15 +18,14 @@ require (
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-openapi/jsonpointer v0.19.5 // indirect
- github.com/go-openapi/jsonreference v0.19.6 // indirect
github.com/go-openapi/swag v0.19.15 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/mailru/easyjson v0.7.6 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
- golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
- golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e // indirect
+ golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
+ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect
diff --git a/vendor/github.com/swaggo/swag/go.sum b/vendor/github.com/swaggo/swag/go.sum
index 4d899a34..f2c35bf1 100644
--- a/vendor/github.com/swaggo/swag/go.sum
+++ b/vendor/github.com/swaggo/swag/go.sum
@@ -5,8 +5,6 @@ github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tN
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
-github.com/agiledragon/gomonkey/v2 v2.3.1 h1:k+UnUY0EMNYUFUAQVETGY9uUTxjMdnUkP0ARyJS1zzs=
-github.com/agiledragon/gomonkey/v2 v2.3.1/go.mod h1:ap1AmDzcVOAz1YpeJ3TCzIgstoaWLA6jbbgxfB4w2iY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
@@ -25,10 +23,8 @@ github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7
github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk=
github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM=
github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ=
-github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY=
github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y=
-github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
@@ -40,21 +36,12 @@ github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA
github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
-github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE=
-github.com/otiai10/copy v1.7.0/go.mod h1:rmRl6QPdJj6EiUqXQ/4Nn2lLXoNQjFCQbbNrxgc/t3U=
-github.com/otiai10/curr v0.0.0-20150429015615-9b4961190c95/go.mod h1:9qAhocn7zKJG+0mI8eUu6xqkFDYS2kb2saOteoSB3cE=
-github.com/otiai10/curr v1.0.0/go.mod h1:LskTG5wDwr8Rs+nNQ+1LlxRjAtTZZjtJW4rMXl6j4vs=
-github.com/otiai10/mint v1.3.0/go.mod h1:F5AjcsTsWUqX+Na9fpHb52P8pcRX2CI6A3ctIT91xUo=
-github.com/otiai10/mint v1.3.3 h1:7JgpsBaN0uMkyju4tbYHu0mnM55hNKVYLsXmwr15NQI=
-github.com/otiai10/mint v1.3.3/go.mod h1:/yxELlJQ0ufhjUwhshSj+wFjZ78CnZ48/1wtmBH1OTc=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
-github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
-github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
@@ -62,40 +49,22 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
github.com/urfave/cli/v2 v2.3.0/go.mod h1:LJmUH05zAU44vOAcrfzZQKsZbVcdbOG8rtL3/XcUArI=
-github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
-golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=
-golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
-golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
-golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
+golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o=
golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM=
-golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d h1:20cMwl2fHAzkJMEA+8J4JgqBQcQGzbisXo31MIeenXI=
-golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 h1:HVyaeDAYux4pnY+D/SiwmLOR36ewZ4iGQIIrtnuCjFA=
+golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e h1:WUoyKPm6nCo1BnNUvPGnFG3T5DUVem42yDJZZ4CNxMA=
-golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
-golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.1.7 h1:6j8CgantCy3yc8JGBqkDLMKWqZ0RDU2g1HVgacojGWQ=
-golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo=
-golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
-golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20=
+golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
-golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
diff --git a/vendor/github.com/swaggo/swag/operation.go b/vendor/github.com/swaggo/swag/operation.go
index 16d74889..e8675917 100644
--- a/vendor/github.com/swaggo/swag/operation.go
+++ b/vendor/github.com/swaggo/swag/operation.go
@@ -62,8 +62,23 @@ func NewOperation(parser *Parser, options ...func(*Operation)) *Operation {
RouterProperties: []RouteProperties{},
Operation: spec.Operation{
OperationProps: spec.OperationProps{
+ ID: "",
+ Description: "",
+ Summary: "",
+ Security: nil,
+ ExternalDocs: nil,
+ Deprecated: false,
+ Tags: []string{},
+ Consumes: []string{},
+ Produces: []string{},
+ Schemes: []string{},
+ Parameters: []spec.Parameter{},
Responses: &spec.Responses{
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: spec.Extensions{},
+ },
ResponsesProps: spec.ResponsesProps{
+ Default: nil,
StatusCodeResponses: make(map[int]spec.Response),
},
},
@@ -72,6 +87,7 @@ func NewOperation(parser *Parser, options ...func(*Operation)) *Operation {
Extensions: spec.Extensions{},
},
},
+ codeExampleFilesDir: "",
}
for _, option := range options {
@@ -94,11 +110,10 @@ func (operation *Operation) ParseComment(comment string, astFile *ast.File) erro
if len(commentLine) == 0 {
return nil
}
- attribute := strings.Fields(commentLine)[0]
- lineRemainder := strings.TrimSpace(commentLine[len(attribute):])
- lowerAttribute := strings.ToLower(attribute)
- var err error
+ attribute := strings.Fields(commentLine)[0]
+ lineRemainder, lowerAttribute := strings.TrimSpace(commentLine[len(attribute):]), strings.ToLower(attribute)
+
switch lowerAttribute {
case descriptionAttr:
operation.ParseDescriptionComment(lineRemainder)
@@ -107,6 +122,7 @@ func (operation *Operation) ParseComment(comment string, astFile *ast.File) erro
if err != nil {
return err
}
+
operation.ParseDescriptionComment(string(commentInfo))
case summaryAttr:
operation.Summary = lineRemainder
@@ -115,28 +131,28 @@ func (operation *Operation) ParseComment(comment string, astFile *ast.File) erro
case tagsAttr:
operation.ParseTagsComment(lineRemainder)
case acceptAttr:
- err = operation.ParseAcceptComment(lineRemainder)
+ return operation.ParseAcceptComment(lineRemainder)
case produceAttr:
- err = operation.ParseProduceComment(lineRemainder)
+ return operation.ParseProduceComment(lineRemainder)
case paramAttr:
- err = operation.ParseParamComment(lineRemainder, astFile)
+ return operation.ParseParamComment(lineRemainder, astFile)
case successAttr, failureAttr, responseAttr:
- err = operation.ParseResponseComment(lineRemainder, astFile)
+ return operation.ParseResponseComment(lineRemainder, astFile)
case headerAttr:
- err = operation.ParseResponseHeaderComment(lineRemainder, astFile)
+ return operation.ParseResponseHeaderComment(lineRemainder, astFile)
case routerAttr:
- err = operation.ParseRouterComment(lineRemainder)
+ return operation.ParseRouterComment(lineRemainder)
case securityAttr:
- err = operation.ParseSecurityComment(lineRemainder)
+ return operation.ParseSecurityComment(lineRemainder)
case deprecatedAttr:
operation.Deprecate()
case xCodeSamplesAttr:
- err = operation.ParseCodeSample(attribute, commentLine, lineRemainder)
+ return operation.ParseCodeSample(attribute, commentLine, lineRemainder)
default:
- err = operation.ParseMetadata(attribute, lowerAttribute, lineRemainder)
+ return operation.ParseMetadata(attribute, lowerAttribute, lineRemainder)
}
- return err
+ return nil
}
// ParseCodeSample godoc.
@@ -148,6 +164,7 @@ func (operation *Operation) ParseCodeSample(attribute, _, lineRemainder string)
}
var valueJSON interface{}
+
err = json.Unmarshal(data, &valueJSON)
if err != nil {
return fmt.Errorf("annotation %s need a valid json value", attribute)
@@ -170,6 +187,7 @@ func (operation *Operation) ParseDescriptionComment(lineRemainder string) {
return
}
+
operation.Description += "\n" + lineRemainder
}
@@ -182,6 +200,7 @@ func (operation *Operation) ParseMetadata(attribute, lowerAttribute, lineRemaind
}
var valueJSON interface{}
+
err := json.Unmarshal([]byte(lineRemainder), &valueJSON)
if err != nil {
return fmt.Errorf("annotation %s need a valid json value", attribute)
@@ -194,7 +213,7 @@ func (operation *Operation) ParseMetadata(attribute, lowerAttribute, lineRemaind
return nil
}
-var paramPattern = regexp.MustCompile(`(\S+)[\s]+([\w]+)[\s]+([\S.]+)[\s]+([\w]+)[\s]+"([^"]+)"`)
+var paramPattern = regexp.MustCompile(`(\S+)\s+(\w+)\s+([\S.]+)\s+(\w+)\s+"([^"]+)"`)
func findInSlice(arr []string, target string) bool {
for _, str := range arr {
@@ -210,13 +229,39 @@ func (operation *Operation) parseArrayParam(param *spec.Parameter, paramType, re
if !IsPrimitiveType(refType) {
return fmt.Errorf("%s is not supported array type for %s", refType, paramType)
}
+
param.SimpleSchema.Type = objectType
+
if operation.parser != nil {
param.CollectionFormat = TransToValidCollectionFormat(operation.parser.collectionFormatInQuery)
}
+
param.SimpleSchema.Items = &spec.Items{
SimpleSchema: spec.SimpleSchema{
- Type: refType,
+ Default: nil,
+ Nullable: false,
+ Format: "",
+ Items: nil,
+ CollectionFormat: "",
+ Type: refType,
+ Example: nil,
+ },
+ CommonValidations: spec.CommonValidations{
+ Maximum: nil,
+ ExclusiveMaximum: false,
+ Minimum: nil,
+ ExclusiveMinimum: false,
+ MaxLength: nil,
+ MinLength: nil,
+ Pattern: "",
+ MaxItems: nil,
+ MinItems: nil,
+ UniqueItems: false,
+ MultipleOf: nil,
+ Enum: nil,
+ },
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: nil,
},
}
@@ -232,6 +277,7 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F
if len(matches) != 6 {
return fmt.Errorf("missing required param comment parameters \"%s\"", commentLine)
}
+
name := matches[1]
paramType := matches[2]
refType := TransToValidSchemeType(matches[3])
@@ -248,7 +294,7 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F
}
requiredText := strings.ToLower(matches[4])
- required := requiredText == "true" || requiredText == "required"
+ required := requiredText == "true" || requiredText == requiredLabel
description := matches[5]
param := createParameter(paramType, description, name, refType, required)
@@ -276,27 +322,30 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F
if err != nil {
return err
}
+
if len(schema.Properties) == 0 {
return nil
}
items := schema.Properties.ToOrderedSchemaItems()
+
for _, item := range items {
- name := item.Name
- prop := item.Schema
+ name, prop := item.Name, item.Schema
if len(prop.Type) == 0 {
continue
}
+
switch {
- case prop.Type[0] == ARRAY &&
- prop.Items.Schema != nil &&
- len(prop.Items.Schema.Type) > 0 &&
- IsSimplePrimitiveType(prop.Items.Schema.Type[0]):
+ case prop.Type[0] == ARRAY && prop.Items.Schema != nil &&
+ len(prop.Items.Schema.Type) > 0 && IsSimplePrimitiveType(prop.Items.Schema.Type[0]):
+
param = createParameter(paramType, prop.Description, name, prop.Type[0], findInSlice(schema.Required, name))
param.SimpleSchema.Type = prop.Type[0]
+
if operation.parser != nil && operation.parser.collectionFormatInQuery != "" && param.CollectionFormat == "" {
param.CollectionFormat = TransToValidCollectionFormat(operation.parser.collectionFormatInQuery)
}
+
param.SimpleSchema.Items = &spec.Items{
SimpleSchema: spec.SimpleSchema{
Type: prop.Items.Schema.Type[0],
@@ -309,6 +358,7 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F
continue
}
+
param.Nullable = prop.Nullable
param.Format = prop.Format
param.Default = prop.Default
@@ -339,16 +389,18 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F
if err != nil {
return err
}
+
param.Schema = schema
}
default:
return fmt.Errorf("%s is not supported paramType", paramType)
}
- err := operation.parseAndExtractionParamAttribute(commentLine, objectType, refType, ¶m)
+ err := operation.parseParamAttribute(commentLine, objectType, refType, ¶m)
if err != nil {
return err
}
+
operation.Operation.Parameters = append(operation.Operation.Parameters, param)
return nil
@@ -360,12 +412,13 @@ const (
defaultTag = "default"
enumsTag = "enums"
exampleTag = "example"
+ schemaExampleTag = "schemaExample"
formatTag = "format"
validateTag = "validate"
minimumTag = "minimum"
maximumTag = "maximum"
- minLengthTag = "minlength"
- maxLengthTag = "maxlength"
+ minLengthTag = "minLength"
+ maxLengthTag = "maxLength"
multipleOfTag = "multipleOf"
readOnlyTag = "readonly"
extensionsTag = "extensions"
@@ -393,33 +446,40 @@ var regexAttributes = map[string]*regexp.Regexp{
collectionFormatTag: regexp.MustCompile(`(?i)\s+collectionFormat\(.*\)`),
// example(0)
exampleTag: regexp.MustCompile(`(?i)\s+example\(.*\)`),
+ // schemaExample(0)
+ schemaExampleTag: regexp.MustCompile(`(?i)\s+schemaExample\(.*\)`),
}
-func (operation *Operation) parseAndExtractionParamAttribute(commentLine, objectType, schemaType string, param *spec.Parameter) error {
+func (operation *Operation) parseParamAttribute(comment, objectType, schemaType string, param *spec.Parameter) error {
schemaType = TransToValidSchemeType(schemaType)
+
for attrKey, re := range regexAttributes {
- attr, err := findAttr(re, commentLine)
+ attr, err := findAttr(re, comment)
if err != nil {
continue
}
+
switch attrKey {
case enumsTag:
err = setEnumParam(param, attr, objectType, schemaType)
case minimumTag, maximumTag:
- err = setNumberParam(param, attrKey, schemaType, attr, commentLine)
+ err = setNumberParam(param, attrKey, schemaType, attr, comment)
case defaultTag:
err = setDefault(param, schemaType, attr)
case minLengthTag, maxLengthTag:
- err = setStringParam(param, attrKey, schemaType, attr, commentLine)
+ err = setStringParam(param, attrKey, schemaType, attr, comment)
case formatTag:
param.Format = attr
case exampleTag:
err = setExample(param, schemaType, attr)
+ case schemaExampleTag:
+ err = setSchemaExample(param, schemaType, attr)
case extensionsTag:
- _ = setExtensionParam(param, attr)
+ param.Extensions = setExtensionParam(attr)
case collectionFormatTag:
- err = setCollectionFormatParam(param, attrKey, objectType, attr, commentLine)
+ err = setCollectionFormatParam(param, attrKey, objectType, attr, comment)
}
+
if err != nil {
return err
}
@@ -430,8 +490,8 @@ func (operation *Operation) parseAndExtractionParamAttribute(commentLine, object
func findAttr(re *regexp.Regexp, commentLine string) (string, error) {
attr := re.FindString(commentLine)
- l := strings.Index(attr, "(")
- r := strings.Index(attr, ")")
+
+ l, r := strings.Index(attr, "("), strings.Index(attr, ")")
if l == -1 || r == -1 {
return "", fmt.Errorf("can not find regex=%s, comment=%s", re.String(), commentLine)
}
@@ -466,12 +526,14 @@ func setNumberParam(param *spec.Parameter, name, schemaType, attr, commentLine s
if err != nil {
return fmt.Errorf("maximum is allow only a number. comment=%s got=%s", commentLine, attr)
}
+
switch name {
case minimumTag:
param.Minimum = &n
case maximumTag:
param.Maximum = &n
}
+
return nil
default:
return fmt.Errorf("%s is attribute to set to a number. comment=%s got=%s", name, commentLine, schemaType)
@@ -498,23 +560,33 @@ func setEnumParam(param *spec.Parameter, attr, objectType, schemaType string) er
return nil
}
-func setExtensionParam(param *spec.Parameter, attr string) error {
- param.Extensions = map[string]interface{}{}
+func setExtensionParam(attr string) spec.Extensions {
+ extensions := spec.Extensions{}
+
for _, val := range splitNotWrapped(attr, ',') {
parts := strings.SplitN(val, "=", 2)
if len(parts) == 2 {
- param.Extensions.Add(parts[0], parts[1])
+ extensions.Add(parts[0], parts[1])
continue
}
- param.Extensions.Add(parts[0], true)
+
+ if len(parts[0]) > 0 && string(parts[0][0]) == "!" {
+ extensions.Add(parts[0][1:], false)
+
+ continue
+ }
+
+ extensions.Add(parts[0], true)
}
- return nil
+
+ return extensions
}
func setCollectionFormatParam(param *spec.Parameter, name, schemaType, attr, commentLine string) error {
if schemaType == ARRAY {
param.CollectionFormat = TransToValidCollectionFormat(attr)
+
return nil
}
@@ -526,7 +598,30 @@ func setDefault(param *spec.Parameter, schemaType string, value string) error {
if err != nil {
return nil // Don't set a default value if it's not valid
}
+
param.Default = val
+
+ return nil
+}
+
+func setSchemaExample(param *spec.Parameter, schemaType string, value string) error {
+ val, err := defineType(schemaType, value)
+ if err != nil {
+ return nil // Don't set a example value if it's not valid
+ }
+ // skip schema
+ if param.Schema == nil {
+ return nil
+ }
+
+ switch v := val.(type) {
+ case string:
+ // replaces \r \n \t in example string values.
+ param.Schema.Example = strings.NewReplacer(`\r`, "\r", `\n`, "\n", `\t`, "\t").Replace(v)
+ default:
+ param.Schema.Example = val
+ }
+
return nil
}
@@ -535,13 +630,16 @@ func setExample(param *spec.Parameter, schemaType string, value string) error {
if err != nil {
return nil // Don't set a example value if it's not valid
}
+
param.Example = val
+
return nil
}
// defineType enum value define the type (object and array unsupported).
func defineType(schemaType string, value string) (v interface{}, err error) {
schemaType = TransToValidSchemeType(schemaType)
+
switch schemaType {
case STRING:
return value, nil
@@ -569,8 +667,7 @@ func defineType(schemaType string, value string) (v interface{}, err error) {
// ParseTagsComment parses comment for given `tag` comment string.
func (operation *Operation) ParseTagsComment(commentLine string) {
- tags := strings.Split(commentLine, ",")
- for _, tag := range tags {
+ for _, tag := range strings.Split(commentLine, ",") {
operation.Tags = append(operation.Tags, strings.TrimSpace(tag))
}
}
@@ -589,13 +686,13 @@ func (operation *Operation) ParseProduceComment(commentLine string) error {
// `produce` (`Content-Type:` response header) or
// `accept` (`Accept:` request header).
func parseMimeTypeList(mimeTypeList string, typeList *[]string, format string) error {
- mimeTypes := strings.Split(mimeTypeList, ",")
- for _, typeName := range mimeTypes {
+ for _, typeName := range strings.Split(mimeTypeList, ",") {
if mimeTypePattern.MatchString(typeName) {
*typeList = append(*typeList, typeName)
continue
}
+
aliasMimeType, ok := mimeTypeAliases[typeName]
if !ok {
return fmt.Errorf(format, typeName)
@@ -615,6 +712,7 @@ func (operation *Operation) ParseRouterComment(commentLine string) error {
if len(matches) != 3 {
return fmt.Errorf("can not parse router comment \"%s\"", commentLine)
}
+
signature := RouteProperties{
Path: matches[1],
HTTPMethod: strings.ToUpper(matches[2]),
@@ -631,33 +729,41 @@ func (operation *Operation) ParseRouterComment(commentLine string) error {
// ParseSecurityComment parses comment for given `security` comment string.
func (operation *Operation) ParseSecurityComment(commentLine string) error {
- securitySource := commentLine[strings.Index(commentLine, "@Security")+1:]
- l := strings.Index(securitySource, "[")
- r := strings.Index(securitySource, "]")
- // exists scope
- if !(l == -1 && r == -1) {
- scopes := securitySource[l+1 : r]
- var s []string
- for _, scope := range strings.Split(scopes, ",") {
- s = append(s, strings.TrimSpace(scope))
+ var (
+ securityMap = make(map[string][]string)
+ securitySource = commentLine[strings.Index(commentLine, "@Security")+1:]
+ )
+
+ for _, securityOption := range strings.Split(securitySource, "||") {
+ securityOption = strings.TrimSpace(securityOption)
+
+ left, right := strings.Index(securityOption, "["), strings.Index(securityOption, "]")
+
+ if !(left == -1 && right == -1) {
+ scopes := securityOption[left+1 : right]
+
+ var options []string
+
+ for _, scope := range strings.Split(scopes, ",") {
+ options = append(options, strings.TrimSpace(scope))
+ }
+
+ securityKey := securityOption[0:left]
+ securityMap[securityKey] = append(securityMap[securityKey], options...)
+ } else {
+ securityKey := strings.TrimSpace(securityOption)
+ securityMap[securityKey] = []string{}
}
- securityKey := securitySource[0:l]
- securityMap := map[string][]string{}
- securityMap[securityKey] = append(securityMap[securityKey], s...)
- operation.Security = append(operation.Security, securityMap)
- } else {
- securityKey := strings.TrimSpace(securitySource)
- securityMap := map[string][]string{}
- securityMap[securityKey] = []string{}
- operation.Security = append(operation.Security, securityMap)
}
+ operation.Security = append(operation.Security, securityMap)
+
return nil
}
// findTypeDef attempts to find the *ast.TypeSpec for a specific type given the
// type's name and the package's import path.
-// TODO: improve finding external pkg
+// TODO: improve finding external pkg.
func findTypeDef(importPath, typeName string) (*ast.TypeSpec, error) {
cwd, err := os.Getwd()
if err != nil {
@@ -693,7 +799,6 @@ func findTypeDef(importPath, typeName string) (*ast.TypeSpec, error) {
}
// TODO: possibly cache pkgInfo since it's an expensive operation
-
for i := range pkgInfo.Files {
for _, astDeclaration := range pkgInfo.Files[i].Decls {
generalDeclaration, ok := astDeclaration.(*ast.GenDecl)
@@ -713,7 +818,7 @@ func findTypeDef(importPath, typeName string) (*ast.TypeSpec, error) {
return nil, fmt.Errorf("type spec not found")
}
-var responsePattern = regexp.MustCompile(`^([\w,]+)[\s]+([\w{}]+)[\s]+([\w\-.\\{}=,\[\]]+)[^"]*(.*)?`)
+var responsePattern = regexp.MustCompile(`^([\w,]+)\s+([\w{}]+)\s+([\w\-.\\{}=,\[\]]+)[^"]*(.*)?`)
// ResponseType{data1=Type1,data2=Type2}.
var combinedPattern = regexp.MustCompile(`^([\w\-./\[\]]+){(.*)}$`)
@@ -722,7 +827,9 @@ func (operation *Operation) parseObjectSchema(refType string, astFile *ast.File)
switch {
case refType == NIL:
return nil, nil
- case refType == "interface{}":
+ case refType == INTERFACE:
+ return PrimitiveSchema(OBJECT), nil
+ case refType == ANY:
return PrimitiveSchema(OBJECT), nil
case IsGolangPrimitiveType(refType):
refType = TransToValidSchemeType(refType)
@@ -743,10 +850,12 @@ func (operation *Operation) parseObjectSchema(refType string, astFile *ast.File)
if idx < 0 {
return nil, fmt.Errorf("invalid type: %s", refType)
}
+
refType = refType[idx+1:]
- if refType == "interface{}" {
+ if refType == INTERFACE || refType == ANY {
return spec.MapProperty(nil), nil
}
+
schema, err := operation.parseObjectSchema(refType, astFile)
if err != nil {
return nil, err
@@ -769,45 +878,46 @@ func (operation *Operation) parseObjectSchema(refType string, astFile *ast.File)
}
}
+func parseFields(s string) []string {
+ nestLevel := 0
+
+ return strings.FieldsFunc(s, func(char rune) bool {
+ if char == '{' {
+ nestLevel++
+
+ return false
+ } else if char == '}' {
+ nestLevel--
+
+ return false
+ }
+
+ return char == ',' && nestLevel == 0
+ })
+}
+
func (operation *Operation) parseCombinedObjectSchema(refType string, astFile *ast.File) (*spec.Schema, error) {
matches := combinedPattern.FindStringSubmatch(refType)
if len(matches) != 3 {
return nil, fmt.Errorf("invalid type: %s", refType)
}
- refType = matches[1]
- schema, err := operation.parseObjectSchema(refType, astFile)
+
+ schema, err := operation.parseObjectSchema(matches[1], astFile)
if err != nil {
return nil, err
}
- parseFields := func(s string) []string {
- n := 0
+ fields, props := parseFields(matches[2]), map[string]spec.Schema{}
- return strings.FieldsFunc(s, func(r rune) bool {
- if r == '{' {
- n++
-
- return false
- } else if r == '}' {
- n--
-
- return false
- }
-
- return r == ',' && n == 0
- })
- }
-
- fields := parseFields(matches[2])
- props := map[string]spec.Schema{}
for _, field := range fields {
- matches := strings.SplitN(field, "=", 2)
- if len(matches) == 2 {
- schema, err := operation.parseObjectSchema(matches[1], astFile)
+ keyVal := strings.SplitN(field, "=", 2)
+ if len(keyVal) == 2 {
+ schema, err := operation.parseObjectSchema(keyVal[1], astFile)
if err != nil {
return nil, err
}
- props[matches[0]] = *schema
+
+ props[keyVal[0]] = *schema
}
}
@@ -829,6 +939,7 @@ func (operation *Operation) parseAPIObjectSchema(schemaType, refType string, ast
if !strings.HasPrefix(refType, "[]") {
return operation.parseObjectSchema(refType, astFile)
}
+
refType = refType[2:]
fallthrough
@@ -857,6 +968,7 @@ func (operation *Operation) ParseResponseComment(commentLine string, astFile *as
}
description := strings.Trim(matches[4], "\"")
+
schema, err := operation.parseAPIObjectSchema(strings.Trim(matches[2], "{}"), matches[3], astFile)
if err != nil {
return err
@@ -868,6 +980,7 @@ func (operation *Operation) ParseResponseComment(commentLine string, astFile *as
continue
}
+
code, err := strconv.Atoi(codeStr)
if err != nil {
return fmt.Errorf("can not parse response comment \"%s\"", commentLine)
@@ -892,6 +1005,23 @@ func newHeaderSpec(schemaType, description string) spec.Header {
HeaderProps: spec.HeaderProps{
Description: description,
},
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: nil,
+ },
+ CommonValidations: spec.CommonValidations{
+ Maximum: nil,
+ ExclusiveMaximum: false,
+ Minimum: nil,
+ ExclusiveMinimum: false,
+ MaxLength: nil,
+ MinLength: nil,
+ Pattern: "",
+ MaxItems: nil,
+ MinItems: nil,
+ UniqueItems: false,
+ MultipleOf: nil,
+ Enum: nil,
+ },
}
}
@@ -934,6 +1064,7 @@ func (operation *Operation) ParseResponseHeaderComment(commentLine string, _ *as
if err != nil {
return fmt.Errorf("can not parse response comment \"%s\"", commentLine)
}
+
if operation.Responses.StatusCodeResponses != nil {
response, responseExist := operation.Responses.StatusCodeResponses[code]
if responseExist {
@@ -947,7 +1078,7 @@ func (operation *Operation) ParseResponseHeaderComment(commentLine string, _ *as
return nil
}
-var emptyResponsePattern = regexp.MustCompile(`([\w,]+)[\s]+"(.*)"`)
+var emptyResponsePattern = regexp.MustCompile(`([\w,]+)\s+"(.*)"`)
// ParseEmptyResponseComment parse only comment out status code and description,eg: @Success 200 "it's ok".
func (operation *Operation) ParseEmptyResponseComment(commentLine string) error {
@@ -957,6 +1088,7 @@ func (operation *Operation) ParseEmptyResponseComment(commentLine string) error
}
description := strings.Trim(matches[2], "\"")
+
for _, codeStr := range strings.Split(matches[1], ",") {
if strings.EqualFold(codeStr, defaultTag) {
operation.DefaultResponse().WithDescription(description)
@@ -983,6 +1115,7 @@ func (operation *Operation) ParseEmptyResponseOnly(commentLine string) error {
continue
}
+
code, err := strconv.Atoi(codeStr)
if err != nil {
return fmt.Errorf("can not parse response comment \"%s\"", commentLine)
@@ -999,7 +1132,8 @@ func (operation *Operation) DefaultResponse() *spec.Response {
if operation.Responses.Default == nil {
operation.Responses.Default = &spec.Response{
ResponseProps: spec.ResponseProps{
- Headers: make(map[string]spec.Header),
+ Description: "",
+ Headers: make(map[string]spec.Header),
},
}
}
@@ -1012,6 +1146,7 @@ func (operation *Operation) AddResponse(code int, response *spec.Response) {
if response.Headers == nil {
response.Headers = make(map[string]spec.Header)
}
+
operation.Responses.StatusCodeResponses[code] = *response
}
@@ -1020,10 +1155,12 @@ func createParameter(paramType, description, paramName, schemaType string, requi
// //five possible parameter types. query, path, body, header, form
result := spec.Parameter{
ParamProps: spec.ParamProps{
- Name: paramName,
- Description: description,
- Required: required,
- In: paramType,
+ Name: paramName,
+ Description: description,
+ Required: required,
+ In: paramType,
+ Schema: nil,
+ AllowEmptyValue: false,
},
}
@@ -1038,7 +1175,9 @@ func createParameter(paramType, description, paramName, schemaType string, requi
}
result.SimpleSchema = spec.SimpleSchema{
- Type: schemaType,
+ Type: schemaType,
+ Nullable: false,
+ Format: "",
}
return result
@@ -1054,6 +1193,7 @@ func getCodeExampleForSummary(summaryName string, dirPath string) ([]byte, error
if fileInfo.IsDir() {
continue
}
+
fileName := fileInfo.Name()
if !strings.Contains(fileName, ".json") {
@@ -1062,6 +1202,7 @@ func getCodeExampleForSummary(summaryName string, dirPath string) ([]byte, error
if strings.Contains(fileName, summaryName) {
fullPath := filepath.Join(dirPath, fileName)
+
commentInfo, err := ioutil.ReadFile(fullPath)
if err != nil {
return nil, fmt.Errorf("Failed to read code example file %s error: %s ", fullPath, err)
diff --git a/vendor/github.com/swaggo/swag/packages.go b/vendor/github.com/swaggo/swag/packages.go
index c454f065..dd1a0e6c 100644
--- a/vendor/github.com/swaggo/swag/packages.go
+++ b/vendor/github.com/swaggo/swag/packages.go
@@ -29,13 +29,13 @@ func NewPackagesDefinitions() *PackagesDefinitions {
}
// CollectAstFile collect ast.file.
-func (pkgs *PackagesDefinitions) CollectAstFile(packageDir, path string, astFile *ast.File) error {
- if pkgs.files == nil {
- pkgs.files = make(map[*ast.File]*AstFileInfo)
+func (pkgDefs *PackagesDefinitions) CollectAstFile(packageDir, path string, astFile *ast.File) error {
+ if pkgDefs.files == nil {
+ pkgDefs.files = make(map[*ast.File]*AstFileInfo)
}
- if pkgs.packages == nil {
- pkgs.packages = make(map[string]*PackageDefinitions)
+ if pkgDefs.packages == nil {
+ pkgDefs.packages = make(map[string]*PackageDefinitions)
}
// return without storing the file if we lack a packageDir
@@ -48,23 +48,24 @@ func (pkgs *PackagesDefinitions) CollectAstFile(packageDir, path string, astFile
return err
}
- pd, ok := pkgs.packages[packageDir]
+ dependency, ok := pkgDefs.packages[packageDir]
if ok {
// return without storing the file if it already exists
- _, exists := pd.Files[path]
+ _, exists := dependency.Files[path]
if exists {
return nil
}
- pd.Files[path] = astFile
+
+ dependency.Files[path] = astFile
} else {
- pkgs.packages[packageDir] = &PackageDefinitions{
+ pkgDefs.packages[packageDir] = &PackageDefinitions{
Name: astFile.Name.Name,
Files: map[string]*ast.File{path: astFile},
TypeDefinitions: make(map[string]*TypeSpecDef),
}
}
- pkgs.files[astFile] = &AstFileInfo{
+ pkgDefs.files[astFile] = &AstFileInfo{
File: astFile,
Path: path,
PackagePath: packageDir,
@@ -96,15 +97,15 @@ func rangeFiles(files map[*ast.File]*AstFileInfo, handle func(filename string, f
// ParseTypes parse types
// @Return parsed definitions.
-func (pkgs *PackagesDefinitions) ParseTypes() (map[*TypeSpecDef]*Schema, error) {
+func (pkgDefs *PackagesDefinitions) ParseTypes() (map[*TypeSpecDef]*Schema, error) {
parsedSchemas := make(map[*TypeSpecDef]*Schema)
- for astFile, info := range pkgs.files {
- pkgs.parseTypesFromFile(astFile, info.PackagePath, parsedSchemas)
+ for astFile, info := range pkgDefs.files {
+ pkgDefs.parseTypesFromFile(astFile, info.PackagePath, parsedSchemas)
}
return parsedSchemas, nil
}
-func (pkgs *PackagesDefinitions) parseTypesFromFile(astFile *ast.File, packagePath string, parsedSchemas map[*TypeSpecDef]*Schema) {
+func (pkgDefs *PackagesDefinitions) parseTypesFromFile(astFile *ast.File, packagePath string, parsedSchemas map[*TypeSpecDef]*Schema) {
for _, astDeclaration := range astFile.Decls {
if generalDeclaration, ok := astDeclaration.(*ast.GenDecl); ok && generalDeclaration.Tok == token.TYPE {
for _, astSpec := range generalDeclaration.Specs {
@@ -123,29 +124,29 @@ func (pkgs *PackagesDefinitions) parseTypesFromFile(astFile *ast.File, packagePa
}
}
- if pkgs.uniqueDefinitions == nil {
- pkgs.uniqueDefinitions = make(map[string]*TypeSpecDef)
+ if pkgDefs.uniqueDefinitions == nil {
+ pkgDefs.uniqueDefinitions = make(map[string]*TypeSpecDef)
}
fullName := typeSpecDef.FullName()
- anotherTypeDef, ok := pkgs.uniqueDefinitions[fullName]
+ anotherTypeDef, ok := pkgDefs.uniqueDefinitions[fullName]
if ok {
if typeSpecDef.PkgPath == anotherTypeDef.PkgPath {
continue
} else {
- delete(pkgs.uniqueDefinitions, fullName)
+ delete(pkgDefs.uniqueDefinitions, fullName)
}
} else {
- pkgs.uniqueDefinitions[fullName] = typeSpecDef
+ pkgDefs.uniqueDefinitions[fullName] = typeSpecDef
}
- if pkgs.packages[typeSpecDef.PkgPath] == nil {
- pkgs.packages[typeSpecDef.PkgPath] = &PackageDefinitions{
+ if pkgDefs.packages[typeSpecDef.PkgPath] == nil {
+ pkgDefs.packages[typeSpecDef.PkgPath] = &PackageDefinitions{
Name: astFile.Name.Name,
TypeDefinitions: map[string]*TypeSpecDef{typeSpecDef.Name(): typeSpecDef},
}
- } else if _, ok = pkgs.packages[typeSpecDef.PkgPath].TypeDefinitions[typeSpecDef.Name()]; !ok {
- pkgs.packages[typeSpecDef.PkgPath].TypeDefinitions[typeSpecDef.Name()] = typeSpecDef
+ } else if _, ok = pkgDefs.packages[typeSpecDef.PkgPath].TypeDefinitions[typeSpecDef.Name()]; !ok {
+ pkgDefs.packages[typeSpecDef.PkgPath].TypeDefinitions[typeSpecDef.Name()] = typeSpecDef
}
}
}
@@ -153,11 +154,12 @@ func (pkgs *PackagesDefinitions) parseTypesFromFile(astFile *ast.File, packagePa
}
}
-func (pkgs *PackagesDefinitions) findTypeSpec(pkgPath string, typeName string) *TypeSpecDef {
- if pkgs.packages == nil {
+func (pkgDefs *PackagesDefinitions) findTypeSpec(pkgPath string, typeName string) *TypeSpecDef {
+ if pkgDefs.packages == nil {
return nil
}
- pd, found := pkgs.packages[pkgPath]
+
+ pd, found := pkgDefs.packages[pkgPath]
if found {
typeSpec, ok := pd.TypeDefinitions[typeName]
if ok {
@@ -168,7 +170,7 @@ func (pkgs *PackagesDefinitions) findTypeSpec(pkgPath string, typeName string) *
return nil
}
-func (pkgs *PackagesDefinitions) loadExternalPackage(importPath string) error {
+func (pkgDefs *PackagesDefinitions) loadExternalPackage(importPath string) error {
cwd, err := os.Getwd()
if err != nil {
return err
@@ -189,7 +191,7 @@ func (pkgs *PackagesDefinitions) loadExternalPackage(importPath string) error {
for _, info := range loaderProgram.AllPackages {
pkgPath := strings.TrimPrefix(info.Pkg.Path(), "vendor/")
for _, astFile := range info.Files {
- pkgs.parseTypesFromFile(astFile, pkgPath, nil)
+ pkgDefs.parseTypesFromFile(astFile, pkgPath, nil)
}
}
@@ -201,7 +203,7 @@ func (pkgs *PackagesDefinitions) loadExternalPackage(importPath string) error {
// @file current ast.File in which to search imports
// @fuzzy search for the package path that the last part matches the @pkg if true
// @return the package path of a package of @pkg.
-func (pkgs *PackagesDefinitions) findPackagePathFromImports(pkg string, file *ast.File, fuzzy bool) string {
+func (pkgDefs *PackagesDefinitions) findPackagePathFromImports(pkg string, file *ast.File, fuzzy bool) string {
if file == nil {
return ""
}
@@ -214,6 +216,7 @@ func (pkgs *PackagesDefinitions) findPackagePathFromImports(pkg string, file *as
matchLastPathPart := func(pkgPath string) bool {
paths := strings.Split(pkgPath, "/")
+
return paths[len(paths)-1] == pkg
}
@@ -223,26 +226,33 @@ func (pkgs *PackagesDefinitions) findPackagePathFromImports(pkg string, file *as
if imp.Name.Name == pkg {
return strings.Trim(imp.Path.Value, `"`)
}
+
if imp.Name.Name == "_" {
hasAnonymousPkg = true
}
continue
}
- if pkgs.packages != nil {
+
+ if pkgDefs.packages != nil {
path := strings.Trim(imp.Path.Value, `"`)
if fuzzy {
if matchLastPathPart(path) {
return path
}
- } else if pd, ok := pkgs.packages[path]; ok && pd.Name == pkg {
+
+ continue
+ }
+
+ pd, ok := pkgDefs.packages[path]
+ if ok && pd.Name == pkg {
return path
}
}
}
// match unnamed package
- if hasAnonymousPkg && pkgs.packages != nil {
+ if hasAnonymousPkg && pkgDefs.packages != nil {
for _, imp := range file.Imports {
if imp.Name == nil {
continue
@@ -253,7 +263,7 @@ func (pkgs *PackagesDefinitions) findPackagePathFromImports(pkg string, file *as
if matchLastPathPart(path) {
return path
}
- } else if pd, ok := pkgs.packages[path]; ok && pd.Name == pkg {
+ } else if pd, ok := pkgDefs.packages[path]; ok && pd.Name == pkg {
return path
}
}
@@ -267,12 +277,13 @@ func (pkgs *PackagesDefinitions) findPackagePathFromImports(pkg string, file *as
// @typeName the name of the target type, if it starts with a package name, find its own package path from imports on top of @file
// @file the ast.file in which @typeName is used
// @pkgPath the package path of @file.
-func (pkgs *PackagesDefinitions) FindTypeSpec(typeName string, file *ast.File, parseDependency bool) *TypeSpecDef {
+func (pkgDefs *PackagesDefinitions) FindTypeSpec(typeName string, file *ast.File, parseDependency bool) *TypeSpecDef {
if IsGolangPrimitiveType(typeName) {
return nil
}
+
if file == nil { // for test
- return pkgs.uniqueDefinitions[typeName]
+ return pkgDefs.uniqueDefinitions[typeName]
}
parts := strings.Split(typeName, ".")
@@ -290,42 +301,43 @@ func (pkgs *PackagesDefinitions) FindTypeSpec(typeName string, file *ast.File, p
}
if !isAliasPkgName(file, parts[0]) {
- typeDef, ok := pkgs.uniqueDefinitions[typeName]
+ typeDef, ok := pkgDefs.uniqueDefinitions[typeName]
if ok {
return typeDef
}
}
- pkgPath := pkgs.findPackagePathFromImports(parts[0], file, false)
+
+ pkgPath := pkgDefs.findPackagePathFromImports(parts[0], file, false)
if len(pkgPath) == 0 {
// check if the current package
if parts[0] == file.Name.Name {
- pkgPath = pkgs.files[file].PackagePath
+ pkgPath = pkgDefs.files[file].PackagePath
} else if parseDependency {
// take it as an external package, needs to be loaded
- if pkgPath = pkgs.findPackagePathFromImports(parts[0], file, true); len(pkgPath) > 0 {
- if err := pkgs.loadExternalPackage(pkgPath); err != nil {
+ if pkgPath = pkgDefs.findPackagePathFromImports(parts[0], file, true); len(pkgPath) > 0 {
+ if err := pkgDefs.loadExternalPackage(pkgPath); err != nil {
return nil
}
}
}
}
- return pkgs.findTypeSpec(pkgPath, parts[1])
+ return pkgDefs.findTypeSpec(pkgPath, parts[1])
}
- typeDef, ok := pkgs.uniqueDefinitions[fullTypeName(file.Name.Name, typeName)]
+ typeDef, ok := pkgDefs.uniqueDefinitions[fullTypeName(file.Name.Name, typeName)]
if ok {
return typeDef
}
- typeDef = pkgs.findTypeSpec(pkgs.files[file].PackagePath, typeName)
+ typeDef = pkgDefs.findTypeSpec(pkgDefs.files[file].PackagePath, typeName)
if typeDef != nil {
return typeDef
}
for _, imp := range file.Imports {
if imp.Name != nil && imp.Name.Name == "." {
- typeDef := pkgs.findTypeSpec(strings.Trim(imp.Path.Value, `"`), typeName)
+ typeDef := pkgDefs.findTypeSpec(strings.Trim(imp.Path.Value, `"`), typeName)
if typeDef != nil {
return typeDef
}
diff --git a/vendor/github.com/swaggo/swag/parser.go b/vendor/github.com/swaggo/swag/parser.go
index 387151ab..a390714f 100644
--- a/vendor/github.com/swaggo/swag/parser.go
+++ b/vendor/github.com/swaggo/swag/parser.go
@@ -65,7 +65,7 @@ var (
// ErrFailedConvertPrimitiveType Failed to convert for swag to interpretable type.
ErrFailedConvertPrimitiveType = errors.New("swag property: failed convert primitive type")
- // ErrSkippedField .swaggo specifies field should be skipped
+ // ErrSkippedField .swaggo specifies field should be skipped.
ErrSkippedField = errors.New("field is skipped by global overrides")
)
@@ -142,12 +142,12 @@ type Parser struct {
Overrides map[string]string
}
-// FieldParserFactory create FieldParser
+// FieldParserFactory create FieldParser.
type FieldParserFactory func(ps *Parser, field *ast.Field) FieldParser
-// FieldParser parse struct field
+// FieldParser parse struct field.
type FieldParser interface {
- ShouldSkip() (bool, error)
+ ShouldSkip() bool
FieldName() (string, error)
CustomSchema() (*spec.Schema, error)
ComplementSchema(schema *spec.Schema) error
@@ -161,8 +161,6 @@ type Debugger interface {
// New creates a new Parser with default properties.
func New(options ...func(*Parser)) *Parser {
- // parser.swagger.SecurityDefinitions =
-
parser := &Parser{
swagger: &spec.Swagger{
SwaggerProps: spec.SwaggerProps{
@@ -177,10 +175,16 @@ func New(options ...func(*Parser)) *Parser {
},
Paths: &spec.Paths{
Paths: make(map[string]spec.PathItem),
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: nil,
+ },
},
Definitions: make(map[string]spec.Schema),
SecurityDefinitions: make(map[string]*spec.SecurityScheme),
},
+ VendorExtensible: spec.VendorExtensible{
+ Extensions: nil,
+ },
},
packages: NewPackagesDefinitions(),
debug: log.New(os.Stdout, "", log.LstdFlags),
@@ -284,22 +288,22 @@ func (parser *Parser) ParseAPIMultiSearchDir(searchDirs []string, mainAPIFile st
}
if parser.ParseDependency {
- var t depth.Tree
- t.ResolveInternal = true
- t.MaxDepth = parseDepth
+ var tree depth.Tree
+ tree.ResolveInternal = true
+ tree.MaxDepth = parseDepth
pkgName, err := getPkgName(filepath.Dir(absMainAPIFilePath))
if err != nil {
return err
}
- err = t.Resolve(pkgName)
+ err = tree.Resolve(pkgName)
if err != nil {
return fmt.Errorf("pkg %s cannot find all dependencies, %s", pkgName, err)
}
- for i := 0; i < len(t.Root.Deps); i++ {
- err := parser.getAllGoFileInfoFromDeps(&t.Root.Deps[i])
+ for i := 0; i < len(tree.Root.Deps); i++ {
+ err := parser.getAllGoFileInfoFromDeps(&tree.Root.Deps[i])
if err != nil {
return err
}
@@ -329,7 +333,9 @@ func (parser *Parser) ParseAPIMultiSearchDir(searchDirs []string, mainAPIFile st
func getPkgName(searchDir string) (string, error) {
cmd := exec.Command("go", "list", "-f={{.ImportPath}}")
cmd.Dir = searchDir
+
var stdout, stderr strings.Builder
+
cmd.Stdout = &stdout
cmd.Stderr = &stderr
@@ -342,7 +348,9 @@ func getPkgName(searchDir string) (string, error) {
if outStr[0] == '_' { // will shown like _/{GOPATH}/src/{YOUR_PACKAGE} when NOT enable GO MODULE.
outStr = strings.TrimPrefix(outStr, "_"+build.Default.GOPATH+"/src/")
}
+
f := strings.Split(outStr, "\n")
+
outStr = f[0]
return outStr, nil
@@ -370,7 +378,8 @@ func (parser *Parser) ParseGeneralAPIInfo(mainAPIFile string) error {
if !isGeneralAPIComment(comments) {
continue
}
- err := parseGeneralAPIInfo(parser, comments)
+
+ err = parseGeneralAPIInfo(parser, comments)
if err != nil {
return err
}
@@ -383,13 +392,15 @@ func parseGeneralAPIInfo(parser *Parser, comments []string) error {
previousAttribute := ""
// parsing classic meta data model
- for i, commentLine := range comments {
+ for line := 0; line < len(comments); line++ {
+ commentLine := comments[line]
attribute := strings.Split(commentLine, " ")[0]
value := strings.TrimSpace(commentLine[len(attribute):])
multilineBlock := false
if previousAttribute == attribute {
multilineBlock = true
}
+
switch strings.ToLower(attribute) {
case versionAttr:
parser.swagger.Info.Version = value
@@ -401,12 +412,14 @@ func parseGeneralAPIInfo(parser *Parser, comments []string) error {
continue
}
+
parser.swagger.Info.Description = value
case "@description.markdown":
commentInfo, err := getMarkdownForTag("api", parser.markdownFileDir)
if err != nil {
return err
}
+
parser.swagger.Info.Description = string(commentInfo)
case "@termsofservice":
parser.swagger.Info.TermsOfService = value
@@ -450,57 +463,67 @@ func parseGeneralAPIInfo(parser *Parser, comments []string) error {
replaceLastTag(parser.swagger.Tags, tag)
case "@tag.description.markdown":
tag := parser.swagger.Tags[len(parser.swagger.Tags)-1]
+
commentInfo, err := getMarkdownForTag(tag.TagProps.Name, parser.markdownFileDir)
if err != nil {
return err
}
+
tag.TagProps.Description = string(commentInfo)
replaceLastTag(parser.swagger.Tags, tag)
case "@tag.docs.url":
tag := parser.swagger.Tags[len(parser.swagger.Tags)-1]
tag.TagProps.ExternalDocs = &spec.ExternalDocumentation{
- URL: value,
+ URL: value,
+ Description: "",
}
+
replaceLastTag(parser.swagger.Tags, tag)
case "@tag.docs.description":
tag := parser.swagger.Tags[len(parser.swagger.Tags)-1]
if tag.TagProps.ExternalDocs == nil {
return fmt.Errorf("%s needs to come after a @tags.docs.url", attribute)
}
+
tag.TagProps.ExternalDocs.Description = value
replaceLastTag(parser.swagger.Tags, tag)
case "@securitydefinitions.basic":
parser.swagger.SecurityDefinitions[value] = spec.BasicAuth()
case "@securitydefinitions.apikey":
- attrMap, _, _, err := parseSecAttr(attribute, []string{"@in", "@name"}, comments[i+1:])
+ attrMap, _, extensions, err := parseSecAttr(attribute, []string{"@in", "@name"}, comments, &line)
if err != nil {
return err
}
- parser.swagger.SecurityDefinitions[value] = spec.APIKeyAuth(attrMap["@name"], attrMap["@in"])
+
+ parser.swagger.SecurityDefinitions[value] = tryAddDescription(spec.APIKeyAuth(attrMap["@name"], attrMap["@in"]), extensions)
case "@securitydefinitions.oauth2.application":
- attrMap, scopes, extensions, err := parseSecAttr(attribute, []string{"@tokenurl"}, comments[i+1:])
+ attrMap, scopes, extensions, err := parseSecAttr(attribute, []string{"@tokenurl"}, comments, &line)
if err != nil {
return err
}
- parser.swagger.SecurityDefinitions[value] = secOAuth2Application(attrMap["@tokenurl"], scopes, extensions)
+
+ parser.swagger.SecurityDefinitions[value] = tryAddDescription(secOAuth2Application(attrMap["@tokenurl"], scopes, extensions), extensions)
case "@securitydefinitions.oauth2.implicit":
- attrs, scopes, ext, err := parseSecAttr(attribute, []string{"@authorizationurl"}, comments[i+1:])
+ attrs, scopes, ext, err := parseSecAttr(attribute, []string{"@authorizationurl"}, comments, &line)
if err != nil {
return err
}
- parser.swagger.SecurityDefinitions[value] = secOAuth2Implicit(attrs["@authorizationurl"], scopes, ext)
+
+ parser.swagger.SecurityDefinitions[value] = tryAddDescription(secOAuth2Implicit(attrs["@authorizationurl"], scopes, ext), ext)
case "@securitydefinitions.oauth2.password":
- attrs, scopes, ext, err := parseSecAttr(attribute, []string{"@tokenurl"}, comments[i+1:])
+ attrs, scopes, ext, err := parseSecAttr(attribute, []string{"@tokenurl"}, comments, &line)
if err != nil {
return err
}
- parser.swagger.SecurityDefinitions[value] = secOAuth2Password(attrs["@tokenurl"], scopes, ext)
+
+ parser.swagger.SecurityDefinitions[value] = tryAddDescription(secOAuth2Password(attrs["@tokenurl"], scopes, ext), ext)
case "@securitydefinitions.oauth2.accesscode":
- attrs, scopes, ext, err := parseSecAttr(attribute, []string{"@tokenurl", "@authorizationurl"}, comments[i+1:])
+ attrs, scopes, ext, err := parseSecAttr(attribute, []string{"@tokenurl", "@authorizationurl"}, comments, &line)
if err != nil {
return err
}
- parser.swagger.SecurityDefinitions[value] = secOAuth2AccessToken(attrs["@authorizationurl"], attrs["@tokenurl"], scopes, ext)
+
+ parser.swagger.SecurityDefinitions[value] = tryAddDescription(secOAuth2AccessToken(attrs["@authorizationurl"], attrs["@tokenurl"], scopes, ext), ext)
case "@query.collection.format":
parser.collectionFormatInQuery = value
default:
@@ -517,17 +540,21 @@ func parseGeneralAPIInfo(parser *Parser, comments []string) error {
break
}
}
+
// if it is present on security def, don't add it again
if extExistsInSecurityDef {
break
}
var valueJSON interface{}
+
split := strings.SplitAfter(commentLine, attribute+" ")
if len(split) < 2 {
return fmt.Errorf("annotation %s need a value", attribute)
}
+
extensionName := "x-" + strings.SplitAfter(attribute, prefixExtension)[1]
+
err := json.Unmarshal([]byte(split[1]), &valueJSON)
if err != nil {
return fmt.Errorf("annotation %s need a valid json value", attribute)
@@ -539,16 +566,28 @@ func parseGeneralAPIInfo(parser *Parser, comments []string) error {
if parser.swagger.Extensions == nil {
parser.swagger.Extensions = make(map[string]interface{})
}
+
parser.swagger.Extensions[attribute[1:]] = valueJSON
}
}
}
+
previousAttribute = attribute
}
return nil
}
+func tryAddDescription(spec *spec.SecurityScheme, extensions map[string]interface{}) *spec.SecurityScheme {
+ if val, ok := extensions["@description"]; ok {
+ if str, ok := val.(string); ok {
+ spec.Description = str
+ }
+ }
+
+ return spec
+}
+
// ParseAcceptComment parses comment for given `accept` comment string.
func (parser *Parser) ParseAcceptComment(commentLine string) error {
return parseMimeTypeList(commentLine, &parser.swagger.Consumes, "%v accept type can't be accepted")
@@ -572,11 +611,17 @@ func isGeneralAPIComment(comments []string) bool {
return true
}
-func parseSecAttr(context string, search []string, lines []string) (map[string]string, map[string]string, map[string]interface{}, error) {
+func parseSecAttr(context string, search []string, lines []string, index *int) (map[string]string, map[string]string, map[string]interface{}, error) {
attrMap := map[string]string{}
scopes := map[string]string{}
extensions := map[string]interface{}{}
- for _, v := range lines {
+
+ // For the first line we get the attributes in the context parameter, so we skip to the next one
+ *index++
+
+ for ; *index < len(lines); *index++ {
+ v := lines[*index]
+
securityAttr := strings.ToLower(strings.Split(v, " ")[0])
for _, findterm := range search {
if securityAttr == findterm {
@@ -585,19 +630,31 @@ func parseSecAttr(context string, search []string, lines []string) (map[string]s
continue
}
}
+
isExists, err := isExistsScope(securityAttr)
if err != nil {
return nil, nil, nil, err
}
+
if isExists {
scopes[securityAttr[len(scopeAttrPrefix):]] = v[len(securityAttr):]
}
+
if strings.HasPrefix(securityAttr, "@x-") {
// Add the custom attribute without the @
extensions[securityAttr[1:]] = strings.TrimSpace(v[len(securityAttr):])
}
+
+ // Not mandatory field
+ if securityAttr == "@description" {
+ extensions[securityAttr] = strings.TrimSpace(v[len(securityAttr):])
+ }
+
// next securityDefinitions
if strings.Index(securityAttr, "@securitydefinitions.") == 0 {
+ // Go back to the previous line and break
+ *index--
+
break
}
}
@@ -609,8 +666,12 @@ func parseSecAttr(context string, search []string, lines []string) (map[string]s
return attrMap, scopes, extensions, nil
}
-func secOAuth2Application(tokenURL string, scopes map[string]string,
- extensions map[string]interface{}) *spec.SecurityScheme {
+type (
+ authExtensions map[string]interface{}
+ authScopes map[string]string
+)
+
+func secOAuth2Application(tokenURL string, scopes authScopes, extensions authExtensions) *spec.SecurityScheme {
securityScheme := spec.OAuth2Application(tokenURL)
securityScheme.VendorExtensible.Extensions = handleSecuritySchemaExtensions(extensions)
for scope, description := range scopes {
@@ -620,10 +681,10 @@ func secOAuth2Application(tokenURL string, scopes map[string]string,
return securityScheme
}
-func secOAuth2Implicit(authorizationURL string, scopes map[string]string,
- extensions map[string]interface{}) *spec.SecurityScheme {
+func secOAuth2Implicit(authorizationURL string, scopes authScopes, extensions authExtensions) *spec.SecurityScheme {
securityScheme := spec.OAuth2Implicit(authorizationURL)
securityScheme.VendorExtensible.Extensions = handleSecuritySchemaExtensions(extensions)
+
for scope, description := range scopes {
securityScheme.AddScope(scope, description)
}
@@ -631,10 +692,10 @@ func secOAuth2Implicit(authorizationURL string, scopes map[string]string,
return securityScheme
}
-func secOAuth2Password(tokenURL string, scopes map[string]string,
- extensions map[string]interface{}) *spec.SecurityScheme {
+func secOAuth2Password(tokenURL string, scopes authScopes, extensions authExtensions) *spec.SecurityScheme {
securityScheme := spec.OAuth2Password(tokenURL)
securityScheme.VendorExtensible.Extensions = handleSecuritySchemaExtensions(extensions)
+
for scope, description := range scopes {
securityScheme.AddScope(scope, description)
}
@@ -642,10 +703,10 @@ func secOAuth2Password(tokenURL string, scopes map[string]string,
return securityScheme
}
-func secOAuth2AccessToken(authorizationURL, tokenURL string,
- scopes map[string]string, extensions map[string]interface{}) *spec.SecurityScheme {
+func secOAuth2AccessToken(authorizationURL, tokenURL string, scopes authScopes, extensions authExtensions) *spec.SecurityScheme {
securityScheme := spec.OAuth2AccessToken(authorizationURL, tokenURL)
securityScheme.VendorExtensible.Extensions = handleSecuritySchemaExtensions(extensions)
+
for scope, description := range scopes {
securityScheme.AddScope(scope, description)
}
@@ -653,7 +714,7 @@ func secOAuth2AccessToken(authorizationURL, tokenURL string,
return securityScheme
}
-func handleSecuritySchemaExtensions(providedExtensions map[string]interface{}) spec.Extensions {
+func handleSecuritySchemaExtensions(providedExtensions authExtensions) spec.Extensions {
var extensions spec.Extensions
if len(providedExtensions) > 0 {
extensions = make(map[string]interface{}, len(providedExtensions))
@@ -675,6 +736,7 @@ func getMarkdownForTag(tagName string, dirPath string) ([]byte, error) {
if fileInfo.IsDir() {
continue
}
+
fileName := fileInfo.Name()
if !strings.Contains(fileName, ".md") {
@@ -683,6 +745,7 @@ func getMarkdownForTag(tagName string, dirPath string) ([]byte, error) {
if strings.Contains(fileName, tagName) {
fullPath := filepath.Join(dirPath, fileName)
+
commentInfo, err := ioutil.ReadFile(fullPath)
if err != nil {
return nil, fmt.Errorf("Failed to read markdown file %s error: %s ", fullPath, err)
@@ -729,29 +792,9 @@ func (parser *Parser) ParseRouterAPIInfo(fileName string, astFile *ast.File) err
}
}
- for _, routeProperties := range operation.RouterProperties {
- var pathItem spec.PathItem
- var ok bool
-
- pathItem, ok = parser.swagger.Paths.Paths[routeProperties.Path]
- if !ok {
- pathItem = spec.PathItem{}
- }
-
- op := refRouteMethodOp(&pathItem, routeProperties.HTTPMethod)
-
- // check if we already have a operation for this path and method
- if *op != nil {
- err := fmt.Errorf("route %s %s is declared multiple times", routeProperties.HTTPMethod, routeProperties.Path)
- if parser.Strict {
- return err
- }
- parser.debug.Printf("warning: %s\n", err)
- }
-
- *op = &operation.Operation
-
- parser.swagger.Paths.Paths[routeProperties.Path] = pathItem
+ err := processRouterOperation(parser, operation)
+ if err != nil {
+ return err
}
}
}
@@ -776,14 +819,48 @@ func refRouteMethodOp(item *spec.PathItem, method string) (op **spec.Operation)
case http.MethodOptions:
op = &item.Options
}
+
return
}
+func processRouterOperation(parser *Parser, operation *Operation) error {
+ for _, routeProperties := range operation.RouterProperties {
+ var (
+ pathItem spec.PathItem
+ ok bool
+ )
+
+ pathItem, ok = parser.swagger.Paths.Paths[routeProperties.Path]
+ if !ok {
+ pathItem = spec.PathItem{}
+ }
+
+ op := refRouteMethodOp(&pathItem, routeProperties.HTTPMethod)
+
+ // check if we already have an operation for this path and method
+ if *op != nil {
+ err := fmt.Errorf("route %s %s is declared multiple times", routeProperties.HTTPMethod, routeProperties.Path)
+ if parser.Strict {
+ return err
+ }
+
+ parser.debug.Printf("warning: %s\n", err)
+ }
+
+ *op = &operation.Operation
+
+ parser.swagger.Paths.Paths[routeProperties.Path] = pathItem
+ }
+
+ return nil
+}
+
func convertFromSpecificToPrimitive(typeName string) (string, error) {
name := typeName
if strings.ContainsRune(name, '.') {
name = strings.Split(name, ".")[1]
}
+
switch strings.ToUpper(name) {
case "TIME", "OBJECTID", "UUID":
return STRING, nil
@@ -812,6 +889,7 @@ func (parser *Parser) getTypeSchema(typeName string, file *ast.File, ref bool) (
if override, ok := parser.Overrides[typeSpecDef.FullPath()]; ok {
if override == "" {
parser.debug.Printf("Override detected for %s: ignoring", typeSpecDef.FullPath())
+
return nil, ErrSkippedField
}
@@ -821,6 +899,7 @@ func (parser *Parser) getTypeSchema(typeName string, file *ast.File, ref bool) (
if separator == -1 {
// treat as a swaggertype tag
parts := strings.Split(override, ",")
+
return BuildCustomSchema(parts)
}
@@ -830,6 +909,7 @@ func (parser *Parser) getTypeSchema(typeName string, file *ast.File, ref bool) (
schema, ok := parser.parsedSchemas[typeSpecDef]
if !ok {
var err error
+
schema, err = parser.ParseDefinition(typeSpecDef)
if err != nil {
if err == ErrRecursiveParseStruct && ref {
@@ -865,8 +945,10 @@ func (parser *Parser) renameRefSchemas() {
for _, refURL := range parser.toBeRenamedRefURLs {
parts := strings.Split(refURL.Fragment, "/")
name := parts[len(parts)-1]
+
if pkgPath, ok := parser.toBeRenamedSchemas[name]; ok {
parts[len(parts)-1] = parser.renameSchema(name, pkgPath)
+
refURL.Fragment = strings.Join(parts, "/")
}
}
@@ -895,6 +977,7 @@ func (parser *Parser) getRefTypeSchema(typeSpecDef *TypeSpecDef, schema *Schema)
} else {
parser.existSchemaNames[schema.Name] = schema
}
+
parser.swagger.Definitions[schema.Name] = spec.Schema{}
if schema.Schema != nil {
@@ -928,8 +1011,8 @@ func (parser *Parser) ParseDefinition(typeSpecDef *TypeSpecDef) (*Schema, error)
typeName := typeSpecDef.FullName()
refTypeName := TypeDocName(typeName, typeSpecDef.TypeSpec)
- schema, ok := parser.parsedSchemas[typeSpecDef]
- if ok {
+ schema, found := parser.parsedSchemas[typeSpecDef]
+ if found {
parser.debug.Printf("Skipping '%s', already parsed.", typeName)
return schema, nil
@@ -945,6 +1028,7 @@ func (parser *Parser) ParseDefinition(typeSpecDef *TypeSpecDef) (*Schema, error)
},
ErrRecursiveParseStruct
}
+
parser.structStack = append(parser.structStack, typeSpecDef)
parser.debug.Printf("Generating %s", typeName)
@@ -958,20 +1042,20 @@ func (parser *Parser) ParseDefinition(typeSpecDef *TypeSpecDef) (*Schema, error)
fillDefinitionDescription(definition, typeSpecDef.File, typeSpecDef)
}
- s := Schema{
+ sch := Schema{
Name: refTypeName,
PkgPath: typeSpecDef.PkgPath,
Schema: definition,
}
- parser.parsedSchemas[typeSpecDef] = &s
+ parser.parsedSchemas[typeSpecDef] = &sch
// update an empty schema as a result of recursion
- s2, ok := parser.outputSchemas[typeSpecDef]
- if ok {
+ s2, found := parser.outputSchemas[typeSpecDef]
+ if found {
parser.swagger.Definitions[s2.Name] = *definition
}
- return &s, nil
+ return &sch, nil
}
func fullTypeName(pkgName, typeName string) string {
@@ -1014,13 +1098,16 @@ func extractDeclarationDescription(commentGroups ...*ast.CommentGroup) string {
}
isHandlingDescription := false
+
for _, comment := range commentGroup.List {
commentText := strings.TrimSpace(strings.TrimLeft(comment.Text, "/"))
attribute := strings.Split(commentText, " ")[0]
+
if strings.ToLower(attribute) != descriptionAttr {
if !isHandlingDescription {
continue
}
+
break
}
@@ -1088,8 +1175,8 @@ func (parser *Parser) parseTypeExpr(file *ast.File, typeExpr ast.Expr, ref bool)
}
func (parser *Parser) parseStruct(file *ast.File, fields *ast.FieldList) (*spec.Schema, error) {
- required := make([]string, 0)
- properties := make(map[string]spec.Schema)
+ required, properties := make([]string, 0), make(map[string]spec.Schema)
+
for _, field := range fields.List {
fieldProps, requiredFromAnon, err := parser.parseStructField(file, field)
if err != nil {
@@ -1099,10 +1186,13 @@ func (parser *Parser) parseStruct(file *ast.File, fields *ast.FieldList) (*spec.
return nil, err
}
+
if len(fieldProps) == 0 {
continue
}
+
required = append(required, requiredFromAnon...)
+
for k, v := range fieldProps {
properties[k] = v
}
@@ -1132,10 +1222,12 @@ func (parser *Parser) parseStructField(file *ast.File, field *ast.Field) (map[st
if err != nil {
return nil, nil, err
}
+
schema, err := parser.getTypeSchema(typeName, file, false)
if err != nil {
return nil, nil, err
}
+
if len(schema.Type) > 0 && schema.Type[0] == OBJECT {
if len(schema.Properties) == 0 {
return nil, nil, nil
@@ -1155,11 +1247,7 @@ func (parser *Parser) parseStructField(file *ast.File, field *ast.Field) (map[st
ps := parser.fieldParserFactory(parser, field)
- ok, err := ps.ShouldSkip()
- if err != nil {
- return nil, nil, err
- }
- if ok {
+ if ps.ShouldSkip() {
return nil, nil, nil
}
@@ -1172,6 +1260,7 @@ func (parser *Parser) parseStructField(file *ast.File, field *ast.Field) (map[st
if err != nil {
return nil, nil, err
}
+
if schema == nil {
typeName, err := getFieldType(field.Type)
if err == nil {
@@ -1181,6 +1270,7 @@ func (parser *Parser) parseStructField(file *ast.File, field *ast.Field) (map[st
// unnamed type
schema, err = parser.parseTypeExpr(file, field.Type, false)
}
+
if err != nil {
return nil, nil, err
}
@@ -1192,10 +1282,12 @@ func (parser *Parser) parseStructField(file *ast.File, field *ast.Field) (map[st
}
var tagRequired []string
+
required, err := ps.IsRequired()
if err != nil {
return nil, nil, err
}
+
if required {
tagRequired = append(tagRequired, fieldName)
}
@@ -1214,7 +1306,6 @@ func getFieldType(field ast.Expr) (string, error) {
}
return fullTypeName(packageName, fieldType.Sel.Name), nil
-
case *ast.StarExpr:
fullName, err := getFieldType(fieldType.X)
if err != nil {
@@ -1232,6 +1323,7 @@ func (parser *Parser) GetSchemaTypePath(schema *spec.Schema, depth int) []string
if schema == nil || depth == 0 {
return nil
}
+
name := schema.Ref.String()
if name != "" {
if pos := strings.LastIndexByte(name, '/'); pos >= 0 {
@@ -1243,10 +1335,12 @@ func (parser *Parser) GetSchemaTypePath(schema *spec.Schema, depth int) []string
return nil
}
+
if len(schema.Type) > 0 {
switch schema.Type[0] {
case ARRAY:
depth--
+
s := []string{schema.Type[0]}
return append(s, parser.GetSchemaTypePath(schema.Items.Schema, depth)...)
@@ -1254,6 +1348,7 @@ func (parser *Parser) GetSchemaTypePath(schema *spec.Schema, depth int) []string
if schema.AdditionalProperties != nil && schema.AdditionalProperties.Schema != nil {
// for map
depth--
+
s := []string{schema.Type[0]}
return append(s, parser.GetSchemaTypePath(schema.AdditionalProperties.Schema, depth)...)
@@ -1304,6 +1399,7 @@ func defineTypeOfExample(schemaType, arrayType, exampleValue string) (interface{
if err != nil {
return nil, err
}
+
result = append(result, v)
}
@@ -1314,7 +1410,9 @@ func defineTypeOfExample(schemaType, arrayType, exampleValue string) (interface{
}
values := strings.Split(exampleValue, ",")
+
result := map[string]interface{}{}
+
for _, value := range values {
mapData := strings.Split(value, ":")
@@ -1323,10 +1421,14 @@ func defineTypeOfExample(schemaType, arrayType, exampleValue string) (interface{
if err != nil {
return nil, err
}
+
result[mapData[0]] = v
- } else {
- return nil, fmt.Errorf("example value %s should format: key:value", exampleValue)
+
+ continue
+
}
+
+ return nil, fmt.Errorf("example value %s should format: key:value", exampleValue)
}
return result, nil
@@ -1338,9 +1440,12 @@ func defineTypeOfExample(schemaType, arrayType, exampleValue string) (interface{
// GetAllGoFileInfo gets all Go source files information for given searchDir.
func (parser *Parser) getAllGoFileInfo(packageDir, searchDir string) error {
return filepath.Walk(searchDir, func(path string, f os.FileInfo, _ error) error {
- if err := parser.Skip(path, f); err != nil {
+ err := parser.Skip(path, f)
+ if err != nil {
return err
- } else if f.IsDir() {
+ }
+
+ if f.IsDir() {
return nil
}
@@ -1363,7 +1468,9 @@ func (parser *Parser) getAllGoFileInfoFromDeps(pkg *depth.Pkg) error {
if pkg.Raw == nil && pkg.Name == "C" {
return nil
}
+
srcDir := pkg.Raw.Dir
+
files, err := ioutil.ReadDir(srcDir) // only parsing files in the dir(don't contain sub dir files)
if err != nil {
return err
@@ -1414,24 +1521,29 @@ func (parser *Parser) checkOperationIDUniqueness() error {
for path, item := range parser.swagger.Paths.Paths {
var method, id string
+
for method = range allMethod {
op := refRouteMethodOp(&item, method)
if *op != nil {
id = (**op).ID
+
break
}
}
+
if id == "" {
continue
}
current := fmt.Sprintf("%s %s", method, path)
+
previous, ok := operationsIds[id]
if ok {
return fmt.Errorf(
"duplicated @id annotation '%s' found in '%s', previously declared in: '%s'",
id, current, previous)
}
+
operationsIds[id] = current
}
diff --git a/vendor/github.com/swaggo/swag/schema.go b/vendor/github.com/swaggo/swag/schema.go
index 8f25d6f7..a23d21b3 100644
--- a/vendor/github.com/swaggo/swag/schema.go
+++ b/vendor/github.com/swaggo/swag/schema.go
@@ -26,6 +26,8 @@ const (
STRING = "string"
// FUNC represent a function value.
FUNC = "func"
+ // INTERFACE represent a interface value.
+ INTERFACE = "interface{}"
// ANY represent a any value.
ANY = "any"
// NIL represent a empty value.
@@ -104,7 +106,8 @@ func IsGolangPrimitiveType(typeName string) bool {
"float32",
"float64",
"bool",
- "string":
+ "string",
+ "any":
return true
}
@@ -132,6 +135,7 @@ func TypeDocName(pkgName string, spec *ast.TypeSpec) string {
}
}
}
+
if spec.Name != nil {
return fullTypeName(strings.Split(pkgName, ".")[0], spec.Name.Name)
}
@@ -167,6 +171,7 @@ func BuildCustomSchema(types []string) (*spec.Schema, error) {
if len(types) == 1 {
return nil, errors.New("need array item type after array")
}
+
schema, err := BuildCustomSchema(types[1:])
if err != nil {
return nil, err
@@ -177,6 +182,7 @@ func BuildCustomSchema(types []string) (*spec.Schema, error) {
if len(types) == 1 {
return PrimitiveSchema(types[0]), nil
}
+
schema, err := BuildCustomSchema(types[1:])
if err != nil {
return nil, err
diff --git a/vendor/github.com/swaggo/swag/spec.go b/vendor/github.com/swaggo/swag/spec.go
index 9e0ec1ad..3a727c94 100644
--- a/vendor/github.com/swaggo/swag/spec.go
+++ b/vendor/github.com/swaggo/swag/spec.go
@@ -21,31 +21,33 @@ type Spec struct {
// ReadDoc parses SwaggerTemplate into swagger document.
func (i *Spec) ReadDoc() string {
- i.Description = strings.Replace(i.Description, "\n", "\\n", -1)
+ i.Description = strings.ReplaceAll(i.Description, "\n", "\\n")
- t, err := template.New("swagger_info").Funcs(template.FuncMap{
+ tpl, err := template.New("swagger_info").Funcs(template.FuncMap{
"marshal": func(v interface{}) string {
a, _ := json.Marshal(v)
+
return string(a)
},
"escape": func(v interface{}) string {
// escape tabs
- str := strings.Replace(v.(string), "\t", "\\t", -1)
+ var str = strings.ReplaceAll(v.(string), "\t", "\\t")
// replace " with \", and if that results in \\", replace that with \\\"
- str = strings.Replace(str, "\"", "\\\"", -1)
- return strings.Replace(str, "\\\\\"", "\\\\\\\"", -1)
+ str = strings.ReplaceAll(str, "\"", "\\\"")
+
+ return strings.ReplaceAll(str, "\\\\\"", "\\\\\\\"")
},
}).Parse(i.SwaggerTemplate)
if err != nil {
return i.SwaggerTemplate
}
- var tpl bytes.Buffer
- if err = t.Execute(&tpl, i); err != nil {
+ var doc bytes.Buffer
+ if err = tpl.Execute(&doc, i); err != nil {
return i.SwaggerTemplate
}
- return tpl.String()
+ return doc.String()
}
// InstanceName returns Spec instance name.
diff --git a/vendor/github.com/swaggo/swag/swagger.go b/vendor/github.com/swaggo/swag/swagger.go
index c00feb22..5ffbab63 100644
--- a/vendor/github.com/swaggo/swag/swagger.go
+++ b/vendor/github.com/swaggo/swag/swagger.go
@@ -23,6 +23,7 @@ type Swagger interface {
func Register(name string, swagger Swagger) {
swaggerMu.Lock()
defer swaggerMu.Unlock()
+
if swagger == nil {
panic("swagger is nil")
}
@@ -34,6 +35,7 @@ func Register(name string, swagger Swagger) {
if _, ok := swags[name]; ok {
panic("Register called twice for swag: " + name)
}
+
swags[name] = swagger
}
diff --git a/vendor/github.com/swaggo/swag/version.go b/vendor/github.com/swaggo/swag/version.go
index 9a9c4691..0955fab6 100644
--- a/vendor/github.com/swaggo/swag/version.go
+++ b/vendor/github.com/swaggo/swag/version.go
@@ -1,4 +1,4 @@
package swag
// Version of swag.
-const Version = "v1.8.0"
+const Version = "v1.8.1"
diff --git a/vendor/github.com/tklauser/numcpus/.cirrus.yml b/vendor/github.com/tklauser/numcpus/.cirrus.yml
index 11a39e21..91acc281 100644
--- a/vendor/github.com/tklauser/numcpus/.cirrus.yml
+++ b/vendor/github.com/tklauser/numcpus/.cirrus.yml
@@ -1,12 +1,13 @@
env:
CIRRUS_CLONE_DEPTH: 1
+ GO_VERSION: go1.18.1
freebsd_12_task:
freebsd_instance:
image_family: freebsd-12-3
install_script: |
- pkg install -y git go
- GOBIN=$PWD/bin go install golang.org/dl/go1.17.6@latest
- bin/go1.17.6 download
- build_script: bin/go1.17.6 build -v ./...
- test_script: bin/go1.17.6 test -race ./...
+ pkg install -y go
+ GOBIN=$PWD/bin go install golang.org/dl/${GO_VERSION}@latest
+ bin/${GO_VERSION} download
+ build_script: bin/${GO_VERSION} build -buildvcs=false -v ./...
+ test_script: bin/${GO_VERSION} test -buildvcs=false -race ./...
diff --git a/vendor/github.com/tklauser/numcpus/go.mod b/vendor/github.com/tklauser/numcpus/go.mod
index 5f84e50a..861f9bd2 100644
--- a/vendor/github.com/tklauser/numcpus/go.mod
+++ b/vendor/github.com/tklauser/numcpus/go.mod
@@ -1,5 +1,5 @@
module github.com/tklauser/numcpus
-go 1.11
+go 1.13
-require golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27
+require golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6
diff --git a/vendor/github.com/tklauser/numcpus/go.sum b/vendor/github.com/tklauser/numcpus/go.sum
index 15089f2f..67ddd694 100644
--- a/vendor/github.com/tklauser/numcpus/go.sum
+++ b/vendor/github.com/tklauser/numcpus/go.sum
@@ -1,2 +1,2 @@
-golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27 h1:XDXtA5hveEEV8JB2l7nhMTp3t3cHp9ZpwcdjqyEWLlo=
-golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6 h1:nonptSpoQ4vQjyraW20DXPAglgQfVnM9ZC6MmNLMR60=
+golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
diff --git a/vendor/github.com/urfave/cli/v2/.gitignore b/vendor/github.com/urfave/cli/v2/.gitignore
index 2d5e149b..c04fcc53 100644
--- a/vendor/github.com/urfave/cli/v2/.gitignore
+++ b/vendor/github.com/urfave/cli/v2/.gitignore
@@ -1,7 +1,10 @@
*.coverprofile
*.orig
-node_modules/
vendor
.idea
internal/*/built-example
coverage.txt
+/.local/
+/site/
+
+*.exe
diff --git a/vendor/github.com/urfave/cli/v2/CODE_OF_CONDUCT.md b/vendor/github.com/urfave/cli/v2/CODE_OF_CONDUCT.md
index 41ba294f..9fee1480 100644
--- a/vendor/github.com/urfave/cli/v2/CODE_OF_CONDUCT.md
+++ b/vendor/github.com/urfave/cli/v2/CODE_OF_CONDUCT.md
@@ -55,11 +55,12 @@ further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
-reported by contacting Dan Buch at dan@meatballhat.com. All complaints will be
-reviewed and investigated and will result in a response that is deemed necessary
-and appropriate to the circumstances. The project team is obligated to maintain
-confidentiality with regard to the reporter of an incident. Further details of
-specific enforcement policies may be posted separately.
+reported by contacting urfave-governance@googlegroups.com, a members-only group
+that is world-postable. All complaints will be reviewed and investigated and
+will result in a response that is deemed necessary and appropriate to the
+circumstances. The project team is obligated to maintain confidentiality with
+regard to the reporter of an incident. Further details of specific enforcement
+policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
diff --git a/vendor/github.com/urfave/cli/v2/LICENSE b/vendor/github.com/urfave/cli/v2/LICENSE
index 42a597e2..2c84c78a 100644
--- a/vendor/github.com/urfave/cli/v2/LICENSE
+++ b/vendor/github.com/urfave/cli/v2/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2016 Jeremy Saenz & Contributors
+Copyright (c) 2022 urfave/cli maintainers
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/vendor/github.com/urfave/cli/v2/Makefile b/vendor/github.com/urfave/cli/v2/Makefile
new file mode 100644
index 00000000..3b0e5e0b
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/Makefile
@@ -0,0 +1,40 @@
+# NOTE: this Makefile is meant to provide a simplified entry point for humans to
+# run all of the critical steps to verify one's changes are harmonious in
+# nature. Keeping target bodies to one line each and abstaining from make magic
+# are very important so that maintainers and contributors can focus their
+# attention on files that are primarily Go.
+
+.PHONY: all
+all: generate vet tag-test test check-binary-size tag-check-binary-size gfmrun v2diff
+
+# NOTE: this is a special catch-all rule to run any of the commands
+# defined in internal/build/build.go with optional arguments passed
+# via GFLAGS (global flags) and FLAGS (command-specific flags), e.g.:
+#
+# $ make test GFLAGS='--packages cli'
+%:
+ go run internal/build/build.go $(GFLAGS) $* $(FLAGS)
+
+.PHONY: tag-test
+tag-test:
+ go run internal/build/build.go -tags urfave_cli_no_docs test
+
+.PHONY: tag-check-binary-size
+tag-check-binary-size:
+ go run internal/build/build.go -tags urfave_cli_no_docs check-binary-size
+
+.PHONY: gfmrun
+gfmrun:
+ go run internal/build/build.go gfmrun docs/v2/manual.md
+
+.PHONY: docs
+docs:
+ mkdocs build
+
+.PHONY: docs-deps
+docs-deps:
+ pip install -r mkdocs-requirements.txt
+
+.PHONY: serve-docs
+serve-docs:
+ mkdocs serve
diff --git a/vendor/github.com/urfave/cli/v2/README.md b/vendor/github.com/urfave/cli/v2/README.md
index 408668bc..eaed3563 100644
--- a/vendor/github.com/urfave/cli/v2/README.md
+++ b/vendor/github.com/urfave/cli/v2/README.md
@@ -1,70 +1,19 @@
-cli
-===
+# cli
-[](https://godoc.org/github.com/urfave/cli)
+[](https://pkg.go.dev/github.com/urfave/cli/v2)
[](https://codebeat.co/projects/github-com-urfave-cli)
[](https://goreportcard.com/report/urfave/cli)
-[](https://codecov.io/gh/urfave/cli)
+[](https://codecov.io/gh/urfave/cli)
cli is a simple, fast, and fun package for building command line apps in Go. The
goal is to enable developers to write fast and distributable command line
applications in an expressive way.
-## Usage Documentation
+## Documentation
-Usage documentation exists for each major version. Don't know what version you're on? You're probably using the version from the `master` branch, which is currently `v2`.
+More documentation is available in [`./docs`](./docs) or the hosted
+documentation site at .
-- `v2` - [./docs/v2/manual.md](./docs/v2/manual.md)
-- `v1` - [./docs/v1/manual.md](./docs/v1/manual.md)
+## License
-Guides for migrating to newer versions:
-
-- `v1-to-v2` - [./docs/migrate-v1-to-v2.md](./docs/migrate-v1-to-v2.md)
-
-## Installation
-
-Using this package requires a working Go environment. [See the install instructions for Go](http://golang.org/doc/install.html).
-
-Go Modules are required when using this package. [See the go blog guide on using Go Modules](https://blog.golang.org/using-go-modules).
-
-### Using `v2` releases
-
-```
-$ GO111MODULE=on go get github.com/urfave/cli/v2
-```
-
-```go
-...
-import (
- "github.com/urfave/cli/v2" // imports as package "cli"
-)
-...
-```
-
-### Using `v1` releases
-
-```
-$ GO111MODULE=on go get github.com/urfave/cli
-```
-
-```go
-...
-import (
- "github.com/urfave/cli"
-)
-...
-```
-
-### GOPATH
-
-Make sure your `PATH` includes the `$GOPATH/bin` directory so your commands can
-be easily used:
-```
-export PATH=$PATH:$GOPATH/bin
-```
-
-### Supported platforms
-
-cli is tested against multiple versions of Go on Linux, and against the latest
-released version of Go on OS X and Windows. This project uses Github Actions for
-builds. To see our currently supported go versions and platforms, look at the [./.github/workflows/cli.yml](https://github.com/urfave/cli/blob/master/.github/workflows/cli.yml).
+See [`LICENSE`](./LICENSE)
diff --git a/vendor/github.com/urfave/cli/v2/app.go b/vendor/github.com/urfave/cli/v2/app.go
index f801fce9..333bd57b 100644
--- a/vendor/github.com/urfave/cli/v2/app.go
+++ b/vendor/github.com/urfave/cli/v2/app.go
@@ -11,13 +11,19 @@ import (
"time"
)
+const suggestDidYouMeanTemplate = "Did you mean %q?"
+
var (
- changeLogURL = "https://github.com/urfave/cli/blob/master/docs/CHANGELOG.md"
+ changeLogURL = "https://github.com/urfave/cli/blob/main/docs/CHANGELOG.md"
appActionDeprecationURL = fmt.Sprintf("%s#deprecated-cli-app-action-signature", changeLogURL)
contactSysadmin = "This is an error in the application. Please contact the distributor of this application if this is not you."
errInvalidActionType = NewExitError("ERROR invalid Action type. "+
fmt.Sprintf("Must be `func(*Context`)` or `func(*Context) error). %s", contactSysadmin)+
fmt.Sprintf("See %s", appActionDeprecationURL), 2)
+
+ SuggestFlag SuggestFlagFunc = suggestFlag
+ SuggestCommand SuggestCommandFunc = suggestCommand
+ SuggestDidYouMeanTemplate string = suggestDidYouMeanTemplate
)
// App is the main structure of a cli application. It is recommended that
@@ -52,6 +58,8 @@ type App struct {
HideVersion bool
// categories contains the categorized commands and is populated on app startup
categories CommandCategories
+ // flagCategories contains the categorized flags and is populated on app startup
+ flagCategories FlagCategories
// An action to execute when the shell completion flag is set
BashComplete BashCompleteFunc
// An action to execute before any subcommands are run, but after the context is ready
@@ -94,10 +102,16 @@ type App struct {
// single-character bool arguments into one
// i.e. foobar -o -v -> foobar -ov
UseShortOptionHandling bool
+ // Enable suggestions for commands and flags
+ Suggest bool
didSetup bool
}
+type SuggestFlagFunc func(flags []Flag, provided string, hideHelp bool) string
+
+type SuggestCommandFunc func(commands []*Command, provided string) string
+
// Tries to find out when this binary was compiled.
// Returns the current time if it fails to find it.
func compileTime() time.Time {
@@ -140,7 +154,7 @@ func (a *App) Setup() {
}
if a.HelpName == "" {
- a.HelpName = filepath.Base(os.Args[0])
+ a.HelpName = a.Name
}
if a.Usage == "" {
@@ -181,6 +195,8 @@ func (a *App) Setup() {
if c.HelpName == "" {
c.HelpName = fmt.Sprintf("%s %s", a.HelpName, c.Name)
}
+
+ c.flagCategories = newFlagCategoriesFromFlags(c.Flags)
newCommands = append(newCommands, c)
}
a.Commands = newCommands
@@ -205,6 +221,13 @@ func (a *App) Setup() {
}
sort.Sort(a.categories.(*commandCategories))
+ a.flagCategories = newFlagCategories()
+ for _, fl := range a.Flags {
+ if cf, ok := fl.(CategorizableFlag); ok {
+ a.flagCategories.AddFlag(cf.GetCategory(), cf)
+ }
+ }
+
if a.Metadata == nil {
a.Metadata = make(map[string]interface{})
}
@@ -245,48 +268,53 @@ func (a *App) RunContext(ctx context.Context, arguments []string) (err error) {
err = parseIter(set, a, arguments[1:], shellComplete)
nerr := normalizeFlags(a.Flags, set)
- context := NewContext(a, set, &Context{Context: ctx})
+ cCtx := NewContext(a, set, &Context{Context: ctx})
if nerr != nil {
_, _ = fmt.Fprintln(a.Writer, nerr)
- _ = ShowAppHelp(context)
+ _ = ShowAppHelp(cCtx)
return nerr
}
- context.shellComplete = shellComplete
+ cCtx.shellComplete = shellComplete
- if checkCompletions(context) {
+ if checkCompletions(cCtx) {
return nil
}
if err != nil {
if a.OnUsageError != nil {
- err := a.OnUsageError(context, err, false)
- a.handleExitCoder(context, err)
+ err := a.OnUsageError(cCtx, err, false)
+ a.handleExitCoder(cCtx, err)
return err
}
_, _ = fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error())
- _ = ShowAppHelp(context)
+ if a.Suggest {
+ if suggestion, err := a.suggestFlagFromError(err, ""); err == nil {
+ fmt.Fprintf(a.Writer, suggestion)
+ }
+ }
+ _ = ShowAppHelp(cCtx)
return err
}
- if !a.HideHelp && checkHelp(context) {
- _ = ShowAppHelp(context)
+ if !a.HideHelp && checkHelp(cCtx) {
+ _ = ShowAppHelp(cCtx)
return nil
}
- if !a.HideVersion && checkVersion(context) {
- ShowVersion(context)
+ if !a.HideVersion && checkVersion(cCtx) {
+ ShowVersion(cCtx)
return nil
}
- cerr := checkRequiredFlags(a.Flags, context)
+ cerr := cCtx.checkRequiredFlags(a.Flags)
if cerr != nil {
- _ = ShowAppHelp(context)
+ _ = ShowAppHelp(cCtx)
return cerr
}
if a.After != nil {
defer func() {
- if afterErr := a.After(context); afterErr != nil {
+ if afterErr := a.After(cCtx); afterErr != nil {
if err != nil {
err = newMultiError(err, afterErr)
} else {
@@ -297,20 +325,20 @@ func (a *App) RunContext(ctx context.Context, arguments []string) (err error) {
}
if a.Before != nil {
- beforeErr := a.Before(context)
+ beforeErr := a.Before(cCtx)
if beforeErr != nil {
- a.handleExitCoder(context, beforeErr)
+ a.handleExitCoder(cCtx, beforeErr)
err = beforeErr
return err
}
}
- args := context.Args()
+ args := cCtx.Args()
if args.Present() {
name := args.First()
c := a.Command(name)
if c != nil {
- return c.Run(context)
+ return c.Run(cCtx)
}
}
@@ -319,16 +347,39 @@ func (a *App) RunContext(ctx context.Context, arguments []string) (err error) {
}
// Run default Action
- err = a.Action(context)
+ err = a.Action(cCtx)
- a.handleExitCoder(context, err)
+ a.handleExitCoder(cCtx, err)
return err
}
+func (a *App) suggestFlagFromError(err error, command string) (string, error) {
+ flag, parseErr := flagFromError(err)
+ if parseErr != nil {
+ return "", err
+ }
+
+ flags := a.Flags
+ if command != "" {
+ cmd := a.Command(command)
+ if cmd == nil {
+ return "", err
+ }
+ flags = cmd.Flags
+ }
+
+ suggestion := SuggestFlag(flags, flag, a.HideHelp)
+ if len(suggestion) == 0 {
+ return "", err
+ }
+
+ return fmt.Sprintf(SuggestDidYouMeanTemplate+"\n\n", suggestion), nil
+}
+
// RunAndExitOnError calls .Run() and exits non-zero if an error was returned
//
// Deprecated: instead you should return an error that fulfills cli.ExitCoder
-// to cli.App.Run. This will cause the application to exit with the given eror
+// to cli.App.Run. This will cause the application to exit with the given error
// code in the cli.ExitCoder
func (a *App) RunAndExitOnError() {
if err := a.Run(os.Args); err != nil {
@@ -359,55 +410,60 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
err = parseIter(set, a, ctx.Args().Tail(), ctx.shellComplete)
nerr := normalizeFlags(a.Flags, set)
- context := NewContext(a, set, ctx)
+ cCtx := NewContext(a, set, ctx)
if nerr != nil {
_, _ = fmt.Fprintln(a.Writer, nerr)
_, _ = fmt.Fprintln(a.Writer)
if len(a.Commands) > 0 {
- _ = ShowSubcommandHelp(context)
+ _ = ShowSubcommandHelp(cCtx)
} else {
- _ = ShowCommandHelp(ctx, context.Args().First())
+ _ = ShowCommandHelp(ctx, cCtx.Args().First())
}
return nerr
}
- if checkCompletions(context) {
+ if checkCompletions(cCtx) {
return nil
}
if err != nil {
if a.OnUsageError != nil {
- err = a.OnUsageError(context, err, true)
- a.handleExitCoder(context, err)
+ err = a.OnUsageError(cCtx, err, true)
+ a.handleExitCoder(cCtx, err)
return err
}
_, _ = fmt.Fprintf(a.Writer, "%s %s\n\n", "Incorrect Usage.", err.Error())
- _ = ShowSubcommandHelp(context)
+ if a.Suggest {
+ if suggestion, err := a.suggestFlagFromError(err, cCtx.Command.Name); err == nil {
+ fmt.Fprintf(a.Writer, suggestion)
+ }
+ }
+ _ = ShowSubcommandHelp(cCtx)
return err
}
if len(a.Commands) > 0 {
- if checkSubcommandHelp(context) {
+ if checkSubcommandHelp(cCtx) {
return nil
}
} else {
- if checkCommandHelp(ctx, context.Args().First()) {
+ if checkCommandHelp(ctx, cCtx.Args().First()) {
return nil
}
}
- cerr := checkRequiredFlags(a.Flags, context)
+ cerr := cCtx.checkRequiredFlags(a.Flags)
if cerr != nil {
- _ = ShowSubcommandHelp(context)
+ _ = ShowSubcommandHelp(cCtx)
return cerr
}
if a.After != nil {
defer func() {
- afterErr := a.After(context)
+ afterErr := a.After(cCtx)
if afterErr != nil {
- a.handleExitCoder(context, err)
+ a.handleExitCoder(cCtx, err)
if err != nil {
err = newMultiError(err, afterErr)
} else {
@@ -418,27 +474,27 @@ func (a *App) RunAsSubcommand(ctx *Context) (err error) {
}
if a.Before != nil {
- beforeErr := a.Before(context)
+ beforeErr := a.Before(cCtx)
if beforeErr != nil {
- a.handleExitCoder(context, beforeErr)
+ a.handleExitCoder(cCtx, beforeErr)
err = beforeErr
return err
}
}
- args := context.Args()
+ args := cCtx.Args()
if args.Present() {
name := args.First()
c := a.Command(name)
if c != nil {
- return c.Run(context)
+ return c.Run(cCtx)
}
}
// Run default Action
- err = a.Action(context)
+ err = a.Action(cCtx)
- a.handleExitCoder(context, err)
+ a.handleExitCoder(cCtx, err)
return err
}
@@ -481,6 +537,14 @@ func (a *App) VisibleCommands() []*Command {
return ret
}
+// VisibleFlagCategories returns a slice containing all the categories with the flags they contain
+func (a *App) VisibleFlagCategories() []VisibleFlagCategory {
+ if a.flagCategories == nil {
+ return []VisibleFlagCategory{}
+ }
+ return a.flagCategories.VisibleCategories()
+}
+
// VisibleFlags returns a slice of the Flags with Hidden=false
func (a *App) VisibleFlags() []Flag {
return visibleFlags(a.Flags)
@@ -498,9 +562,9 @@ func (a *App) appendCommand(c *Command) {
}
}
-func (a *App) handleExitCoder(context *Context, err error) {
+func (a *App) handleExitCoder(cCtx *Context, err error) {
if a.ExitErrHandler != nil {
- a.ExitErrHandler(context, err)
+ a.ExitErrHandler(cCtx, err)
} else {
HandleExitCoder(err)
}
@@ -525,14 +589,14 @@ func (a *Author) String() string {
// HandleAction attempts to figure out which Action signature was used. If
// it's an ActionFunc or a func with the legacy signature for Action, the func
// is run!
-func HandleAction(action interface{}, context *Context) (err error) {
+func HandleAction(action interface{}, cCtx *Context) (err error) {
switch a := action.(type) {
case ActionFunc:
- return a(context)
+ return a(cCtx)
case func(*Context) error:
- return a(context)
+ return a(cCtx)
case func(*Context): // deprecated function signature
- a(context)
+ a(cCtx)
return nil
}
diff --git a/vendor/github.com/urfave/cli/v2/category.go b/vendor/github.com/urfave/cli/v2/category.go
index 867e3908..8bf325e2 100644
--- a/vendor/github.com/urfave/cli/v2/category.go
+++ b/vendor/github.com/urfave/cli/v2/category.go
@@ -1,10 +1,12 @@
package cli
+import "sort"
+
// CommandCategories interface allows for category manipulation
type CommandCategories interface {
// AddCommand adds a command to a category, creating a new category if necessary.
AddCommand(category string, command *Command)
- // categories returns a copy of the category slice
+ // Categories returns a slice of categories sorted by name
Categories() []CommandCategory
}
@@ -77,3 +79,93 @@ func (c *commandCategory) VisibleCommands() []*Command {
}
return ret
}
+
+// FlagCategories interface allows for category manipulation
+type FlagCategories interface {
+ // AddFlags adds a flag to a category, creating a new category if necessary.
+ AddFlag(category string, fl Flag)
+ // VisibleCategories returns a slice of visible flag categories sorted by name
+ VisibleCategories() []VisibleFlagCategory
+}
+
+type defaultFlagCategories struct {
+ m map[string]*defaultVisibleFlagCategory
+}
+
+func newFlagCategories() FlagCategories {
+ return &defaultFlagCategories{
+ m: map[string]*defaultVisibleFlagCategory{},
+ }
+}
+
+func newFlagCategoriesFromFlags(fs []Flag) FlagCategories {
+ fc := newFlagCategories()
+ for _, fl := range fs {
+ if cf, ok := fl.(CategorizableFlag); ok {
+ fc.AddFlag(cf.GetCategory(), cf)
+ }
+ }
+
+ return fc
+}
+
+func (f *defaultFlagCategories) AddFlag(category string, fl Flag) {
+ if _, ok := f.m[category]; !ok {
+ f.m[category] = &defaultVisibleFlagCategory{name: category, m: map[string]Flag{}}
+ }
+
+ f.m[category].m[fl.String()] = fl
+}
+
+func (f *defaultFlagCategories) VisibleCategories() []VisibleFlagCategory {
+ catNames := []string{}
+ for name := range f.m {
+ catNames = append(catNames, name)
+ }
+
+ sort.Strings(catNames)
+
+ ret := make([]VisibleFlagCategory, len(catNames))
+ for i, name := range catNames {
+ ret[i] = f.m[name]
+ }
+
+ return ret
+}
+
+// VisibleFlagCategory is a category containing flags.
+type VisibleFlagCategory interface {
+ // Name returns the category name string
+ Name() string
+ // Flags returns a slice of VisibleFlag sorted by name
+ Flags() []VisibleFlag
+}
+
+type defaultVisibleFlagCategory struct {
+ name string
+ m map[string]Flag
+}
+
+func (fc *defaultVisibleFlagCategory) Name() string {
+ return fc.name
+}
+
+func (fc *defaultVisibleFlagCategory) Flags() []VisibleFlag {
+ vfNames := []string{}
+ for flName, fl := range fc.m {
+ if vf, ok := fl.(VisibleFlag); ok {
+ if vf.IsVisible() {
+ vfNames = append(vfNames, flName)
+ }
+ }
+ }
+
+ sort.Strings(vfNames)
+
+ ret := make([]VisibleFlag, len(vfNames))
+ for i, flName := range vfNames {
+ ret[i] = fc.m[flName].(VisibleFlag)
+ }
+
+ return ret
+}
diff --git a/vendor/github.com/urfave/cli/v2/cli.go b/vendor/github.com/urfave/cli/v2/cli.go
index 62a5bc22..2a11c5ad 100644
--- a/vendor/github.com/urfave/cli/v2/cli.go
+++ b/vendor/github.com/urfave/cli/v2/cli.go
@@ -20,4 +20,4 @@
// }
package cli
-//go:generate go run flag-gen/main.go flag-gen/assets_vfsdata.go
+//go:generate go run internal/genflags/cmd/genflags/main.go
diff --git a/vendor/github.com/urfave/cli/v2/command.go b/vendor/github.com/urfave/cli/v2/command.go
index dda2f49a..2cafd8e0 100644
--- a/vendor/github.com/urfave/cli/v2/command.go
+++ b/vendor/github.com/urfave/cli/v2/command.go
@@ -38,7 +38,8 @@ type Command struct {
// List of child commands
Subcommands []*Command
// List of flags to parse
- Flags []Flag
+ Flags []Flag
+ flagCategories FlagCategories
// Treat all flags as normal arguments if true
SkipFlagParsing bool
// Boolean to hide built-in help command and help flag
@@ -105,39 +106,44 @@ func (c *Command) Run(ctx *Context) (err error) {
set, err := c.parseFlags(ctx.Args(), ctx.shellComplete)
- context := NewContext(ctx.App, set, ctx)
- context.Command = c
- if checkCommandCompletions(context, c.Name) {
+ cCtx := NewContext(ctx.App, set, ctx)
+ cCtx.Command = c
+ if checkCommandCompletions(cCtx, c.Name) {
return nil
}
if err != nil {
if c.OnUsageError != nil {
- err = c.OnUsageError(context, err, false)
- context.App.handleExitCoder(context, err)
+ err = c.OnUsageError(cCtx, err, false)
+ cCtx.App.handleExitCoder(cCtx, err)
return err
}
- _, _ = fmt.Fprintln(context.App.Writer, "Incorrect Usage:", err.Error())
- _, _ = fmt.Fprintln(context.App.Writer)
- _ = ShowCommandHelp(context, c.Name)
+ _, _ = fmt.Fprintln(cCtx.App.Writer, "Incorrect Usage:", err.Error())
+ _, _ = fmt.Fprintln(cCtx.App.Writer)
+ if ctx.App.Suggest {
+ if suggestion, err := ctx.App.suggestFlagFromError(err, c.Name); err == nil {
+ fmt.Fprintf(cCtx.App.Writer, suggestion)
+ }
+ }
+ _ = ShowCommandHelp(cCtx, c.Name)
return err
}
- if checkCommandHelp(context, c.Name) {
+ if checkCommandHelp(cCtx, c.Name) {
return nil
}
- cerr := checkRequiredFlags(c.Flags, context)
+ cerr := cCtx.checkRequiredFlags(c.Flags)
if cerr != nil {
- _ = ShowCommandHelp(context, c.Name)
+ _ = ShowCommandHelp(cCtx, c.Name)
return cerr
}
if c.After != nil {
defer func() {
- afterErr := c.After(context)
+ afterErr := c.After(cCtx)
if afterErr != nil {
- context.App.handleExitCoder(context, err)
+ cCtx.App.handleExitCoder(cCtx, err)
if err != nil {
err = newMultiError(err, afterErr)
} else {
@@ -148,9 +154,9 @@ func (c *Command) Run(ctx *Context) (err error) {
}
if c.Before != nil {
- err = c.Before(context)
+ err = c.Before(cCtx)
if err != nil {
- context.App.handleExitCoder(context, err)
+ cCtx.App.handleExitCoder(cCtx, err)
return err
}
}
@@ -159,11 +165,11 @@ func (c *Command) Run(ctx *Context) (err error) {
c.Action = helpSubcommand.Action
}
- context.Command = c
- err = c.Action(context)
+ cCtx.Command = c
+ err = c.Action(cCtx)
if err != nil {
- context.App.handleExitCoder(context, err)
+ cCtx.App.handleExitCoder(cCtx, err)
}
return err
}
@@ -227,6 +233,7 @@ func (c *Command) startApp(ctx *Context) error {
}
app.Usage = c.Usage
+ app.UsageText = c.UsageText
app.Description = c.Description
app.ArgsUsage = c.ArgsUsage
@@ -243,10 +250,12 @@ func (c *Command) startApp(ctx *Context) error {
app.Version = ctx.App.Version
app.HideVersion = true
app.Compiled = ctx.App.Compiled
+ app.Reader = ctx.App.Reader
app.Writer = ctx.App.Writer
app.ErrWriter = ctx.App.ErrWriter
app.ExitErrHandler = ctx.App.ExitErrHandler
app.UseShortOptionHandling = ctx.App.UseShortOptionHandling
+ app.Suggest = ctx.App.Suggest
app.categories = newCommandCategories()
for _, command := range c.Subcommands {
@@ -278,6 +287,14 @@ func (c *Command) startApp(ctx *Context) error {
return app.RunAsSubcommand(ctx)
}
+// VisibleFlagCategories returns a slice containing all the visible flag categories with the flags they contain
+func (c *Command) VisibleFlagCategories() []VisibleFlagCategory {
+ if c.flagCategories == nil {
+ return []VisibleFlagCategory{}
+ }
+ return c.flagCategories.VisibleCategories()
+}
+
// VisibleFlags returns a slice of the Flags with Hidden=false
func (c *Command) VisibleFlags() []Flag {
return visibleFlags(c.Flags)
diff --git a/vendor/github.com/urfave/cli/v2/context.go b/vendor/github.com/urfave/cli/v2/context.go
index 74ed5191..6b497ed2 100644
--- a/vendor/github.com/urfave/cli/v2/context.go
+++ b/vendor/github.com/urfave/cli/v2/context.go
@@ -2,9 +2,7 @@ package cli
import (
"context"
- "errors"
"flag"
- "fmt"
"strings"
)
@@ -42,31 +40,29 @@ func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context {
}
// NumFlags returns the number of flags set
-func (c *Context) NumFlags() int {
- return c.flagSet.NFlag()
+func (cCtx *Context) NumFlags() int {
+ return cCtx.flagSet.NFlag()
}
// Set sets a context flag to a value.
-func (c *Context) Set(name, value string) error {
- return c.flagSet.Set(name, value)
+func (cCtx *Context) Set(name, value string) error {
+ return cCtx.flagSet.Set(name, value)
}
// IsSet determines if the flag was actually set
-func (c *Context) IsSet(name string) bool {
- if fs := lookupFlagSet(name, c); fs != nil {
- if fs := lookupFlagSet(name, c); fs != nil {
- isSet := false
- fs.Visit(func(f *flag.Flag) {
- if f.Name == name {
- isSet = true
- }
- })
- if isSet {
- return true
+func (cCtx *Context) IsSet(name string) bool {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
+ isSet := false
+ fs.Visit(func(f *flag.Flag) {
+ if f.Name == name {
+ isSet = true
}
+ })
+ if isSet {
+ return true
}
- f := lookupFlag(name, c)
+ f := cCtx.lookupFlag(name)
if f == nil {
return false
}
@@ -78,28 +74,28 @@ func (c *Context) IsSet(name string) bool {
}
// LocalFlagNames returns a slice of flag names used in this context.
-func (c *Context) LocalFlagNames() []string {
+func (cCtx *Context) LocalFlagNames() []string {
var names []string
- c.flagSet.Visit(makeFlagNameVisitor(&names))
+ cCtx.flagSet.Visit(makeFlagNameVisitor(&names))
return names
}
// FlagNames returns a slice of flag names used by the this context and all of
// its parent contexts.
-func (c *Context) FlagNames() []string {
+func (cCtx *Context) FlagNames() []string {
var names []string
- for _, ctx := range c.Lineage() {
- ctx.flagSet.Visit(makeFlagNameVisitor(&names))
+ for _, pCtx := range cCtx.Lineage() {
+ pCtx.flagSet.Visit(makeFlagNameVisitor(&names))
}
return names
}
// Lineage returns *this* context and all of its ancestor contexts in order from
// child to parent
-func (c *Context) Lineage() []*Context {
+func (cCtx *Context) Lineage() []*Context {
var lineage []*Context
- for cur := c; cur != nil; cur = cur.parentContext {
+ for cur := cCtx; cur != nil; cur = cur.parentContext {
lineage = append(lineage, cur)
}
@@ -107,23 +103,26 @@ func (c *Context) Lineage() []*Context {
}
// Value returns the value of the flag corresponding to `name`
-func (c *Context) Value(name string) interface{} {
- return c.flagSet.Lookup(name).Value.(flag.Getter).Get()
+func (cCtx *Context) Value(name string) interface{} {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
+ return fs.Lookup(name).Value.(flag.Getter).Get()
+ }
+ return nil
}
// Args returns the command line arguments associated with the context.
-func (c *Context) Args() Args {
- ret := args(c.flagSet.Args())
+func (cCtx *Context) Args() Args {
+ ret := args(cCtx.flagSet.Args())
return &ret
}
// NArg returns the number of the command line arguments.
-func (c *Context) NArg() int {
- return c.Args().Len()
+func (cCtx *Context) NArg() int {
+ return cCtx.Args().Len()
}
-func lookupFlag(name string, ctx *Context) Flag {
- for _, c := range ctx.Lineage() {
+func (cCtx *Context) lookupFlag(name string) Flag {
+ for _, c := range cCtx.Lineage() {
if c.Command == nil {
continue
}
@@ -137,8 +136,8 @@ func lookupFlag(name string, ctx *Context) Flag {
}
}
- if ctx.App != nil {
- for _, f := range ctx.App.Flags {
+ if cCtx.App != nil {
+ for _, f := range cCtx.App.Flags {
for _, n := range f.Names() {
if n == name {
return f
@@ -150,8 +149,11 @@ func lookupFlag(name string, ctx *Context) Flag {
return nil
}
-func lookupFlagSet(name string, ctx *Context) *flag.FlagSet {
- for _, c := range ctx.Lineage() {
+func (cCtx *Context) lookupFlagSet(name string) *flag.FlagSet {
+ for _, c := range cCtx.Lineage() {
+ if c.flagSet == nil {
+ continue
+ }
if f := c.flagSet.Lookup(name); f != nil {
return c.flagSet
}
@@ -160,45 +162,33 @@ func lookupFlagSet(name string, ctx *Context) *flag.FlagSet {
return nil
}
-func copyFlag(name string, ff *flag.Flag, set *flag.FlagSet) {
- switch ff.Value.(type) {
- case Serializer:
- _ = set.Set(name, ff.Value.(Serializer).Serialize())
- default:
- _ = set.Set(name, ff.Value.String())
- }
-}
-
-func normalizeFlags(flags []Flag, set *flag.FlagSet) error {
- visited := make(map[string]bool)
- set.Visit(func(f *flag.Flag) {
- visited[f.Name] = true
- })
+func (cCtx *Context) checkRequiredFlags(flags []Flag) requiredFlagsErr {
+ var missingFlags []string
for _, f := range flags {
- parts := f.Names()
- if len(parts) == 1 {
- continue
- }
- var ff *flag.Flag
- for _, name := range parts {
- name = strings.Trim(name, " ")
- if visited[name] {
- if ff != nil {
- return errors.New("Cannot use two forms of the same flag: " + name + " " + ff.Name)
+ if rf, ok := f.(RequiredFlag); ok && rf.IsRequired() {
+ var flagPresent bool
+ var flagName string
+
+ for _, key := range f.Names() {
+ if len(key) > 1 {
+ flagName = key
+ }
+
+ if cCtx.IsSet(strings.TrimSpace(key)) {
+ flagPresent = true
}
- ff = set.Lookup(name)
}
- }
- if ff == nil {
- continue
- }
- for _, name := range parts {
- name = strings.Trim(name, " ")
- if !visited[name] {
- copyFlag(name, ff, set)
+
+ if !flagPresent && flagName != "" {
+ missingFlags = append(missingFlags, flagName)
}
}
}
+
+ if len(missingFlags) != 0 {
+ return &errRequiredFlags{missingFlags: missingFlags}
+ }
+
return nil
}
@@ -219,55 +209,3 @@ func makeFlagNameVisitor(names *[]string) func(*flag.Flag) {
}
}
}
-
-type requiredFlagsErr interface {
- error
- getMissingFlags() []string
-}
-
-type errRequiredFlags struct {
- missingFlags []string
-}
-
-func (e *errRequiredFlags) Error() string {
- numberOfMissingFlags := len(e.missingFlags)
- if numberOfMissingFlags == 1 {
- return fmt.Sprintf("Required flag %q not set", e.missingFlags[0])
- }
- joinedMissingFlags := strings.Join(e.missingFlags, ", ")
- return fmt.Sprintf("Required flags %q not set", joinedMissingFlags)
-}
-
-func (e *errRequiredFlags) getMissingFlags() []string {
- return e.missingFlags
-}
-
-func checkRequiredFlags(flags []Flag, context *Context) requiredFlagsErr {
- var missingFlags []string
- for _, f := range flags {
- if rf, ok := f.(RequiredFlag); ok && rf.IsRequired() {
- var flagPresent bool
- var flagName string
-
- for _, key := range f.Names() {
- if len(key) > 1 {
- flagName = key
- }
-
- if context.IsSet(strings.TrimSpace(key)) {
- flagPresent = true
- }
- }
-
- if !flagPresent && flagName != "" {
- missingFlags = append(missingFlags, flagName)
- }
- }
- }
-
- if len(missingFlags) != 0 {
- return &errRequiredFlags{missingFlags: missingFlags}
- }
-
- return nil
-}
diff --git a/vendor/github.com/urfave/cli/v2/docs.go b/vendor/github.com/urfave/cli/v2/docs.go
index dc16fc82..8b1c9c8a 100644
--- a/vendor/github.com/urfave/cli/v2/docs.go
+++ b/vendor/github.com/urfave/cli/v2/docs.go
@@ -1,3 +1,6 @@
+//go:build !urfave_cli_no_docs
+// +build !urfave_cli_no_docs
+
package cli
import (
@@ -15,31 +18,39 @@ import (
// The function errors if either parsing or writing of the string fails.
func (a *App) ToMarkdown() (string, error) {
var w bytes.Buffer
- if err := a.writeDocTemplate(&w); err != nil {
+ if err := a.writeDocTemplate(&w, 0); err != nil {
return "", err
}
return w.String(), nil
}
-// ToMan creates a man page string for the `*App`
+// ToMan creates a man page string with section number for the `*App`
// The function errors if either parsing or writing of the string fails.
-func (a *App) ToMan() (string, error) {
+func (a *App) ToManWithSection(sectionNumber int) (string, error) {
var w bytes.Buffer
- if err := a.writeDocTemplate(&w); err != nil {
+ if err := a.writeDocTemplate(&w, sectionNumber); err != nil {
return "", err
}
man := md2man.Render(w.Bytes())
return string(man), nil
}
+// ToMan creates a man page string for the `*App`
+// The function errors if either parsing or writing of the string fails.
+func (a *App) ToMan() (string, error) {
+ man, err := a.ToManWithSection(8)
+ return man, err
+}
+
type cliTemplate struct {
App *App
+ SectionNum int
Commands []string
GlobalArgs []string
SynopsisArgs []string
}
-func (a *App) writeDocTemplate(w io.Writer) error {
+func (a *App) writeDocTemplate(w io.Writer, sectionNum int) error {
const name = "cli"
t, err := template.New(name).Parse(MarkdownDocTemplate)
if err != nil {
@@ -47,6 +58,7 @@ func (a *App) writeDocTemplate(w io.Writer) error {
}
return t.ExecuteTemplate(w, name, &cliTemplate{
App: a,
+ SectionNum: sectionNum,
Commands: prepareCommands(a.Commands, 0),
GlobalArgs: prepareArgsWithValues(a.VisibleFlags()),
SynopsisArgs: prepareArgsSynopsis(a.VisibleFlags()),
@@ -59,25 +71,26 @@ func prepareCommands(commands []*Command, level int) []string {
if command.Hidden {
continue
}
- usage := ""
- if command.Usage != "" {
- usage = command.Usage
- }
- prepared := fmt.Sprintf("%s %s\n\n%s\n",
+ usageText := prepareUsageText(command)
+
+ usage := prepareUsage(command, usageText)
+
+ prepared := fmt.Sprintf("%s %s\n\n%s%s",
strings.Repeat("#", level+2),
strings.Join(command.Names(), ", "),
usage,
+ usageText,
)
- flags := prepareArgsWithValues(command.Flags)
+ flags := prepareArgsWithValues(command.VisibleFlags())
if len(flags) > 0 {
prepared += fmt.Sprintf("\n%s", strings.Join(flags, "\n"))
}
coms = append(coms, prepared)
- // recursevly iterate subcommands
+ // recursively iterate subcommands
if len(command.Subcommands) > 0 {
coms = append(
coms,
@@ -146,3 +159,40 @@ func flagDetails(flag DocGenerationFlag) string {
}
return ": " + description
}
+
+func prepareUsageText(command *Command) string {
+ if command.UsageText == "" {
+ return ""
+ }
+
+ // Remove leading and trailing newlines
+ preparedUsageText := strings.Trim(command.UsageText, "\n")
+
+ var usageText string
+ if strings.Contains(preparedUsageText, "\n") {
+ // Format multi-line string as a code block using the 4 space schema to allow for embedded markdown such
+ // that it will not break the continuous code block.
+ for _, ln := range strings.Split(preparedUsageText, "\n") {
+ usageText += fmt.Sprintf(" %s\n", ln)
+ }
+ } else {
+ // Style a single line as a note
+ usageText = fmt.Sprintf(">%s\n", preparedUsageText)
+ }
+
+ return usageText
+}
+
+func prepareUsage(command *Command, usageText string) string {
+ if command.Usage == "" {
+ return ""
+ }
+
+ usage := command.Usage + "\n"
+ // Add a newline to the Usage IFF there is a UsageText
+ if usageText != "" {
+ usage += "\n"
+ }
+
+ return usage
+}
diff --git a/vendor/github.com/urfave/cli/v2/errors.go b/vendor/github.com/urfave/cli/v2/errors.go
index 751ef9b1..8f641fb6 100644
--- a/vendor/github.com/urfave/cli/v2/errors.go
+++ b/vendor/github.com/urfave/cli/v2/errors.go
@@ -47,6 +47,28 @@ func (m *multiError) Errors() []error {
return errs
}
+type requiredFlagsErr interface {
+ error
+ getMissingFlags() []string
+}
+
+type errRequiredFlags struct {
+ missingFlags []string
+}
+
+func (e *errRequiredFlags) Error() string {
+ numberOfMissingFlags := len(e.missingFlags)
+ if numberOfMissingFlags == 1 {
+ return fmt.Sprintf("Required flag %q not set", e.missingFlags[0])
+ }
+ joinedMissingFlags := strings.Join(e.missingFlags, ", ")
+ return fmt.Sprintf("Required flags %q not set", joinedMissingFlags)
+}
+
+func (e *errRequiredFlags) getMissingFlags() []string {
+ return e.missingFlags
+}
+
// ErrorFormatter is the interface that will suitably format the error output
type ErrorFormatter interface {
Format(s fmt.State, verb rune)
diff --git a/vendor/github.com/urfave/cli/v2/fish.go b/vendor/github.com/urfave/cli/v2/fish.go
index 588e070e..eec3253c 100644
--- a/vendor/github.com/urfave/cli/v2/fish.go
+++ b/vendor/github.com/urfave/cli/v2/fish.go
@@ -95,7 +95,7 @@ func (a *App) prepareFishCommands(commands []*Command, allCommands *[]string, pr
completions = append(completions, completion.String())
completions = append(
completions,
- a.prepareFishFlags(command.Flags, command.Names())...,
+ a.prepareFishFlags(command.VisibleFlags(), command.Names())...,
)
// recursevly iterate subcommands
diff --git a/vendor/github.com/urfave/cli/v2/flag-spec.yaml b/vendor/github.com/urfave/cli/v2/flag-spec.yaml
new file mode 100644
index 00000000..d85fa30b
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/flag-spec.yaml
@@ -0,0 +1,50 @@
+# NOTE: this file is used by the tool defined in
+# ./internal/genflags/cmd/genflags/main.go which uses the
+# `genflags.Spec` type that maps to this file structure.
+
+flag_types:
+ bool: {}
+ float64: {}
+ int64: {}
+ int: {}
+ time.Duration: {}
+ uint64: {}
+ uint: {}
+
+ string:
+ struct_fields:
+ - { name: TakesFile, type: bool }
+ Generic:
+ struct_fields:
+ - { name: TakesFile, type: bool }
+ Path:
+ struct_fields:
+ - { name: TakesFile, type: bool }
+
+ Float64Slice:
+ value_pointer: true
+ skip_interfaces:
+ - fmt.Stringer
+ Int64Slice:
+ value_pointer: true
+ skip_interfaces:
+ - fmt.Stringer
+ IntSlice:
+ value_pointer: true
+ skip_interfaces:
+ - fmt.Stringer
+ StringSlice:
+ value_pointer: true
+ skip_interfaces:
+ - fmt.Stringer
+ struct_fields:
+ - { name: TakesFile, type: bool }
+ Timestamp:
+ value_pointer: true
+ struct_fields:
+ - { name: Layout, type: string }
+
+ # TODO: enable UintSlice
+ # UintSlice: {}
+ # TODO: enable Uint64Slice once #1334 lands
+ # Uint64Slice: {}
diff --git a/vendor/github.com/urfave/cli/v2/flag.go b/vendor/github.com/urfave/cli/v2/flag.go
index ad97c2d0..dbed577c 100644
--- a/vendor/github.com/urfave/cli/v2/flag.go
+++ b/vendor/github.com/urfave/cli/v2/flag.go
@@ -1,10 +1,10 @@
package cli
import (
+ "errors"
"flag"
"fmt"
"io/ioutil"
- "reflect"
"regexp"
"runtime"
"strconv"
@@ -116,6 +116,28 @@ type DocGenerationFlag interface {
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
GetValue() string
+
+ // GetDefaultText returns the default text for this flag
+ GetDefaultText() string
+
+ // GetEnvVars returns the env vars for this flag
+ GetEnvVars() []string
+}
+
+// VisibleFlag is an interface that allows to check if a flag is visible
+type VisibleFlag interface {
+ Flag
+
+ // IsVisible returns true if the flag is not hidden, otherwise false
+ IsVisible() bool
+}
+
+// CategorizableFlag is an interface that allows us to potentially
+// use a flag in a categorized representation.
+type CategorizableFlag interface {
+ VisibleFlag
+
+ GetCategory() string
}
func flagSet(name string, flags []Flag) (*flag.FlagSet, error) {
@@ -130,11 +152,52 @@ func flagSet(name string, flags []Flag) (*flag.FlagSet, error) {
return set, nil
}
+func copyFlag(name string, ff *flag.Flag, set *flag.FlagSet) {
+ switch ff.Value.(type) {
+ case Serializer:
+ _ = set.Set(name, ff.Value.(Serializer).Serialize())
+ default:
+ _ = set.Set(name, ff.Value.String())
+ }
+}
+
+func normalizeFlags(flags []Flag, set *flag.FlagSet) error {
+ visited := make(map[string]bool)
+ set.Visit(func(f *flag.Flag) {
+ visited[f.Name] = true
+ })
+ for _, f := range flags {
+ parts := f.Names()
+ if len(parts) == 1 {
+ continue
+ }
+ var ff *flag.Flag
+ for _, name := range parts {
+ name = strings.Trim(name, " ")
+ if visited[name] {
+ if ff != nil {
+ return errors.New("Cannot use two forms of the same flag: " + name + " " + ff.Name)
+ }
+ ff = set.Lookup(name)
+ }
+ }
+ if ff == nil {
+ continue
+ }
+ for _, name := range parts {
+ name = strings.Trim(name, " ")
+ if !visited[name] {
+ copyFlag(name, ff, set)
+ }
+ }
+ }
+ return nil
+}
+
func visibleFlags(fl []Flag) []Flag {
var visible []Flag
for _, f := range fl {
- field := flagValue(f).FieldByName("Hidden")
- if !field.IsValid() || !field.Bool() {
+ if vf, ok := f.(VisibleFlag); ok && vf.IsVisible() {
visible = append(visible, f)
}
}
@@ -188,7 +251,7 @@ func prefixedNames(names []string, placeholder string) string {
func withEnvHint(envVars []string, str string) string {
envText := ""
- if envVars != nil && len(envVars) > 0 {
+ if len(envVars) > 0 {
prefix := "$"
suffix := ""
sep := ", $"
@@ -203,7 +266,7 @@ func withEnvHint(envVars []string, str string) string {
return str + envText
}
-func flagNames(name string, aliases []string) []string {
+func FlagNames(name string, aliases []string) []string {
var ret []string
for _, part := range append([]string{name}, aliases...) {
@@ -217,17 +280,6 @@ func flagNames(name string, aliases []string) []string {
return ret
}
-func flagStringSliceField(f Flag, name string) []string {
- fv := flagValue(f)
- field := fv.FieldByName(name)
-
- if field.IsValid() {
- return field.Interface().([]string)
- }
-
- return []string{}
-}
-
func withFileHint(filePath, str string) string {
fileText := ""
if filePath != "" {
@@ -236,68 +288,34 @@ func withFileHint(filePath, str string) string {
return str + fileText
}
-func flagValue(f Flag) reflect.Value {
- fv := reflect.ValueOf(f)
- for fv.Kind() == reflect.Ptr {
- fv = reflect.Indirect(fv)
- }
- return fv
-}
-
func formatDefault(format string) string {
return " (default: " + format + ")"
}
func stringifyFlag(f Flag) string {
- fv := flagValue(f)
-
- switch f := f.(type) {
- case *IntSliceFlag:
- return withEnvHint(flagStringSliceField(f, "EnvVars"),
- stringifyIntSliceFlag(f))
- case *Int64SliceFlag:
- return withEnvHint(flagStringSliceField(f, "EnvVars"),
- stringifyInt64SliceFlag(f))
- case *Float64SliceFlag:
- return withEnvHint(flagStringSliceField(f, "EnvVars"),
- stringifyFloat64SliceFlag(f))
- case *StringSliceFlag:
- return withEnvHint(flagStringSliceField(f, "EnvVars"),
- stringifyStringSliceFlag(f))
+ // enforce DocGeneration interface on flags to avoid reflection
+ df, ok := f.(DocGenerationFlag)
+ if !ok {
+ return ""
}
- placeholder, usage := unquoteUsage(fv.FieldByName("Usage").String())
-
- needsPlaceholder := false
- defaultValueString := ""
- val := fv.FieldByName("Value")
- if val.IsValid() {
- needsPlaceholder = val.Kind() != reflect.Bool
- defaultValueString = fmt.Sprintf(formatDefault("%v"), val.Interface())
-
- if val.Kind() == reflect.String && val.String() != "" {
- defaultValueString = fmt.Sprintf(formatDefault("%q"), val.String())
- }
- }
-
- helpText := fv.FieldByName("DefaultText")
- if helpText.IsValid() && helpText.String() != "" {
- needsPlaceholder = val.Kind() != reflect.Bool
- defaultValueString = fmt.Sprintf(formatDefault("%s"), helpText.String())
- }
-
- if defaultValueString == formatDefault("") {
- defaultValueString = ""
- }
+ placeholder, usage := unquoteUsage(df.GetUsage())
+ needsPlaceholder := df.TakesValue()
if needsPlaceholder && placeholder == "" {
placeholder = defaultPlaceholder
}
+ defaultValueString := ""
+
+ if s := df.GetDefaultText(); s != "" {
+ defaultValueString = fmt.Sprintf(formatDefault("%s"), s)
+ }
+
usageWithDefault := strings.TrimSpace(usage + defaultValueString)
- return withEnvHint(flagStringSliceField(f, "EnvVars"),
- fmt.Sprintf("%s\t%s", prefixedNames(f.Names(), placeholder), usageWithDefault))
+ return withEnvHint(df.GetEnvVars(),
+ fmt.Sprintf("%s\t%s", prefixedNames(df.Names(), placeholder), usageWithDefault))
}
func stringifyIntSliceFlag(f *IntSliceFlag) string {
@@ -359,7 +377,11 @@ func stringifySliceFlag(usage string, names, defaultVals []string) string {
}
usageWithDefault := strings.TrimSpace(fmt.Sprintf("%s%s", usage, defaultVal))
- return fmt.Sprintf("%s\t%s", prefixedNames(names, placeholder), usageWithDefault)
+ multiInputString := "(accepts multiple inputs)"
+ if usageWithDefault != "" {
+ multiInputString = "\t" + multiInputString
+ }
+ return fmt.Sprintf("%s\t%s%s", prefixedNames(names, placeholder), usageWithDefault, multiInputString)
}
func hasFlag(flags []Flag, fl Flag) bool {
@@ -372,17 +394,26 @@ func hasFlag(flags []Flag, fl Flag) bool {
return false
}
-func flagFromEnvOrFile(envVars []string, filePath string) (val string, ok bool) {
+// Return the first value from a list of environment variables and files
+// (which may or may not exist), a description of where the value was found,
+// and a boolean which is true if a value was found.
+func flagFromEnvOrFile(envVars []string, filePath string) (value string, fromWhere string, found bool) {
for _, envVar := range envVars {
envVar = strings.TrimSpace(envVar)
- if val, ok := syscall.Getenv(envVar); ok {
- return val, true
+ if value, found := syscall.Getenv(envVar); found {
+ return value, fmt.Sprintf("environment variable %q", envVar), true
}
}
for _, fileVar := range strings.Split(filePath, ",") {
- if data, err := ioutil.ReadFile(fileVar); err == nil {
- return string(data), true
+ if fileVar != "" {
+ if data, err := ioutil.ReadFile(fileVar); err == nil {
+ return string(data), fmt.Sprintf("file %q", filePath), true
+ }
}
}
- return "", false
+ return "", "", false
+}
+
+func flagSplitMultiValues(val string) []string {
+ return strings.Split(val, ",")
}
diff --git a/vendor/github.com/urfave/cli/v2/flag_bool.go b/vendor/github.com/urfave/cli/v2/flag_bool.go
index bc9ea35d..b21d5163 100644
--- a/vendor/github.com/urfave/cli/v2/flag_bool.go
+++ b/vendor/github.com/urfave/cli/v2/flag_bool.go
@@ -6,42 +6,6 @@ import (
"strconv"
)
-// BoolFlag is a flag with type bool
-type BoolFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value bool
- DefaultText string
- Destination *bool
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *BoolFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *BoolFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *BoolFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *BoolFlag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *BoolFlag) TakesValue() bool {
return false
@@ -52,20 +16,38 @@ func (f *BoolFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *BoolFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *BoolFlag) GetValue() string {
return ""
}
+// GetDefaultText returns the default text for this flag
+func (f *BoolFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return fmt.Sprintf("%v", f.Value)
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *BoolFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *BoolFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
valBool, err := strconv.ParseBool(val)
if err != nil {
- return fmt.Errorf("could not parse %q as bool value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as bool value from %s for flag %s: %s", val, source, f.Name, err)
}
f.Value = valBool
@@ -84,10 +66,15 @@ func (f *BoolFlag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *BoolFlag) Get(ctx *Context) bool {
+ return ctx.Bool(f.Name)
+}
+
// Bool looks up the value of a local BoolFlag, returns
// false if not found
-func (c *Context) Bool(name string) bool {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Bool(name string) bool {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupBool(name, fs)
}
return false
diff --git a/vendor/github.com/urfave/cli/v2/flag_duration.go b/vendor/github.com/urfave/cli/v2/flag_duration.go
index 22a2e672..5178c6ae 100644
--- a/vendor/github.com/urfave/cli/v2/flag_duration.go
+++ b/vendor/github.com/urfave/cli/v2/flag_duration.go
@@ -6,42 +6,6 @@ import (
"time"
)
-// DurationFlag is a flag with type time.Duration (see https://golang.org/pkg/time/#ParseDuration)
-type DurationFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value time.Duration
- DefaultText string
- Destination *time.Duration
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *DurationFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *DurationFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *DurationFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *DurationFlag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *DurationFlag) TakesValue() bool {
return true
@@ -52,20 +16,38 @@ func (f *DurationFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *DurationFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *DurationFlag) GetValue() string {
return f.Value.String()
}
+// GetDefaultText returns the default text for this flag
+func (f *DurationFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *DurationFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *DurationFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
valDuration, err := time.ParseDuration(val)
if err != nil {
- return fmt.Errorf("could not parse %q as duration value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as duration value from %s for flag %s: %s", val, source, f.Name, err)
}
f.Value = valDuration
@@ -83,10 +65,15 @@ func (f *DurationFlag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *DurationFlag) Get(ctx *Context) time.Duration {
+ return ctx.Duration(f.Name)
+}
+
// Duration looks up the value of a local DurationFlag, returns
// 0 if not found
-func (c *Context) Duration(name string) time.Duration {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Duration(name string) time.Duration {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupDuration(name, fs)
}
return 0
diff --git a/vendor/github.com/urfave/cli/v2/flag_float64.go b/vendor/github.com/urfave/cli/v2/flag_float64.go
index 91c778c8..2d31739b 100644
--- a/vendor/github.com/urfave/cli/v2/flag_float64.go
+++ b/vendor/github.com/urfave/cli/v2/flag_float64.go
@@ -6,42 +6,6 @@ import (
"strconv"
)
-// Float64Flag is a flag with type float64
-type Float64Flag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value float64
- DefaultText string
- Destination *float64
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *Float64Flag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *Float64Flag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *Float64Flag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *Float64Flag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *Float64Flag) TakesValue() bool {
return true
@@ -52,20 +16,37 @@ func (f *Float64Flag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *Float64Flag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *Float64Flag) GetValue() string {
- return fmt.Sprintf("%f", f.Value)
+ return fmt.Sprintf("%v", f.Value)
+}
+
+// GetDefaultText returns the default text for this flag
+func (f *Float64Flag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *Float64Flag) GetEnvVars() []string {
+ return f.EnvVars
}
// Apply populates the flag given the flag set and environment
func (f *Float64Flag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
- valFloat, err := strconv.ParseFloat(val, 10)
-
+ valFloat, err := strconv.ParseFloat(val, 64)
if err != nil {
- return fmt.Errorf("could not parse %q as float64 value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as float64 value from %s for flag %s: %s", val, source, f.Name, err)
}
f.Value = valFloat
@@ -84,10 +65,15 @@ func (f *Float64Flag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *Float64Flag) Get(ctx *Context) float64 {
+ return ctx.Float64(f.Name)
+}
+
// Float64 looks up the value of a local Float64Flag, returns
// 0 if not found
-func (c *Context) Float64(name string) float64 {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Float64(name string) float64 {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupFloat64(name, fs)
}
return 0
diff --git a/vendor/github.com/urfave/cli/v2/flag_float64_slice.go b/vendor/github.com/urfave/cli/v2/flag_float64_slice.go
index 706ee6cd..bc347ccd 100644
--- a/vendor/github.com/urfave/cli/v2/flag_float64_slice.go
+++ b/vendor/github.com/urfave/cli/v2/flag_float64_slice.go
@@ -19,6 +19,16 @@ func NewFloat64Slice(defaults ...float64) *Float64Slice {
return &Float64Slice{slice: append([]float64{}, defaults...)}
}
+// clone allocate a copy of self object
+func (f *Float64Slice) clone() *Float64Slice {
+ n := &Float64Slice{
+ slice: make([]float64, len(f.slice)),
+ hasBeenSet: f.hasBeenSet,
+ }
+ copy(n.slice, f.slice)
+ return n
+}
+
// Set parses the value into a float64 and appends it to the list of values
func (f *Float64Slice) Set(value string) error {
if !f.hasBeenSet {
@@ -33,12 +43,14 @@ func (f *Float64Slice) Set(value string) error {
return nil
}
- tmp, err := strconv.ParseFloat(value, 64)
- if err != nil {
- return err
- }
+ for _, s := range flagSplitMultiValues(value) {
+ tmp, err := strconv.ParseFloat(strings.TrimSpace(s), 64)
+ if err != nil {
+ return err
+ }
- f.slice = append(f.slice, tmp)
+ f.slice = append(f.slice, tmp)
+ }
return nil
}
@@ -63,39 +75,10 @@ func (f *Float64Slice) Get() interface{} {
return *f
}
-// Float64SliceFlag is a flag with type *Float64Slice
-type Float64SliceFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value *Float64Slice
- DefaultText string
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *Float64SliceFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
// String returns a readable representation of this value
// (for usage defaults)
func (f *Float64SliceFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *Float64SliceFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *Float64SliceFlag) IsRequired() bool {
- return f.Required
+ return withEnvHint(f.GetEnvVars(), stringifyFloat64SliceFlag(f))
}
// TakesValue returns true if the flag takes a value, otherwise false
@@ -108,6 +91,11 @@ func (f *Float64SliceFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *Float64SliceFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *Float64SliceFlag) GetValue() string {
@@ -117,36 +105,58 @@ func (f *Float64SliceFlag) GetValue() string {
return ""
}
+// GetDefaultText returns the default text for this flag
+func (f *Float64SliceFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *Float64SliceFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *Float64SliceFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
f.Value = &Float64Slice{}
- for _, s := range strings.Split(val, ",") {
+ for _, s := range flagSplitMultiValues(val) {
if err := f.Value.Set(strings.TrimSpace(s)); err != nil {
- return fmt.Errorf("could not parse %q as float64 slice value for flag %s: %s", f.Value, f.Name, err)
+ return fmt.Errorf("could not parse %q as float64 slice value from %s for flag %s: %s", f.Value, source, f.Name, err)
}
}
+ // Set this to false so that we reset the slice if we then set values from
+ // flags that have already been set by the environment.
+ f.Value.hasBeenSet = false
f.HasBeenSet = true
}
}
+ if f.Value == nil {
+ f.Value = &Float64Slice{}
+ }
+ copyValue := f.Value.clone()
for _, name := range f.Names() {
- if f.Value == nil {
- f.Value = &Float64Slice{}
- }
- set.Var(f.Value, name, f.Usage)
+ set.Var(copyValue, name, f.Usage)
}
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *Float64SliceFlag) Get(ctx *Context) []float64 {
+ return ctx.Float64Slice(f.Name)
+}
+
// Float64Slice looks up the value of a local Float64SliceFlag, returns
// nil if not found
-func (c *Context) Float64Slice(name string) []float64 {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Float64Slice(name string) []float64 {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupFloat64Slice(name, fs)
}
return nil
diff --git a/vendor/github.com/urfave/cli/v2/flag_generic.go b/vendor/github.com/urfave/cli/v2/flag_generic.go
index b0c8ff44..680eeb9d 100644
--- a/vendor/github.com/urfave/cli/v2/flag_generic.go
+++ b/vendor/github.com/urfave/cli/v2/flag_generic.go
@@ -11,42 +11,6 @@ type Generic interface {
String() string
}
-// GenericFlag is a flag with type Generic
-type GenericFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- TakesFile bool
- Value Generic
- DefaultText string
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *GenericFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *GenericFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *GenericFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *GenericFlag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *GenericFlag) TakesValue() bool {
return true
@@ -57,6 +21,11 @@ func (f *GenericFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *GenericFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *GenericFlag) GetValue() string {
@@ -66,13 +35,26 @@ func (f *GenericFlag) GetValue() string {
return ""
}
+// GetDefaultText returns the default text for this flag
+func (f *GenericFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *GenericFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply takes the flagset and calls Set on the generic flag with the value
// provided by the user for parsing by the flag
func (f GenericFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
if err := f.Value.Set(val); err != nil {
- return fmt.Errorf("could not parse %q as value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q from %s as value for flag %s: %s", val, source, f.Name, err)
}
f.HasBeenSet = true
@@ -86,10 +68,15 @@ func (f GenericFlag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *GenericFlag) Get(ctx *Context) interface{} {
+ return ctx.Generic(f.Name)
+}
+
// Generic looks up the value of a local GenericFlag, returns
// nil if not found
-func (c *Context) Generic(name string) interface{} {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Generic(name string) interface{} {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupGeneric(name, fs)
}
return nil
diff --git a/vendor/github.com/urfave/cli/v2/flag_int.go b/vendor/github.com/urfave/cli/v2/flag_int.go
index ac39d4a9..c70b8898 100644
--- a/vendor/github.com/urfave/cli/v2/flag_int.go
+++ b/vendor/github.com/urfave/cli/v2/flag_int.go
@@ -6,42 +6,6 @@ import (
"strconv"
)
-// IntFlag is a flag with type int
-type IntFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value int
- DefaultText string
- Destination *int
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *IntFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *IntFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *IntFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *IntFlag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *IntFlag) TakesValue() bool {
return true
@@ -52,20 +16,38 @@ func (f *IntFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *IntFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *IntFlag) GetValue() string {
return fmt.Sprintf("%d", f.Value)
}
+// GetDefaultText returns the default text for this flag
+func (f *IntFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *IntFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *IntFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
valInt, err := strconv.ParseInt(val, 0, 64)
if err != nil {
- return fmt.Errorf("could not parse %q as int value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as int value from %s for flag %s: %s", val, source, f.Name, err)
}
f.Value = int(valInt)
@@ -84,10 +66,15 @@ func (f *IntFlag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *IntFlag) Get(ctx *Context) int {
+ return ctx.Int(f.Name)
+}
+
// Int looks up the value of a local IntFlag, returns
// 0 if not found
-func (c *Context) Int(name string) int {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Int(name string) int {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupInt(name, fs)
}
return 0
diff --git a/vendor/github.com/urfave/cli/v2/flag_int64.go b/vendor/github.com/urfave/cli/v2/flag_int64.go
index e0999126..5e7038cf 100644
--- a/vendor/github.com/urfave/cli/v2/flag_int64.go
+++ b/vendor/github.com/urfave/cli/v2/flag_int64.go
@@ -6,42 +6,6 @@ import (
"strconv"
)
-// Int64Flag is a flag with type int64
-type Int64Flag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value int64
- DefaultText string
- Destination *int64
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *Int64Flag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *Int64Flag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *Int64Flag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *Int64Flag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *Int64Flag) TakesValue() bool {
return true
@@ -52,20 +16,38 @@ func (f *Int64Flag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *Int64Flag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *Int64Flag) GetValue() string {
return fmt.Sprintf("%d", f.Value)
}
+// GetDefaultText returns the default text for this flag
+func (f *Int64Flag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *Int64Flag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *Int64Flag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
valInt, err := strconv.ParseInt(val, 0, 64)
if err != nil {
- return fmt.Errorf("could not parse %q as int value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as int value from %s for flag %s: %s", val, source, f.Name, err)
}
f.Value = valInt
@@ -83,10 +65,15 @@ func (f *Int64Flag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *Int64Flag) Get(ctx *Context) int64 {
+ return ctx.Int64(f.Name)
+}
+
// Int64 looks up the value of a local Int64Flag, returns
// 0 if not found
-func (c *Context) Int64(name string) int64 {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Int64(name string) int64 {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupInt64(name, fs)
}
return 0
diff --git a/vendor/github.com/urfave/cli/v2/flag_int64_slice.go b/vendor/github.com/urfave/cli/v2/flag_int64_slice.go
index 6c7fd937..5f3d5cd4 100644
--- a/vendor/github.com/urfave/cli/v2/flag_int64_slice.go
+++ b/vendor/github.com/urfave/cli/v2/flag_int64_slice.go
@@ -19,6 +19,16 @@ func NewInt64Slice(defaults ...int64) *Int64Slice {
return &Int64Slice{slice: append([]int64{}, defaults...)}
}
+// clone allocate a copy of self object
+func (i *Int64Slice) clone() *Int64Slice {
+ n := &Int64Slice{
+ slice: make([]int64, len(i.slice)),
+ hasBeenSet: i.hasBeenSet,
+ }
+ copy(n.slice, i.slice)
+ return n
+}
+
// Set parses the value into an integer and appends it to the list of values
func (i *Int64Slice) Set(value string) error {
if !i.hasBeenSet {
@@ -33,12 +43,14 @@ func (i *Int64Slice) Set(value string) error {
return nil
}
- tmp, err := strconv.ParseInt(value, 0, 64)
- if err != nil {
- return err
- }
+ for _, s := range flagSplitMultiValues(value) {
+ tmp, err := strconv.ParseInt(strings.TrimSpace(s), 0, 64)
+ if err != nil {
+ return err
+ }
- i.slice = append(i.slice, tmp)
+ i.slice = append(i.slice, tmp)
+ }
return nil
}
@@ -64,39 +76,10 @@ func (i *Int64Slice) Get() interface{} {
return *i
}
-// Int64SliceFlag is a flag with type *Int64Slice
-type Int64SliceFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value *Int64Slice
- DefaultText string
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *Int64SliceFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
// String returns a readable representation of this value
// (for usage defaults)
func (f *Int64SliceFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *Int64SliceFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *Int64SliceFlag) IsRequired() bool {
- return f.Required
+ return withEnvHint(f.GetEnvVars(), stringifyInt64SliceFlag(f))
}
// TakesValue returns true of the flag takes a value, otherwise false
@@ -105,10 +88,15 @@ func (f *Int64SliceFlag) TakesValue() bool {
}
// GetUsage returns the usage string for the flag
-func (f Int64SliceFlag) GetUsage() string {
+func (f *Int64SliceFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *Int64SliceFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *Int64SliceFlag) GetValue() string {
@@ -118,34 +106,59 @@ func (f *Int64SliceFlag) GetValue() string {
return ""
}
+// GetDefaultText returns the default text for this flag
+func (f *Int64SliceFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *Int64SliceFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *Int64SliceFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
f.Value = &Int64Slice{}
- for _, s := range strings.Split(val, ",") {
+ for _, s := range flagSplitMultiValues(val) {
if err := f.Value.Set(strings.TrimSpace(s)); err != nil {
- return fmt.Errorf("could not parse %q as int64 slice value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as int64 slice value from %s for flag %s: %s", val, source, f.Name, err)
}
}
+ // Set this to false so that we reset the slice if we then set values from
+ // flags that have already been set by the environment.
+ f.Value.hasBeenSet = false
f.HasBeenSet = true
}
+ if f.Value == nil {
+ f.Value = &Int64Slice{}
+ }
+ copyValue := f.Value.clone()
for _, name := range f.Names() {
- if f.Value == nil {
- f.Value = &Int64Slice{}
- }
- set.Var(f.Value, name, f.Usage)
+ set.Var(copyValue, name, f.Usage)
}
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *Int64SliceFlag) Get(ctx *Context) []int64 {
+ return ctx.Int64Slice(f.Name)
+}
+
// Int64Slice looks up the value of a local Int64SliceFlag, returns
// nil if not found
-func (c *Context) Int64Slice(name string) []int64 {
- return lookupInt64Slice(name, c.flagSet)
+func (cCtx *Context) Int64Slice(name string) []int64 {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
+ return lookupInt64Slice(name, fs)
+ }
+ return nil
}
func lookupInt64Slice(name string, set *flag.FlagSet) []int64 {
diff --git a/vendor/github.com/urfave/cli/v2/flag_int_slice.go b/vendor/github.com/urfave/cli/v2/flag_int_slice.go
index 4e0afc02..2ddf8059 100644
--- a/vendor/github.com/urfave/cli/v2/flag_int_slice.go
+++ b/vendor/github.com/urfave/cli/v2/flag_int_slice.go
@@ -19,6 +19,16 @@ func NewIntSlice(defaults ...int) *IntSlice {
return &IntSlice{slice: append([]int{}, defaults...)}
}
+// clone allocate a copy of self object
+func (i *IntSlice) clone() *IntSlice {
+ n := &IntSlice{
+ slice: make([]int, len(i.slice)),
+ hasBeenSet: i.hasBeenSet,
+ }
+ copy(n.slice, i.slice)
+ return n
+}
+
// TODO: Consistently have specific Set function for Int64 and Float64 ?
// SetInt directly adds an integer to the list of values
func (i *IntSlice) SetInt(value int) {
@@ -44,12 +54,14 @@ func (i *IntSlice) Set(value string) error {
return nil
}
- tmp, err := strconv.ParseInt(value, 0, 64)
- if err != nil {
- return err
- }
+ for _, s := range flagSplitMultiValues(value) {
+ tmp, err := strconv.ParseInt(strings.TrimSpace(s), 0, 64)
+ if err != nil {
+ return err
+ }
- i.slice = append(i.slice, int(tmp))
+ i.slice = append(i.slice, int(tmp))
+ }
return nil
}
@@ -75,39 +87,10 @@ func (i *IntSlice) Get() interface{} {
return *i
}
-// IntSliceFlag is a flag with type *IntSlice
-type IntSliceFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value *IntSlice
- DefaultText string
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *IntSliceFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
// String returns a readable representation of this value
// (for usage defaults)
func (f *IntSliceFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *IntSliceFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *IntSliceFlag) IsRequired() bool {
- return f.Required
+ return withEnvHint(f.GetEnvVars(), stringifyIntSliceFlag(f))
}
// TakesValue returns true of the flag takes a value, otherwise false
@@ -116,10 +99,15 @@ func (f *IntSliceFlag) TakesValue() bool {
}
// GetUsage returns the usage string for the flag
-func (f IntSliceFlag) GetUsage() string {
+func (f *IntSliceFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *IntSliceFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *IntSliceFlag) GetValue() string {
@@ -129,35 +117,57 @@ func (f *IntSliceFlag) GetValue() string {
return ""
}
+// GetDefaultText returns the default text for this flag
+func (f *IntSliceFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *IntSliceFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *IntSliceFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
f.Value = &IntSlice{}
- for _, s := range strings.Split(val, ",") {
+ for _, s := range flagSplitMultiValues(val) {
if err := f.Value.Set(strings.TrimSpace(s)); err != nil {
- return fmt.Errorf("could not parse %q as int slice value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as int slice value from %s for flag %s: %s", val, source, f.Name, err)
}
}
+ // Set this to false so that we reset the slice if we then set values from
+ // flags that have already been set by the environment.
+ f.Value.hasBeenSet = false
f.HasBeenSet = true
}
+ if f.Value == nil {
+ f.Value = &IntSlice{}
+ }
+ copyValue := f.Value.clone()
for _, name := range f.Names() {
- if f.Value == nil {
- f.Value = &IntSlice{}
- }
- set.Var(f.Value, name, f.Usage)
+ set.Var(copyValue, name, f.Usage)
}
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *IntSliceFlag) Get(ctx *Context) []int {
+ return ctx.IntSlice(f.Name)
+}
+
// IntSlice looks up the value of a local IntSliceFlag, returns
// nil if not found
-func (c *Context) IntSlice(name string) []int {
- if fs := lookupFlagSet(name, c); fs != nil {
- return lookupIntSlice(name, c.flagSet)
+func (cCtx *Context) IntSlice(name string) []int {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
+ return lookupIntSlice(name, fs)
}
return nil
}
diff --git a/vendor/github.com/urfave/cli/v2/flag_path.go b/vendor/github.com/urfave/cli/v2/flag_path.go
index 8070dc4b..7c87a890 100644
--- a/vendor/github.com/urfave/cli/v2/flag_path.go
+++ b/vendor/github.com/urfave/cli/v2/flag_path.go
@@ -1,42 +1,11 @@
package cli
-import "flag"
+import (
+ "flag"
+ "fmt"
+)
-type PathFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- TakesFile bool
- Value string
- DefaultText string
- Destination *string
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *PathFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *PathFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *PathFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *PathFlag) IsRequired() bool {
- return f.Required
-}
+type Path = string
// TakesValue returns true of the flag takes a value, otherwise false
func (f *PathFlag) TakesValue() bool {
@@ -48,15 +17,36 @@ func (f *PathFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *PathFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *PathFlag) GetValue() string {
return f.Value
}
+// GetDefaultText returns the default text for this flag
+func (f *PathFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ if f.Value == "" {
+ return f.Value
+ }
+ return fmt.Sprintf("%q", f.Value)
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *PathFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *PathFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, _, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
f.Value = val
f.HasBeenSet = true
}
@@ -72,10 +62,15 @@ func (f *PathFlag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *PathFlag) Get(ctx *Context) string {
+ return ctx.Path(f.Name)
+}
+
// Path looks up the value of a local PathFlag, returns
// "" if not found
-func (c *Context) Path(name string) string {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Path(name string) string {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupPath(name, fs)
}
diff --git a/vendor/github.com/urfave/cli/v2/flag_string.go b/vendor/github.com/urfave/cli/v2/flag_string.go
index 400bb532..c8da38f9 100644
--- a/vendor/github.com/urfave/cli/v2/flag_string.go
+++ b/vendor/github.com/urfave/cli/v2/flag_string.go
@@ -1,43 +1,9 @@
package cli
-import "flag"
-
-// StringFlag is a flag with type string
-type StringFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- TakesFile bool
- Value string
- DefaultText string
- Destination *string
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *StringFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *StringFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *StringFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *StringFlag) IsRequired() bool {
- return f.Required
-}
+import (
+ "flag"
+ "fmt"
+)
// TakesValue returns true of the flag takes a value, otherwise false
func (f *StringFlag) TakesValue() bool {
@@ -49,15 +15,36 @@ func (f *StringFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *StringFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *StringFlag) GetValue() string {
return f.Value
}
+// GetDefaultText returns the default text for this flag
+func (f *StringFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ if f.Value == "" {
+ return f.Value
+ }
+ return fmt.Sprintf("%q", f.Value)
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *StringFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *StringFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, _, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
f.Value = val
f.HasBeenSet = true
}
@@ -73,10 +60,15 @@ func (f *StringFlag) Apply(set *flag.FlagSet) error {
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *StringFlag) Get(ctx *Context) string {
+ return ctx.String(f.Name)
+}
+
// String looks up the value of a local StringFlag, returns
// "" if not found
-func (c *Context) String(name string) string {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) String(name string) string {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupString(name, fs)
}
return ""
@@ -85,10 +77,7 @@ func (c *Context) String(name string) string {
func lookupString(name string, set *flag.FlagSet) string {
f := set.Lookup(name)
if f != nil {
- parsed, err := f.Value.String(), error(nil)
- if err != nil {
- return ""
- }
+ parsed := f.Value.String()
return parsed
}
return ""
diff --git a/vendor/github.com/urfave/cli/v2/flag_string_slice.go b/vendor/github.com/urfave/cli/v2/flag_string_slice.go
index 35497032..599f42c7 100644
--- a/vendor/github.com/urfave/cli/v2/flag_string_slice.go
+++ b/vendor/github.com/urfave/cli/v2/flag_string_slice.go
@@ -18,6 +18,16 @@ func NewStringSlice(defaults ...string) *StringSlice {
return &StringSlice{slice: append([]string{}, defaults...)}
}
+// clone allocate a copy of self object
+func (s *StringSlice) clone() *StringSlice {
+ n := &StringSlice{
+ slice: make([]string, len(s.slice)),
+ hasBeenSet: s.hasBeenSet,
+ }
+ copy(n.slice, s.slice)
+ return n
+}
+
// Set appends the string value to the list of values
func (s *StringSlice) Set(value string) error {
if !s.hasBeenSet {
@@ -32,7 +42,9 @@ func (s *StringSlice) Set(value string) error {
return nil
}
- s.slice = append(s.slice, value)
+ for _, t := range flagSplitMultiValues(value) {
+ s.slice = append(s.slice, strings.TrimSpace(t))
+ }
return nil
}
@@ -58,41 +70,10 @@ func (s *StringSlice) Get() interface{} {
return *s
}
-// StringSliceFlag is a flag with type *StringSlice
-type StringSliceFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- TakesFile bool
- Value *StringSlice
- DefaultText string
- HasBeenSet bool
- Destination *StringSlice
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *StringSliceFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
// String returns a readable representation of this value
// (for usage defaults)
func (f *StringSliceFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *StringSliceFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *StringSliceFlag) IsRequired() bool {
- return f.Required
+ return withEnvHint(f.GetEnvVars(), stringifyStringSliceFlag(f))
}
// TakesValue returns true of the flag takes a value, otherwise false
@@ -105,6 +86,11 @@ func (f *StringSliceFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *StringSliceFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *StringSliceFlag) GetValue() string {
@@ -114,6 +100,19 @@ func (f *StringSliceFlag) GetValue() string {
return ""
}
+// GetDefaultText returns the default text for this flag
+func (f *StringSliceFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *StringSliceFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *StringSliceFlag) Apply(set *flag.FlagSet) error {
@@ -123,7 +122,7 @@ func (f *StringSliceFlag) Apply(set *flag.FlagSet) error {
}
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if f.Value == nil {
f.Value = &StringSlice{}
}
@@ -132,9 +131,9 @@ func (f *StringSliceFlag) Apply(set *flag.FlagSet) error {
destination = f.Destination
}
- for _, s := range strings.Split(val, ",") {
+ for _, s := range flagSplitMultiValues(val) {
if err := destination.Set(strings.TrimSpace(s)); err != nil {
- return fmt.Errorf("could not parse %q as string value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as string value from %s for flag %s: %s", val, source, f.Name, err)
}
}
@@ -144,26 +143,29 @@ func (f *StringSliceFlag) Apply(set *flag.FlagSet) error {
f.HasBeenSet = true
}
+ if f.Value == nil {
+ f.Value = &StringSlice{}
+ }
+ setValue := f.Destination
+ if f.Destination == nil {
+ setValue = f.Value.clone()
+ }
for _, name := range f.Names() {
- if f.Value == nil {
- f.Value = &StringSlice{}
- }
-
- if f.Destination != nil {
- set.Var(f.Destination, name, f.Usage)
- continue
- }
-
- set.Var(f.Value, name, f.Usage)
+ set.Var(setValue, name, f.Usage)
}
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *StringSliceFlag) Get(ctx *Context) []string {
+ return ctx.StringSlice(f.Name)
+}
+
// StringSlice looks up the value of a local StringSliceFlag, returns
// nil if not found
-func (c *Context) StringSlice(name string) []string {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) StringSlice(name string) []string {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupStringSlice(name, fs)
}
return nil
diff --git a/vendor/github.com/urfave/cli/v2/flag_timestamp.go b/vendor/github.com/urfave/cli/v2/flag_timestamp.go
index 0382a6b9..05224779 100644
--- a/vendor/github.com/urfave/cli/v2/flag_timestamp.go
+++ b/vendor/github.com/urfave/cli/v2/flag_timestamp.go
@@ -58,42 +58,6 @@ func (t *Timestamp) Get() interface{} {
return *t
}
-// TimestampFlag is a flag with type time
-type TimestampFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Layout string
- Value *Timestamp
- DefaultText string
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *TimestampFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *TimestampFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *TimestampFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *TimestampFlag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *TimestampFlag) TakesValue() bool {
return true
@@ -104,6 +68,11 @@ func (f *TimestampFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *TimestampFlag) GetCategory() string {
+ return f.Category
+}
+
// GetValue returns the flags value as string representation and an empty
// string if the flag takes no value at all.
func (f *TimestampFlag) GetValue() string {
@@ -113,6 +82,19 @@ func (f *TimestampFlag) GetValue() string {
return ""
}
+// GetDefaultText returns the default text for this flag
+func (f *TimestampFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *TimestampFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
// Apply populates the flag given the flag set and environment
func (f *TimestampFlag) Apply(set *flag.FlagSet) error {
if f.Layout == "" {
@@ -123,22 +105,36 @@ func (f *TimestampFlag) Apply(set *flag.FlagSet) error {
}
f.Value.SetLayout(f.Layout)
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if f.Destination != nil {
+ f.Destination.SetLayout(f.Layout)
+ }
+
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if err := f.Value.Set(val); err != nil {
- return fmt.Errorf("could not parse %q as timestamp value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as timestamp value from %s for flag %s: %s", val, source, f.Name, err)
}
f.HasBeenSet = true
}
for _, name := range f.Names() {
+ if f.Destination != nil {
+ set.Var(f.Destination, name, f.Usage)
+ continue
+ }
+
set.Var(f.Value, name, f.Usage)
}
return nil
}
+// Get returns the flag’s value in the given Context.
+func (f *TimestampFlag) Get(ctx *Context) *time.Time {
+ return ctx.Timestamp(f.Name)
+}
+
// Timestamp gets the timestamp from a flag name
-func (c *Context) Timestamp(name string) *time.Time {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Timestamp(name string) *time.Time {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupTimestamp(name, fs)
}
return nil
diff --git a/vendor/github.com/urfave/cli/v2/flag_uint.go b/vendor/github.com/urfave/cli/v2/flag_uint.go
index 2e5e76b0..6092b1ad 100644
--- a/vendor/github.com/urfave/cli/v2/flag_uint.go
+++ b/vendor/github.com/urfave/cli/v2/flag_uint.go
@@ -6,42 +6,6 @@ import (
"strconv"
)
-// UintFlag is a flag with type uint
-type UintFlag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value uint
- DefaultText string
- Destination *uint
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *UintFlag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *UintFlag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *UintFlag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *UintFlag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *UintFlag) TakesValue() bool {
return true
@@ -52,13 +16,18 @@ func (f *UintFlag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *UintFlag) GetCategory() string {
+ return f.Category
+}
+
// Apply populates the flag given the flag set and environment
func (f *UintFlag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
valInt, err := strconv.ParseUint(val, 0, 64)
if err != nil {
- return fmt.Errorf("could not parse %q as uint value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as uint value from %s for flag %s: %s", val, source, f.Name, err)
}
f.Value = uint(valInt)
@@ -83,10 +52,28 @@ func (f *UintFlag) GetValue() string {
return fmt.Sprintf("%d", f.Value)
}
+// GetDefaultText returns the default text for this flag
+func (f *UintFlag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *UintFlag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
+// Get returns the flag’s value in the given Context.
+func (f *UintFlag) Get(ctx *Context) uint {
+ return ctx.Uint(f.Name)
+}
+
// Uint looks up the value of a local UintFlag, returns
// 0 if not found
-func (c *Context) Uint(name string) uint {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Uint(name string) uint {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupUint(name, fs)
}
return 0
diff --git a/vendor/github.com/urfave/cli/v2/flag_uint64.go b/vendor/github.com/urfave/cli/v2/flag_uint64.go
index 8fc3289d..a37f30d9 100644
--- a/vendor/github.com/urfave/cli/v2/flag_uint64.go
+++ b/vendor/github.com/urfave/cli/v2/flag_uint64.go
@@ -6,42 +6,6 @@ import (
"strconv"
)
-// Uint64Flag is a flag with type uint64
-type Uint64Flag struct {
- Name string
- Aliases []string
- Usage string
- EnvVars []string
- FilePath string
- Required bool
- Hidden bool
- Value uint64
- DefaultText string
- Destination *uint64
- HasBeenSet bool
-}
-
-// IsSet returns whether or not the flag has been set through env or file
-func (f *Uint64Flag) IsSet() bool {
- return f.HasBeenSet
-}
-
-// String returns a readable representation of this value
-// (for usage defaults)
-func (f *Uint64Flag) String() string {
- return FlagStringer(f)
-}
-
-// Names returns the names of the flag
-func (f *Uint64Flag) Names() []string {
- return flagNames(f.Name, f.Aliases)
-}
-
-// IsRequired returns whether or not the flag is required
-func (f *Uint64Flag) IsRequired() bool {
- return f.Required
-}
-
// TakesValue returns true of the flag takes a value, otherwise false
func (f *Uint64Flag) TakesValue() bool {
return true
@@ -52,13 +16,18 @@ func (f *Uint64Flag) GetUsage() string {
return f.Usage
}
+// GetCategory returns the category for the flag
+func (f *Uint64Flag) GetCategory() string {
+ return f.Category
+}
+
// Apply populates the flag given the flag set and environment
func (f *Uint64Flag) Apply(set *flag.FlagSet) error {
- if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {
+ if val, source, found := flagFromEnvOrFile(f.EnvVars, f.FilePath); found {
if val != "" {
valInt, err := strconv.ParseUint(val, 0, 64)
if err != nil {
- return fmt.Errorf("could not parse %q as uint64 value for flag %s: %s", val, f.Name, err)
+ return fmt.Errorf("could not parse %q as uint64 value from %s for flag %s: %s", val, source, f.Name, err)
}
f.Value = valInt
@@ -83,10 +52,28 @@ func (f *Uint64Flag) GetValue() string {
return fmt.Sprintf("%d", f.Value)
}
+// GetDefaultText returns the default text for this flag
+func (f *Uint64Flag) GetDefaultText() string {
+ if f.DefaultText != "" {
+ return f.DefaultText
+ }
+ return f.GetValue()
+}
+
+// GetEnvVars returns the env vars for this flag
+func (f *Uint64Flag) GetEnvVars() []string {
+ return f.EnvVars
+}
+
+// Get returns the flag’s value in the given Context.
+func (f *Uint64Flag) Get(ctx *Context) uint64 {
+ return ctx.Uint64(f.Name)
+}
+
// Uint64 looks up the value of a local Uint64Flag, returns
// 0 if not found
-func (c *Context) Uint64(name string) uint64 {
- if fs := lookupFlagSet(name, c); fs != nil {
+func (cCtx *Context) Uint64(name string) uint64 {
+ if fs := cCtx.lookupFlagSet(name); fs != nil {
return lookupUint64(name, fs)
}
return 0
diff --git a/vendor/github.com/urfave/cli/v2/funcs.go b/vendor/github.com/urfave/cli/v2/funcs.go
index 474c48fa..0a9b22c9 100644
--- a/vendor/github.com/urfave/cli/v2/funcs.go
+++ b/vendor/github.com/urfave/cli/v2/funcs.go
@@ -17,15 +17,15 @@ type ActionFunc func(*Context) error
// CommandNotFoundFunc is executed if the proper command cannot be found
type CommandNotFoundFunc func(*Context, string)
-// OnUsageErrorFunc is executed if an usage error occurs. This is useful for displaying
+// OnUsageErrorFunc is executed if a usage error occurs. This is useful for displaying
// customized usage error messages. This function is able to replace the
// original error messages. If this function is not set, the "Incorrect usage"
// is displayed and the execution is interrupted.
-type OnUsageErrorFunc func(context *Context, err error, isSubcommand bool) error
+type OnUsageErrorFunc func(cCtx *Context, err error, isSubcommand bool) error
// ExitErrHandlerFunc is executed if provided in order to handle exitError values
// returned by Actions and Before/After functions.
-type ExitErrHandlerFunc func(context *Context, err error)
+type ExitErrHandlerFunc func(cCtx *Context, err error)
// FlagStringFunc is used by the help generation to display a flag, which is
// expected to be a single line.
diff --git a/vendor/github.com/urfave/cli/v2/go.mod b/vendor/github.com/urfave/cli/v2/go.mod
index 11396643..63434215 100644
--- a/vendor/github.com/urfave/cli/v2/go.mod
+++ b/vendor/github.com/urfave/cli/v2/go.mod
@@ -1,9 +1,13 @@
module github.com/urfave/cli/v2
-go 1.11
+go 1.18
require (
- github.com/BurntSushi/toml v0.3.1
- github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d
- gopkg.in/yaml.v2 v2.2.3
+ github.com/BurntSushi/toml v1.1.0
+ github.com/cpuguy83/go-md2man/v2 v2.0.1
+ github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
+ golang.org/x/text v0.3.7
+ gopkg.in/yaml.v2 v2.4.0
)
+
+require github.com/russross/blackfriday/v2 v2.1.0 // indirect
diff --git a/vendor/github.com/urfave/cli/v2/go.sum b/vendor/github.com/urfave/cli/v2/go.sum
index 663ad727..0d18f8c5 100644
--- a/vendor/github.com/urfave/cli/v2/go.sum
+++ b/vendor/github.com/urfave/cli/v2/go.sum
@@ -1,14 +1,14 @@
-github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
-github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
-github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
-github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
-github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
-github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
-github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
-github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
-github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
+github.com/BurntSushi/toml v1.1.0 h1:ksErzDEI1khOiGPgpwuI7x2ebx/uXQNw7xJpn9Eq1+I=
+github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
+github.com/cpuguy83/go-md2man/v2 v2.0.1 h1:r/myEWzV9lfsM1tFLgDyu0atFtJ1fXn261LKYj/3DxU=
+github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
+github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673 h1:bAn7/zixMGCfxrRTfdpNzjtPYqr8smhKouy9mxVdGPU=
+github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673/go.mod h1:N3UwUGtsrSj3ccvlPHLoLsHnpR27oXr4ZE984MbSER8=
+golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
+golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
-gopkg.in/yaml.v2 v2.2.3 h1:fvjTMHxHEw/mxHbtzPi3JCcKXQRAnQTBRo6YCJSVHKI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
diff --git a/vendor/github.com/urfave/cli/v2/godoc-current.txt b/vendor/github.com/urfave/cli/v2/godoc-current.txt
new file mode 100644
index 00000000..d94e80dc
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/godoc-current.txt
@@ -0,0 +1,2204 @@
+package cli // import "github.com/urfave/cli/v2"
+
+Package cli provides a minimal framework for creating and organizing command
+line Go applications. cli is designed to be easy to understand and write,
+the most simple cli application can be written as follows:
+
+ func main() {
+ (&cli.App{}).Run(os.Args)
+ }
+
+Of course this application does not do much, so let's make this an actual
+application:
+
+ func main() {
+ app := &cli.App{
+ Name: "greet",
+ Usage: "say a greeting",
+ Action: func(c *cli.Context) error {
+ fmt.Println("Greetings")
+ return nil
+ },
+ }
+
+ app.Run(os.Args)
+ }
+
+VARIABLES
+
+var (
+ SuggestFlag SuggestFlagFunc = suggestFlag
+ SuggestCommand SuggestCommandFunc = suggestCommand
+ SuggestDidYouMeanTemplate string = suggestDidYouMeanTemplate
+)
+var AppHelpTemplate = `NAME:
+ {{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
+
+USAGE:
+ {{if .UsageText}}{{.UsageText | nindent 3 | trim}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
+
+VERSION:
+ {{.Version}}{{end}}{{end}}{{if .Description}}
+
+DESCRIPTION:
+ {{.Description | nindent 3 | trim}}{{end}}{{if len .Authors}}
+
+AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
+ {{range $index, $author := .Authors}}{{if $index}}
+ {{end}}{{$author}}{{end}}{{end}}{{if .VisibleCommands}}
+
+COMMANDS:{{range .VisibleCategories}}{{if .Name}}
+ {{.Name}}:{{range .VisibleCommands}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlagCategories}}
+
+GLOBAL OPTIONS:{{range .VisibleFlagCategories}}
+ {{if .Name}}{{.Name}}
+ {{end}}{{range .Flags}}{{.}}
+ {{end}}{{end}}{{else}}{{if .VisibleFlags}}
+
+GLOBAL OPTIONS:
+ {{range $index, $option := .VisibleFlags}}{{if $index}}
+ {{end}}{{$option}}{{end}}{{end}}{{end}}{{if .Copyright}}
+
+COPYRIGHT:
+ {{.Copyright}}{{end}}
+`
+ AppHelpTemplate is the text template for the Default help topic. cli.go uses
+ text/template to render templates. You can render custom help text by
+ setting this variable.
+
+var CommandHelpTemplate = `NAME:
+ {{.HelpName}} - {{.Usage}}
+
+USAGE:
+ {{if .UsageText}}{{.UsageText | nindent 3 | trim}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Category}}
+
+CATEGORY:
+ {{.Category}}{{end}}{{if .Description}}
+
+DESCRIPTION:
+ {{.Description | nindent 3 | trim}}{{end}}{{if .VisibleFlagCategories}}
+
+OPTIONS:{{range .VisibleFlagCategories}}
+ {{if .Name}}{{.Name}}
+ {{end}}{{range .Flags}}{{.}}
+ {{end}}{{end}}{{else}}{{if .VisibleFlags}}
+
+OPTIONS:
+ {{range .VisibleFlags}}{{.}}
+ {{end}}{{end}}{{end}}
+`
+ CommandHelpTemplate is the text template for the command help topic. cli.go
+ uses text/template to render templates. You can render custom help text by
+ setting this variable.
+
+var ErrWriter io.Writer = os.Stderr
+ ErrWriter is used to write errors to the user. This can be anything
+ implementing the io.Writer interface and defaults to os.Stderr.
+
+var FishCompletionTemplate = `# {{ .App.Name }} fish shell completion
+
+function __fish_{{ .App.Name }}_no_subcommand --description 'Test if there has been any subcommand yet'
+ for i in (commandline -opc)
+ if contains -- $i{{ range $v := .AllCommands }} {{ $v }}{{ end }}
+ return 1
+ end
+ end
+ return 0
+end
+
+{{ range $v := .Completions }}{{ $v }}
+{{ end }}`
+var MarkdownDocTemplate = `{{if gt .SectionNum 0}}% {{ .App.Name }} {{ .SectionNum }}
+
+{{end}}# NAME
+
+{{ .App.Name }}{{ if .App.Usage }} - {{ .App.Usage }}{{ end }}
+
+# SYNOPSIS
+
+{{ .App.Name }}
+{{ if .SynopsisArgs }}
+` + "```" + `
+{{ range $v := .SynopsisArgs }}{{ $v }}{{ end }}` + "```" + `
+{{ end }}{{ if .App.Description }}
+# DESCRIPTION
+
+{{ .App.Description }}
+{{ end }}
+**Usage**:
+
+` + "```" + `{{ if .App.UsageText }}
+{{ .App.UsageText }}
+{{ else }}
+{{ .App.Name }} [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...]
+{{ end }}` + "```" + `
+{{ if .GlobalArgs }}
+# GLOBAL OPTIONS
+{{ range $v := .GlobalArgs }}
+{{ $v }}{{ end }}
+{{ end }}{{ if .Commands }}
+# COMMANDS
+{{ range $v := .Commands }}
+{{ $v }}{{ end }}{{ end }}`
+var OsExiter = os.Exit
+ OsExiter is the function used when the app exits. If not set defaults to
+ os.Exit.
+
+var SubcommandHelpTemplate = `NAME:
+ {{.HelpName}} - {{.Usage}}
+
+USAGE:
+ {{if .UsageText}}{{.UsageText | nindent 3 | trim}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
+
+DESCRIPTION:
+ {{.Description | nindent 3 | trim}}{{end}}
+
+COMMANDS:{{range .VisibleCategories}}{{if .Name}}
+ {{.Name}}:{{range .VisibleCommands}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
+
+OPTIONS:
+ {{range .VisibleFlags}}{{.}}
+ {{end}}{{end}}
+`
+ SubcommandHelpTemplate is the text template for the subcommand help topic.
+ cli.go uses text/template to render templates. You can render custom help
+ text by setting this variable.
+
+var VersionPrinter = printVersion
+ VersionPrinter prints the version for the App
+
+var HelpPrinter helpPrinter = printHelp
+ HelpPrinter is a function that writes the help output. If not set
+ explicitly, this calls HelpPrinterCustom using only the default template
+ functions.
+
+ If custom logic for printing help is required, this function can be
+ overridden. If the ExtraInfo field is defined on an App, this function
+ should not be modified, as HelpPrinterCustom will be used directly in order
+ to capture the extra information.
+
+var HelpPrinterCustom helpPrinterCustom = printHelpCustom
+ HelpPrinterCustom is a function that writes the help output. It is used as
+ the default implementation of HelpPrinter, and may be called directly if the
+ ExtraInfo field is set on an App.
+
+
+FUNCTIONS
+
+func DefaultAppComplete(cCtx *Context)
+ DefaultAppComplete prints the list of subcommands as the default app
+ completion method
+
+func DefaultCompleteWithFlags(cmd *Command) func(cCtx *Context)
+func FlagNames(name string, aliases []string) []string
+func HandleAction(action interface{}, cCtx *Context) (err error)
+ HandleAction attempts to figure out which Action signature was used. If it's
+ an ActionFunc or a func with the legacy signature for Action, the func is
+ run!
+
+func HandleExitCoder(err error)
+ HandleExitCoder handles errors implementing ExitCoder by printing their
+ message and calling OsExiter with the given exit code.
+
+ If the given error instead implements MultiError, each error will be checked
+ for the ExitCoder interface, and OsExiter will be called with the last exit
+ code found, or exit code 1 if no ExitCoder is found.
+
+ This function is the default error-handling behavior for an App.
+
+func ShowAppHelp(cCtx *Context) error
+ ShowAppHelp is an action that displays the help.
+
+func ShowAppHelpAndExit(c *Context, exitCode int)
+ ShowAppHelpAndExit - Prints the list of subcommands for the app and exits
+ with exit code.
+
+func ShowCommandCompletions(ctx *Context, command string)
+ ShowCommandCompletions prints the custom completions for a given command
+
+func ShowCommandHelp(ctx *Context, command string) error
+ ShowCommandHelp prints help for the given command
+
+func ShowCommandHelpAndExit(c *Context, command string, code int)
+ ShowCommandHelpAndExit - exits with code after showing help
+
+func ShowCompletions(cCtx *Context)
+ ShowCompletions prints the lists of commands within a given context
+
+func ShowSubcommandHelp(cCtx *Context) error
+ ShowSubcommandHelp prints help for the given subcommand
+
+func ShowSubcommandHelpAndExit(c *Context, exitCode int)
+ ShowSubcommandHelpAndExit - Prints help for the given subcommand and exits
+ with exit code.
+
+func ShowVersion(cCtx *Context)
+ ShowVersion prints the version number of the App
+
+
+TYPES
+
+type ActionFunc func(*Context) error
+ ActionFunc is the action to execute when no subcommands are specified
+
+type AfterFunc func(*Context) error
+ AfterFunc is an action to execute after any subcommands are run, but after
+ the subcommand has finished it is run even if Action() panics
+
+type App struct {
+ // The name of the program. Defaults to path.Base(os.Args[0])
+ Name string
+ // Full name of command for help, defaults to Name
+ HelpName string
+ // Description of the program.
+ Usage string
+ // Text to override the USAGE section of help
+ UsageText string
+ // Description of the program argument format.
+ ArgsUsage string
+ // Version of the program
+ Version string
+ // Description of the program
+ Description string
+ // List of commands to execute
+ Commands []*Command
+ // List of flags to parse
+ Flags []Flag
+ // Boolean to enable bash completion commands
+ EnableBashCompletion bool
+ // Boolean to hide built-in help command and help flag
+ HideHelp bool
+ // Boolean to hide built-in help command but keep help flag.
+ // Ignored if HideHelp is true.
+ HideHelpCommand bool
+ // Boolean to hide built-in version flag and the VERSION section of help
+ HideVersion bool
+
+ // An action to execute when the shell completion flag is set
+ BashComplete BashCompleteFunc
+ // An action to execute before any subcommands are run, but after the context is ready
+ // If a non-nil error is returned, no subcommands are run
+ Before BeforeFunc
+ // An action to execute after any subcommands are run, but after the subcommand has finished
+ // It is run even if Action() panics
+ After AfterFunc
+ // The action to execute when no subcommands are specified
+ Action ActionFunc
+ // Execute this function if the proper command cannot be found
+ CommandNotFound CommandNotFoundFunc
+ // Execute this function if a usage error occurs
+ OnUsageError OnUsageErrorFunc
+ // Compilation date
+ Compiled time.Time
+ // List of all authors who contributed
+ Authors []*Author
+ // Copyright of the binary if any
+ Copyright string
+ // Reader reader to write input to (useful for tests)
+ Reader io.Reader
+ // Writer writer to write output to
+ Writer io.Writer
+ // ErrWriter writes error output
+ ErrWriter io.Writer
+ // ExitErrHandler processes any error encountered while running an App before
+ // it is returned to the caller. If no function is provided, HandleExitCoder
+ // is used as the default behavior.
+ ExitErrHandler ExitErrHandlerFunc
+ // Other custom info
+ Metadata map[string]interface{}
+ // Carries a function which returns app specific info.
+ ExtraInfo func() map[string]string
+ // CustomAppHelpTemplate the text template for app help topic.
+ // cli.go uses text/template to render templates. You can
+ // render custom help text by setting this variable.
+ CustomAppHelpTemplate string
+ // Boolean to enable short-option handling so user can combine several
+ // single-character bool arguments into one
+ // i.e. foobar -o -v -> foobar -ov
+ UseShortOptionHandling bool
+ // Enable suggestions for commands and flags
+ Suggest bool
+
+ // Has unexported fields.
+}
+ App is the main structure of a cli application. It is recommended that an
+ app be created with the cli.NewApp() function
+
+func NewApp() *App
+ NewApp creates a new cli Application with some reasonable defaults for Name,
+ Usage, Version and Action.
+
+func (a *App) Command(name string) *Command
+ Command returns the named command on App. Returns nil if the command does
+ not exist
+
+func (a *App) Run(arguments []string) (err error)
+ Run is the entry point to the cli app. Parses the arguments slice and routes
+ to the proper flag/args combination
+
+func (a *App) RunAndExitOnError()
+ RunAndExitOnError calls .Run() and exits non-zero if an error was returned
+
+ Deprecated: instead you should return an error that fulfills cli.ExitCoder
+ to cli.App.Run. This will cause the application to exit with the given error
+ code in the cli.ExitCoder
+
+func (a *App) RunAsSubcommand(ctx *Context) (err error)
+ RunAsSubcommand invokes the subcommand given the context, parses ctx.Args()
+ to generate command-specific flags
+
+func (a *App) RunContext(ctx context.Context, arguments []string) (err error)
+ RunContext is like Run except it takes a Context that will be passed to its
+ commands and sub-commands. Through this, you can propagate timeouts and
+ cancellation requests
+
+func (a *App) Setup()
+ Setup runs initialization code to ensure all data structures are ready for
+ `Run` or inspection prior to `Run`. It is internally called by `Run`, but
+ will return early if setup has already happened.
+
+func (a *App) ToFishCompletion() (string, error)
+ ToFishCompletion creates a fish completion string for the `*App` The
+ function errors if either parsing or writing of the string fails.
+
+func (a *App) ToMan() (string, error)
+ ToMan creates a man page string for the `*App` The function errors if either
+ parsing or writing of the string fails.
+
+func (a *App) ToManWithSection(sectionNumber int) (string, error)
+ ToMan creates a man page string with section number for the `*App` The
+ function errors if either parsing or writing of the string fails.
+
+func (a *App) ToMarkdown() (string, error)
+ ToMarkdown creates a markdown string for the `*App` The function errors if
+ either parsing or writing of the string fails.
+
+func (a *App) VisibleCategories() []CommandCategory
+ VisibleCategories returns a slice of categories and commands that are
+ Hidden=false
+
+func (a *App) VisibleCommands() []*Command
+ VisibleCommands returns a slice of the Commands with Hidden=false
+
+func (a *App) VisibleFlagCategories() []VisibleFlagCategory
+ VisibleFlagCategories returns a slice containing all the categories with the
+ flags they contain
+
+func (a *App) VisibleFlags() []Flag
+ VisibleFlags returns a slice of the Flags with Hidden=false
+
+type Args interface {
+ // Get returns the nth argument, or else a blank string
+ Get(n int) string
+ // First returns the first argument, or else a blank string
+ First() string
+ // Tail returns the rest of the arguments (not the first one)
+ // or else an empty string slice
+ Tail() []string
+ // Len returns the length of the wrapped slice
+ Len() int
+ // Present checks if there are any arguments present
+ Present() bool
+ // Slice returns a copy of the internal slice
+ Slice() []string
+}
+
+type Author struct {
+ Name string // The Authors name
+ Email string // The Authors email
+}
+ Author represents someone who has contributed to a cli project.
+
+func (a *Author) String() string
+ String makes Author comply to the Stringer interface, to allow an easy print
+ in the templating process
+
+type BashCompleteFunc func(*Context)
+ BashCompleteFunc is an action to execute when the shell completion flag is
+ set
+
+type BeforeFunc func(*Context) error
+ BeforeFunc is an action to execute before any subcommands are run, but after
+ the context is ready if a non-nil error is returned, no subcommands are run
+
+type BoolFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value bool
+ Destination *bool
+
+ Aliases []string
+ EnvVars []string
+}
+ BoolFlag is a flag with type bool
+
+func (f *BoolFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *BoolFlag) Get(ctx *Context) bool
+ Get returns the flag’s value in the given Context.
+
+func (f *BoolFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *BoolFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *BoolFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *BoolFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *BoolFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *BoolFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *BoolFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *BoolFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *BoolFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *BoolFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *BoolFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type CategorizableFlag interface {
+ VisibleFlag
+
+ GetCategory() string
+}
+ CategorizableFlag is an interface that allows us to potentially use a flag
+ in a categorized representation.
+
+type Command struct {
+ // The name of the command
+ Name string
+ // A list of aliases for the command
+ Aliases []string
+ // A short description of the usage of this command
+ Usage string
+ // Custom text to show on USAGE section of help
+ UsageText string
+ // A longer explanation of how the command works
+ Description string
+ // A short description of the arguments of this command
+ ArgsUsage string
+ // The category the command is part of
+ Category string
+ // The function to call when checking for bash command completions
+ BashComplete BashCompleteFunc
+ // An action to execute before any sub-subcommands are run, but after the context is ready
+ // If a non-nil error is returned, no sub-subcommands are run
+ Before BeforeFunc
+ // An action to execute after any subcommands are run, but after the subcommand has finished
+ // It is run even if Action() panics
+ After AfterFunc
+ // The function to call when this command is invoked
+ Action ActionFunc
+ // Execute this function if a usage error occurs.
+ OnUsageError OnUsageErrorFunc
+ // List of child commands
+ Subcommands []*Command
+ // List of flags to parse
+ Flags []Flag
+
+ // Treat all flags as normal arguments if true
+ SkipFlagParsing bool
+ // Boolean to hide built-in help command and help flag
+ HideHelp bool
+ // Boolean to hide built-in help command but keep help flag
+ // Ignored if HideHelp is true.
+ HideHelpCommand bool
+ // Boolean to hide this command from help or completion
+ Hidden bool
+ // Boolean to enable short-option handling so user can combine several
+ // single-character bool arguments into one
+ // i.e. foobar -o -v -> foobar -ov
+ UseShortOptionHandling bool
+
+ // Full name of command for help, defaults to full command name, including parent commands.
+ HelpName string
+
+ // CustomHelpTemplate the text template for the command help topic.
+ // cli.go uses text/template to render templates. You can
+ // render custom help text by setting this variable.
+ CustomHelpTemplate string
+ // Has unexported fields.
+}
+ Command is a subcommand for a cli.App.
+
+func (c *Command) FullName() string
+ FullName returns the full name of the command. For subcommands this ensures
+ that parent commands are part of the command path
+
+func (c *Command) HasName(name string) bool
+ HasName returns true if Command.Name matches given name
+
+func (c *Command) Names() []string
+ Names returns the names including short names and aliases.
+
+func (c *Command) Run(ctx *Context) (err error)
+ Run invokes the command given the context, parses ctx.Args() to generate
+ command-specific flags
+
+func (c *Command) VisibleFlagCategories() []VisibleFlagCategory
+ VisibleFlagCategories returns a slice containing all the visible flag
+ categories with the flags they contain
+
+func (c *Command) VisibleFlags() []Flag
+ VisibleFlags returns a slice of the Flags with Hidden=false
+
+type CommandCategories interface {
+ // AddCommand adds a command to a category, creating a new category if necessary.
+ AddCommand(category string, command *Command)
+ // Categories returns a slice of categories sorted by name
+ Categories() []CommandCategory
+}
+ CommandCategories interface allows for category manipulation
+
+type CommandCategory interface {
+ // Name returns the category name string
+ Name() string
+ // VisibleCommands returns a slice of the Commands with Hidden=false
+ VisibleCommands() []*Command
+}
+ CommandCategory is a category containing commands.
+
+type CommandNotFoundFunc func(*Context, string)
+ CommandNotFoundFunc is executed if the proper command cannot be found
+
+type Commands []*Command
+
+type CommandsByName []*Command
+
+func (c CommandsByName) Len() int
+
+func (c CommandsByName) Less(i, j int) bool
+
+func (c CommandsByName) Swap(i, j int)
+
+type Context struct {
+ context.Context
+ App *App
+ Command *Command
+
+ // Has unexported fields.
+}
+ Context is a type that is passed through to each Handler action in a cli
+ application. Context can be used to retrieve context-specific args and
+ parsed command-line options.
+
+func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context
+ NewContext creates a new context. For use in when invoking an App or Command
+ action.
+
+func (cCtx *Context) Args() Args
+ Args returns the command line arguments associated with the context.
+
+func (cCtx *Context) Bool(name string) bool
+ Bool looks up the value of a local BoolFlag, returns false if not found
+
+func (cCtx *Context) Duration(name string) time.Duration
+ Duration looks up the value of a local DurationFlag, returns 0 if not found
+
+func (cCtx *Context) FlagNames() []string
+ FlagNames returns a slice of flag names used by the this context and all of
+ its parent contexts.
+
+func (cCtx *Context) Float64(name string) float64
+ Float64 looks up the value of a local Float64Flag, returns 0 if not found
+
+func (cCtx *Context) Float64Slice(name string) []float64
+ Float64Slice looks up the value of a local Float64SliceFlag, returns nil if
+ not found
+
+func (cCtx *Context) Generic(name string) interface{}
+ Generic looks up the value of a local GenericFlag, returns nil if not found
+
+func (cCtx *Context) Int(name string) int
+ Int looks up the value of a local IntFlag, returns 0 if not found
+
+func (cCtx *Context) Int64(name string) int64
+ Int64 looks up the value of a local Int64Flag, returns 0 if not found
+
+func (cCtx *Context) Int64Slice(name string) []int64
+ Int64Slice looks up the value of a local Int64SliceFlag, returns nil if not
+ found
+
+func (cCtx *Context) IntSlice(name string) []int
+ IntSlice looks up the value of a local IntSliceFlag, returns nil if not
+ found
+
+func (cCtx *Context) IsSet(name string) bool
+ IsSet determines if the flag was actually set
+
+func (cCtx *Context) Lineage() []*Context
+ Lineage returns *this* context and all of its ancestor contexts in order
+ from child to parent
+
+func (cCtx *Context) LocalFlagNames() []string
+ LocalFlagNames returns a slice of flag names used in this context.
+
+func (cCtx *Context) NArg() int
+ NArg returns the number of the command line arguments.
+
+func (cCtx *Context) NumFlags() int
+ NumFlags returns the number of flags set
+
+func (cCtx *Context) Path(name string) string
+ Path looks up the value of a local PathFlag, returns "" if not found
+
+func (cCtx *Context) Set(name, value string) error
+ Set sets a context flag to a value.
+
+func (cCtx *Context) String(name string) string
+ String looks up the value of a local StringFlag, returns "" if not found
+
+func (cCtx *Context) StringSlice(name string) []string
+ StringSlice looks up the value of a local StringSliceFlag, returns nil if
+ not found
+
+func (cCtx *Context) Timestamp(name string) *time.Time
+ Timestamp gets the timestamp from a flag name
+
+func (cCtx *Context) Uint(name string) uint
+ Uint looks up the value of a local UintFlag, returns 0 if not found
+
+func (cCtx *Context) Uint64(name string) uint64
+ Uint64 looks up the value of a local Uint64Flag, returns 0 if not found
+
+func (cCtx *Context) Value(name string) interface{}
+ Value returns the value of the flag corresponding to `name`
+
+type DocGenerationFlag interface {
+ Flag
+
+ // TakesValue returns true if the flag takes a value, otherwise false
+ TakesValue() bool
+
+ // GetUsage returns the usage string for the flag
+ GetUsage() string
+
+ // GetValue returns the flags value as string representation and an empty
+ // string if the flag takes no value at all.
+ GetValue() string
+
+ // GetDefaultText returns the default text for this flag
+ GetDefaultText() string
+
+ // GetEnvVars returns the env vars for this flag
+ GetEnvVars() []string
+}
+ DocGenerationFlag is an interface that allows documentation generation for
+ the flag
+
+type DurationFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value time.Duration
+ Destination *time.Duration
+
+ Aliases []string
+ EnvVars []string
+}
+ DurationFlag is a flag with type time.Duration
+
+func (f *DurationFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *DurationFlag) Get(ctx *Context) time.Duration
+ Get returns the flag’s value in the given Context.
+
+func (f *DurationFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *DurationFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *DurationFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *DurationFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *DurationFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *DurationFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *DurationFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *DurationFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *DurationFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *DurationFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *DurationFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type ErrorFormatter interface {
+ Format(s fmt.State, verb rune)
+}
+ ErrorFormatter is the interface that will suitably format the error output
+
+type ExitCoder interface {
+ error
+ ExitCode() int
+}
+ ExitCoder is the interface checked by `App` and `Command` for a custom exit
+ code
+
+func Exit(message interface{}, exitCode int) ExitCoder
+ Exit wraps a message and exit code into an error, which by default is
+ handled with a call to os.Exit during default error handling.
+
+ This is the simplest way to trigger a non-zero exit code for an App without
+ having to call os.Exit manually. During testing, this behavior can be
+ avoided by overiding the ExitErrHandler function on an App or the
+ package-global OsExiter function.
+
+func NewExitError(message interface{}, exitCode int) ExitCoder
+ NewExitError calls Exit to create a new ExitCoder.
+
+ Deprecated: This function is a duplicate of Exit and will eventually be
+ removed.
+
+type ExitErrHandlerFunc func(cCtx *Context, err error)
+ ExitErrHandlerFunc is executed if provided in order to handle exitError
+ values returned by Actions and Before/After functions.
+
+type Flag interface {
+ fmt.Stringer
+ // Apply Flag settings to the given flag set
+ Apply(*flag.FlagSet) error
+ Names() []string
+ IsSet() bool
+}
+ Flag is a common interface related to parsing flags in cli. For more
+ advanced flag parsing techniques, it is recommended that this interface be
+ implemented.
+
+var BashCompletionFlag Flag = &BoolFlag{
+ Name: "generate-bash-completion",
+ Hidden: true,
+}
+ BashCompletionFlag enables bash-completion for all commands and subcommands
+
+var HelpFlag Flag = &BoolFlag{
+ Name: "help",
+ Aliases: []string{"h"},
+ Usage: "show help",
+}
+ HelpFlag prints the help for all commands and subcommands. Set to nil to
+ disable the flag. The subcommand will still be added unless HideHelp or
+ HideHelpCommand is set to true.
+
+var VersionFlag Flag = &BoolFlag{
+ Name: "version",
+ Aliases: []string{"v"},
+ Usage: "print the version",
+}
+ VersionFlag prints the version for the application
+
+type FlagCategories interface {
+ // AddFlags adds a flag to a category, creating a new category if necessary.
+ AddFlag(category string, fl Flag)
+ // VisibleCategories returns a slice of visible flag categories sorted by name
+ VisibleCategories() []VisibleFlagCategory
+}
+ FlagCategories interface allows for category manipulation
+
+type FlagEnvHintFunc func(envVars []string, str string) string
+ FlagEnvHintFunc is used by the default FlagStringFunc to annotate flag help
+ with the environment variable details.
+
+var FlagEnvHinter FlagEnvHintFunc = withEnvHint
+ FlagEnvHinter annotates flag help message with the environment variable
+ details. This is used by the default FlagStringer.
+
+type FlagFileHintFunc func(filePath, str string) string
+ FlagFileHintFunc is used by the default FlagStringFunc to annotate flag help
+ with the file path details.
+
+var FlagFileHinter FlagFileHintFunc = withFileHint
+ FlagFileHinter annotates flag help message with the environment variable
+ details. This is used by the default FlagStringer.
+
+type FlagNamePrefixFunc func(fullName []string, placeholder string) string
+ FlagNamePrefixFunc is used by the default FlagStringFunc to create prefix
+ text for a flag's full name.
+
+var FlagNamePrefixer FlagNamePrefixFunc = prefixedNames
+ FlagNamePrefixer converts a full flag name and its placeholder into the help
+ message flag prefix. This is used by the default FlagStringer.
+
+type FlagStringFunc func(Flag) string
+ FlagStringFunc is used by the help generation to display a flag, which is
+ expected to be a single line.
+
+var FlagStringer FlagStringFunc = stringifyFlag
+ FlagStringer converts a flag definition to a string. This is used by help to
+ display a flag.
+
+type FlagsByName []Flag
+ FlagsByName is a slice of Flag.
+
+func (f FlagsByName) Len() int
+
+func (f FlagsByName) Less(i, j int) bool
+
+func (f FlagsByName) Swap(i, j int)
+
+type Float64Flag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value float64
+ Destination *float64
+
+ Aliases []string
+ EnvVars []string
+}
+ Float64Flag is a flag with type float64
+
+func (f *Float64Flag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *Float64Flag) Get(ctx *Context) float64
+ Get returns the flag’s value in the given Context.
+
+func (f *Float64Flag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *Float64Flag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *Float64Flag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *Float64Flag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *Float64Flag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *Float64Flag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *Float64Flag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *Float64Flag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *Float64Flag) Names() []string
+ Names returns the names of the flag
+
+func (f *Float64Flag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *Float64Flag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type Float64Slice struct {
+ // Has unexported fields.
+}
+ Float64Slice wraps []float64 to satisfy flag.Value
+
+func NewFloat64Slice(defaults ...float64) *Float64Slice
+ NewFloat64Slice makes a *Float64Slice with default values
+
+func (f *Float64Slice) Get() interface{}
+ Get returns the slice of float64s set by this flag
+
+func (f *Float64Slice) Serialize() string
+ Serialize allows Float64Slice to fulfill Serializer
+
+func (f *Float64Slice) Set(value string) error
+ Set parses the value into a float64 and appends it to the list of values
+
+func (f *Float64Slice) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *Float64Slice) Value() []float64
+ Value returns the slice of float64s set by this flag
+
+type Float64SliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *Float64Slice
+ Destination *Float64Slice
+
+ Aliases []string
+ EnvVars []string
+}
+ Float64SliceFlag is a flag with type *Float64Slice
+
+func (f *Float64SliceFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *Float64SliceFlag) Get(ctx *Context) []float64
+ Get returns the flag’s value in the given Context.
+
+func (f *Float64SliceFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *Float64SliceFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *Float64SliceFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *Float64SliceFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *Float64SliceFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *Float64SliceFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *Float64SliceFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *Float64SliceFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *Float64SliceFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *Float64SliceFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *Float64SliceFlag) TakesValue() bool
+ TakesValue returns true if the flag takes a value, otherwise false
+
+type Generic interface {
+ Set(value string) error
+ String() string
+}
+ Generic is a generic parseable type identified by a specific flag
+
+type GenericFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value Generic
+ Destination *Generic
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+ GenericFlag is a flag with type Generic
+
+func (f GenericFlag) Apply(set *flag.FlagSet) error
+ Apply takes the flagset and calls Set on the generic flag with the value
+ provided by the user for parsing by the flag
+
+func (f *GenericFlag) Get(ctx *Context) interface{}
+ Get returns the flag’s value in the given Context.
+
+func (f *GenericFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *GenericFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *GenericFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *GenericFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *GenericFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *GenericFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *GenericFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *GenericFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *GenericFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *GenericFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *GenericFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type Int64Flag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value int64
+ Destination *int64
+
+ Aliases []string
+ EnvVars []string
+}
+ Int64Flag is a flag with type int64
+
+func (f *Int64Flag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *Int64Flag) Get(ctx *Context) int64
+ Get returns the flag’s value in the given Context.
+
+func (f *Int64Flag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *Int64Flag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *Int64Flag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *Int64Flag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *Int64Flag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *Int64Flag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *Int64Flag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *Int64Flag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *Int64Flag) Names() []string
+ Names returns the names of the flag
+
+func (f *Int64Flag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *Int64Flag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type Int64Slice struct {
+ // Has unexported fields.
+}
+ Int64Slice wraps []int64 to satisfy flag.Value
+
+func NewInt64Slice(defaults ...int64) *Int64Slice
+ NewInt64Slice makes an *Int64Slice with default values
+
+func (i *Int64Slice) Get() interface{}
+ Get returns the slice of ints set by this flag
+
+func (i *Int64Slice) Serialize() string
+ Serialize allows Int64Slice to fulfill Serializer
+
+func (i *Int64Slice) Set(value string) error
+ Set parses the value into an integer and appends it to the list of values
+
+func (i *Int64Slice) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (i *Int64Slice) Value() []int64
+ Value returns the slice of ints set by this flag
+
+type Int64SliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *Int64Slice
+ Destination *Int64Slice
+
+ Aliases []string
+ EnvVars []string
+}
+ Int64SliceFlag is a flag with type *Int64Slice
+
+func (f *Int64SliceFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *Int64SliceFlag) Get(ctx *Context) []int64
+ Get returns the flag’s value in the given Context.
+
+func (f *Int64SliceFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *Int64SliceFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *Int64SliceFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *Int64SliceFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *Int64SliceFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *Int64SliceFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *Int64SliceFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *Int64SliceFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *Int64SliceFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *Int64SliceFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *Int64SliceFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type IntFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value int
+ Destination *int
+
+ Aliases []string
+ EnvVars []string
+}
+ IntFlag is a flag with type int
+
+func (f *IntFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *IntFlag) Get(ctx *Context) int
+ Get returns the flag’s value in the given Context.
+
+func (f *IntFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *IntFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *IntFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *IntFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *IntFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *IntFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *IntFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *IntFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *IntFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *IntFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *IntFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type IntSlice struct {
+ // Has unexported fields.
+}
+ IntSlice wraps []int to satisfy flag.Value
+
+func NewIntSlice(defaults ...int) *IntSlice
+ NewIntSlice makes an *IntSlice with default values
+
+func (i *IntSlice) Get() interface{}
+ Get returns the slice of ints set by this flag
+
+func (i *IntSlice) Serialize() string
+ Serialize allows IntSlice to fulfill Serializer
+
+func (i *IntSlice) Set(value string) error
+ Set parses the value into an integer and appends it to the list of values
+
+func (i *IntSlice) SetInt(value int)
+ TODO: Consistently have specific Set function for Int64 and Float64 ? SetInt
+ directly adds an integer to the list of values
+
+func (i *IntSlice) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (i *IntSlice) Value() []int
+ Value returns the slice of ints set by this flag
+
+type IntSliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *IntSlice
+ Destination *IntSlice
+
+ Aliases []string
+ EnvVars []string
+}
+ IntSliceFlag is a flag with type *IntSlice
+
+func (f *IntSliceFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *IntSliceFlag) Get(ctx *Context) []int
+ Get returns the flag’s value in the given Context.
+
+func (f *IntSliceFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *IntSliceFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *IntSliceFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *IntSliceFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *IntSliceFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *IntSliceFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *IntSliceFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *IntSliceFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *IntSliceFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *IntSliceFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *IntSliceFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type MultiError interface {
+ error
+ Errors() []error
+}
+ MultiError is an error that wraps multiple errors.
+
+type OnUsageErrorFunc func(cCtx *Context, err error, isSubcommand bool) error
+ OnUsageErrorFunc is executed if a usage error occurs. This is useful for
+ displaying customized usage error messages. This function is able to replace
+ the original error messages. If this function is not set, the "Incorrect
+ usage" is displayed and the execution is interrupted.
+
+type Path = string
+
+type PathFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value Path
+ Destination *Path
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+ PathFlag is a flag with type Path
+
+func (f *PathFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *PathFlag) Get(ctx *Context) string
+ Get returns the flag’s value in the given Context.
+
+func (f *PathFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *PathFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *PathFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *PathFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *PathFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *PathFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *PathFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *PathFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *PathFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *PathFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *PathFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type RequiredFlag interface {
+ Flag
+
+ IsRequired() bool
+}
+ RequiredFlag is an interface that allows us to mark flags as required it
+ allows flags required flags to be backwards compatible with the Flag
+ interface
+
+type Serializer interface {
+ Serialize() string
+}
+ Serializer is used to circumvent the limitations of flag.FlagSet.Set
+
+type StringFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value string
+ Destination *string
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+ StringFlag is a flag with type string
+
+func (f *StringFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *StringFlag) Get(ctx *Context) string
+ Get returns the flag’s value in the given Context.
+
+func (f *StringFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *StringFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *StringFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *StringFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *StringFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *StringFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *StringFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *StringFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *StringFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *StringFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *StringFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type StringSlice struct {
+ // Has unexported fields.
+}
+ StringSlice wraps a []string to satisfy flag.Value
+
+func NewStringSlice(defaults ...string) *StringSlice
+ NewStringSlice creates a *StringSlice with default values
+
+func (s *StringSlice) Get() interface{}
+ Get returns the slice of strings set by this flag
+
+func (s *StringSlice) Serialize() string
+ Serialize allows StringSlice to fulfill Serializer
+
+func (s *StringSlice) Set(value string) error
+ Set appends the string value to the list of values
+
+func (s *StringSlice) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (s *StringSlice) Value() []string
+ Value returns the slice of strings set by this flag
+
+type StringSliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *StringSlice
+ Destination *StringSlice
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+ StringSliceFlag is a flag with type *StringSlice
+
+func (f *StringSliceFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *StringSliceFlag) Get(ctx *Context) []string
+ Get returns the flag’s value in the given Context.
+
+func (f *StringSliceFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *StringSliceFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *StringSliceFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *StringSliceFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *StringSliceFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *StringSliceFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *StringSliceFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *StringSliceFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *StringSliceFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *StringSliceFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *StringSliceFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type SuggestCommandFunc func(commands []*Command, provided string) string
+
+type SuggestFlagFunc func(flags []Flag, provided string, hideHelp bool) string
+
+type Timestamp struct {
+ // Has unexported fields.
+}
+ Timestamp wrap to satisfy golang's flag interface.
+
+func NewTimestamp(timestamp time.Time) *Timestamp
+ Timestamp constructor
+
+func (t *Timestamp) Get() interface{}
+ Get returns the flag structure
+
+func (t *Timestamp) Set(value string) error
+ Parses the string value to timestamp
+
+func (t *Timestamp) SetLayout(layout string)
+ Set the timestamp string layout for future parsing
+
+func (t *Timestamp) SetTimestamp(value time.Time)
+ Set the timestamp value directly
+
+func (t *Timestamp) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (t *Timestamp) Value() *time.Time
+ Value returns the timestamp value stored in the flag
+
+type TimestampFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *Timestamp
+ Destination *Timestamp
+
+ Aliases []string
+ EnvVars []string
+
+ Layout string
+}
+ TimestampFlag is a flag with type *Timestamp
+
+func (f *TimestampFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *TimestampFlag) Get(ctx *Context) *time.Time
+ Get returns the flag’s value in the given Context.
+
+func (f *TimestampFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *TimestampFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *TimestampFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *TimestampFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *TimestampFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *TimestampFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *TimestampFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *TimestampFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *TimestampFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *TimestampFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *TimestampFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type Uint64Flag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value uint64
+ Destination *uint64
+
+ Aliases []string
+ EnvVars []string
+}
+ Uint64Flag is a flag with type uint64
+
+func (f *Uint64Flag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *Uint64Flag) Get(ctx *Context) uint64
+ Get returns the flag’s value in the given Context.
+
+func (f *Uint64Flag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *Uint64Flag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *Uint64Flag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *Uint64Flag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *Uint64Flag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *Uint64Flag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *Uint64Flag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *Uint64Flag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *Uint64Flag) Names() []string
+ Names returns the names of the flag
+
+func (f *Uint64Flag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *Uint64Flag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type UintFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value uint
+ Destination *uint
+
+ Aliases []string
+ EnvVars []string
+}
+ UintFlag is a flag with type uint
+
+func (f *UintFlag) Apply(set *flag.FlagSet) error
+ Apply populates the flag given the flag set and environment
+
+func (f *UintFlag) Get(ctx *Context) uint
+ Get returns the flag’s value in the given Context.
+
+func (f *UintFlag) GetCategory() string
+ GetCategory returns the category for the flag
+
+func (f *UintFlag) GetDefaultText() string
+ GetDefaultText returns the default text for this flag
+
+func (f *UintFlag) GetEnvVars() []string
+ GetEnvVars returns the env vars for this flag
+
+func (f *UintFlag) GetUsage() string
+ GetUsage returns the usage string for the flag
+
+func (f *UintFlag) GetValue() string
+ GetValue returns the flags value as string representation and an empty
+ string if the flag takes no value at all.
+
+func (f *UintFlag) IsRequired() bool
+ IsRequired returns whether or not the flag is required
+
+func (f *UintFlag) IsSet() bool
+ IsSet returns whether or not the flag has been set through env or file
+
+func (f *UintFlag) IsVisible() bool
+ IsVisible returns true if the flag is not hidden, otherwise false
+
+func (f *UintFlag) Names() []string
+ Names returns the names of the flag
+
+func (f *UintFlag) String() string
+ String returns a readable representation of this value (for usage defaults)
+
+func (f *UintFlag) TakesValue() bool
+ TakesValue returns true of the flag takes a value, otherwise false
+
+type VisibleFlag interface {
+ Flag
+
+ // IsVisible returns true if the flag is not hidden, otherwise false
+ IsVisible() bool
+}
+ VisibleFlag is an interface that allows to check if a flag is visible
+
+type VisibleFlagCategory interface {
+ // Name returns the category name string
+ Name() string
+ // Flags returns a slice of VisibleFlag sorted by name
+ Flags() []VisibleFlag
+}
+ VisibleFlagCategory is a category containing flags.
+
+package altsrc // import "github.com/urfave/cli/v2/altsrc"
+
+
+FUNCTIONS
+
+func ApplyInputSourceValues(cCtx *cli.Context, inputSourceContext InputSourceContext, flags []cli.Flag) error
+ ApplyInputSourceValues iterates over all provided flags and executes
+ ApplyInputSourceValue on flags implementing the FlagInputSourceExtension
+ interface to initialize these flags to an alternate input source.
+
+func InitInputSource(flags []cli.Flag, createInputSource func() (InputSourceContext, error)) cli.BeforeFunc
+ InitInputSource is used to to setup an InputSourceContext on a cli.Command
+ Before method. It will create a new input source based on the func provided.
+ If there is no error it will then apply the new input source to any flags
+ that are supported by the input source
+
+func InitInputSourceWithContext(flags []cli.Flag, createInputSource func(cCtx *cli.Context) (InputSourceContext, error)) cli.BeforeFunc
+ InitInputSourceWithContext is used to to setup an InputSourceContext on a
+ cli.Command Before method. It will create a new input source based on the
+ func provided with potentially using existing cli.Context values to
+ initialize itself. If there is no error it will then apply the new input
+ source to any flags that are supported by the input source
+
+func NewJSONSourceFromFlagFunc(flag string) func(c *cli.Context) (InputSourceContext, error)
+ NewJSONSourceFromFlagFunc returns a func that takes a cli.Context and
+ returns an InputSourceContext suitable for retrieving config variables from
+ a file containing JSON data with the file name defined by the given flag.
+
+func NewTomlSourceFromFlagFunc(flagFileName string) func(cCtx *cli.Context) (InputSourceContext, error)
+ NewTomlSourceFromFlagFunc creates a new TOML InputSourceContext from a
+ provided flag name and source context.
+
+func NewYamlSourceFromFlagFunc(flagFileName string) func(cCtx *cli.Context) (InputSourceContext, error)
+ NewYamlSourceFromFlagFunc creates a new Yaml InputSourceContext from a
+ provided flag name and source context.
+
+
+TYPES
+
+type BoolFlag struct {
+ *cli.BoolFlag
+ // Has unexported fields.
+}
+ BoolFlag is the flag type that wraps cli.BoolFlag to allow for other values
+ to be specified
+
+func NewBoolFlag(fl *cli.BoolFlag) *BoolFlag
+ NewBoolFlag creates a new BoolFlag
+
+func (f *BoolFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ BoolFlag.Apply
+
+func (f *BoolFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a Bool value to the flagSet if required
+
+type DurationFlag struct {
+ *cli.DurationFlag
+ // Has unexported fields.
+}
+ DurationFlag is the flag type that wraps cli.DurationFlag to allow for other
+ values to be specified
+
+func NewDurationFlag(fl *cli.DurationFlag) *DurationFlag
+ NewDurationFlag creates a new DurationFlag
+
+func (f *DurationFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ DurationFlag.Apply
+
+func (f *DurationFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a Duration value to the flagSet if required
+
+type FlagInputSourceExtension interface {
+ cli.Flag
+ ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+}
+ FlagInputSourceExtension is an extension interface of cli.Flag that allows a
+ value to be set on the existing parsed flags.
+
+type Float64Flag struct {
+ *cli.Float64Flag
+ // Has unexported fields.
+}
+ Float64Flag is the flag type that wraps cli.Float64Flag to allow for other
+ values to be specified
+
+func NewFloat64Flag(fl *cli.Float64Flag) *Float64Flag
+ NewFloat64Flag creates a new Float64Flag
+
+func (f *Float64Flag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ Float64Flag.Apply
+
+func (f *Float64Flag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a Float64 value to the flagSet if required
+
+type Float64SliceFlag struct {
+ *cli.Float64SliceFlag
+ // Has unexported fields.
+}
+ Float64SliceFlag is the flag type that wraps cli.Float64SliceFlag to allow
+ for other values to be specified
+
+func NewFloat64SliceFlag(fl *cli.Float64SliceFlag) *Float64SliceFlag
+ NewFloat64SliceFlag creates a new Float64SliceFlag
+
+func (f *Float64SliceFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ Float64SliceFlag.Apply
+
+type GenericFlag struct {
+ *cli.GenericFlag
+ // Has unexported fields.
+}
+ GenericFlag is the flag type that wraps cli.GenericFlag to allow for other
+ values to be specified
+
+func NewGenericFlag(fl *cli.GenericFlag) *GenericFlag
+ NewGenericFlag creates a new GenericFlag
+
+func (f *GenericFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ GenericFlag.Apply
+
+func (f *GenericFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a generic value to the flagSet if required
+
+type InputSourceContext interface {
+ Source() string
+
+ Int(name string) (int, error)
+ Duration(name string) (time.Duration, error)
+ Float64(name string) (float64, error)
+ String(name string) (string, error)
+ StringSlice(name string) ([]string, error)
+ IntSlice(name string) ([]int, error)
+ Generic(name string) (cli.Generic, error)
+ Bool(name string) (bool, error)
+
+ // Has unexported methods.
+}
+ InputSourceContext is an interface used to allow other input sources to be
+ implemented as needed.
+
+ Source returns an identifier for the input source. In case of file source it
+ should return path to the file.
+
+func NewJSONSource(data []byte) (InputSourceContext, error)
+ NewJSONSource returns an InputSourceContext suitable for retrieving config
+ variables from raw JSON data.
+
+func NewJSONSourceFromFile(f string) (InputSourceContext, error)
+ NewJSONSourceFromFile returns an InputSourceContext suitable for retrieving
+ config variables from a file (or url) containing JSON data.
+
+func NewJSONSourceFromReader(r io.Reader) (InputSourceContext, error)
+ NewJSONSourceFromReader returns an InputSourceContext suitable for
+ retrieving config variables from an io.Reader that returns JSON data.
+
+func NewTomlSourceFromFile(file string) (InputSourceContext, error)
+ NewTomlSourceFromFile creates a new TOML InputSourceContext from a filepath.
+
+func NewYamlSourceFromFile(file string) (InputSourceContext, error)
+ NewYamlSourceFromFile creates a new Yaml InputSourceContext from a filepath.
+
+type Int64Flag struct {
+ *cli.Int64Flag
+ // Has unexported fields.
+}
+ Int64Flag is the flag type that wraps cli.Int64Flag to allow for other
+ values to be specified
+
+func NewInt64Flag(fl *cli.Int64Flag) *Int64Flag
+ NewInt64Flag creates a new Int64Flag
+
+func (f *Int64Flag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ Int64Flag.Apply
+
+type Int64SliceFlag struct {
+ *cli.Int64SliceFlag
+ // Has unexported fields.
+}
+ Int64SliceFlag is the flag type that wraps cli.Int64SliceFlag to allow for
+ other values to be specified
+
+func NewInt64SliceFlag(fl *cli.Int64SliceFlag) *Int64SliceFlag
+ NewInt64SliceFlag creates a new Int64SliceFlag
+
+func (f *Int64SliceFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ Int64SliceFlag.Apply
+
+type IntFlag struct {
+ *cli.IntFlag
+ // Has unexported fields.
+}
+ IntFlag is the flag type that wraps cli.IntFlag to allow for other values to
+ be specified
+
+func NewIntFlag(fl *cli.IntFlag) *IntFlag
+ NewIntFlag creates a new IntFlag
+
+func (f *IntFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ IntFlag.Apply
+
+func (f *IntFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a int value to the flagSet if required
+
+type IntSliceFlag struct {
+ *cli.IntSliceFlag
+ // Has unexported fields.
+}
+ IntSliceFlag is the flag type that wraps cli.IntSliceFlag to allow for other
+ values to be specified
+
+func NewIntSliceFlag(fl *cli.IntSliceFlag) *IntSliceFlag
+ NewIntSliceFlag creates a new IntSliceFlag
+
+func (f *IntSliceFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ IntSliceFlag.Apply
+
+func (f *IntSliceFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a IntSlice value if required
+
+type MapInputSource struct {
+ // Has unexported fields.
+}
+ MapInputSource implements InputSourceContext to return data from the map
+ that is loaded.
+
+func NewMapInputSource(file string, valueMap map[interface{}]interface{}) *MapInputSource
+ NewMapInputSource creates a new MapInputSource for implementing custom input
+ sources.
+
+func (fsm *MapInputSource) Bool(name string) (bool, error)
+ Bool returns an bool from the map otherwise returns false
+
+func (fsm *MapInputSource) Duration(name string) (time.Duration, error)
+ Duration returns a duration from the map if it exists otherwise returns 0
+
+func (fsm *MapInputSource) Float64(name string) (float64, error)
+ Float64 returns an float64 from the map if it exists otherwise returns 0
+
+func (fsm *MapInputSource) Generic(name string) (cli.Generic, error)
+ Generic returns an cli.Generic from the map if it exists otherwise returns
+ nil
+
+func (fsm *MapInputSource) Int(name string) (int, error)
+ Int returns an int from the map if it exists otherwise returns 0
+
+func (fsm *MapInputSource) IntSlice(name string) ([]int, error)
+ IntSlice returns an []int from the map if it exists otherwise returns nil
+
+func (fsm *MapInputSource) Source() string
+ Source returns the path of the source file
+
+func (fsm *MapInputSource) String(name string) (string, error)
+ String returns a string from the map if it exists otherwise returns an empty
+ string
+
+func (fsm *MapInputSource) StringSlice(name string) ([]string, error)
+ StringSlice returns an []string from the map if it exists otherwise returns
+ nil
+
+type PathFlag struct {
+ *cli.PathFlag
+ // Has unexported fields.
+}
+ PathFlag is the flag type that wraps cli.PathFlag to allow for other values
+ to be specified
+
+func NewPathFlag(fl *cli.PathFlag) *PathFlag
+ NewPathFlag creates a new PathFlag
+
+func (f *PathFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ PathFlag.Apply
+
+func (f *PathFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a Path value to the flagSet if required
+
+type StringFlag struct {
+ *cli.StringFlag
+ // Has unexported fields.
+}
+ StringFlag is the flag type that wraps cli.StringFlag to allow for other
+ values to be specified
+
+func NewStringFlag(fl *cli.StringFlag) *StringFlag
+ NewStringFlag creates a new StringFlag
+
+func (f *StringFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ StringFlag.Apply
+
+func (f *StringFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a String value to the flagSet if required
+
+type StringSliceFlag struct {
+ *cli.StringSliceFlag
+ // Has unexported fields.
+}
+ StringSliceFlag is the flag type that wraps cli.StringSliceFlag to allow for
+ other values to be specified
+
+func NewStringSliceFlag(fl *cli.StringSliceFlag) *StringSliceFlag
+ NewStringSliceFlag creates a new StringSliceFlag
+
+func (f *StringSliceFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ StringSliceFlag.Apply
+
+func (f *StringSliceFlag) ApplyInputSourceValue(cCtx *cli.Context, isc InputSourceContext) error
+ ApplyInputSourceValue applies a StringSlice value to the flagSet if required
+
+type Uint64Flag struct {
+ *cli.Uint64Flag
+ // Has unexported fields.
+}
+ Uint64Flag is the flag type that wraps cli.Uint64Flag to allow for other
+ values to be specified
+
+func NewUint64Flag(fl *cli.Uint64Flag) *Uint64Flag
+ NewUint64Flag creates a new Uint64Flag
+
+func (f *Uint64Flag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ Uint64Flag.Apply
+
+type UintFlag struct {
+ *cli.UintFlag
+ // Has unexported fields.
+}
+ UintFlag is the flag type that wraps cli.UintFlag to allow for other values
+ to be specified
+
+func NewUintFlag(fl *cli.UintFlag) *UintFlag
+ NewUintFlag creates a new UintFlag
+
+func (f *UintFlag) Apply(set *flag.FlagSet) error
+ Apply saves the flagSet for later usage calls, then calls the wrapped
+ UintFlag.Apply
+
diff --git a/vendor/github.com/urfave/cli/v2/help.go b/vendor/github.com/urfave/cli/v2/help.go
index 0a421ee9..ff59ddc8 100644
--- a/vendor/github.com/urfave/cli/v2/help.go
+++ b/vendor/github.com/urfave/cli/v2/help.go
@@ -10,34 +10,39 @@ import (
"unicode/utf8"
)
+const (
+ helpName = "help"
+ helpAlias = "h"
+)
+
var helpCommand = &Command{
- Name: "help",
- Aliases: []string{"h"},
+ Name: helpName,
+ Aliases: []string{helpAlias},
Usage: "Shows a list of commands or help for one command",
ArgsUsage: "[command]",
- Action: func(c *Context) error {
- args := c.Args()
+ Action: func(cCtx *Context) error {
+ args := cCtx.Args()
if args.Present() {
- return ShowCommandHelp(c, args.First())
+ return ShowCommandHelp(cCtx, args.First())
}
- _ = ShowAppHelp(c)
+ _ = ShowAppHelp(cCtx)
return nil
},
}
var helpSubcommand = &Command{
- Name: "help",
- Aliases: []string{"h"},
+ Name: helpName,
+ Aliases: []string{helpAlias},
Usage: "Shows a list of commands or help for one command",
ArgsUsage: "[command]",
- Action: func(c *Context) error {
- args := c.Args()
+ Action: func(cCtx *Context) error {
+ args := cCtx.Args()
if args.Present() {
- return ShowCommandHelp(c, args.First())
+ return ShowCommandHelp(cCtx, args.First())
}
- return ShowSubcommandHelp(c)
+ return ShowSubcommandHelp(cCtx)
},
}
@@ -71,30 +76,30 @@ func ShowAppHelpAndExit(c *Context, exitCode int) {
}
// ShowAppHelp is an action that displays the help.
-func ShowAppHelp(c *Context) error {
- tpl := c.App.CustomAppHelpTemplate
+func ShowAppHelp(cCtx *Context) error {
+ tpl := cCtx.App.CustomAppHelpTemplate
if tpl == "" {
tpl = AppHelpTemplate
}
- if c.App.ExtraInfo == nil {
- HelpPrinter(c.App.Writer, tpl, c.App)
+ if cCtx.App.ExtraInfo == nil {
+ HelpPrinter(cCtx.App.Writer, tpl, cCtx.App)
return nil
}
customAppData := func() map[string]interface{} {
return map[string]interface{}{
- "ExtraInfo": c.App.ExtraInfo,
+ "ExtraInfo": cCtx.App.ExtraInfo,
}
}
- HelpPrinterCustom(c.App.Writer, tpl, c.App, customAppData())
+ HelpPrinterCustom(cCtx.App.Writer, tpl, cCtx.App, customAppData())
return nil
}
// DefaultAppComplete prints the list of subcommands as the default app completion method
-func DefaultAppComplete(c *Context) {
- DefaultCompleteWithFlags(nil)(c)
+func DefaultAppComplete(cCtx *Context) {
+ DefaultCompleteWithFlags(nil)(cCtx)
}
func printCommandSuggestions(commands []*Command, writer io.Writer) {
@@ -102,7 +107,7 @@ func printCommandSuggestions(commands []*Command, writer io.Writer) {
if command.Hidden {
continue
}
- if os.Getenv("_CLI_ZSH_AUTOCOMPLETE_HACK") == "1" {
+ if strings.HasSuffix(os.Getenv("SHELL"), "zsh") {
for _, name := range command.Names() {
_, _ = fmt.Fprintf(writer, "%s:%s\n", name, command.Usage)
}
@@ -159,23 +164,30 @@ func printFlagSuggestions(lastArg string, flags []Flag, writer io.Writer) {
}
}
-func DefaultCompleteWithFlags(cmd *Command) func(c *Context) {
- return func(c *Context) {
+func DefaultCompleteWithFlags(cmd *Command) func(cCtx *Context) {
+ return func(cCtx *Context) {
if len(os.Args) > 2 {
lastArg := os.Args[len(os.Args)-2]
+
if strings.HasPrefix(lastArg, "-") {
- printFlagSuggestions(lastArg, c.App.Flags, c.App.Writer)
if cmd != nil {
- printFlagSuggestions(lastArg, cmd.Flags, c.App.Writer)
+ printFlagSuggestions(lastArg, cmd.Flags, cCtx.App.Writer)
+
+ return
}
+
+ printFlagSuggestions(lastArg, cCtx.App.Flags, cCtx.App.Writer)
+
return
}
}
+
if cmd != nil {
- printCommandSuggestions(cmd.Subcommands, c.App.Writer)
- } else {
- printCommandSuggestions(c.App.Commands, c.App.Writer)
+ printCommandSuggestions(cmd.Subcommands, cCtx.App.Writer)
+ return
}
+
+ printCommandSuggestions(cCtx.App.Commands, cCtx.App.Writer)
}
}
@@ -207,7 +219,13 @@ func ShowCommandHelp(ctx *Context, command string) error {
}
if ctx.App.CommandNotFound == nil {
- return Exit(fmt.Sprintf("No help topic for '%v'", command), 3)
+ errMsg := fmt.Sprintf("No help topic for '%v'", command)
+ if ctx.App.Suggest {
+ if suggestion := SuggestCommand(ctx.App.Commands, command); suggestion != "" {
+ errMsg += ". " + suggestion
+ }
+ }
+ return Exit(errMsg, 3)
}
ctx.App.CommandNotFound(ctx, command)
@@ -221,32 +239,32 @@ func ShowSubcommandHelpAndExit(c *Context, exitCode int) {
}
// ShowSubcommandHelp prints help for the given subcommand
-func ShowSubcommandHelp(c *Context) error {
- if c == nil {
+func ShowSubcommandHelp(cCtx *Context) error {
+ if cCtx == nil {
return nil
}
- if c.Command != nil {
- return ShowCommandHelp(c, c.Command.Name)
+ if cCtx.Command != nil {
+ return ShowCommandHelp(cCtx, cCtx.Command.Name)
}
- return ShowCommandHelp(c, "")
+ return ShowCommandHelp(cCtx, "")
}
// ShowVersion prints the version number of the App
-func ShowVersion(c *Context) {
- VersionPrinter(c)
+func ShowVersion(cCtx *Context) {
+ VersionPrinter(cCtx)
}
-func printVersion(c *Context) {
- _, _ = fmt.Fprintf(c.App.Writer, "%v version %v\n", c.App.Name, c.App.Version)
+func printVersion(cCtx *Context) {
+ _, _ = fmt.Fprintf(cCtx.App.Writer, "%v version %v\n", cCtx.App.Name, cCtx.App.Version)
}
// ShowCompletions prints the lists of commands within a given context
-func ShowCompletions(c *Context) {
- a := c.App
+func ShowCompletions(cCtx *Context) {
+ a := cCtx.App
if a != nil && a.BashComplete != nil {
- a.BashComplete(c)
+ a.BashComplete(cCtx)
}
}
@@ -297,20 +315,20 @@ func printHelp(out io.Writer, templ string, data interface{}) {
HelpPrinterCustom(out, templ, data, nil)
}
-func checkVersion(c *Context) bool {
+func checkVersion(cCtx *Context) bool {
found := false
for _, name := range VersionFlag.Names() {
- if c.Bool(name) {
+ if cCtx.Bool(name) {
found = true
}
}
return found
}
-func checkHelp(c *Context) bool {
+func checkHelp(cCtx *Context) bool {
found := false
for _, name := range HelpFlag.Names() {
- if c.Bool(name) {
+ if cCtx.Bool(name) {
found = true
}
}
@@ -326,9 +344,9 @@ func checkCommandHelp(c *Context, name string) bool {
return false
}
-func checkSubcommandHelp(c *Context) bool {
- if c.Bool("h") || c.Bool("help") {
- _ = ShowSubcommandHelp(c)
+func checkSubcommandHelp(cCtx *Context) bool {
+ if cCtx.Bool("h") || cCtx.Bool("help") {
+ _ = ShowSubcommandHelp(cCtx)
return true
}
@@ -350,20 +368,20 @@ func checkShellCompleteFlag(a *App, arguments []string) (bool, []string) {
return true, arguments[:pos]
}
-func checkCompletions(c *Context) bool {
- if !c.shellComplete {
+func checkCompletions(cCtx *Context) bool {
+ if !cCtx.shellComplete {
return false
}
- if args := c.Args(); args.Present() {
+ if args := cCtx.Args(); args.Present() {
name := args.First()
- if cmd := c.App.Command(name); cmd != nil {
+ if cmd := cCtx.App.Command(name); cmd != nil {
// let the command handle the completion
return false
}
}
- ShowCompletions(c)
+ ShowCompletions(cCtx)
return true
}
diff --git a/vendor/github.com/urfave/cli/v2/mkdocs-requirements.txt b/vendor/github.com/urfave/cli/v2/mkdocs-requirements.txt
new file mode 100644
index 00000000..482ad062
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/mkdocs-requirements.txt
@@ -0,0 +1,5 @@
+mkdocs-git-revision-date-localized-plugin~=1.0
+mkdocs-material-extensions~=1.0
+mkdocs-material~=8.2
+mkdocs~=1.3
+pygments~=2.12
diff --git a/vendor/github.com/urfave/cli/v2/mkdocs.yml b/vendor/github.com/urfave/cli/v2/mkdocs.yml
new file mode 100644
index 00000000..73b88c50
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/mkdocs.yml
@@ -0,0 +1,62 @@
+# NOTE: the mkdocs dependencies will need to be installed out of
+# band until this whole thing gets more automated:
+#
+# pip install -r mkdocs-requirements.txt
+#
+
+site_name: urfave/cli
+site_url: https://cli.urfave.org/
+repo_url: https://github.com/urfave/cli
+edit_uri: edit/main/docs/
+nav:
+ - Home: index.md
+ - v2 Manual: v2/index.md
+ - v1 Manual: v1/index.md
+theme:
+ name: material
+ palette:
+ - media: "(prefers-color-scheme: light)"
+ scheme: default
+ toggle:
+ icon: material/brightness-4
+ name: dark mode
+ - media: "(prefers-color-scheme: dark)"
+ scheme: slate
+ toggle:
+ icon: material/brightness-7
+ name: light mode
+plugins:
+ - git-revision-date-localized
+ - search
+# NOTE: this is the recommended configuration from
+# https://squidfunk.github.io/mkdocs-material/setup/extensions/#recommended-configuration
+markdown_extensions:
+ - abbr
+ - admonition
+ - attr_list
+ - def_list
+ - footnotes
+ - meta
+ - md_in_html
+ - toc:
+ permalink: true
+ - pymdownx.arithmatex:
+ generic: true
+ - pymdownx.betterem:
+ smart_enable: all
+ - pymdownx.caret
+ - pymdownx.details
+ - pymdownx.emoji:
+ emoji_index: !!python/name:materialx.emoji.twemoji
+ emoji_generator: !!python/name:materialx.emoji.to_svg
+ - pymdownx.highlight
+ - pymdownx.inlinehilite
+ - pymdownx.keys
+ - pymdownx.mark
+ - pymdownx.smartsymbols
+ - pymdownx.superfences
+ - pymdownx.tabbed:
+ alternate_style: true
+ - pymdownx.tasklist:
+ custom_checkbox: true
+ - pymdownx.tilde
diff --git a/vendor/github.com/urfave/cli/v2/parse.go b/vendor/github.com/urfave/cli/v2/parse.go
index 7df17296..a2db306e 100644
--- a/vendor/github.com/urfave/cli/v2/parse.go
+++ b/vendor/github.com/urfave/cli/v2/parse.go
@@ -26,9 +26,8 @@ func parseIter(set *flag.FlagSet, ip iterativeParser, args []string, shellComple
return err
}
- errStr := err.Error()
- trimmed := strings.TrimPrefix(errStr, "flag provided but not defined: -")
- if errStr == trimmed {
+ trimmed, trimErr := flagFromError(err)
+ if trimErr != nil {
return err
}
@@ -67,6 +66,19 @@ func parseIter(set *flag.FlagSet, ip iterativeParser, args []string, shellComple
}
}
+const providedButNotDefinedErrMsg = "flag provided but not defined: -"
+
+// flagFromError tries to parse a provided flag from an error message. If the
+// parsing fials, it returns the input error and an empty string
+func flagFromError(err error) (string, error) {
+ errStr := err.Error()
+ trimmed := strings.TrimPrefix(errStr, providedButNotDefinedErrMsg)
+ if errStr == trimmed {
+ return "", err
+ }
+ return trimmed, nil
+}
+
func splitShortOptions(set *flag.FlagSet, arg string) []string {
shortFlagsExist := func(s string) bool {
for _, c := range s[1:] {
diff --git a/vendor/github.com/urfave/cli/v2/suggestions.go b/vendor/github.com/urfave/cli/v2/suggestions.go
new file mode 100644
index 00000000..87fa905d
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/suggestions.go
@@ -0,0 +1,60 @@
+package cli
+
+import (
+ "fmt"
+
+ "github.com/xrash/smetrics"
+)
+
+func jaroWinkler(a, b string) float64 {
+ // magic values are from https://github.com/xrash/smetrics/blob/039620a656736e6ad994090895784a7af15e0b80/jaro-winkler.go#L8
+ const (
+ boostThreshold = 0.7
+ prefixSize = 4
+ )
+ return smetrics.JaroWinkler(a, b, boostThreshold, prefixSize)
+}
+
+func suggestFlag(flags []Flag, provided string, hideHelp bool) string {
+ distance := 0.0
+ suggestion := ""
+
+ for _, flag := range flags {
+ flagNames := flag.Names()
+ if !hideHelp {
+ flagNames = append(flagNames, HelpFlag.Names()...)
+ }
+ for _, name := range flagNames {
+ newDistance := jaroWinkler(name, provided)
+ if newDistance > distance {
+ distance = newDistance
+ suggestion = name
+ }
+ }
+ }
+
+ if len(suggestion) == 1 {
+ suggestion = "-" + suggestion
+ } else if len(suggestion) > 1 {
+ suggestion = "--" + suggestion
+ }
+
+ return suggestion
+}
+
+// suggestCommand takes a list of commands and a provided string to suggest a
+// command name
+func suggestCommand(commands []*Command, provided string) (suggestion string) {
+ distance := 0.0
+ for _, command := range commands {
+ for _, name := range append(command.Names(), helpName, helpAlias) {
+ newDistance := jaroWinkler(name, provided)
+ if newDistance > distance {
+ distance = newDistance
+ suggestion = name
+ }
+ }
+ }
+
+ return fmt.Sprintf(SuggestDidYouMeanTemplate, suggestion)
+}
diff --git a/vendor/github.com/urfave/cli/v2/template.go b/vendor/github.com/urfave/cli/v2/template.go
index 31c03f81..264eb856 100644
--- a/vendor/github.com/urfave/cli/v2/template.go
+++ b/vendor/github.com/urfave/cli/v2/template.go
@@ -7,7 +7,7 @@ var AppHelpTemplate = `NAME:
{{.Name}}{{if .Usage}} - {{.Usage}}{{end}}
USAGE:
- {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
+ {{if .UsageText}}{{.UsageText | nindent 3 | trim}}{{else}}{{.HelpName}} {{if .VisibleFlags}}[global options]{{end}}{{if .Commands}} command [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Version}}{{if not .HideVersion}}
VERSION:
{{.Version}}{{end}}{{end}}{{if .Description}}
@@ -22,11 +22,16 @@ AUTHOR{{with $length := len .Authors}}{{if ne 1 $length}}S{{end}}{{end}}:
COMMANDS:{{range .VisibleCategories}}{{if .Name}}
{{.Name}}:{{range .VisibleCommands}}
{{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{else}}{{range .VisibleCommands}}
- {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlags}}
+ {{join .Names ", "}}{{"\t"}}{{.Usage}}{{end}}{{end}}{{end}}{{end}}{{if .VisibleFlagCategories}}
+
+GLOBAL OPTIONS:{{range .VisibleFlagCategories}}
+ {{if .Name}}{{.Name}}
+ {{end}}{{range .Flags}}{{.}}
+ {{end}}{{end}}{{else}}{{if .VisibleFlags}}
GLOBAL OPTIONS:
{{range $index, $option := .VisibleFlags}}{{if $index}}
- {{end}}{{$option}}{{end}}{{end}}{{if .Copyright}}
+ {{end}}{{$option}}{{end}}{{end}}{{end}}{{if .Copyright}}
COPYRIGHT:
{{.Copyright}}{{end}}
@@ -39,17 +44,22 @@ var CommandHelpTemplate = `NAME:
{{.HelpName}} - {{.Usage}}
USAGE:
- {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Category}}
+ {{if .UsageText}}{{.UsageText | nindent 3 | trim}}{{else}}{{.HelpName}}{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Category}}
CATEGORY:
{{.Category}}{{end}}{{if .Description}}
DESCRIPTION:
- {{.Description | nindent 3 | trim}}{{end}}{{if .VisibleFlags}}
+ {{.Description | nindent 3 | trim}}{{end}}{{if .VisibleFlagCategories}}
+
+OPTIONS:{{range .VisibleFlagCategories}}
+ {{if .Name}}{{.Name}}
+ {{end}}{{range .Flags}}{{.}}
+ {{end}}{{end}}{{else}}{{if .VisibleFlags}}
OPTIONS:
{{range .VisibleFlags}}{{.}}
- {{end}}{{end}}
+ {{end}}{{end}}{{end}}
`
// SubcommandHelpTemplate is the text template for the subcommand help topic.
@@ -59,7 +69,7 @@ var SubcommandHelpTemplate = `NAME:
{{.HelpName}} - {{.Usage}}
USAGE:
- {{if .UsageText}}{{.UsageText}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
+ {{if .UsageText}}{{.UsageText | nindent 3 | trim}}{{else}}{{.HelpName}} command{{if .VisibleFlags}} [command options]{{end}} {{if .ArgsUsage}}{{.ArgsUsage}}{{else}}[arguments...]{{end}}{{end}}{{if .Description}}
DESCRIPTION:
{{.Description | nindent 3 | trim}}{{end}}
@@ -74,9 +84,9 @@ OPTIONS:
{{end}}{{end}}
`
-var MarkdownDocTemplate = `% {{ .App.Name }} 8
+var MarkdownDocTemplate = `{{if gt .SectionNum 0}}% {{ .App.Name }} {{ .SectionNum }}
-# NAME
+{{end}}# NAME
{{ .App.Name }}{{ if .App.Usage }} - {{ .App.Usage }}{{ end }}
@@ -86,16 +96,18 @@ var MarkdownDocTemplate = `% {{ .App.Name }} 8
{{ if .SynopsisArgs }}
` + "```" + `
{{ range $v := .SynopsisArgs }}{{ $v }}{{ end }}` + "```" + `
-{{ end }}{{ if .App.UsageText }}
+{{ end }}{{ if .App.Description }}
# DESCRIPTION
-{{ .App.UsageText }}
+{{ .App.Description }}
{{ end }}
**Usage**:
-` + "```" + `
+` + "```" + `{{ if .App.UsageText }}
+{{ .App.UsageText }}
+{{ else }}
{{ .App.Name }} [GLOBAL OPTIONS] command [COMMAND OPTIONS] [ARGUMENTS...]
-` + "```" + `
+{{ end }}` + "```" + `
{{ if .GlobalArgs }}
# GLOBAL OPTIONS
{{ range $v := .GlobalArgs }}
diff --git a/vendor/github.com/urfave/cli/v2/zz_generated.flags.go b/vendor/github.com/urfave/cli/v2/zz_generated.flags.go
new file mode 100644
index 00000000..3cae978c
--- /dev/null
+++ b/vendor/github.com/urfave/cli/v2/zz_generated.flags.go
@@ -0,0 +1,672 @@
+// WARNING: this file is generated. DO NOT EDIT
+
+package cli
+
+import "time"
+
+// Float64SliceFlag is a flag with type *Float64Slice
+type Float64SliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *Float64Slice
+ Destination *Float64Slice
+
+ Aliases []string
+ EnvVars []string
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *Float64SliceFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *Float64SliceFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *Float64SliceFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *Float64SliceFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// GenericFlag is a flag with type Generic
+type GenericFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value Generic
+ Destination *Generic
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *GenericFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *GenericFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *GenericFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *GenericFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *GenericFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// Int64SliceFlag is a flag with type *Int64Slice
+type Int64SliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *Int64Slice
+ Destination *Int64Slice
+
+ Aliases []string
+ EnvVars []string
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *Int64SliceFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *Int64SliceFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *Int64SliceFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *Int64SliceFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// IntSliceFlag is a flag with type *IntSlice
+type IntSliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *IntSlice
+ Destination *IntSlice
+
+ Aliases []string
+ EnvVars []string
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *IntSliceFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *IntSliceFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *IntSliceFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *IntSliceFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// PathFlag is a flag with type Path
+type PathFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value Path
+ Destination *Path
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *PathFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *PathFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *PathFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *PathFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *PathFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// StringSliceFlag is a flag with type *StringSlice
+type StringSliceFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *StringSlice
+ Destination *StringSlice
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *StringSliceFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *StringSliceFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *StringSliceFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *StringSliceFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// TimestampFlag is a flag with type *Timestamp
+type TimestampFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value *Timestamp
+ Destination *Timestamp
+
+ Aliases []string
+ EnvVars []string
+
+ Layout string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *TimestampFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *TimestampFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *TimestampFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *TimestampFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *TimestampFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// BoolFlag is a flag with type bool
+type BoolFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value bool
+ Destination *bool
+
+ Aliases []string
+ EnvVars []string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *BoolFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *BoolFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *BoolFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *BoolFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *BoolFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// Float64Flag is a flag with type float64
+type Float64Flag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value float64
+ Destination *float64
+
+ Aliases []string
+ EnvVars []string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *Float64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *Float64Flag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *Float64Flag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *Float64Flag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *Float64Flag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// IntFlag is a flag with type int
+type IntFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value int
+ Destination *int
+
+ Aliases []string
+ EnvVars []string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *IntFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *IntFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *IntFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *IntFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *IntFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// Int64Flag is a flag with type int64
+type Int64Flag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value int64
+ Destination *int64
+
+ Aliases []string
+ EnvVars []string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *Int64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *Int64Flag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *Int64Flag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *Int64Flag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *Int64Flag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// StringFlag is a flag with type string
+type StringFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value string
+ Destination *string
+
+ Aliases []string
+ EnvVars []string
+
+ TakesFile bool
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *StringFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *StringFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *StringFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *StringFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *StringFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// DurationFlag is a flag with type time.Duration
+type DurationFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value time.Duration
+ Destination *time.Duration
+
+ Aliases []string
+ EnvVars []string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *DurationFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *DurationFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *DurationFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *DurationFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *DurationFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// UintFlag is a flag with type uint
+type UintFlag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value uint
+ Destination *uint
+
+ Aliases []string
+ EnvVars []string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *UintFlag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *UintFlag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *UintFlag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *UintFlag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *UintFlag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// Uint64Flag is a flag with type uint64
+type Uint64Flag struct {
+ Name string
+
+ Category string
+ DefaultText string
+ FilePath string
+ Usage string
+
+ Required bool
+ Hidden bool
+ HasBeenSet bool
+
+ Value uint64
+ Destination *uint64
+
+ Aliases []string
+ EnvVars []string
+}
+
+// String returns a readable representation of this value (for usage defaults)
+func (f *Uint64Flag) String() string {
+ return FlagStringer(f)
+}
+
+// IsSet returns whether or not the flag has been set through env or file
+func (f *Uint64Flag) IsSet() bool {
+ return f.HasBeenSet
+}
+
+// Names returns the names of the flag
+func (f *Uint64Flag) Names() []string {
+ return FlagNames(f.Name, f.Aliases)
+}
+
+// IsRequired returns whether or not the flag is required
+func (f *Uint64Flag) IsRequired() bool {
+ return f.Required
+}
+
+// IsVisible returns true if the flag is not hidden, otherwise false
+func (f *Uint64Flag) IsVisible() bool {
+ return !f.Hidden
+}
+
+// vim:ro
diff --git a/vendor/github.com/vektah/gqlparser/v2/ast/definition.go b/vendor/github.com/vektah/gqlparser/v2/ast/definition.go
index 9087d402..d2039081 100644
--- a/vendor/github.com/vektah/gqlparser/v2/ast/definition.go
+++ b/vendor/github.com/vektah/gqlparser/v2/ast/definition.go
@@ -11,7 +11,7 @@ const (
InputObject DefinitionKind = "INPUT_OBJECT"
)
-// ObjectDefinition is the core type definition object, it includes all of the definable types
+// Definition is the core type definition object, it includes all of the definable types
// but does *not* cover schema or directives.
//
// @vektah: Javascript implementation has different types for all of these, but they are
diff --git a/vendor/github.com/vektah/gqlparser/v2/ast/document.go b/vendor/github.com/vektah/gqlparser/v2/ast/document.go
index e74622cb..43bfb54f 100644
--- a/vendor/github.com/vektah/gqlparser/v2/ast/document.go
+++ b/vendor/github.com/vektah/gqlparser/v2/ast/document.go
@@ -37,6 +37,16 @@ type Schema struct {
Description string
}
+// AddTypes is the helper to add types definition to the schema
+func (s *Schema) AddTypes(defs ...*Definition) {
+ if s.Types == nil {
+ s.Types = make(map[string]*Definition)
+ }
+ for _, def := range defs {
+ s.Types[def.Name] = def
+ }
+}
+
func (s *Schema) AddPossibleType(name string, def *Definition) {
s.PossibleTypes[name] = append(s.PossibleTypes[name], def)
}
diff --git a/vendor/github.com/vektah/gqlparser/v2/validator/prelude.go b/vendor/github.com/vektah/gqlparser/v2/validator/prelude.go
index 034624f1..c354ec0d 100644
--- a/vendor/github.com/vektah/gqlparser/v2/validator/prelude.go
+++ b/vendor/github.com/vektah/gqlparser/v2/validator/prelude.go
@@ -1,9 +1,15 @@
package validator
-import "github.com/vektah/gqlparser/v2/ast"
+import (
+ _ "embed"
+ "github.com/vektah/gqlparser/v2/ast"
+)
+
+//go:embed prelude.graphql
+var preludeGraphql string
var Prelude = &ast.Source{
Name: "prelude.graphql",
- Input: "# This file defines all the implicitly declared types that are required by the graphql spec. It is implicitly included by calls to LoadSchema\n\n\"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.\"\nscalar Int\n\n\"The `Float` scalar type represents signed double-precision fractional values as specified by [IEEE 754](http://en.wikipedia.org/wiki/IEEE_floating_point).\"\nscalar Float\n\n\"The `String`scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.\"\nscalar String\n\n\"The `Boolean` scalar type represents `true` or `false`.\"\nscalar Boolean\n\n\"\"\"The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as \"4\") or integer (such as 4) input value will be accepted as an ID.\"\"\"\nscalar ID\n\n\"The @include directive may be provided for fields, fragment spreads, and inline fragments, and allows for conditional inclusion during execution as described by the if argument.\"\ndirective @include(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\n\"The @skip directive may be provided for fields, fragment spreads, and inline fragments, and allows for conditional exclusion during execution as described by the if argument.\"\ndirective @skip(if: Boolean!) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT\n\n\"The @deprecated built-in directive is used within the type system definition language to indicate deprecated portions of a GraphQL service's schema, such as deprecated fields on a type, arguments on a field, input fields on an input type, or values of an enum type.\"\ndirective @deprecated(reason: String = \"No longer supported\") on FIELD_DEFINITION | ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION | ENUM_VALUE\n\n\"The @specifiedBy built-in directive is used within the type system definition language to provide a scalar specification URL for specifying the behavior of custom scalar types.\"\ndirective @specifiedBy(url: String!) on SCALAR\n\ntype __Schema {\n description: String\n types: [__Type!]!\n queryType: __Type!\n mutationType: __Type\n subscriptionType: __Type\n directives: [__Directive!]!\n}\n\ntype __Type {\n kind: __TypeKind!\n name: String\n description: String\n # must be non-null for OBJECT and INTERFACE, otherwise null.\n fields(includeDeprecated: Boolean = false): [__Field!]\n # must be non-null for OBJECT and INTERFACE, otherwise null.\n interfaces: [__Type!]\n # must be non-null for INTERFACE and UNION, otherwise null.\n possibleTypes: [__Type!]\n # must be non-null for ENUM, otherwise null.\n enumValues(includeDeprecated: Boolean = false): [__EnumValue!]\n # must be non-null for INPUT_OBJECT, otherwise null.\n inputFields: [__InputValue!]\n # must be non-null for NON_NULL and LIST, otherwise null.\n ofType: __Type\n # may be non-null for custom SCALAR, otherwise null.\n specifiedByURL: String\n}\n\ntype __Field {\n name: String!\n description: String\n args: [__InputValue!]!\n type: __Type!\n isDeprecated: Boolean!\n deprecationReason: String\n}\n\ntype __InputValue {\n name: String!\n description: String\n type: __Type!\n defaultValue: String\n}\n\ntype __EnumValue {\n name: String!\n description: String\n isDeprecated: Boolean!\n deprecationReason: String\n}\n\nenum __TypeKind {\n SCALAR\n OBJECT\n INTERFACE\n UNION\n ENUM\n INPUT_OBJECT\n LIST\n NON_NULL\n}\n\ntype __Directive {\n name: String!\n description: String\n locations: [__DirectiveLocation!]!\n args: [__InputValue!]!\n isRepeatable: Boolean!\n}\n\nenum __DirectiveLocation {\n QUERY\n MUTATION\n SUBSCRIPTION\n FIELD\n FRAGMENT_DEFINITION\n FRAGMENT_SPREAD\n INLINE_FRAGMENT\n VARIABLE_DEFINITION\n SCHEMA\n SCALAR\n OBJECT\n FIELD_DEFINITION\n ARGUMENT_DEFINITION\n INTERFACE\n UNION\n ENUM\n ENUM_VALUE\n INPUT_OBJECT\n INPUT_FIELD_DEFINITION\n}\n",
+ Input: preludeGraphql,
BuiltIn: true,
}
diff --git a/vendor/github.com/vektah/gqlparser/v2/validator/rules/values_of_correct_type.go b/vendor/github.com/vektah/gqlparser/v2/validator/rules/values_of_correct_type.go
index ab7b69e5..22bea771 100644
--- a/vendor/github.com/vektah/gqlparser/v2/validator/rules/values_of_correct_type.go
+++ b/vendor/github.com/vektah/gqlparser/v2/validator/rules/values_of_correct_type.go
@@ -16,6 +16,13 @@ func init() {
return
}
+ if value.Kind == ast.NullValue && value.ExpectedType.NonNull {
+ addError(
+ Message(`Expected value of type "%s", found %s.`, value.ExpectedType.String(), value.String()),
+ At(value.Position),
+ )
+ }
+
if value.Definition.Kind == ast.Scalar {
// Skip custom validating scalars
if !value.Definition.OneOf("Int", "Float", "String", "Boolean", "ID") {
@@ -37,13 +44,7 @@ func init() {
switch value.Kind {
case ast.NullValue:
- if value.ExpectedType.NonNull {
- addError(
- Message(`Expected value of type "%s", found %s.`, value.ExpectedType.String(), value.String()),
- At(value.Position),
- )
- }
-
+ return
case ast.ListValue:
if value.ExpectedType.Elem == nil {
unexpectedTypeMessage(addError, value)
diff --git a/vendor/github.com/vektah/gqlparser/v2/validator/schema.go b/vendor/github.com/vektah/gqlparser/v2/validator/schema.go
index 67921932..57dc549f 100644
--- a/vendor/github.com/vektah/gqlparser/v2/validator/schema.go
+++ b/vendor/github.com/vektah/gqlparser/v2/validator/schema.go
@@ -1,5 +1,3 @@
-//go:generate go run ./inliner/inliner.go
-
package validator
import (
@@ -251,27 +249,27 @@ func validateDefinition(schema *Schema, def *Definition) *gqlerror.Error {
switch def.Kind {
case Object, Interface:
if len(def.Fields) == 0 {
- return gqlerror.ErrorPosf(def.Position, "%s must define one or more fields.", def.Kind)
+ return gqlerror.ErrorPosf(def.Position, "%s %s: must define one or more fields.", def.Kind, def.Name)
}
for _, field := range def.Fields {
if typ, ok := schema.Types[field.Type.Name()]; ok {
if !isValidKind(typ.Kind, Scalar, Object, Interface, Union, Enum) {
- return gqlerror.ErrorPosf(field.Position, "%s field must be one of %s.", def.Kind, kindList(Scalar, Object, Interface, Union, Enum))
+ return gqlerror.ErrorPosf(field.Position, "%s %s: field must be one of %s.", def.Kind, def.Name, kindList(Scalar, Object, Interface, Union, Enum))
}
}
}
case Enum:
if len(def.EnumValues) == 0 {
- return gqlerror.ErrorPosf(def.Position, "%s must define one or more unique enum values.", def.Kind)
+ return gqlerror.ErrorPosf(def.Position, "%s %s: must define one or more unique enum values.", def.Kind, def.Name)
}
case InputObject:
if len(def.Fields) == 0 {
- return gqlerror.ErrorPosf(def.Position, "%s must define one or more input fields.", def.Kind)
+ return gqlerror.ErrorPosf(def.Position, "%s %s: must define one or more input fields.", def.Kind, def.Name)
}
for _, field := range def.Fields {
if typ, ok := schema.Types[field.Type.Name()]; ok {
if !isValidKind(typ.Kind, Scalar, Enum, InputObject) {
- return gqlerror.ErrorPosf(field.Position, "%s field must be one of %s.", def.Kind, kindList(Scalar, Enum, InputObject))
+ return gqlerror.ErrorPosf(field.Position, "%s %s: field must be one of %s.", typ.Kind, field.Name, kindList(Scalar, Enum, InputObject))
}
}
}
diff --git a/vendor/github.com/vektah/gqlparser/v2/validator/schema_test.yml b/vendor/github.com/vektah/gqlparser/v2/validator/schema_test.yml
index 50642cf0..a07707ba 100644
--- a/vendor/github.com/vektah/gqlparser/v2/validator/schema_test.yml
+++ b/vendor/github.com/vektah/gqlparser/v2/validator/schema_test.yml
@@ -61,7 +61,7 @@ object types:
b: Int
}
error:
- message: 'OBJECT must define one or more fields.'
+ message: 'OBJECT InvalidObject2: must define one or more fields.'
locations: [{line: 6, column: 6}]
- name: check reserved names on type name
input: |
@@ -98,7 +98,7 @@ object types:
input: Input!
}
error:
- message: 'OBJECT field must be one of SCALAR, OBJECT, INTERFACE, UNION, ENUM.'
+ message: 'OBJECT Query: field must be one of SCALAR, OBJECT, INTERFACE, UNION, ENUM.'
locations: [{line: 5, column: 3}]
interfaces:
@@ -149,7 +149,7 @@ interfaces:
b: Int
}
error:
- message: 'INTERFACE must define one or more fields.'
+ message: 'INTERFACE InvalidInterface2: must define one or more fields.'
locations: [{line: 6, column: 11}]
- name: check reserved names on type name
@@ -173,7 +173,7 @@ interfaces:
input: Input!
}
error:
- message: 'INTERFACE field must be one of SCALAR, OBJECT, INTERFACE, UNION, ENUM.'
+ message: 'INTERFACE Foo: field must be one of SCALAR, OBJECT, INTERFACE, UNION, ENUM.'
locations: [{line: 8, column: 3}]
- name: must have all fields from interface
@@ -341,7 +341,7 @@ inputs:
b: Int
}
error:
- message: 'INPUT_OBJECT must define one or more input fields.'
+ message: 'INPUT_OBJECT InvalidInput2: must define one or more input fields.'
locations: [{line: 6, column: 7}]
- name: check reserved names on type name
input: |
@@ -357,7 +357,7 @@ inputs:
type Object { id: ID }
input Foo { a: Object! }
error:
- message: INPUT_OBJECT field must be one of SCALAR, ENUM, INPUT_OBJECT.
+ message: 'OBJECT a: field must be one of SCALAR, ENUM, INPUT_OBJECT.'
locations: [{line: 2, column: 13}]
- name: fields cannot be Interfaces
@@ -365,7 +365,7 @@ inputs:
interface Interface { id: ID! }
input Foo { a: Interface! }
error:
- message: INPUT_OBJECT field must be one of SCALAR, ENUM, INPUT_OBJECT.
+ message: 'INTERFACE a: field must be one of SCALAR, ENUM, INPUT_OBJECT.'
locations: [{line: 2, column: 13}]
- name: fields cannot be Unions
@@ -374,7 +374,7 @@ inputs:
union Union = Object
input Foo { a: Union! }
error:
- message: INPUT_OBJECT field must be one of SCALAR, ENUM, INPUT_OBJECT.
+ message: 'UNION a: field must be one of SCALAR, ENUM, INPUT_OBJECT.'
locations: [{line: 3, column: 13}]
args:
@@ -434,7 +434,7 @@ enums:
BAR
}
error:
- message: 'ENUM must define one or more unique enum values.'
+ message: 'ENUM InvalidEnum2: must define one or more unique enum values.'
locations: [{line: 6, column: 6}]
- name: check reserved names on type name
input: |
diff --git a/vendor/github.com/vektah/gqlparser/v2/validator/vars.go b/vendor/github.com/vektah/gqlparser/v2/validator/vars.go
index af2d76c7..c3fd559b 100644
--- a/vendor/github.com/vektah/gqlparser/v2/validator/vars.go
+++ b/vendor/github.com/vektah/gqlparser/v2/validator/vars.go
@@ -1,8 +1,10 @@
package validator
import (
+ "encoding/json"
"fmt"
"reflect"
+ "strconv"
"strings"
"github.com/vektah/gqlparser/v2/ast"
@@ -28,6 +30,7 @@ func VariableValues(schema *ast.Schema, op *ast.OperationDefinition, variables m
}
val, hasValue := variables[v.Variable]
+
if !hasValue {
if v.DefaultValue != nil {
var err error
@@ -49,6 +52,24 @@ func VariableValues(schema *ast.Schema, op *ast.OperationDefinition, variables m
coercedVars[v.Variable] = nil
} else {
rv := reflect.ValueOf(val)
+
+ jsonNumber, isJsonNumber := val.(json.Number)
+ if isJsonNumber {
+ if v.Type.NamedType == "Int" {
+ n, err := jsonNumber.Int64()
+ if err != nil {
+ return nil, gqlerror.ErrorPathf(validator.path, "cannot use value %d as %s", n, v.Type.NamedType)
+ }
+ rv = reflect.ValueOf(n)
+ } else if v.Type.NamedType == "Float" {
+ f, err := jsonNumber.Float64()
+ if err != nil {
+ return nil, gqlerror.ErrorPathf(validator.path, "cannot use value %f as %s", f, v.Type.NamedType)
+ }
+ rv = reflect.ValueOf(f)
+
+ }
+ }
if rv.Kind() == reflect.Ptr || rv.Kind() == reflect.Interface {
rv = rv.Elem()
}
@@ -132,11 +153,11 @@ func (v *varValidator) validateVarType(typ *ast.Type, val reflect.Value) (reflec
kind := val.Type().Kind()
switch typ.NamedType {
case "Int":
- if kind == reflect.String || kind == reflect.Int || kind == reflect.Int32 || kind == reflect.Int64 {
+ if kind == reflect.Int || kind == reflect.Int32 || kind == reflect.Int64 || kind == reflect.Float32 || kind == reflect.Float64 || IsValidIntString(val, kind) {
return val, nil
}
case "Float":
- if kind == reflect.String || kind == reflect.Float32 || kind == reflect.Float64 || kind == reflect.Int || kind == reflect.Int32 || kind == reflect.Int64 {
+ if kind == reflect.Float32 || kind == reflect.Float64 || kind == reflect.Int || kind == reflect.Int32 || kind == reflect.Int64 || IsValidFloatString(val, kind) {
return val, nil
}
case "String":
@@ -218,3 +239,20 @@ func (v *varValidator) validateVarType(typ *ast.Type, val reflect.Value) (reflec
}
return val, nil
}
+
+func IsValidIntString(val reflect.Value, kind reflect.Kind) bool {
+ if kind != reflect.String {
+ return false
+ }
+ _, e := strconv.ParseInt(fmt.Sprintf("%v", val.Interface()), 10, 64)
+
+ return e == nil
+}
+
+func IsValidFloatString(val reflect.Value, kind reflect.Kind) bool {
+ if kind != reflect.String {
+ return false
+ }
+ _, e := strconv.ParseFloat(fmt.Sprintf("%v", val.Interface()), 64)
+ return e == nil
+}
diff --git a/vendor/github.com/xrash/smetrics/.travis.yml b/vendor/github.com/xrash/smetrics/.travis.yml
new file mode 100644
index 00000000..d1cd67ff
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/.travis.yml
@@ -0,0 +1,9 @@
+language: go
+go:
+ - 1.11
+ - 1.12
+ - 1.13
+ - 1.14.x
+ - master
+script:
+ - cd tests && make
diff --git a/vendor/github.com/xrash/smetrics/LICENSE b/vendor/github.com/xrash/smetrics/LICENSE
new file mode 100644
index 00000000..80445682
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/LICENSE
@@ -0,0 +1,21 @@
+Copyright (C) 2016 Felipe da Cunha Gonçalves
+All Rights Reserved.
+
+MIT LICENSE
+
+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/xrash/smetrics/README.md b/vendor/github.com/xrash/smetrics/README.md
new file mode 100644
index 00000000..5e0c1a46
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/README.md
@@ -0,0 +1,49 @@
+[](http://travis-ci.org/xrash/smetrics)
+
+# smetrics
+
+`smetrics` is "string metrics".
+
+Package smetrics provides a bunch of algorithms for calculating the distance between strings.
+
+There are implementations for calculating the popular Levenshtein distance (aka Edit Distance or Wagner-Fischer), as well as the Jaro distance, the Jaro-Winkler distance, and more.
+
+# How to import
+
+```go
+import "github.com/xrash/smetrics"
+```
+
+# Documentation
+
+Go to [https://pkg.go.dev/github.com/xrash/smetrics](https://pkg.go.dev/github.com/xrash/smetrics) for complete documentation.
+
+# Example
+
+```go
+package main
+
+import (
+ "github.com/xrash/smetrics"
+)
+
+func main() {
+ smetrics.WagnerFischer("POTATO", "POTATTO", 1, 1, 2)
+ smetrics.WagnerFischer("MOUSE", "HOUSE", 2, 2, 4)
+
+ smetrics.Ukkonen("POTATO", "POTATTO", 1, 1, 2)
+ smetrics.Ukkonen("MOUSE", "HOUSE", 2, 2, 4)
+
+ smetrics.Jaro("AL", "AL")
+ smetrics.Jaro("MARTHA", "MARHTA")
+
+ smetrics.JaroWinkler("AL", "AL", 0.7, 4)
+ smetrics.JaroWinkler("MARTHA", "MARHTA", 0.7, 4)
+
+ smetrics.Soundex("Euler")
+ smetrics.Soundex("Ellery")
+
+ smetrics.Hamming("aaa", "aaa")
+ smetrics.Hamming("aaa", "aab")
+}
+```
diff --git a/vendor/github.com/xrash/smetrics/doc.go b/vendor/github.com/xrash/smetrics/doc.go
new file mode 100644
index 00000000..21bc986c
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/doc.go
@@ -0,0 +1,19 @@
+/*
+Package smetrics provides a bunch of algorithms for calculating
+the distance between strings.
+
+There are implementations for calculating the popular Levenshtein
+distance (aka Edit Distance or Wagner-Fischer), as well as the Jaro
+distance, the Jaro-Winkler distance, and more.
+
+For the Levenshtein distance, you can use the functions WagnerFischer()
+and Ukkonen(). Read the documentation on these functions.
+
+For the Jaro and Jaro-Winkler algorithms, check the functions
+Jaro() and JaroWinkler(). Read the documentation on these functions.
+
+For the Soundex algorithm, check the function Soundex().
+
+For the Hamming distance algorithm, check the function Hamming().
+*/
+package smetrics
diff --git a/vendor/github.com/xrash/smetrics/hamming.go b/vendor/github.com/xrash/smetrics/hamming.go
new file mode 100644
index 00000000..505d3e5d
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/hamming.go
@@ -0,0 +1,25 @@
+package smetrics
+
+import (
+ "fmt"
+)
+
+// The Hamming distance is the minimum number of substitutions required to change string A into string B. Both strings must have the same size. If the strings have different sizes, the function returns an error.
+func Hamming(a, b string) (int, error) {
+ al := len(a)
+ bl := len(b)
+
+ if al != bl {
+ return -1, fmt.Errorf("strings are not equal (len(a)=%d, len(b)=%d)", al, bl)
+ }
+
+ var difference = 0
+
+ for i := range a {
+ if a[i] != b[i] {
+ difference = difference + 1
+ }
+ }
+
+ return difference, nil
+}
diff --git a/vendor/github.com/xrash/smetrics/jaro-winkler.go b/vendor/github.com/xrash/smetrics/jaro-winkler.go
new file mode 100644
index 00000000..abdb2888
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/jaro-winkler.go
@@ -0,0 +1,28 @@
+package smetrics
+
+import (
+ "math"
+)
+
+// The Jaro-Winkler distance. The result is 1 for equal strings, and 0 for completely different strings. It is commonly used on Record Linkage stuff, thus it tries to be accurate for common typos when writing real names such as person names and street names.
+// Jaro-Winkler is a modification of the Jaro algorithm. It works by first running Jaro, then boosting the score of exact matches at the beginning of the strings. Because of that, it introduces two more parameters: the boostThreshold and the prefixSize. These are commonly set to 0.7 and 4, respectively.
+func JaroWinkler(a, b string, boostThreshold float64, prefixSize int) float64 {
+ j := Jaro(a, b)
+
+ if j <= boostThreshold {
+ return j
+ }
+
+ prefixSize = int(math.Min(float64(len(a)), math.Min(float64(prefixSize), float64(len(b)))))
+
+ var prefixMatch float64
+ for i := 0; i < prefixSize; i++ {
+ if a[i] == b[i] {
+ prefixMatch++
+ } else {
+ break
+ }
+ }
+
+ return j + 0.1*prefixMatch*(1.0-j)
+}
diff --git a/vendor/github.com/xrash/smetrics/jaro.go b/vendor/github.com/xrash/smetrics/jaro.go
new file mode 100644
index 00000000..75f924e1
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/jaro.go
@@ -0,0 +1,86 @@
+package smetrics
+
+import (
+ "math"
+)
+
+// The Jaro distance. The result is 1 for equal strings, and 0 for completely different strings.
+func Jaro(a, b string) float64 {
+ // If both strings are zero-length, they are completely equal,
+ // therefore return 1.
+ if len(a) == 0 && len(b) == 0 {
+ return 1
+ }
+
+ // If one string is zero-length, strings are completely different,
+ // therefore return 0.
+ if len(a) == 0 || len(b) == 0 {
+ return 0
+ }
+
+ // Define the necessary variables for the algorithm.
+ la := float64(len(a))
+ lb := float64(len(b))
+ matchRange := int(math.Max(0, math.Floor(math.Max(la, lb)/2.0)-1))
+ matchesA := make([]bool, len(a))
+ matchesB := make([]bool, len(b))
+ var matches float64 = 0
+
+ // Step 1: Matches
+ // Loop through each character of the first string,
+ // looking for a matching character in the second string.
+ for i := 0; i < len(a); i++ {
+ start := int(math.Max(0, float64(i-matchRange)))
+ end := int(math.Min(lb-1, float64(i+matchRange)))
+
+ for j := start; j <= end; j++ {
+ if matchesB[j] {
+ continue
+ }
+
+ if a[i] == b[j] {
+ matchesA[i] = true
+ matchesB[j] = true
+ matches++
+ break
+ }
+ }
+ }
+
+ // If there are no matches, strings are completely different,
+ // therefore return 0.
+ if matches == 0 {
+ return 0
+ }
+
+ // Step 2: Transpositions
+ // Loop through the matches' arrays, looking for
+ // unaligned matches. Count the number of unaligned matches.
+ unaligned := 0
+ j := 0
+ for i := 0; i < len(a); i++ {
+ if !matchesA[i] {
+ continue
+ }
+
+ for !matchesB[j] {
+ j++
+ }
+
+ if a[i] != b[j] {
+ unaligned++
+ }
+
+ j++
+ }
+
+ // The number of unaligned matches divided by two, is the number of _transpositions_.
+ transpositions := math.Floor(float64(unaligned / 2))
+
+ // Jaro distance is the average between these three numbers:
+ // 1. matches / length of string A
+ // 2. matches / length of string B
+ // 3. (matches - transpositions/matches)
+ // So, all that divided by three is the final result.
+ return ((matches / la) + (matches / lb) + ((matches - transpositions) / matches)) / 3.0
+}
diff --git a/vendor/github.com/xrash/smetrics/soundex.go b/vendor/github.com/xrash/smetrics/soundex.go
new file mode 100644
index 00000000..a2ad034d
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/soundex.go
@@ -0,0 +1,41 @@
+package smetrics
+
+import (
+ "strings"
+)
+
+// The Soundex encoding. It is a phonetic algorithm that considers how the words sound in English. Soundex maps a string to a 4-byte code consisting of the first letter of the original string and three numbers. Strings that sound similar should map to the same code.
+func Soundex(s string) string {
+ m := map[byte]string{
+ 'B': "1", 'P': "1", 'F': "1", 'V': "1",
+ 'C': "2", 'S': "2", 'K': "2", 'G': "2", 'J': "2", 'Q': "2", 'X': "2", 'Z': "2",
+ 'D': "3", 'T': "3",
+ 'L': "4",
+ 'M': "5", 'N': "5",
+ 'R': "6",
+ }
+
+ s = strings.ToUpper(s)
+
+ r := string(s[0])
+ p := s[0]
+ for i := 1; i < len(s) && len(r) < 4; i++ {
+ c := s[i]
+
+ if (c < 'A' || c > 'Z') || (c == p) {
+ continue
+ }
+
+ p = c
+
+ if n, ok := m[c]; ok {
+ r += n
+ }
+ }
+
+ for i := len(r); i < 4; i++ {
+ r += "0"
+ }
+
+ return r
+}
diff --git a/vendor/github.com/xrash/smetrics/ukkonen.go b/vendor/github.com/xrash/smetrics/ukkonen.go
new file mode 100644
index 00000000..3c5579cd
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/ukkonen.go
@@ -0,0 +1,94 @@
+package smetrics
+
+import (
+ "math"
+)
+
+// The Ukkonen algorithm for calculating the Levenshtein distance. The algorithm is described in http://www.cs.helsinki.fi/u/ukkonen/InfCont85.PDF, or in docs/InfCont85.PDF. It runs on O(t . min(m, n)) where t is the actual distance between strings a and b. It needs O(min(t, m, n)) space. This function might be preferred over WagnerFischer() for *very* similar strings. But test it out yourself.
+// The first two parameters are the two strings to be compared. The last three parameters are the insertion cost, the deletion cost and the substitution cost. These are normally defined as 1, 1 and 2 respectively.
+func Ukkonen(a, b string, icost, dcost, scost int) int {
+ var lowerCost int
+
+ if icost < dcost && icost < scost {
+ lowerCost = icost
+ } else if dcost < scost {
+ lowerCost = dcost
+ } else {
+ lowerCost = scost
+ }
+
+ infinite := math.MaxInt32 / 2
+
+ var r []int
+ var k, kprime, p, t int
+ var ins, del, sub int
+
+ if len(a) > len(b) {
+ t = (len(a) - len(b) + 1) * lowerCost
+ } else {
+ t = (len(b) - len(a) + 1) * lowerCost
+ }
+
+ for {
+ if (t / lowerCost) < (len(b) - len(a)) {
+ continue
+ }
+
+ // This is the right damn thing since the original Ukkonen
+ // paper minimizes the expression result only, but the uncommented version
+ // doesn't need to deal with floats so it's faster.
+ // p = int(math.Floor(0.5*((float64(t)/float64(lowerCost)) - float64(len(b) - len(a)))))
+ p = ((t / lowerCost) - (len(b) - len(a))) / 2
+
+ k = -p
+ kprime = k
+
+ rowlength := (len(b) - len(a)) + (2 * p)
+
+ r = make([]int, rowlength+2)
+
+ for i := 0; i < rowlength+2; i++ {
+ r[i] = infinite
+ }
+
+ for i := 0; i <= len(a); i++ {
+ for j := 0; j <= rowlength; j++ {
+ if i == j+k && i == 0 {
+ r[j] = 0
+ } else {
+ if j-1 < 0 {
+ ins = infinite
+ } else {
+ ins = r[j-1] + icost
+ }
+
+ del = r[j+1] + dcost
+ sub = r[j] + scost
+
+ if i-1 < 0 || i-1 >= len(a) || j+k-1 >= len(b) || j+k-1 < 0 {
+ sub = infinite
+ } else if a[i-1] == b[j+k-1] {
+ sub = r[j]
+ }
+
+ if ins < del && ins < sub {
+ r[j] = ins
+ } else if del < sub {
+ r[j] = del
+ } else {
+ r[j] = sub
+ }
+ }
+ }
+ k++
+ }
+
+ if r[(len(b)-len(a))+(2*p)+kprime] <= t {
+ break
+ } else {
+ t *= 2
+ }
+ }
+
+ return r[(len(b)-len(a))+(2*p)+kprime]
+}
diff --git a/vendor/github.com/xrash/smetrics/wagner-fischer.go b/vendor/github.com/xrash/smetrics/wagner-fischer.go
new file mode 100644
index 00000000..9883aea0
--- /dev/null
+++ b/vendor/github.com/xrash/smetrics/wagner-fischer.go
@@ -0,0 +1,48 @@
+package smetrics
+
+// The Wagner-Fischer algorithm for calculating the Levenshtein distance.
+// The first two parameters are the two strings to be compared. The last three parameters are the insertion cost, the deletion cost and the substitution cost. These are normally defined as 1, 1 and 2 respectively.
+func WagnerFischer(a, b string, icost, dcost, scost int) int {
+
+ // Allocate both rows.
+ row1 := make([]int, len(b)+1)
+ row2 := make([]int, len(b)+1)
+ var tmp []int
+
+ // Initialize the first row.
+ for i := 1; i <= len(b); i++ {
+ row1[i] = i * icost
+ }
+
+ // For each row...
+ for i := 1; i <= len(a); i++ {
+ row2[0] = i * dcost
+
+ // For each column...
+ for j := 1; j <= len(b); j++ {
+ if a[i-1] == b[j-1] {
+ row2[j] = row1[j-1]
+ } else {
+ ins := row2[j-1] + icost
+ del := row1[j] + dcost
+ sub := row1[j-1] + scost
+
+ if ins < del && ins < sub {
+ row2[j] = ins
+ } else if del < sub {
+ row2[j] = del
+ } else {
+ row2[j] = sub
+ }
+ }
+ }
+
+ // Swap the rows at the end of each row.
+ tmp = row1
+ row1 = row2
+ row2 = tmp
+ }
+
+ // Because we swapped the rows, the final result is in row1 instead of row2.
+ return row1[len(row1)-1]
+}
diff --git a/vendor/golang.org/x/crypto/acme/acme.go b/vendor/golang.org/x/crypto/acme/acme.go
index f2d23f69..df574308 100644
--- a/vendor/golang.org/x/crypto/acme/acme.go
+++ b/vendor/golang.org/x/crypto/acme/acme.go
@@ -77,12 +77,11 @@ const (
// The only required field is Key. An example of creating a client with a new key
// is as follows:
//
-// key, err := rsa.GenerateKey(rand.Reader, 2048)
-// if err != nil {
-// log.Fatal(err)
-// }
-// client := &Client{Key: key}
-//
+// key, err := rsa.GenerateKey(rand.Reader, 2048)
+// if err != nil {
+// log.Fatal(err)
+// }
+// client := &Client{Key: key}
type Client struct {
// Key is the account key used to register with a CA and sign requests.
// Key.Public() must return a *rsa.PublicKey or *ecdsa.PublicKey.
@@ -307,6 +306,20 @@ func (c *Client) UpdateReg(ctx context.Context, acct *Account) (*Account, error)
return c.updateRegRFC(ctx, acct)
}
+// AccountKeyRollover attempts to transition a client's account key to a new key.
+// On success client's Key is updated which is not concurrency safe.
+// On failure an error will be returned.
+// The new key is already registered with the ACME provider if the following is true:
+// - error is of type acme.Error
+// - StatusCode should be 409 (Conflict)
+// - Location header will have the KID of the associated account
+//
+// More about account key rollover can be found at
+// https://tools.ietf.org/html/rfc8555#section-7.3.5.
+func (c *Client) AccountKeyRollover(ctx context.Context, newKey crypto.Signer) error {
+ return c.accountKeyRollover(ctx, newKey)
+}
+
// Authorize performs the initial step in the pre-authorization flow,
// as opposed to order-based flow.
// The caller will then need to choose from and perform a set of returned
diff --git a/vendor/golang.org/x/crypto/acme/autocert/autocert.go b/vendor/golang.org/x/crypto/acme/autocert/autocert.go
index 1858184e..0061c288 100644
--- a/vendor/golang.org/x/crypto/acme/autocert/autocert.go
+++ b/vendor/golang.org/x/crypto/acme/autocert/autocert.go
@@ -170,6 +170,11 @@ type Manager struct {
// in the template's ExtraExtensions field as is.
ExtraExtensions []pkix.Extension
+ // ExternalAccountBinding optionally represents an arbitrary binding to an
+ // account of the CA to which the ACME server is tied.
+ // See RFC 8555, Section 7.3.4 for more details.
+ ExternalAccountBinding *acme.ExternalAccountBinding
+
clientMu sync.Mutex
client *acme.Client // initialized by acmeClient method
@@ -996,7 +1001,7 @@ func (m *Manager) acmeClient(ctx context.Context) (*acme.Client, error) {
if m.Email != "" {
contact = []string{"mailto:" + m.Email}
}
- a := &acme.Account{Contact: contact}
+ a := &acme.Account{Contact: contact, ExternalAccountBinding: m.ExternalAccountBinding}
_, err := client.Register(ctx, a, m.Prompt)
if err == nil || isAccountAlreadyExist(err) {
m.client = client
diff --git a/vendor/golang.org/x/crypto/acme/autocert/cache.go b/vendor/golang.org/x/crypto/acme/autocert/cache.go
index 03f63022..3156a081 100644
--- a/vendor/golang.org/x/crypto/acme/autocert/cache.go
+++ b/vendor/golang.org/x/crypto/acme/autocert/cache.go
@@ -41,7 +41,7 @@ type DirCache string
// Get reads a certificate data from the specified file name.
func (d DirCache) Get(ctx context.Context, name string) ([]byte, error) {
- name = filepath.Join(string(d), name)
+ name = filepath.Join(string(d), filepath.Clean("/"+name))
var (
data []byte
err error
@@ -82,7 +82,7 @@ func (d DirCache) Put(ctx context.Context, name string, data []byte) error {
case <-ctx.Done():
// Don't overwrite the file if the context was canceled.
default:
- newName := filepath.Join(string(d), name)
+ newName := filepath.Join(string(d), filepath.Clean("/"+name))
err = os.Rename(tmp, newName)
}
}()
@@ -96,7 +96,7 @@ func (d DirCache) Put(ctx context.Context, name string, data []byte) error {
// Delete removes the specified file name.
func (d DirCache) Delete(ctx context.Context, name string) error {
- name = filepath.Join(string(d), name)
+ name = filepath.Join(string(d), filepath.Clean("/"+name))
var (
err error
done = make(chan struct{})
diff --git a/vendor/golang.org/x/crypto/acme/autocert/listener.go b/vendor/golang.org/x/crypto/acme/autocert/listener.go
index cb486097..9d62f8ce 100644
--- a/vendor/golang.org/x/crypto/acme/autocert/listener.go
+++ b/vendor/golang.org/x/crypto/acme/autocert/listener.go
@@ -20,7 +20,7 @@ import (
//
// It enables one-line HTTPS servers:
//
-// log.Fatal(http.Serve(autocert.NewListener("example.com"), handler))
+// log.Fatal(http.Serve(autocert.NewListener("example.com"), handler))
//
// NewListener is a convenience function for a common configuration.
// More complex or custom configurations can use the autocert.Manager
diff --git a/vendor/golang.org/x/crypto/acme/jws.go b/vendor/golang.org/x/crypto/acme/jws.go
index 403e5b0c..b38828d8 100644
--- a/vendor/golang.org/x/crypto/acme/jws.go
+++ b/vendor/golang.org/x/crypto/acme/jws.go
@@ -33,6 +33,10 @@ const noKeyID = KeyID("")
// See https://tools.ietf.org/html/rfc8555#section-6.3 for more details.
const noPayload = ""
+// noNonce indicates that the nonce should be omitted from the protected header.
+// See jwsEncodeJSON for details.
+const noNonce = ""
+
// jsonWebSignature can be easily serialized into a JWS following
// https://tools.ietf.org/html/rfc7515#section-3.2.
type jsonWebSignature struct {
@@ -45,10 +49,15 @@ type jsonWebSignature struct {
// The result is serialized in JSON format containing either kid or jwk
// fields based on the provided KeyID value.
//
-// If kid is non-empty, its quoted value is inserted in the protected head
+// The claimset is marshalled using json.Marshal unless it is a string.
+// In which case it is inserted directly into the message.
+//
+// If kid is non-empty, its quoted value is inserted in the protected header
// as "kid" field value. Otherwise, JWK is computed using jwkEncode and inserted
// as "jwk" field value. The "jwk" and "kid" fields are mutually exclusive.
//
+// If nonce is non-empty, its quoted value is inserted in the protected header.
+//
// See https://tools.ietf.org/html/rfc7515#section-7.
func jwsEncodeJSON(claimset interface{}, key crypto.Signer, kid KeyID, nonce, url string) ([]byte, error) {
if key == nil {
@@ -58,20 +67,36 @@ func jwsEncodeJSON(claimset interface{}, key crypto.Signer, kid KeyID, nonce, ur
if alg == "" || !sha.Available() {
return nil, ErrUnsupportedKey
}
- var phead string
+ headers := struct {
+ Alg string `json:"alg"`
+ KID string `json:"kid,omitempty"`
+ JWK json.RawMessage `json:"jwk,omitempty"`
+ Nonce string `json:"nonce,omitempty"`
+ URL string `json:"url"`
+ }{
+ Alg: alg,
+ Nonce: nonce,
+ URL: url,
+ }
switch kid {
case noKeyID:
jwk, err := jwkEncode(key.Public())
if err != nil {
return nil, err
}
- phead = fmt.Sprintf(`{"alg":%q,"jwk":%s,"nonce":%q,"url":%q}`, alg, jwk, nonce, url)
+ headers.JWK = json.RawMessage(jwk)
default:
- phead = fmt.Sprintf(`{"alg":%q,"kid":%q,"nonce":%q,"url":%q}`, alg, kid, nonce, url)
+ headers.KID = string(kid)
}
- phead = base64.RawURLEncoding.EncodeToString([]byte(phead))
+ phJSON, err := json.Marshal(headers)
+ if err != nil {
+ return nil, err
+ }
+ phead := base64.RawURLEncoding.EncodeToString([]byte(phJSON))
var payload string
- if claimset != noPayload {
+ if val, ok := claimset.(string); ok {
+ payload = val
+ } else {
cs, err := json.Marshal(claimset)
if err != nil {
return nil, err
diff --git a/vendor/golang.org/x/crypto/acme/rfc8555.go b/vendor/golang.org/x/crypto/acme/rfc8555.go
index 928a5aa0..940e70b8 100644
--- a/vendor/golang.org/x/crypto/acme/rfc8555.go
+++ b/vendor/golang.org/x/crypto/acme/rfc8555.go
@@ -24,6 +24,9 @@ import (
//
// It only works with CAs implementing RFC 8555.
func (c *Client) DeactivateReg(ctx context.Context) error {
+ if _, err := c.Discover(ctx); err != nil { // required by c.accountKID
+ return err
+ }
url := string(c.accountKID(ctx))
if url == "" {
return ErrNoAccount
@@ -148,6 +151,42 @@ func responseAccount(res *http.Response) (*Account, error) {
}, nil
}
+// accountKeyRollover attempts to perform account key rollover.
+// On success it will change client.Key to the new key.
+func (c *Client) accountKeyRollover(ctx context.Context, newKey crypto.Signer) error {
+ dir, err := c.Discover(ctx) // Also required by c.accountKID
+ if err != nil {
+ return err
+ }
+ kid := c.accountKID(ctx)
+ if kid == noKeyID {
+ return ErrNoAccount
+ }
+ oldKey, err := jwkEncode(c.Key.Public())
+ if err != nil {
+ return err
+ }
+ payload := struct {
+ Account string `json:"account"`
+ OldKey json.RawMessage `json:"oldKey"`
+ }{
+ Account: string(kid),
+ OldKey: json.RawMessage(oldKey),
+ }
+ inner, err := jwsEncodeJSON(payload, newKey, noKeyID, noNonce, dir.KeyChangeURL)
+ if err != nil {
+ return err
+ }
+
+ res, err := c.post(ctx, nil, dir.KeyChangeURL, base64.RawURLEncoding.EncodeToString(inner), wantStatus(http.StatusOK))
+ if err != nil {
+ return err
+ }
+ defer res.Body.Close()
+ c.Key = newKey
+ return nil
+}
+
// AuthorizeOrder initiates the order-based application for certificate issuance,
// as opposed to pre-authorization in Authorize.
// It is only supported by CAs implementing RFC 8555.
diff --git a/vendor/golang.org/x/crypto/sha3/doc.go b/vendor/golang.org/x/crypto/sha3/doc.go
index c2fef30a..decd8cf9 100644
--- a/vendor/golang.org/x/crypto/sha3/doc.go
+++ b/vendor/golang.org/x/crypto/sha3/doc.go
@@ -8,8 +8,7 @@
// Both types of hash function use the "sponge" construction and the Keccak
// permutation. For a detailed specification see http://keccak.noekeon.org/
//
-//
-// Guidance
+// # Guidance
//
// If you aren't sure what function you need, use SHAKE256 with at least 64
// bytes of output. The SHAKE instances are faster than the SHA3 instances;
@@ -19,8 +18,7 @@
// secret key to the input, hash with SHAKE256 and read at least 32 bytes of
// output.
//
-//
-// Security strengths
+// # Security strengths
//
// The SHA3-x (x equals 224, 256, 384, or 512) functions have a security
// strength against preimage attacks of x bits. Since they only produce "x"
@@ -31,8 +29,7 @@
// is used. Requesting more than 64 or 32 bytes of output, respectively, does
// not increase the collision-resistance of the SHAKE functions.
//
-//
-// The sponge construction
+// # The sponge construction
//
// A sponge builds a pseudo-random function from a public pseudo-random
// permutation, by applying the permutation to a state of "rate + capacity"
@@ -50,8 +47,7 @@
// Since the KeccakF-1600 permutation is 1600 bits (200 bytes) wide, this means
// that the security strength of a sponge instance is equal to (1600 - bitrate) / 2.
//
-//
-// Recommendations
+// # Recommendations
//
// The SHAKE functions are recommended for most new uses. They can produce
// output of arbitrary length. SHAKE256, with an output length of at least
diff --git a/vendor/golang.org/x/crypto/sha3/sha3_s390x.go b/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
index 4fcfc924..63a3edb4 100644
--- a/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
+++ b/vendor/golang.org/x/crypto/sha3/sha3_s390x.go
@@ -34,11 +34,13 @@ const (
// kimd is a wrapper for the 'compute intermediate message digest' instruction.
// src must be a multiple of the rate for the given function code.
+//
//go:noescape
func kimd(function code, chain *[200]byte, src []byte)
// klmd is a wrapper for the 'compute last message digest' instruction.
// src padding is handled by the instruction.
+//
//go:noescape
func klmd(function code, chain *[200]byte, dst, src []byte)
diff --git a/vendor/golang.org/x/mod/module/module.go b/vendor/golang.org/x/mod/module/module.go
index ba97ac35..355b5a45 100644
--- a/vendor/golang.org/x/mod/module/module.go
+++ b/vendor/golang.org/x/mod/module/module.go
@@ -286,12 +286,7 @@ func fileNameOK(r rune) bool {
if '0' <= r && r <= '9' || 'A' <= r && r <= 'Z' || 'a' <= r && r <= 'z' {
return true
}
- for i := 0; i < len(allowed); i++ {
- if rune(allowed[i]) == r {
- return true
- }
- }
- return false
+ return strings.ContainsRune(allowed, r)
}
// It may be OK to add more ASCII punctuation here, but only carefully.
// For example Windows disallows < > \, and macOS disallows :, so we must not allow those.
@@ -803,6 +798,7 @@ func unescapeString(escaped string) (string, bool) {
// GOPRIVATE environment variable, as described by 'go help module-private'.
//
// It ignores any empty or malformed patterns in the list.
+// Trailing slashes on patterns are ignored.
func MatchPrefixPatterns(globs, target string) bool {
for globs != "" {
// Extract next non-empty glob in comma-separated list.
@@ -812,6 +808,7 @@ func MatchPrefixPatterns(globs, target string) bool {
} else {
glob, globs = globs, ""
}
+ glob = strings.TrimSuffix(glob, "/")
if glob == "" {
continue
}
diff --git a/vendor/golang.org/x/mod/semver/semver.go b/vendor/golang.org/x/mod/semver/semver.go
index 7be398f8..a30a22bf 100644
--- a/vendor/golang.org/x/mod/semver/semver.go
+++ b/vendor/golang.org/x/mod/semver/semver.go
@@ -32,7 +32,6 @@ type parsed struct {
short string
prerelease string
build string
- err string
}
// IsValid reports whether v is a valid semantic version string.
@@ -172,12 +171,10 @@ func Sort(list []string) {
func parse(v string) (p parsed, ok bool) {
if v == "" || v[0] != 'v' {
- p.err = "missing v prefix"
return
}
p.major, v, ok = parseInt(v[1:])
if !ok {
- p.err = "bad major version"
return
}
if v == "" {
@@ -187,13 +184,11 @@ func parse(v string) (p parsed, ok bool) {
return
}
if v[0] != '.' {
- p.err = "bad minor prefix"
ok = false
return
}
p.minor, v, ok = parseInt(v[1:])
if !ok {
- p.err = "bad minor version"
return
}
if v == "" {
@@ -202,31 +197,26 @@ func parse(v string) (p parsed, ok bool) {
return
}
if v[0] != '.' {
- p.err = "bad patch prefix"
ok = false
return
}
p.patch, v, ok = parseInt(v[1:])
if !ok {
- p.err = "bad patch version"
return
}
if len(v) > 0 && v[0] == '-' {
p.prerelease, v, ok = parsePrerelease(v)
if !ok {
- p.err = "bad prerelease"
return
}
}
if len(v) > 0 && v[0] == '+' {
p.build, v, ok = parseBuild(v)
if !ok {
- p.err = "bad build"
return
}
}
if v != "" {
- p.err = "junk on end"
ok = false
return
}
diff --git a/vendor/golang.org/x/net/http/httpguts/httplex.go b/vendor/golang.org/x/net/http/httpguts/httplex.go
index c79aa73f..6e071e85 100644
--- a/vendor/golang.org/x/net/http/httpguts/httplex.go
+++ b/vendor/golang.org/x/net/http/httpguts/httplex.go
@@ -173,13 +173,15 @@ func tokenEqual(t1, t2 string) bool {
// isLWS reports whether b is linear white space, according
// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
-// LWS = [CRLF] 1*( SP | HT )
+//
+// LWS = [CRLF] 1*( SP | HT )
func isLWS(b byte) bool { return b == ' ' || b == '\t' }
// isCTL reports whether b is a control byte, according
// to http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2
-// CTL =
+//
+// CTL =
func isCTL(b byte) bool {
const del = 0x7f // a CTL
return b < ' ' || b == del
@@ -189,12 +191,13 @@ func isCTL(b byte) bool {
// HTTP/2 imposes the additional restriction that uppercase ASCII
// letters are not allowed.
//
-// RFC 7230 says:
-// header-field = field-name ":" OWS field-value OWS
-// field-name = token
-// token = 1*tchar
-// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
-// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
+// RFC 7230 says:
+//
+// header-field = field-name ":" OWS field-value OWS
+// field-name = token
+// token = 1*tchar
+// tchar = "!" / "#" / "$" / "%" / "&" / "'" / "*" / "+" / "-" / "." /
+// "^" / "_" / "`" / "|" / "~" / DIGIT / ALPHA
func ValidHeaderFieldName(v string) bool {
if len(v) == 0 {
return false
@@ -267,27 +270,28 @@ var validHostByte = [256]bool{
// ValidHeaderFieldValue reports whether v is a valid "field-value" according to
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2 :
//
-// message-header = field-name ":" [ field-value ]
-// field-value = *( field-content | LWS )
-// field-content =
+// message-header = field-name ":" [ field-value ]
+// field-value = *( field-content | LWS )
+// field-content =
//
// http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 :
//
-// TEXT =
-// LWS = [CRLF] 1*( SP | HT )
-// CTL =
+// TEXT =
+// LWS = [CRLF] 1*( SP | HT )
+// CTL =
//
// RFC 7230 says:
-// field-value = *( field-content / obs-fold )
-// obj-fold = N/A to http2, and deprecated
-// field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
-// field-vchar = VCHAR / obs-text
-// obs-text = %x80-FF
-// VCHAR = "any visible [USASCII] character"
+//
+// field-value = *( field-content / obs-fold )
+// obj-fold = N/A to http2, and deprecated
+// field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]
+// field-vchar = VCHAR / obs-text
+// obs-text = %x80-FF
+// VCHAR = "any visible [USASCII] character"
//
// http2 further says: "Similarly, HTTP/2 allows header field values
// that are not valid. While most of the values that can be encoded
diff --git a/vendor/golang.org/x/net/http2/errors.go b/vendor/golang.org/x/net/http2/errors.go
index 2663e5d2..f2067dab 100644
--- a/vendor/golang.org/x/net/http2/errors.go
+++ b/vendor/golang.org/x/net/http2/errors.go
@@ -136,7 +136,7 @@ func (e headerFieldNameError) Error() string {
type headerFieldValueError string
func (e headerFieldValueError) Error() string {
- return fmt.Sprintf("invalid header field value %q", string(e))
+ return fmt.Sprintf("invalid header field value for %q", string(e))
}
var (
diff --git a/vendor/golang.org/x/net/http2/frame.go b/vendor/golang.org/x/net/http2/frame.go
index 96a74790..0178647e 100644
--- a/vendor/golang.org/x/net/http2/frame.go
+++ b/vendor/golang.org/x/net/http2/frame.go
@@ -1532,7 +1532,8 @@ func (fr *Framer) readMetaFrame(hf *HeadersFrame) (*MetaHeadersFrame, error) {
fr.debugReadLoggerf("http2: decoded hpack field %+v", hf)
}
if !httpguts.ValidHeaderFieldValue(hf.Value) {
- invalid = headerFieldValueError(hf.Value)
+ // Don't include the value in the error, because it may be sensitive.
+ invalid = headerFieldValueError(hf.Name)
}
isPseudo := strings.HasPrefix(hf.Name, ":")
if isPseudo {
diff --git a/vendor/golang.org/x/net/http2/h2c/h2c.go b/vendor/golang.org/x/net/http2/h2c/h2c.go
index c0970d84..c3df711d 100644
--- a/vendor/golang.org/x/net/http2/h2c/h2c.go
+++ b/vendor/golang.org/x/net/http2/h2c/h2c.go
@@ -12,7 +12,6 @@ import (
"bufio"
"bytes"
"encoding/base64"
- "encoding/binary"
"errors"
"fmt"
"io"
@@ -25,7 +24,6 @@ import (
"golang.org/x/net/http/httpguts"
"golang.org/x/net/http2"
- "golang.org/x/net/http2/hpack"
)
var (
@@ -61,6 +59,10 @@ type h2cHandler struct {
// Once a request is recognized as h2c, we hijack the connection and convert it
// to an HTTP/2 connection which is understandable to s.ServeConn. (s.ServeConn
// understands HTTP/2 except for the h2c part of it.)
+//
+// The first request on an h2c connection is read entirely into memory before
+// the Handler is called. To limit the memory consumed by this request, wrap
+// the result of NewHandler in an http.MaxBytesHandler.
func NewHandler(h http.Handler, s *http2.Server) http.Handler {
return &h2cHandler{
Handler: h,
@@ -83,24 +85,31 @@ func (s h2cHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
defer conn.Close()
-
s.s.ServeConn(conn, &http2.ServeConnOpts{
- Context: r.Context(),
- Handler: s.Handler,
+ Context: r.Context(),
+ Handler: s.Handler,
+ SawClientPreface: true,
})
return
}
// Handle Upgrade to h2c (RFC 7540 Section 3.2)
- if conn, err := h2cUpgrade(w, r); err == nil {
+ if isH2CUpgrade(r.Header) {
+ conn, settings, err := h2cUpgrade(w, r)
+ if err != nil {
+ if http2VerboseLogs {
+ log.Printf("h2c: error h2c upgrade: %v", err)
+ }
+ return
+ }
defer conn.Close()
-
s.s.ServeConn(conn, &http2.ServeConnOpts{
- Context: r.Context(),
- Handler: s.Handler,
+ Context: r.Context(),
+ Handler: s.Handler,
+ UpgradeRequest: r,
+ Settings: settings,
})
return
}
-
s.Handler.ServeHTTP(w, r)
return
}
@@ -113,11 +122,11 @@ func (s h2cHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
func initH2CWithPriorKnowledge(w http.ResponseWriter) (net.Conn, error) {
hijacker, ok := w.(http.Hijacker)
if !ok {
- panic("Hijack not supported.")
+ return nil, errors.New("h2c: connection does not support Hijack")
}
conn, rw, err := hijacker.Hijack()
if err != nil {
- panic(fmt.Sprintf("Hijack failed: %v", err))
+ return nil, err
}
const expectedBody = "SM\r\n\r\n"
@@ -125,249 +134,40 @@ func initH2CWithPriorKnowledge(w http.ResponseWriter) (net.Conn, error) {
buf := make([]byte, len(expectedBody))
n, err := io.ReadFull(rw, buf)
if err != nil {
- return nil, fmt.Errorf("could not read from the buffer: %s", err)
+ return nil, fmt.Errorf("h2c: error reading client preface: %s", err)
}
if string(buf[:n]) == expectedBody {
- c := &rwConn{
- Conn: conn,
- Reader: io.MultiReader(strings.NewReader(http2.ClientPreface), rw),
- BufWriter: rw.Writer,
- }
- return c, nil
+ return newBufConn(conn, rw), nil
}
conn.Close()
- if http2VerboseLogs {
- log.Printf(
- "h2c: missing the request body portion of the client preface. Wanted: %v Got: %v",
- []byte(expectedBody),
- buf[0:n],
- )
- }
- return nil, errors.New("invalid client preface")
-}
-
-// drainClientPreface reads a single instance of the HTTP/2 client preface from
-// the supplied reader.
-func drainClientPreface(r io.Reader) error {
- var buf bytes.Buffer
- prefaceLen := int64(len(http2.ClientPreface))
- n, err := io.CopyN(&buf, r, prefaceLen)
- if err != nil {
- return err
- }
- if n != prefaceLen || buf.String() != http2.ClientPreface {
- return fmt.Errorf("Client never sent: %s", http2.ClientPreface)
- }
- return nil
+ return nil, errors.New("h2c: invalid client preface")
}
// h2cUpgrade establishes a h2c connection using the HTTP/1 upgrade (Section 3.2).
-func h2cUpgrade(w http.ResponseWriter, r *http.Request) (net.Conn, error) {
- if !isH2CUpgrade(r.Header) {
- return nil, errors.New("non-conforming h2c headers")
- }
-
- // Initial bytes we put into conn to fool http2 server
- initBytes, _, err := convertH1ReqToH2(r)
+func h2cUpgrade(w http.ResponseWriter, r *http.Request) (_ net.Conn, settings []byte, err error) {
+ settings, err = getH2Settings(r.Header)
if err != nil {
- return nil, err
+ return nil, nil, err
}
-
hijacker, ok := w.(http.Hijacker)
if !ok {
- return nil, errors.New("hijack not supported.")
+ return nil, nil, errors.New("h2c: connection does not support Hijack")
}
+
+ body, _ := io.ReadAll(r.Body)
+ r.Body = io.NopCloser(bytes.NewBuffer(body))
+
conn, rw, err := hijacker.Hijack()
if err != nil {
- return nil, fmt.Errorf("hijack failed: %v", err)
+ return nil, nil, err
}
rw.Write([]byte("HTTP/1.1 101 Switching Protocols\r\n" +
"Connection: Upgrade\r\n" +
"Upgrade: h2c\r\n\r\n"))
- rw.Flush()
-
- // A conforming client will now send an H2 client preface which need to drain
- // since we already sent this.
- if err := drainClientPreface(rw); err != nil {
- return nil, err
- }
-
- c := &rwConn{
- Conn: conn,
- Reader: io.MultiReader(initBytes, rw),
- BufWriter: newSettingsAckSwallowWriter(rw.Writer),
- }
- return c, nil
-}
-
-// convert the data contained in the HTTP/1 upgrade request into the HTTP/2
-// version in byte form.
-func convertH1ReqToH2(r *http.Request) (*bytes.Buffer, []http2.Setting, error) {
- h2Bytes := bytes.NewBuffer([]byte((http2.ClientPreface)))
- framer := http2.NewFramer(h2Bytes, nil)
- settings, err := getH2Settings(r.Header)
- if err != nil {
- return nil, nil, err
- }
-
- if err := framer.WriteSettings(settings...); err != nil {
- return nil, nil, err
- }
-
- headerBytes, err := getH2HeaderBytes(r, getMaxHeaderTableSize(settings))
- if err != nil {
- return nil, nil, err
- }
-
- maxFrameSize := int(getMaxFrameSize(settings))
- needOneHeader := len(headerBytes) < maxFrameSize
- err = framer.WriteHeaders(http2.HeadersFrameParam{
- StreamID: 1,
- BlockFragment: headerBytes,
- EndHeaders: needOneHeader,
- })
- if err != nil {
- return nil, nil, err
- }
-
- for i := maxFrameSize; i < len(headerBytes); i += maxFrameSize {
- if len(headerBytes)-i > maxFrameSize {
- if err := framer.WriteContinuation(1,
- false, // endHeaders
- headerBytes[i:maxFrameSize]); err != nil {
- return nil, nil, err
- }
- } else {
- if err := framer.WriteContinuation(1,
- true, // endHeaders
- headerBytes[i:]); err != nil {
- return nil, nil, err
- }
- }
- }
-
- return h2Bytes, settings, nil
-}
-
-// getMaxFrameSize returns the SETTINGS_MAX_FRAME_SIZE. If not present default
-// value is 16384 as specified by RFC 7540 Section 6.5.2.
-func getMaxFrameSize(settings []http2.Setting) uint32 {
- for _, setting := range settings {
- if setting.ID == http2.SettingMaxFrameSize {
- return setting.Val
- }
- }
- return 16384
-}
-
-// getMaxHeaderTableSize returns the SETTINGS_HEADER_TABLE_SIZE. If not present
-// default value is 4096 as specified by RFC 7540 Section 6.5.2.
-func getMaxHeaderTableSize(settings []http2.Setting) uint32 {
- for _, setting := range settings {
- if setting.ID == http2.SettingHeaderTableSize {
- return setting.Val
- }
- }
- return 4096
-}
-
-// bufWriter is a Writer interface that also has a Flush method.
-type bufWriter interface {
- io.Writer
- Flush() error
-}
-
-// rwConn implements net.Conn but overrides Read and Write so that reads and
-// writes are forwarded to the provided io.Reader and bufWriter.
-type rwConn struct {
- net.Conn
- io.Reader
- BufWriter bufWriter
-}
-
-// Read forwards reads to the underlying Reader.
-func (c *rwConn) Read(p []byte) (int, error) {
- return c.Reader.Read(p)
-}
-
-// Write forwards writes to the underlying bufWriter and immediately flushes.
-func (c *rwConn) Write(p []byte) (int, error) {
- n, err := c.BufWriter.Write(p)
- if err := c.BufWriter.Flush(); err != nil {
- return 0, err
- }
- return n, err
-}
-
-// settingsAckSwallowWriter is a writer that normally forwards bytes to its
-// underlying Writer, but swallows the first SettingsAck frame that it sees.
-type settingsAckSwallowWriter struct {
- Writer *bufio.Writer
- buf []byte
- didSwallow bool
-}
-
-// newSettingsAckSwallowWriter returns a new settingsAckSwallowWriter.
-func newSettingsAckSwallowWriter(w *bufio.Writer) *settingsAckSwallowWriter {
- return &settingsAckSwallowWriter{
- Writer: w,
- buf: make([]byte, 0),
- didSwallow: false,
- }
-}
-
-// Write implements io.Writer interface. Normally forwards bytes to w.Writer,
-// except for the first Settings ACK frame that it sees.
-func (w *settingsAckSwallowWriter) Write(p []byte) (int, error) {
- if !w.didSwallow {
- w.buf = append(w.buf, p...)
- // Process all the frames we have collected into w.buf
- for {
- // Append until we get full frame header which is 9 bytes
- if len(w.buf) < 9 {
- break
- }
- // Check if we have collected a whole frame.
- fh, err := http2.ReadFrameHeader(bytes.NewBuffer(w.buf))
- if err != nil {
- // Corrupted frame, fail current Write
- return 0, err
- }
- fSize := fh.Length + 9
- if uint32(len(w.buf)) < fSize {
- // Have not collected whole frame. Stop processing buf, and withhold on
- // forward bytes to w.Writer until we get the full frame.
- break
- }
-
- // We have now collected a whole frame.
- if fh.Type == http2.FrameSettings && fh.Flags.Has(http2.FlagSettingsAck) {
- // If Settings ACK frame, do not forward to underlying writer, remove
- // bytes from w.buf, and record that we have swallowed Settings Ack
- // frame.
- w.didSwallow = true
- w.buf = w.buf[fSize:]
- continue
- }
-
- // Not settings ack frame. Forward bytes to w.Writer.
- if _, err := w.Writer.Write(w.buf[:fSize]); err != nil {
- // Couldn't forward bytes. Fail current Write.
- return 0, err
- }
- w.buf = w.buf[fSize:]
- }
- return len(p), nil
- }
- return w.Writer.Write(p)
-}
-
-// Flush calls w.Writer.Flush.
-func (w *settingsAckSwallowWriter) Flush() error {
- return w.Writer.Flush()
+ return newBufConn(conn, rw), settings, nil
}
// isH2CUpgrade returns true if the header properly request an upgrade to h2c
@@ -377,9 +177,8 @@ func isH2CUpgrade(h http.Header) bool {
httpguts.HeaderValuesContainsToken(h[textproto.CanonicalMIMEHeaderKey("Connection")], "HTTP2-Settings")
}
-// getH2Settings returns the []http2.Setting that are encoded in the
-// HTTP2-Settings header.
-func getH2Settings(h http.Header) ([]http2.Setting, error) {
+// getH2Settings returns the settings in the HTTP2-Settings header.
+func getH2Settings(h http.Header) ([]byte, error) {
vals, ok := h[textproto.CanonicalMIMEHeaderKey("HTTP2-Settings")]
if !ok {
return nil, errors.New("missing HTTP2-Settings header")
@@ -387,115 +186,40 @@ func getH2Settings(h http.Header) ([]http2.Setting, error) {
if len(vals) != 1 {
return nil, fmt.Errorf("expected 1 HTTP2-Settings. Got: %v", vals)
}
- settings, err := decodeSettings(vals[0])
+ settings, err := base64.RawURLEncoding.DecodeString(vals[0])
if err != nil {
- return nil, fmt.Errorf("Invalid HTTP2-Settings: %q", vals[0])
+ return nil, err
}
return settings, nil
}
-// decodeSettings decodes the base64url header value of the HTTP2-Settings
-// header. RFC 7540 Section 3.2.1.
-func decodeSettings(headerVal string) ([]http2.Setting, error) {
- b, err := base64.RawURLEncoding.DecodeString(headerVal)
- if err != nil {
- return nil, err
+func newBufConn(conn net.Conn, rw *bufio.ReadWriter) net.Conn {
+ rw.Flush()
+ if rw.Reader.Buffered() == 0 {
+ // If there's no buffered data to be read,
+ // we can just discard the bufio.ReadWriter.
+ return conn
}
- if len(b)%6 != 0 {
- return nil, err
- }
- settings := make([]http2.Setting, 0)
- for i := 0; i < len(b)/6; i++ {
- settings = append(settings, http2.Setting{
- ID: http2.SettingID(binary.BigEndian.Uint16(b[i*6 : i*6+2])),
- Val: binary.BigEndian.Uint32(b[i*6+2 : i*6+6]),
- })
- }
-
- return settings, nil
+ return &bufConn{conn, rw.Reader}
}
-// getH2HeaderBytes return the headers in r a []bytes encoded by HPACK.
-func getH2HeaderBytes(r *http.Request, maxHeaderTableSize uint32) ([]byte, error) {
- headerBytes := bytes.NewBuffer(nil)
- hpackEnc := hpack.NewEncoder(headerBytes)
- hpackEnc.SetMaxDynamicTableSize(maxHeaderTableSize)
-
- // Section 8.1.2.3
- err := hpackEnc.WriteField(hpack.HeaderField{
- Name: ":method",
- Value: r.Method,
- })
- if err != nil {
- return nil, err
- }
-
- err = hpackEnc.WriteField(hpack.HeaderField{
- Name: ":scheme",
- Value: "http",
- })
- if err != nil {
- return nil, err
- }
-
- err = hpackEnc.WriteField(hpack.HeaderField{
- Name: ":authority",
- Value: r.Host,
- })
- if err != nil {
- return nil, err
- }
-
- path := r.URL.Path
- if r.URL.RawQuery != "" {
- path = strings.Join([]string{path, r.URL.RawQuery}, "?")
- }
- err = hpackEnc.WriteField(hpack.HeaderField{
- Name: ":path",
- Value: path,
- })
- if err != nil {
- return nil, err
- }
-
- // TODO Implement Section 8.3
-
- for header, values := range r.Header {
- // Skip non h2 headers
- if isNonH2Header(header) {
- continue
- }
- for _, v := range values {
- err := hpackEnc.WriteField(hpack.HeaderField{
- Name: strings.ToLower(header),
- Value: v,
- })
- if err != nil {
- return nil, err
- }
- }
- }
- return headerBytes.Bytes(), nil
+// bufConn wraps a net.Conn, but reads drain the bufio.Reader first.
+type bufConn struct {
+ net.Conn
+ *bufio.Reader
}
-// Connection specific headers listed in RFC 7540 Section 8.1.2.2 that are not
-// suppose to be transferred to HTTP/2. The Http2-Settings header is skipped
-// since already use to create the HTTP/2 SETTINGS frame.
-var nonH2Headers = []string{
- "Connection",
- "Keep-Alive",
- "Proxy-Connection",
- "Transfer-Encoding",
- "Upgrade",
- "Http2-Settings",
-}
-
-// isNonH2Header returns true if header should not be transferred to HTTP/2.
-func isNonH2Header(header string) bool {
- for _, nonH2h := range nonH2Headers {
- if header == nonH2h {
- return true
- }
+func (c *bufConn) Read(p []byte) (int, error) {
+ if c.Reader == nil {
+ return c.Conn.Read(p)
}
- return false
+ n := c.Reader.Buffered()
+ if n == 0 {
+ c.Reader = nil
+ return c.Conn.Read(p)
+ }
+ if n < len(p) {
+ p = p[:n]
+ }
+ return c.Reader.Read(p)
}
diff --git a/vendor/golang.org/x/net/http2/hpack/huffman.go b/vendor/golang.org/x/net/http2/hpack/huffman.go
index fe0b84cc..20d083a7 100644
--- a/vendor/golang.org/x/net/http2/hpack/huffman.go
+++ b/vendor/golang.org/x/net/http2/hpack/huffman.go
@@ -169,25 +169,50 @@ func buildRootHuffmanNode() {
// AppendHuffmanString appends s, as encoded in Huffman codes, to dst
// and returns the extended buffer.
func AppendHuffmanString(dst []byte, s string) []byte {
- rembits := uint8(8)
-
+ // This relies on the maximum huffman code length being 30 (See tables.go huffmanCodeLen array)
+ // So if a uint64 buffer has less than 32 valid bits can always accommodate another huffmanCode.
+ var (
+ x uint64 // buffer
+ n uint // number valid of bits present in x
+ )
for i := 0; i < len(s); i++ {
- if rembits == 8 {
- dst = append(dst, 0)
+ c := s[i]
+ n += uint(huffmanCodeLen[c])
+ x <<= huffmanCodeLen[c] % 64
+ x |= uint64(huffmanCodes[c])
+ if n >= 32 {
+ n %= 32 // Normally would be -= 32 but %= 32 informs compiler 0 <= n <= 31 for upcoming shift
+ y := uint32(x >> n) // Compiler doesn't combine memory writes if y isn't uint32
+ dst = append(dst, byte(y>>24), byte(y>>16), byte(y>>8), byte(y))
}
- dst, rembits = appendByteToHuffmanCode(dst, rembits, s[i])
}
-
- if rembits < 8 {
- // special EOS symbol
- code := uint32(0x3fffffff)
- nbits := uint8(30)
-
- t := uint8(code >> (nbits - rembits))
- dst[len(dst)-1] |= t
+ // Add padding bits if necessary
+ if over := n % 8; over > 0 {
+ const (
+ eosCode = 0x3fffffff
+ eosNBits = 30
+ eosPadByte = eosCode >> (eosNBits - 8)
+ )
+ pad := 8 - over
+ x = (x << pad) | (eosPadByte >> over)
+ n += pad // 8 now divides into n exactly
}
-
- return dst
+ // n in (0, 8, 16, 24, 32)
+ switch n / 8 {
+ case 0:
+ return dst
+ case 1:
+ return append(dst, byte(x))
+ case 2:
+ y := uint16(x)
+ return append(dst, byte(y>>8), byte(y))
+ case 3:
+ y := uint16(x >> 8)
+ return append(dst, byte(y>>8), byte(y), byte(x))
+ }
+ // case 4:
+ y := uint32(x)
+ return append(dst, byte(y>>24), byte(y>>16), byte(y>>8), byte(y))
}
// HuffmanEncodeLength returns the number of bytes required to encode
@@ -199,35 +224,3 @@ func HuffmanEncodeLength(s string) uint64 {
}
return (n + 7) / 8
}
-
-// appendByteToHuffmanCode appends Huffman code for c to dst and
-// returns the extended buffer and the remaining bits in the last
-// element. The appending is not byte aligned and the remaining bits
-// in the last element of dst is given in rembits.
-func appendByteToHuffmanCode(dst []byte, rembits uint8, c byte) ([]byte, uint8) {
- code := huffmanCodes[c]
- nbits := huffmanCodeLen[c]
-
- for {
- if rembits > nbits {
- t := uint8(code << (rembits - nbits))
- dst[len(dst)-1] |= t
- rembits -= nbits
- break
- }
-
- t := uint8(code >> (nbits - rembits))
- dst[len(dst)-1] |= t
-
- nbits -= rembits
- rembits = 8
-
- if nbits == 0 {
- break
- }
-
- dst = append(dst, 0)
- }
-
- return dst, rembits
-}
diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go
index 5571ccfd..479ba4b2 100644
--- a/vendor/golang.org/x/net/http2/http2.go
+++ b/vendor/golang.org/x/net/http2/http2.go
@@ -13,7 +13,6 @@
// See https://http2.github.io/ for more information on HTTP/2.
//
// See https://http2.golang.org/ for a test server running this code.
-//
package http2 // import "golang.org/x/net/http2"
import (
@@ -176,10 +175,11 @@ func (s SettingID) String() string {
// name (key). See httpguts.ValidHeaderName for the base rules.
//
// Further, http2 says:
-// "Just as in HTTP/1.x, header field names are strings of ASCII
-// characters that are compared in a case-insensitive
-// fashion. However, header field names MUST be converted to
-// lowercase prior to their encoding in HTTP/2. "
+//
+// "Just as in HTTP/1.x, header field names are strings of ASCII
+// characters that are compared in a case-insensitive
+// fashion. However, header field names MUST be converted to
+// lowercase prior to their encoding in HTTP/2. "
func validWireHeaderFieldName(v string) bool {
if len(v) == 0 {
return false
@@ -365,8 +365,8 @@ func (s *sorter) SortStrings(ss []string) {
// validPseudoPath reports whether v is a valid :path pseudo-header
// value. It must be either:
//
-// *) a non-empty string starting with '/'
-// *) the string '*', for OPTIONS requests.
+// - a non-empty string starting with '/'
+// - the string '*', for OPTIONS requests.
//
// For now this is only used a quick check for deciding when to clean
// up Opaque URLs before sending requests from the Transport.
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index e644d9b2..47524a61 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -315,6 +315,20 @@ type ServeConnOpts struct {
// requests. If nil, BaseConfig.Handler is used. If BaseConfig
// or BaseConfig.Handler is nil, http.DefaultServeMux is used.
Handler http.Handler
+
+ // UpgradeRequest is an initial request received on a connection
+ // undergoing an h2c upgrade. The request body must have been
+ // completely read from the connection before calling ServeConn,
+ // and the 101 Switching Protocols response written.
+ UpgradeRequest *http.Request
+
+ // Settings is the decoded contents of the HTTP2-Settings header
+ // in an h2c upgrade request.
+ Settings []byte
+
+ // SawClientPreface is set if the HTTP/2 connection preface
+ // has already been read from the connection.
+ SawClientPreface bool
}
func (o *ServeConnOpts) context() context.Context {
@@ -383,6 +397,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
headerTableSize: initialHeaderTableSize,
serveG: newGoroutineLock(),
pushEnabled: true,
+ sawClientPreface: opts.SawClientPreface,
}
s.state.registerConn(sc)
@@ -400,7 +415,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
if s.NewWriteScheduler != nil {
sc.writeSched = s.NewWriteScheduler()
} else {
- sc.writeSched = NewRandomWriteScheduler()
+ sc.writeSched = NewPriorityWriteScheduler(nil)
}
// These start at the RFC-specified defaults. If there is a higher
@@ -465,9 +480,27 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
}
}
+ if opts.Settings != nil {
+ fr := &SettingsFrame{
+ FrameHeader: FrameHeader{valid: true},
+ p: opts.Settings,
+ }
+ if err := fr.ForeachSetting(sc.processSetting); err != nil {
+ sc.rejectConn(ErrCodeProtocol, "invalid settings")
+ return
+ }
+ opts.Settings = nil
+ }
+
if hook := testHookGetServerConn; hook != nil {
hook(sc)
}
+
+ if opts.UpgradeRequest != nil {
+ sc.upgradeRequest(opts.UpgradeRequest)
+ opts.UpgradeRequest = nil
+ }
+
sc.serve()
}
@@ -512,6 +545,7 @@ type serverConn struct {
// Everything following is owned by the serve loop; use serveG.check():
serveG goroutineLock // used to verify funcs are on serve()
pushEnabled bool
+ sawClientPreface bool // preface has already been read, used in h2c upgrade
sawFirstSettings bool // got the initial SETTINGS frame after the preface
needToSendSettingsAck bool
unackedSettings int // how many SETTINGS have we sent without ACKs?
@@ -974,6 +1008,9 @@ var errPrefaceTimeout = errors.New("timeout waiting for client preface")
// returns errPrefaceTimeout on timeout, or an error if the greeting
// is invalid.
func (sc *serverConn) readPreface() error {
+ if sc.sawClientPreface {
+ return nil
+ }
errc := make(chan error, 1)
go func() {
// Read the client preface
@@ -1915,6 +1952,26 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
return nil
}
+func (sc *serverConn) upgradeRequest(req *http.Request) {
+ sc.serveG.check()
+ id := uint32(1)
+ sc.maxClientStreamID = id
+ st := sc.newStream(id, 0, stateHalfClosedRemote)
+ st.reqTrailer = req.Trailer
+ if st.reqTrailer != nil {
+ st.trailer = make(http.Header)
+ }
+ rw := sc.newResponseWriter(st, req)
+
+ // Disable any read deadline set by the net/http package
+ // prior to the upgrade.
+ if sc.hs.ReadTimeout != 0 {
+ sc.conn.SetReadDeadline(time.Time{})
+ }
+
+ go sc.runHandler(rw, req, sc.handler.ServeHTTP)
+}
+
func (st *stream) processTrailerHeaders(f *MetaHeadersFrame) error {
sc := st.sc
sc.serveG.check()
@@ -2145,6 +2202,11 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r
}
req = req.WithContext(st.ctx)
+ rw := sc.newResponseWriter(st, req)
+ return rw, req, nil
+}
+
+func (sc *serverConn) newResponseWriter(st *stream, req *http.Request) *responseWriter {
rws := responseWriterStatePool.Get().(*responseWriterState)
bwSave := rws.bw
*rws = responseWriterState{} // zero all the fields
@@ -2153,10 +2215,7 @@ func (sc *serverConn) newWriterAndRequestNoBody(st *stream, rp requestParam) (*r
rws.bw.Reset(chunkWriter{rws})
rws.stream = st
rws.req = req
- rws.body = body
-
- rw := &responseWriter{rws: rws}
- return rw, req, nil
+ return &responseWriter{rws: rws}
}
// Run on its own goroutine.
@@ -2316,17 +2375,18 @@ type requestBody struct {
_ incomparable
stream *stream
conn *serverConn
- closed bool // for use by Close only
- sawEOF bool // for use by Read only
- pipe *pipe // non-nil if we have a HTTP entity message body
- needsContinue bool // need to send a 100-continue
+ closeOnce sync.Once // for use by Close only
+ sawEOF bool // for use by Read only
+ pipe *pipe // non-nil if we have a HTTP entity message body
+ needsContinue bool // need to send a 100-continue
}
func (b *requestBody) Close() error {
- if b.pipe != nil && !b.closed {
- b.pipe.BreakWithError(errClosedBody)
- }
- b.closed = true
+ b.closeOnce.Do(func() {
+ if b.pipe != nil {
+ b.pipe.BreakWithError(errClosedBody)
+ }
+ })
return nil
}
@@ -2370,7 +2430,6 @@ type responseWriterState struct {
// immutable within a request:
stream *stream
req *http.Request
- body *requestBody // to close at end of request, if DATA frames didn't
conn *serverConn
// TODO: adjust buffer writing sizes based on server config, frame size updates from peer, etc
@@ -2546,8 +2605,9 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
// prior to the headers being written. If the set of trailers is fixed
// or known before the header is written, the normal Go trailers mechanism
// is preferred:
-// https://golang.org/pkg/net/http/#ResponseWriter
-// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
+//
+// https://golang.org/pkg/net/http/#ResponseWriter
+// https://golang.org/pkg/net/http/#example_ResponseWriter_trailers
const TrailerPrefix = "Trailer:"
// promoteUndeclaredTrailers permits http.Handlers to set trailers
@@ -2643,8 +2703,7 @@ func checkWriteHeaderCode(code int) {
// Issue 22880: require valid WriteHeader status codes.
// For now we only enforce that it's three digits.
// In the future we might block things over 599 (600 and above aren't defined
- // at http://httpwg.org/specs/rfc7231.html#status.codes)
- // and we might block under 200 (once we have more mature 1xx support).
+ // at http://httpwg.org/specs/rfc7231.html#status.codes).
// But for now any three digits.
//
// We used to send "HTTP/1.1 000 0" on the wire in responses but there's
@@ -2665,13 +2724,41 @@ func (w *responseWriter) WriteHeader(code int) {
}
func (rws *responseWriterState) writeHeader(code int) {
- if !rws.wroteHeader {
- checkWriteHeaderCode(code)
- rws.wroteHeader = true
- rws.status = code
- if len(rws.handlerHeader) > 0 {
- rws.snapHeader = cloneHeader(rws.handlerHeader)
+ if rws.wroteHeader {
+ return
+ }
+
+ checkWriteHeaderCode(code)
+
+ // Handle informational headers
+ if code >= 100 && code <= 199 {
+ // Per RFC 8297 we must not clear the current header map
+ h := rws.handlerHeader
+
+ _, cl := h["Content-Length"]
+ _, te := h["Transfer-Encoding"]
+ if cl || te {
+ h = h.Clone()
+ h.Del("Content-Length")
+ h.Del("Transfer-Encoding")
}
+
+ if rws.conn.writeHeaders(rws.stream, &writeResHeaders{
+ streamID: rws.stream.id,
+ httpResCode: code,
+ h: h,
+ endStream: rws.handlerDone && !rws.hasTrailers(),
+ }) != nil {
+ rws.dirty = true
+ }
+
+ return
+ }
+
+ rws.wroteHeader = true
+ rws.status = code
+ if len(rws.handlerHeader) > 0 {
+ rws.snapHeader = cloneHeader(rws.handlerHeader)
}
}
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index 4f098976..4ded4dfd 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -16,7 +16,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"log"
"math"
mathrand "math/rand"
@@ -501,12 +500,14 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
if req, err = shouldRetryRequest(req, err); err == nil {
// After the first retry, do exponential backoff with 10% jitter.
if retry == 0 {
+ t.vlogf("RoundTrip retrying after failure: %v", err)
continue
}
backoff := float64(uint(1) << (uint(retry) - 1))
backoff += backoff * (0.1 * mathrand.Float64())
select {
case <-time.After(time.Second * time.Duration(backoff)):
+ t.vlogf("RoundTrip retrying after failure: %v", err)
continue
case <-req.Context().Done():
err = req.Context().Err()
@@ -732,10 +733,13 @@ func (cc *ClientConn) healthCheck() {
// trigger the healthCheck again if there is no frame received.
ctx, cancel := context.WithTimeout(context.Background(), pingTimeout)
defer cancel()
+ cc.vlogf("http2: Transport sending health check")
err := cc.Ping(ctx)
if err != nil {
+ cc.vlogf("http2: Transport health check failure: %v", err)
cc.closeForLostPing()
- return
+ } else {
+ cc.vlogf("http2: Transport health check success")
}
}
@@ -1765,7 +1769,8 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
}
for _, v := range vv {
if !httpguts.ValidHeaderFieldValue(v) {
- return nil, fmt.Errorf("invalid HTTP header value %q for header %q", v, k)
+ // Don't include the value in the error, because it may be sensitive.
+ return nil, fmt.Errorf("invalid HTTP header value for header %q", k)
}
}
}
@@ -2898,7 +2903,12 @@ func (t *Transport) logf(format string, args ...interface{}) {
log.Printf(format, args...)
}
-var noBody io.ReadCloser = ioutil.NopCloser(bytes.NewReader(nil))
+var noBody io.ReadCloser = noBodyReader{}
+
+type noBodyReader struct{}
+
+func (noBodyReader) Close() error { return nil }
+func (noBodyReader) Read([]byte) (int, error) { return 0, io.EOF }
type missingBody struct{}
diff --git a/vendor/golang.org/x/net/idna/trieval.go b/vendor/golang.org/x/net/idna/trieval.go
index 7a8cf889..9c070a44 100644
--- a/vendor/golang.org/x/net/idna/trieval.go
+++ b/vendor/golang.org/x/net/idna/trieval.go
@@ -17,23 +17,23 @@ package idna
//
// The per-rune values have the following format:
//
-// if mapped {
-// if inlinedXOR {
-// 15..13 inline XOR marker
-// 12..11 unused
-// 10..3 inline XOR mask
-// } else {
-// 15..3 index into xor or mapping table
-// }
-// } else {
-// 15..14 unused
-// 13 mayNeedNorm
-// 12..11 attributes
-// 10..8 joining type
-// 7..3 category type
-// }
-// 2 use xor pattern
-// 1..0 mapped category
+// if mapped {
+// if inlinedXOR {
+// 15..13 inline XOR marker
+// 12..11 unused
+// 10..3 inline XOR mask
+// } else {
+// 15..3 index into xor or mapping table
+// }
+// } else {
+// 15..14 unused
+// 13 mayNeedNorm
+// 12..11 attributes
+// 10..8 joining type
+// 7..3 category type
+// }
+// 2 use xor pattern
+// 1..0 mapped category
//
// See the definitions below for a more detailed description of the various
// bits.
diff --git a/vendor/golang.org/x/net/webdav/file.go b/vendor/golang.org/x/net/webdav/file.go
index 3fcc0539..c48a17e9 100644
--- a/vendor/golang.org/x/net/webdav/file.go
+++ b/vendor/golang.org/x/net/webdav/file.go
@@ -163,6 +163,7 @@ type memFS struct {
// - "/", "foo", false
// - "/foo/", "bar", false
// - "/foo/bar/", "x", true
+//
// The frag argument will be empty only if dir is the root node and the walk
// ends at that root node.
func (fs *memFS) walk(op, fullname string, f func(dir *memFSNode, frag string, final bool) error) error {
diff --git a/vendor/golang.org/x/net/webdav/internal/xml/marshal.go b/vendor/golang.org/x/net/webdav/internal/xml/marshal.go
index cb82ec21..4dd0f417 100644
--- a/vendor/golang.org/x/net/webdav/internal/xml/marshal.go
+++ b/vendor/golang.org/x/net/webdav/internal/xml/marshal.go
@@ -32,33 +32,33 @@ const (
// elements containing the data.
//
// The name for the XML elements is taken from, in order of preference:
-// - the tag on the XMLName field, if the data is a struct
-// - the value of the XMLName field of type xml.Name
-// - the tag of the struct field used to obtain the data
-// - the name of the struct field used to obtain the data
-// - the name of the marshalled type
+// - the tag on the XMLName field, if the data is a struct
+// - the value of the XMLName field of type xml.Name
+// - the tag of the struct field used to obtain the data
+// - the name of the struct field used to obtain the data
+// - the name of the marshalled type
//
// The XML element for a struct contains marshalled elements for each of the
// exported fields of the struct, with these exceptions:
-// - the XMLName field, described above, is omitted.
-// - a field with tag "-" is omitted.
-// - a field with tag "name,attr" becomes an attribute with
-// the given name in the XML element.
-// - a field with tag ",attr" becomes an attribute with the
-// field name in the XML element.
-// - a field with tag ",chardata" is written as character data,
-// not as an XML element.
-// - a field with tag ",innerxml" is written verbatim, not subject
-// to the usual marshalling procedure.
-// - a field with tag ",comment" is written as an XML comment, not
-// subject to the usual marshalling procedure. It must not contain
-// the "--" string within it.
-// - a field with a tag including the "omitempty" option is omitted
-// if the field value is empty. The empty values are false, 0, any
-// nil pointer or interface value, and any array, slice, map, or
-// string of length zero.
-// - an anonymous struct field is handled as if the fields of its
-// value were part of the outer struct.
+// - the XMLName field, described above, is omitted.
+// - a field with tag "-" is omitted.
+// - a field with tag "name,attr" becomes an attribute with
+// the given name in the XML element.
+// - a field with tag ",attr" becomes an attribute with the
+// field name in the XML element.
+// - a field with tag ",chardata" is written as character data,
+// not as an XML element.
+// - a field with tag ",innerxml" is written verbatim, not subject
+// to the usual marshalling procedure.
+// - a field with tag ",comment" is written as an XML comment, not
+// subject to the usual marshalling procedure. It must not contain
+// the "--" string within it.
+// - a field with a tag including the "omitempty" option is omitted
+// if the field value is empty. The empty values are false, 0, any
+// nil pointer or interface value, and any array, slice, map, or
+// string of length zero.
+// - an anonymous struct field is handled as if the fields of its
+// value were part of the outer struct.
//
// If a field uses a tag "a>b>c", then the element c will be nested inside
// parent elements a and b. Fields that appear next to each other that name
diff --git a/vendor/golang.org/x/net/webdav/internal/xml/read.go b/vendor/golang.org/x/net/webdav/internal/xml/read.go
index 4089056a..bfaef6f1 100644
--- a/vendor/golang.org/x/net/webdav/internal/xml/read.go
+++ b/vendor/golang.org/x/net/webdav/internal/xml/read.go
@@ -35,57 +35,57 @@ import (
// In the rules, the tag of a field refers to the value associated with the
// key 'xml' in the struct field's tag (see the example above).
//
-// * If the struct has a field of type []byte or string with tag
-// ",innerxml", Unmarshal accumulates the raw XML nested inside the
-// element in that field. The rest of the rules still apply.
+// - If the struct has a field of type []byte or string with tag
+// ",innerxml", Unmarshal accumulates the raw XML nested inside the
+// element in that field. The rest of the rules still apply.
//
-// * If the struct has a field named XMLName of type xml.Name,
-// Unmarshal records the element name in that field.
+// - If the struct has a field named XMLName of type xml.Name,
+// Unmarshal records the element name in that field.
//
-// * If the XMLName field has an associated tag of the form
-// "name" or "namespace-URL name", the XML element must have
-// the given name (and, optionally, name space) or else Unmarshal
-// returns an error.
+// - If the XMLName field has an associated tag of the form
+// "name" or "namespace-URL name", the XML element must have
+// the given name (and, optionally, name space) or else Unmarshal
+// returns an error.
//
-// * If the XML element has an attribute whose name matches a
-// struct field name with an associated tag containing ",attr" or
-// the explicit name in a struct field tag of the form "name,attr",
-// Unmarshal records the attribute value in that field.
+// - If the XML element has an attribute whose name matches a
+// struct field name with an associated tag containing ",attr" or
+// the explicit name in a struct field tag of the form "name,attr",
+// Unmarshal records the attribute value in that field.
//
-// * If the XML element contains character data, that data is
-// accumulated in the first struct field that has tag ",chardata".
-// The struct field may have type []byte or string.
-// If there is no such field, the character data is discarded.
+// - If the XML element contains character data, that data is
+// accumulated in the first struct field that has tag ",chardata".
+// The struct field may have type []byte or string.
+// If there is no such field, the character data is discarded.
//
-// * If the XML element contains comments, they are accumulated in
-// the first struct field that has tag ",comment". The struct
-// field may have type []byte or string. If there is no such
-// field, the comments are discarded.
+// - If the XML element contains comments, they are accumulated in
+// the first struct field that has tag ",comment". The struct
+// field may have type []byte or string. If there is no such
+// field, the comments are discarded.
//
-// * If the XML element contains a sub-element whose name matches
-// the prefix of a tag formatted as "a" or "a>b>c", unmarshal
-// will descend into the XML structure looking for elements with the
-// given names, and will map the innermost elements to that struct
-// field. A tag starting with ">" is equivalent to one starting
-// with the field name followed by ">".
+// - If the XML element contains a sub-element whose name matches
+// the prefix of a tag formatted as "a" or "a>b>c", unmarshal
+// will descend into the XML structure looking for elements with the
+// given names, and will map the innermost elements to that struct
+// field. A tag starting with ">" is equivalent to one starting
+// with the field name followed by ">".
//
-// * If the XML element contains a sub-element whose name matches
-// a struct field's XMLName tag and the struct field has no
-// explicit name tag as per the previous rule, unmarshal maps
-// the sub-element to that struct field.
+// - If the XML element contains a sub-element whose name matches
+// a struct field's XMLName tag and the struct field has no
+// explicit name tag as per the previous rule, unmarshal maps
+// the sub-element to that struct field.
//
-// * If the XML element contains a sub-element whose name matches a
-// field without any mode flags (",attr", ",chardata", etc), Unmarshal
-// maps the sub-element to that struct field.
+// - If the XML element contains a sub-element whose name matches a
+// field without any mode flags (",attr", ",chardata", etc), Unmarshal
+// maps the sub-element to that struct field.
//
-// * If the XML element contains a sub-element that hasn't matched any
-// of the above rules and the struct has a field with tag ",any",
-// unmarshal maps the sub-element to that struct field.
+// - If the XML element contains a sub-element that hasn't matched any
+// of the above rules and the struct has a field with tag ",any",
+// unmarshal maps the sub-element to that struct field.
//
-// * An anonymous struct field is handled as if the fields of its
-// value were part of the outer struct.
+// - An anonymous struct field is handled as if the fields of its
+// value were part of the outer struct.
//
-// * A struct field with tag "-" is never unmarshalled into.
+// - A struct field with tag "-" is never unmarshalled into.
//
// Unmarshal maps an XML element to a string or []byte by saving the
// concatenation of that element's character data in the string or
@@ -110,7 +110,6 @@ import (
//
// Unmarshal maps an XML element to a pointer by setting the pointer
// to a freshly allocated value and then mapping the element to that value.
-//
func Unmarshal(data []byte, v interface{}) error {
return NewDecoder(bytes.NewReader(data)).Decode(v)
}
diff --git a/vendor/golang.org/x/net/webdav/webdav.go b/vendor/golang.org/x/net/webdav/webdav.go
index d88995f9..32f5b657 100644
--- a/vendor/golang.org/x/net/webdav/webdav.go
+++ b/vendor/golang.org/x/net/webdav/webdav.go
@@ -642,10 +642,11 @@ const (
// infiniteDepth. Parsing any other string returns invalidDepth.
//
// Different WebDAV methods have further constraints on valid depths:
-// - PROPFIND has no further restrictions, as per section 9.1.
-// - COPY accepts only "0" or "infinity", as per section 9.8.3.
-// - MOVE accepts only "infinity", as per section 9.9.2.
-// - LOCK accepts only "0" or "infinity", as per section 9.10.3.
+// - PROPFIND has no further restrictions, as per section 9.1.
+// - COPY accepts only "0" or "infinity", as per section 9.8.3.
+// - MOVE accepts only "infinity", as per section 9.9.2.
+// - LOCK accepts only "0" or "infinity", as per section 9.10.3.
+//
// These constraints are enforced by the handleXxx methods.
func parseDepth(s string) int {
switch s {
diff --git a/vendor/golang.org/x/sys/cpu/byteorder.go b/vendor/golang.org/x/sys/cpu/byteorder.go
index dcbb14ef..271055be 100644
--- a/vendor/golang.org/x/sys/cpu/byteorder.go
+++ b/vendor/golang.org/x/sys/cpu/byteorder.go
@@ -46,6 +46,7 @@ func hostByteOrder() byteOrder {
case "386", "amd64", "amd64p32",
"alpha",
"arm", "arm64",
+ "loong64",
"mipsle", "mips64le", "mips64p32le",
"nios2",
"ppc64le",
diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go
index b56886f2..83f112c4 100644
--- a/vendor/golang.org/x/sys/cpu/cpu.go
+++ b/vendor/golang.org/x/sys/cpu/cpu.go
@@ -106,8 +106,8 @@ var ARM64 struct {
// ARM contains the supported CPU features of the current ARM (32-bit) platform.
// All feature flags are false if:
-// 1. the current platform is not arm, or
-// 2. the current operating system is not Linux.
+// 1. the current platform is not arm, or
+// 2. the current operating system is not Linux.
var ARM struct {
_ CacheLinePad
HasSWP bool // SWP instruction support
diff --git a/vendor/golang.org/x/sys/cpu/cpu_loong64.go b/vendor/golang.org/x/sys/cpu/cpu_loong64.go
new file mode 100644
index 00000000..0f57b05b
--- /dev/null
+++ b/vendor/golang.org/x/sys/cpu/cpu_loong64.go
@@ -0,0 +1,13 @@
+// Copyright 2022 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.
+
+//go:build loong64
+// +build loong64
+
+package cpu
+
+const cacheLineSize = 64
+
+func initOptions() {
+}
diff --git a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
index a864f24d..96134157 100644
--- a/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
+++ b/vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go
@@ -5,7 +5,7 @@
// Recreate a getsystemcfg syscall handler instead of
// using the one provided by x/sys/unix to avoid having
// the dependency between them. (See golang.org/issue/32102)
-// Morever, this file will be used during the building of
+// Moreover, this file will be used during the building of
// gccgo's libgo and thus must not used a CGo method.
//go:build aix && gccgo
diff --git a/vendor/golang.org/x/sys/execabs/execabs.go b/vendor/golang.org/x/sys/execabs/execabs.go
index 78192498..b981cfbb 100644
--- a/vendor/golang.org/x/sys/execabs/execabs.go
+++ b/vendor/golang.org/x/sys/execabs/execabs.go
@@ -53,7 +53,7 @@ func relError(file, path string) error {
// LookPath instead returns an error.
func LookPath(file string) (string, error) {
path, err := exec.LookPath(file)
- if err != nil {
+ if err != nil && !isGo119ErrDot(err) {
return "", err
}
if filepath.Base(file) == file && !filepath.IsAbs(path) {
diff --git a/vendor/golang.org/x/sys/execabs/execabs_go118.go b/vendor/golang.org/x/sys/execabs/execabs_go118.go
new file mode 100644
index 00000000..6ab5f508
--- /dev/null
+++ b/vendor/golang.org/x/sys/execabs/execabs_go118.go
@@ -0,0 +1,12 @@
+// Copyright 2022 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.
+
+//go:build !go1.19
+// +build !go1.19
+
+package execabs
+
+func isGo119ErrDot(err error) bool {
+ return false
+}
diff --git a/vendor/golang.org/x/sys/execabs/execabs_go119.go b/vendor/golang.org/x/sys/execabs/execabs_go119.go
new file mode 100644
index 00000000..1e7a9ada
--- /dev/null
+++ b/vendor/golang.org/x/sys/execabs/execabs_go119.go
@@ -0,0 +1,15 @@
+// Copyright 2022 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.
+
+//go:build go1.19
+// +build go1.19
+
+package execabs
+
+import "strings"
+
+func isGo119ErrDot(err error) bool {
+ // TODO: return errors.Is(err, exec.ErrDot)
+ return strings.Contains(err.Error(), "current directory")
+}
diff --git a/vendor/golang.org/x/sys/unix/asm_linux_loong64.s b/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
new file mode 100644
index 00000000..6abd48ee
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/asm_linux_loong64.s
@@ -0,0 +1,54 @@
+// Copyright 2022 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.
+
+//go:build linux && loong64 && gc
+// +build linux
+// +build loong64
+// +build gc
+
+#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
+ JMP syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
+ JMP syscall·Syscall6(SB)
+
+TEXT ·SyscallNoError(SB),NOSPLIT,$0-48
+ JAL runtime·entersyscall(SB)
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R11 // syscall entry
+ SYSCALL
+ MOVV R4, r1+32(FP)
+ MOVV R5, r2+40(FP)
+ JAL runtime·exitsyscall(SB)
+ RET
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
+ JMP syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
+ JMP syscall·RawSyscall6(SB)
+
+TEXT ·RawSyscallNoError(SB),NOSPLIT,$0-48
+ MOVV a1+8(FP), R4
+ MOVV a2+16(FP), R5
+ MOVV a3+24(FP), R6
+ MOVV R0, R7
+ MOVV R0, R8
+ MOVV R0, R9
+ MOVV trap+0(FP), R11 // syscall entry
+ SYSCALL
+ MOVV R4, r1+32(FP)
+ MOVV R5, r2+40(FP)
+ RET
diff --git a/vendor/golang.org/x/sys/unix/endian_little.go b/vendor/golang.org/x/sys/unix/endian_little.go
index 4362f47e..b0f2bc4a 100644
--- a/vendor/golang.org/x/sys/unix/endian_little.go
+++ b/vendor/golang.org/x/sys/unix/endian_little.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//
-//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
-// +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
+//go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || loong64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh
+// +build 386 amd64 amd64p32 alpha arm arm64 loong64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh
package unix
diff --git a/vendor/golang.org/x/sys/unix/ifreq_linux.go b/vendor/golang.org/x/sys/unix/ifreq_linux.go
index 934af313..15721a51 100644
--- a/vendor/golang.org/x/sys/unix/ifreq_linux.go
+++ b/vendor/golang.org/x/sys/unix/ifreq_linux.go
@@ -8,7 +8,6 @@
package unix
import (
- "bytes"
"unsafe"
)
@@ -45,13 +44,7 @@ func NewIfreq(name string) (*Ifreq, error) {
// Name returns the interface name associated with the Ifreq.
func (ifr *Ifreq) Name() string {
- // BytePtrToString requires a NULL terminator or the program may crash. If
- // one is not present, just return the empty string.
- if !bytes.Contains(ifr.raw.Ifrn[:], []byte{0x00}) {
- return ""
- }
-
- return BytePtrToString(&ifr.raw.Ifrn[0])
+ return ByteSliceToString(ifr.raw.Ifrn[:])
}
// According to netdevice(7), only AF_INET addresses are returned for numerous
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index a0370874..d888fb77 100644
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -215,6 +215,7 @@ struct ltchars {
#include
#include
#include
+#include
#include
#include
#include
@@ -603,6 +604,7 @@ ccflags="$@"
$2 ~ /^ITIMER_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
+ $2 ~ /^P_/ ||
$2 ~/^PPPIOC/ ||
$2 ~ /^FAN_|FANOTIFY_/ ||
$2 == "HID_MAX_DESCRIPTOR_SIZE" ||
@@ -612,6 +614,7 @@ ccflags="$@"
$2 ~ /^OTP/ ||
$2 ~ /^MEM/ ||
$2 ~ /^WG/ ||
+ $2 ~ /^FIB_RULE_/ ||
$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)}
diff --git a/vendor/golang.org/x/sys/unix/syscall_aix.go b/vendor/golang.org/x/sys/unix/syscall_aix.go
index 4f55c8d9..ad22c33d 100644
--- a/vendor/golang.org/x/sys/unix/syscall_aix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_aix.go
@@ -37,6 +37,7 @@ func Creat(path string, mode uint32) (fd int, err error) {
}
//sys utimes(path string, times *[2]Timeval) (err error)
+
func Utimes(path string, tv []Timeval) error {
if len(tv) != 2 {
return EINVAL
@@ -45,6 +46,7 @@ func Utimes(path string, tv []Timeval) error {
}
//sys utimensat(dirfd int, path string, times *[2]Timespec, flag int) (err error)
+
func UtimesNano(path string, ts []Timespec) error {
if len(ts) != 2 {
return EINVAL
@@ -215,18 +217,12 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
return
}
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
// Recvmsg not implemented on AIX
- sa := new(SockaddrUnix)
- return -1, -1, -1, sa, ENOSYS
+ return -1, -1, -1, ENOSYS
}
-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) {
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
// SendmsgN not implemented on AIX
return -1, ENOSYS
}
@@ -306,11 +302,13 @@ func direntNamlen(buf []byte) (uint64, bool) {
}
//sys getdirent(fd int, buf []byte) (n int, err error)
+
func Getdents(fd int, buf []byte) (n int, err error) {
return getdirent(fd, buf)
}
//sys wait4(pid Pid_t, status *_C_int, options int, rusage *Rusage) (wpid Pid_t, err error)
+
func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int, err error) {
var status _C_int
var r Pid_t
@@ -378,6 +376,7 @@ func (w WaitStatus) TrapCause() int { return -1 }
//sys fcntl(fd int, cmd int, arg int) (val int, err error)
//sys fsyncRange(fd int, how int, start int64, length int64) (err error) = fsync_range
+
func Fsync(fd int) error {
return fsyncRange(fd, O_SYNC, 0, 0)
}
@@ -458,8 +457,8 @@ func Fsync(fd int) 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) = pread64
-//sys Pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
+//sys pread(fd int, p []byte, offset int64) (n int, err error) = pread64
+//sys pwrite(fd int, p []byte, offset int64) (n int, err error) = pwrite64
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error)
//sys Pselect(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timespec, sigmask *Sigset_t) (n int, err error)
//sysnb Setregid(rgid int, egid int) (err error)
@@ -542,6 +541,7 @@ func Poll(fds []PollFd, timeout int) (n int, err error) {
//sys Getsystemcfg(label int) (n uint64)
//sys umount(target string) (err error)
+
func Unmount(target string, flags int) (err error) {
if flags != 0 {
// AIX doesn't have any flags for umount.
diff --git a/vendor/golang.org/x/sys/unix/syscall_bsd.go b/vendor/golang.org/x/sys/unix/syscall_bsd.go
index 0ce45232..9c87c5f0 100644
--- a/vendor/golang.org/x/sys/unix/syscall_bsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_bsd.go
@@ -325,10 +325,9 @@ func GetsockoptString(fd, level, opt int) (string, 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) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec
if len(p) > 0 {
@@ -352,29 +351,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
}
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(fd, &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
- }
- }
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
var msg Msghdr
msg.Name = (*byte)(unsafe.Pointer(ptr))
msg.Namelen = uint32(salen)
@@ -571,12 +553,7 @@ func UtimesNano(path string, ts []Timespec) error {
if len(ts) != 2 {
return EINVAL
}
- // Darwin setattrlist can set nanosecond timestamps
- err := setattrlistTimes(path, ts, 0)
- if err != ENOSYS {
- return err
- }
- err = utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+ err := utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
if err != ENOSYS {
return err
}
@@ -596,10 +573,6 @@ func UtimesNanoAt(dirfd int, path string, ts []Timespec, flags int) error {
if len(ts) != 2 {
return EINVAL
}
- err := setattrlistTimes(path, ts, flags)
- if err != ENOSYS {
- return err
- }
return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), flags)
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 0eaab913..e5448cc9 100644
--- a/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -141,16 +141,6 @@ func direntNamlen(buf []byte) (uint64, bool) {
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) }
-type attrList struct {
- bitmapCount uint16
- _ uint16
- CommonAttr uint32
- VolAttr uint32
- DirAttr uint32
- FileAttr uint32
- Forkattr uint32
-}
-
//sysnb pipe(p *[2]int32) (err error)
func Pipe(p []int) (err error) {
@@ -282,36 +272,7 @@ func Flistxattr(fd int, dest []byte) (sz int, err error) {
return flistxattr(fd, xattrPointer(dest), len(dest), 0)
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- _p0, err := BytePtrFromString(path)
- if err != nil {
- return err
- }
-
- var attrList attrList
- attrList.bitmapCount = ATTR_BIT_MAP_COUNT
- attrList.CommonAttr = ATTR_CMN_MODTIME | ATTR_CMN_ACCTIME
-
- // order is mtime, atime: the opposite of Chtimes
- attributes := [2]Timespec{times[1], times[0]}
- options := 0
- if flags&AT_SYMLINK_NOFOLLOW != 0 {
- options |= FSOPT_NOFOLLOW
- }
- return setattrlist(
- _p0,
- unsafe.Pointer(&attrList),
- unsafe.Pointer(&attributes),
- unsafe.Sizeof(attributes),
- options)
-}
-
-//sys setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error)
-
-func utimensat(dirfd int, path string, times *[2]Timespec, flags int) error {
- // Darwin doesn't support SYS_UTIMENSAT
- return ENOSYS
-}
+//sys utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error)
/*
* Wrapped
@@ -543,11 +504,12 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
//sys Mkdirat(dirfd int, 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 Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error)
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, 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 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
@@ -611,7 +573,6 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) {
// Nfssvc
// Getfh
// Quotactl
-// Mount
// Csops
// Waitid
// Add_profil
diff --git a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
index 2e37c316..61c0d0de 100644
--- a/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
+++ b/vendor/golang.org/x/sys/unix/syscall_dragonfly.go
@@ -125,12 +125,14 @@ func Pipe2(p []int, flags int) (err error) {
}
//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) {
+
+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) {
+
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return extpwrite(fd, p, 0, offset)
}
@@ -169,11 +171,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
diff --git a/vendor/golang.org/x/sys/unix/syscall_freebsd.go b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
index 2f650ae6..6f6c510f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_freebsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_freebsd.go
@@ -194,11 +194,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -638,8 +633,8 @@ func PtraceSingleStep(pid int) (err error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(fdat int, 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 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 5f28f8fd..c8d20321 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -366,6 +366,8 @@ func Wait4(pid int, wstatus *WaitStatus, options int, rusage *Rusage) (wpid int,
return
}
+//sys Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error)
+
func Mkfifo(path string, mode uint32) error {
return Mknod(path, mode|S_IFIFO, 0)
}
@@ -510,24 +512,24 @@ func (sa *SockaddrL2) sockaddr() (unsafe.Pointer, _Socklen, error) {
//
// Server example:
//
-// fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
-// _ = unix.Bind(fd, &unix.SockaddrRFCOMM{
-// Channel: 1,
-// Addr: [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00
-// })
-// _ = Listen(fd, 1)
-// nfd, sa, _ := Accept(fd)
-// fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd)
-// Read(nfd, buf)
+// fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
+// _ = unix.Bind(fd, &unix.SockaddrRFCOMM{
+// Channel: 1,
+// Addr: [6]uint8{0, 0, 0, 0, 0, 0}, // BDADDR_ANY or 00:00:00:00:00:00
+// })
+// _ = Listen(fd, 1)
+// nfd, sa, _ := Accept(fd)
+// fmt.Printf("conn addr=%v fd=%d", sa.(*unix.SockaddrRFCOMM).Addr, nfd)
+// Read(nfd, buf)
//
// Client example:
//
-// fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
-// _ = Connect(fd, &SockaddrRFCOMM{
-// Channel: 1,
-// Addr: [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11
-// })
-// Write(fd, []byte(`hello`))
+// fd, _ := Socket(AF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)
+// _ = Connect(fd, &SockaddrRFCOMM{
+// Channel: 1,
+// Addr: [6]byte{0x11, 0x22, 0x33, 0xaa, 0xbb, 0xcc}, // CC:BB:AA:33:22:11
+// })
+// Write(fd, []byte(`hello`))
type SockaddrRFCOMM struct {
// Addr represents a bluetooth address, byte ordering is little-endian.
Addr [6]uint8
@@ -554,12 +556,12 @@ func (sa *SockaddrRFCOMM) sockaddr() (unsafe.Pointer, _Socklen, error) {
// 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)
+// // 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
@@ -630,13 +632,13 @@ func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {
// 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)
+// // 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
@@ -645,39 +647,39 @@ func (sa *SockaddrCANJ1939) sockaddr() (unsafe.Pointer, _Socklen, error) {
// 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
+// // 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
+// // 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 {
@@ -1497,10 +1499,9 @@ func KeyctlRestrictKeyring(ringid int, keyType string, restriction string) error
//sys keyctlRestrictKeyringByType(cmd int, arg2 int, keyType string, restriction string) (err error) = SYS_KEYCTL
//sys keyctlRestrictKeyring(cmd int, arg2 int) (err error) = SYS_KEYCTL
-func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec
if len(p) > 0 {
@@ -1531,28 +1532,10 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
}
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(fd, &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
- }
- }
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
var msg Msghdr
msg.Name = (*byte)(ptr)
msg.Namelen = uint32(salen)
@@ -1846,6 +1829,9 @@ func Dup2(oldfd, newfd int) error {
//sys Fremovexattr(fd int, attr string) (err error)
//sys Fsetxattr(fd int, attr string, dest []byte, flags int) (err error)
//sys Fsync(fd int) (err error)
+//sys Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error)
+//sys Fsopen(fsName string, flags int) (fd int, err error)
+//sys Fspick(dirfd int, pathName string, flags int) (fd int, err error)
//sys Getdents(fd int, buf []byte) (n int, err error) = SYS_GETDENTS64
//sysnb Getpgid(pid int) (pgid int, err error)
@@ -1876,7 +1862,9 @@ func Getpgrp() (pid int) {
//sys MemfdCreate(name string, flags int) (fd 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 MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error)
//sys Nanosleep(time *Timespec, leftover *Timespec) (err error)
+//sys OpenTree(dfd int, fileName string, flags uint) (r int, err error)
//sys PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, 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
@@ -2201,7 +2189,7 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
gid = Getgid()
}
- if uint32(gid) == st.Gid || isGroupMember(gid) {
+ if uint32(gid) == st.Gid || isGroupMember(int(st.Gid)) {
fmode = (st.Mode >> 3) & 7
} else {
fmode = st.Mode & 7
@@ -2316,6 +2304,7 @@ type RemoteIovec struct {
//sys PidfdOpen(pid int, flags int) (fd int, err error) = SYS_PIDFD_OPEN
//sys PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) = SYS_PIDFD_GETFD
+//sys PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) = SYS_PIDFD_SEND_SIGNAL
//sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error)
//sys shmctl(id int, cmd int, buf *SysvShmDesc) (result int, err error)
@@ -2464,5 +2453,4 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
// 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
index d44b8ad5..518e476e 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -35,8 +35,8 @@ func setTimeval(sec, usec int64) Timeval {
//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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index bd21d93b..f5e9d6be 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -28,9 +28,10 @@ func Lstat(path string, stat *Stat_t) (err error) {
return Fstatat(AT_FDCWD, path, stat, AT_SYMLINK_NOFOLLOW)
}
+//sys MemfdSecret(flags int) (fd 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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index 343c91f6..c1a7778f 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -96,8 +96,8 @@ func Utime(path string, buf *Utimbuf) error {
//sys utimes(path string, times *[2]Timeval) (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 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
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index 8c562868..d83e2c65 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -22,8 +22,9 @@ import "unsafe"
//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 MemfdSecret(flags int) (fd 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
new file mode 100644
index 00000000..28ba7b8c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
@@ -0,0 +1,191 @@
+// Copyright 2022 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.
+
+//go:build loong64 && linux
+// +build loong64,linux
+
+package unix
+
+import "unsafe"
+
+//sys EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) = SYS_EPOLL_PWAIT
+//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 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 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
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ var ts *Timespec
+ if timeout != nil {
+ ts = &Timespec{Sec: timeout.Sec, Nsec: timeout.Usec * 1000}
+ }
+ return Pselect(nfd, r, w, e, ts, nil)
+}
+
+//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
+//sys setfsgid(gid int) (prev int, err error)
+//sys setfsuid(uid int) (prev 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)
+
+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)
+
+func Ustat(dev int, ubuf *Ustat_t) (err error) {
+ return ENOSYS
+}
+
+//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)
+
+//sysnb Gettimeofday(tv *Timeval) (err error)
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func Getrlimit(resource int, rlim *Rlimit) (err error) {
+ err = Prlimit(0, resource, nil, rlim)
+ return
+}
+
+func Setrlimit(resource int, rlim *Rlimit) (err error) {
+ err = Prlimit(0, resource, rlim, nil)
+ return
+}
+
+func futimesat(dirfd int, path string, tv *[2]Timeval) (err error) {
+ if tv == nil {
+ return utimensat(dirfd, path, nil, 0)
+ }
+
+ ts := []Timespec{
+ NsecToTimespec(TimevalToNsec(tv[0])),
+ NsecToTimespec(TimevalToNsec(tv[1])),
+ }
+ return utimensat(dirfd, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+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 utimes(path string, tv *[2]Timeval) (err error) {
+ if tv == nil {
+ return utimensat(AT_FDCWD, path, nil, 0)
+ }
+
+ ts := []Timespec{
+ NsecToTimespec(TimevalToNsec(tv[0])),
+ NsecToTimespec(TimevalToNsec(tv[1])),
+ }
+ return utimensat(AT_FDCWD, path, (*[2]Timespec)(unsafe.Pointer(&ts[0])), 0)
+}
+
+func (r *PtraceRegs) PC() uint64 { return r.Era }
+
+func (r *PtraceRegs) SetPC(era uint64) { r.Era = era }
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint64(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint64(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint64(length)
+}
+
+func (rsa *RawSockaddrNFCLLCP) SetServiceNameLen(length int) {
+ rsa.Service_name_len = uint64(length)
+}
+
+func Pause() error {
+ _, err := ppoll(nil, 0, nil, nil)
+ return err
+}
+
+func Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {
+ return Renameat2(olddirfd, oldpath, newdirfd, newpath, 0)
+}
+
+//sys kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error)
+
+func KexecFileLoad(kernelFd int, initrdFd int, cmdline string, flags int) error {
+ cmdlineLen := len(cmdline)
+ if cmdlineLen > 0 {
+ // Account for the additional NULL byte added by
+ // BytePtrFromString in kexecFileLoad. The kexec_file_load
+ // syscall expects a NULL-terminated string.
+ cmdlineLen++
+ }
+ return kexecFileLoad(kernelFd, initrdFd, cmdlineLen, cmdline, flags)
+}
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index f0b13800..98a2660b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -21,8 +21,8 @@ package unix
//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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//sys Seek(fd int, offset int64, whence int) (off int64, err error) = SYS_LSEEK
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index e6163c30..b8a18c0a 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -25,8 +25,8 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//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
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
index 4740e80a..4ed9e67c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -27,8 +27,8 @@ import (
//sys Listen(s int, n int) (err error)
//sys Lstat(path string, stat *Stat_t) (err error) = SYS_LSTAT64
//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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//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
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index 78bc9166..db63d384 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -26,8 +26,8 @@ package unix
//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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//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__NEWSELECT
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 3d6c4eb0..8ff7adba 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -22,8 +22,8 @@ import "unsafe"
//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 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
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 89ce84a4..6fcf277b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -26,8 +26,8 @@ import (
//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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//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)
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index 35bdb098..02a45d9c 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -23,8 +23,8 @@ package unix
//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 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 Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error)
//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)
diff --git a/vendor/golang.org/x/sys/unix/syscall_netbsd.go b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
index 696fed49..666f0a1b 100644
--- a/vendor/golang.org/x/sys/unix/syscall_netbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_netbsd.go
@@ -163,11 +163,6 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
return -1, ENOSYS
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -313,8 +308,8 @@ func Statvfs(path string, buf *Statvfs_t) (err error) {
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, 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 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
index 11b1d419..78daceb3 100644
--- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go
+++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go
@@ -81,6 +81,7 @@ func Pipe(p []int) (err error) {
}
//sysnb pipe2(p *[2]_C_int, flags int) (err error)
+
func Pipe2(p []int, flags int) error {
if len(p) != 2 {
return EINVAL
@@ -95,6 +96,7 @@ func Pipe2(p []int, flags int) error {
}
//sys Getdents(fd int, buf []byte) (n int, err error)
+
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
n, err = Getdents(fd, buf)
if err != nil || basep == nil {
@@ -149,11 +151,6 @@ func Getfsstat(buf []Statfs_t, flags int) (n int, err error) {
return
}
-func setattrlistTimes(path string, times []Timespec, flags int) error {
- // used on Darwin for UtimesNano
- return ENOSYS
-}
-
//sys ioctl(fd int, req uint, arg uintptr) (err error)
//sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS___SYSCTL
@@ -274,8 +271,8 @@ func Uname(uname *Utsname) error {
//sys Open(path string, mode int, perm uint32) (fd int, err error)
//sys Openat(dirfd int, 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 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 Readlinkat(dirfd int, path string, buf []byte) (n int, err error)
diff --git a/vendor/golang.org/x/sys/unix/syscall_solaris.go b/vendor/golang.org/x/sys/unix/syscall_solaris.go
index 5c813921..5c2003ce 100644
--- a/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -451,10 +451,9 @@ func Accept(fd int) (nfd int, sa Sockaddr, err error) {
//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) {
+func recvmsgRaw(fd int, p, oob []byte, flags int, rsa *RawSockaddrAny) (n, oobn int, recvflags int, err error) {
var msg Msghdr
- var rsa RawSockaddrAny
- msg.Name = (*byte)(unsafe.Pointer(&rsa))
+ msg.Name = (*byte)(unsafe.Pointer(rsa))
msg.Namelen = uint32(SizeofSockaddrAny)
var iov Iovec
if len(p) > 0 {
@@ -476,29 +475,12 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
return
}
oobn = int(msg.Accrightslen)
- // source address is only specified if the socket is unconnected
- if rsa.Addr.Family != AF_UNSPEC {
- from, err = anyToSockaddr(fd, &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
- }
- }
+func sendmsgN(fd int, p, oob []byte, ptr unsafe.Pointer, salen _Socklen, flags int) (n int, err error) {
var msg Msghdr
msg.Name = (*byte)(unsafe.Pointer(ptr))
msg.Namelen = uint32(salen)
@@ -661,8 +643,8 @@ func Sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
//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 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)
@@ -755,8 +737,20 @@ type fileObjCookie struct {
type EventPort struct {
port int
mu sync.Mutex
- fds map[uintptr]interface{}
+ fds map[uintptr]*fileObjCookie
paths map[string]*fileObjCookie
+ // The user cookie presents an interesting challenge from a memory management perspective.
+ // There are two paths by which we can discover that it is no longer in use:
+ // 1. The user calls port_dissociate before any events fire
+ // 2. An event fires and we return it to the user
+ // The tricky situation is if the event has fired in the kernel but
+ // the user hasn't requested/received it yet.
+ // If the user wants to port_dissociate before the event has been processed,
+ // we should handle things gracefully. To do so, we need to keep an extra
+ // reference to the cookie around until the event is processed
+ // thus the otherwise seemingly extraneous "cookies" map
+ // The key of this map is a pointer to the corresponding &fCookie.cookie
+ cookies map[*interface{}]*fileObjCookie
}
// PortEvent is an abstraction of the port_event C struct.
@@ -780,9 +774,10 @@ func NewEventPort() (*EventPort, error) {
return nil, err
}
e := &EventPort{
- port: port,
- fds: make(map[uintptr]interface{}),
- paths: make(map[string]*fileObjCookie),
+ port: port,
+ fds: make(map[uintptr]*fileObjCookie),
+ paths: make(map[string]*fileObjCookie),
+ cookies: make(map[*interface{}]*fileObjCookie),
}
return e, nil
}
@@ -797,9 +792,13 @@ func NewEventPort() (*EventPort, error) {
func (e *EventPort) Close() error {
e.mu.Lock()
defer e.mu.Unlock()
+ err := Close(e.port)
+ if err != nil {
+ return err
+ }
e.fds = nil
e.paths = nil
- return Close(e.port)
+ return nil
}
// PathIsWatched checks to see if path is associated with this EventPort.
@@ -836,6 +835,7 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
return err
}
e.paths[path] = fCookie
+ e.cookies[&fCookie.cookie] = fCookie
return nil
}
@@ -848,11 +848,19 @@ func (e *EventPort) DissociatePath(path string) error {
return fmt.Errorf("%v is not associated with this Event Port", path)
}
_, err := port_dissociate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(f.fobj)))
- if err != nil {
+ // If the path is no longer associated with this event port (ENOENT)
+ // we should delete it from our map. We can still return ENOENT to the caller.
+ // But we need to save the cookie
+ if err != nil && err != ENOENT {
return err
}
+ if err == nil {
+ // dissociate was successful, safe to delete the cookie
+ fCookie := e.paths[path]
+ delete(e.cookies, &fCookie.cookie)
+ }
delete(e.paths, path)
- return nil
+ return err
}
// AssociateFd wraps calls to port_associate(3c) on file descriptors.
@@ -862,12 +870,13 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
if _, found := e.fds[fd]; found {
return fmt.Errorf("%v is already associated with this Event Port", fd)
}
- pcookie := &cookie
- _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(pcookie)))
+ fCookie := &fileObjCookie{nil, cookie}
+ _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
if err != nil {
return err
}
- e.fds[fd] = pcookie
+ e.fds[fd] = fCookie
+ e.cookies[&fCookie.cookie] = fCookie
return nil
}
@@ -880,11 +889,16 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
return fmt.Errorf("%v is not associated with this Event Port", fd)
}
_, err := port_dissociate(e.port, PORT_SOURCE_FD, fd)
- if err != nil {
+ if err != nil && err != ENOENT {
return err
}
+ if err == nil {
+ // dissociate was successful, safe to delete the cookie
+ fCookie := e.fds[fd]
+ delete(e.cookies, &fCookie.cookie)
+ }
delete(e.fds, fd)
- return nil
+ return err
}
func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
@@ -912,26 +926,48 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
return nil, err
}
p := new(PortEvent)
- p.Events = pe.Events
- p.Source = pe.Source
e.mu.Lock()
defer e.mu.Unlock()
- switch pe.Source {
- case PORT_SOURCE_FD:
- p.Fd = uintptr(pe.Object)
- cookie := (*interface{})(unsafe.Pointer(pe.User))
- p.Cookie = *cookie
- delete(e.fds, p.Fd)
- case PORT_SOURCE_FILE:
- p.fobj = (*fileObj)(unsafe.Pointer(uintptr(pe.Object)))
- p.Path = BytePtrToString((*byte)(unsafe.Pointer(p.fobj.Name)))
- cookie := (*interface{})(unsafe.Pointer(pe.User))
- p.Cookie = *cookie
- delete(e.paths, p.Path)
- }
+ e.peIntToExt(pe, p)
return p, nil
}
+// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
+// NOTE: Always call this function while holding the e.mu mutex
+func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
+ peExt.Events = peInt.Events
+ peExt.Source = peInt.Source
+ cookie := (*interface{})(unsafe.Pointer(peInt.User))
+ peExt.Cookie = *cookie
+ switch peInt.Source {
+ case PORT_SOURCE_FD:
+ delete(e.cookies, cookie)
+ peExt.Fd = uintptr(peInt.Object)
+ // Only remove the fds entry if it exists and this cookie matches
+ if fobj, ok := e.fds[peExt.Fd]; ok {
+ if &fobj.cookie == cookie {
+ delete(e.fds, peExt.Fd)
+ }
+ }
+ case PORT_SOURCE_FILE:
+ if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
+ // Use our stashed reference rather than using unsafe on what we got back
+ // the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
+ peExt.fobj = fCookie.fobj
+ } else {
+ panic("mismanaged memory")
+ }
+ delete(e.cookies, cookie)
+ peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
+ // Only remove the paths entry if it exists and this cookie matches
+ if fobj, ok := e.paths[peExt.Path]; ok {
+ if &fobj.cookie == cookie {
+ delete(e.paths, peExt.Path)
+ }
+ }
+ }
+}
+
// Pending wraps port_getn(3c) and returns how many events are pending.
func (e *EventPort) Pending() (int, error) {
var n uint32 = 0
@@ -962,21 +998,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
e.mu.Lock()
defer e.mu.Unlock()
for i := 0; i < int(got); i++ {
- s[i].Events = ps[i].Events
- s[i].Source = ps[i].Source
- switch ps[i].Source {
- case PORT_SOURCE_FD:
- s[i].Fd = uintptr(ps[i].Object)
- cookie := (*interface{})(unsafe.Pointer(ps[i].User))
- s[i].Cookie = *cookie
- delete(e.fds, s[i].Fd)
- case PORT_SOURCE_FILE:
- s[i].fobj = (*fileObj)(unsafe.Pointer(uintptr(ps[i].Object)))
- s[i].Path = BytePtrToString((*byte)(unsafe.Pointer(s[i].fobj.Name)))
- cookie := (*interface{})(unsafe.Pointer(ps[i].User))
- s[i].Cookie = *cookie
- delete(e.paths, s[i].Path)
- }
+ e.peIntToExt(&ps[i], &s[i])
}
return int(got), err
}
diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go
index cf296a24..70508afc 100644
--- a/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -177,6 +177,30 @@ func Write(fd int, p []byte) (n int, err error) {
return
}
+func Pread(fd int, p []byte, offset int64) (n int, err error) {
+ n, err = pread(fd, p, offset)
+ if raceenabled {
+ if n > 0 {
+ raceWriteRange(unsafe.Pointer(&p[0]), n)
+ }
+ if err == nil {
+ raceAcquire(unsafe.Pointer(&ioSync))
+ }
+ }
+ return
+}
+
+func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ n, err = pwrite(fd, p, offset)
+ 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
@@ -313,6 +337,33 @@ func Recvfrom(fd int, p []byte, flags int) (n int, from Sockaddr, err error) {
return
}
+func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from Sockaddr, err error) {
+ var rsa RawSockaddrAny
+ n, oobn, recvflags, err = recvmsgRaw(fd, p, oob, flags, &rsa)
+ // source address is only specified if the socket is unconnected
+ if rsa.Addr.Family != AF_UNSPEC {
+ from, err = anyToSockaddr(fd, &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 {
+ ptr, salen, err = to.sockaddr()
+ if err != nil {
+ return 0, err
+ }
+ }
+ return sendmsgN(fd, p, oob, ptr, salen, flags)
+}
+
func Send(s int, buf []byte, flags int) (err error) {
return sendto(s, buf, flags, nil, 0)
}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go
index bc7c9d07..c0a43f8b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go
@@ -393,9 +393,11 @@ const (
CAP_SYS_TIME = 0x19
CAP_SYS_TTY_CONFIG = 0x1a
CAP_WAKE_ALARM = 0x23
+ CEPH_SUPER_MAGIC = 0xc36400
CFLUSH = 0xf
CGROUP2_SUPER_MAGIC = 0x63677270
CGROUP_SUPER_MAGIC = 0x27e0eb
+ CIFS_SUPER_MAGIC = 0xff534d42
CLOCK_BOOTTIME = 0x7
CLOCK_BOOTTIME_ALARM = 0x9
CLOCK_DEFAULT = 0x0
@@ -784,6 +786,7 @@ const (
EV_SYN = 0x0
EV_VERSION = 0x10001
EXABYTE_ENABLE_NEST = 0xf0
+ EXFAT_SUPER_MAGIC = 0x2011bab0
EXT2_SUPER_MAGIC = 0xef53
EXT3_SUPER_MAGIC = 0xef53
EXT4_SUPER_MAGIC = 0xef53
@@ -826,6 +829,8 @@ const (
FAN_EVENT_INFO_TYPE_DFID_NAME = 0x2
FAN_EVENT_INFO_TYPE_ERROR = 0x5
FAN_EVENT_INFO_TYPE_FID = 0x1
+ FAN_EVENT_INFO_TYPE_NEW_DFID_NAME = 0xc
+ FAN_EVENT_INFO_TYPE_OLD_DFID_NAME = 0xa
FAN_EVENT_INFO_TYPE_PIDFD = 0x4
FAN_EVENT_METADATA_LEN = 0x18
FAN_EVENT_ON_CHILD = 0x8000000
@@ -854,17 +859,27 @@ const (
FAN_OPEN_EXEC_PERM = 0x40000
FAN_OPEN_PERM = 0x10000
FAN_Q_OVERFLOW = 0x4000
+ FAN_RENAME = 0x10000000
FAN_REPORT_DFID_NAME = 0xc00
+ FAN_REPORT_DFID_NAME_TARGET = 0x1e00
FAN_REPORT_DIR_FID = 0x400
FAN_REPORT_FID = 0x200
FAN_REPORT_NAME = 0x800
FAN_REPORT_PIDFD = 0x80
+ FAN_REPORT_TARGET_FID = 0x1000
FAN_REPORT_TID = 0x100
FAN_UNLIMITED_MARKS = 0x20
FAN_UNLIMITED_QUEUE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
+ FIB_RULE_DEV_DETACHED = 0x8
+ FIB_RULE_FIND_SADDR = 0x10000
+ FIB_RULE_IIF_DETACHED = 0x8
+ FIB_RULE_INVERT = 0x2
+ FIB_RULE_OIF_DETACHED = 0x10
+ FIB_RULE_PERMANENT = 0x1
+ FIB_RULE_UNRESOLVED = 0x4
FIDEDUPERANGE = 0xc0189436
FSCRYPT_KEY_DESCRIPTOR_SIZE = 0x8
FSCRYPT_KEY_DESC_PREFIX = "fscrypt:"
@@ -927,6 +942,7 @@ const (
FS_VERITY_METADATA_TYPE_DESCRIPTOR = 0x2
FS_VERITY_METADATA_TYPE_MERKLE_TREE = 0x1
FS_VERITY_METADATA_TYPE_SIGNATURE = 0x3
+ FUSE_SUPER_MAGIC = 0x65735546
FUTEXFS_SUPER_MAGIC = 0xbad1dea
F_ADD_SEALS = 0x409
F_DUPFD = 0x0
@@ -1294,6 +1310,7 @@ const (
KEXEC_ARCH_ARM = 0x280000
KEXEC_ARCH_DEFAULT = 0x0
KEXEC_ARCH_IA_64 = 0x320000
+ KEXEC_ARCH_LOONGARCH = 0x1020000
KEXEC_ARCH_MASK = 0xffff0000
KEXEC_ARCH_MIPS = 0x80000
KEXEC_ARCH_MIPS_LE = 0xa0000
@@ -1495,6 +1512,7 @@ const (
MNT_DETACH = 0x2
MNT_EXPIRE = 0x4
MNT_FORCE = 0x1
+ MODULE_INIT_COMPRESSED_FILE = 0x4
MODULE_INIT_IGNORE_MODVERSIONS = 0x1
MODULE_INIT_IGNORE_VERMAGIC = 0x2
MOUNT_ATTR_IDMAP = 0x100000
@@ -1849,6 +1867,9 @@ const (
PERF_MEM_BLK_NA = 0x1
PERF_MEM_BLK_SHIFT = 0x28
PERF_MEM_HOPS_0 = 0x1
+ PERF_MEM_HOPS_1 = 0x2
+ PERF_MEM_HOPS_2 = 0x3
+ PERF_MEM_HOPS_3 = 0x4
PERF_MEM_HOPS_SHIFT = 0x2b
PERF_MEM_LOCK_LOCKED = 0x2
PERF_MEM_LOCK_NA = 0x1
@@ -2052,6 +2073,8 @@ const (
PR_SET_TIMING = 0xe
PR_SET_TSC = 0x1a
PR_SET_UNALIGN = 0x6
+ PR_SET_VMA = 0x53564d41
+ PR_SET_VMA_ANON_NAME = 0x0
PR_SPEC_DISABLE = 0x4
PR_SPEC_DISABLE_NOEXEC = 0x10
PR_SPEC_ENABLE = 0x2
@@ -2135,6 +2158,10 @@ const (
PTRACE_SYSCALL_INFO_NONE = 0x0
PTRACE_SYSCALL_INFO_SECCOMP = 0x3
PTRACE_TRACEME = 0x0
+ P_ALL = 0x0
+ P_PGID = 0x2
+ P_PID = 0x1
+ P_PIDFD = 0x3
QNX4_SUPER_MAGIC = 0x2f
QNX6_SUPER_MAGIC = 0x68191122
RAMFS_MAGIC = 0x858458f6
@@ -2505,6 +2532,7 @@ const (
SMART_STATUS = 0xda
SMART_WRITE_LOG_SECTOR = 0xd6
SMART_WRITE_THRESHOLDS = 0xd7
+ SMB2_SUPER_MAGIC = 0xfe534d42
SMB_SUPER_MAGIC = 0x517b
SOCKFS_MAGIC = 0x534f434b
SOCK_BUF_LOCK_MASK = 0x3
@@ -2646,7 +2674,7 @@ const (
TASKSTATS_GENL_NAME = "TASKSTATS"
TASKSTATS_GENL_VERSION = 0x1
TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0xa
+ TASKSTATS_VERSION = 0xb
TCIFLUSH = 0x0
TCIOFF = 0x2
TCIOFLUSH = 0x2
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 234fd4a5..1b305fab 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -5,7 +5,7 @@
// +build 386,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 58619b75..6bcdef5d 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -5,7 +5,7 @@
// +build amd64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 3a64ff59..e65df0f8 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -5,7 +5,7 @@
// +build arm,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index abe0b925..c7021115 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -5,7 +5,7 @@
// +build arm64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
new file mode 100644
index 00000000..0d83a1cd
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
@@ -0,0 +1,818 @@
+// mkerrors.sh -Wall -Werror -static -I/tmp/include
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build loong64 && linux
+// +build loong64,linux
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ B1000000 = 0x1008
+ B115200 = 0x1002
+ B1152000 = 0x1009
+ B1500000 = 0x100a
+ B2000000 = 0x100b
+ B230400 = 0x1003
+ B2500000 = 0x100c
+ B3000000 = 0x100d
+ B3500000 = 0x100e
+ B4000000 = 0x100f
+ B460800 = 0x1004
+ B500000 = 0x1005
+ B57600 = 0x1001
+ B576000 = 0x1006
+ B921600 = 0x1007
+ BLKBSZGET = 0x80081270
+ BLKBSZSET = 0x40081271
+ BLKFLSBUF = 0x1261
+ BLKFRAGET = 0x1265
+ BLKFRASET = 0x1264
+ BLKGETSIZE = 0x1260
+ BLKGETSIZE64 = 0x80081272
+ BLKPBSZGET = 0x127b
+ BLKRAGET = 0x1263
+ BLKRASET = 0x1262
+ BLKROGET = 0x125e
+ BLKROSET = 0x125d
+ BLKRRPART = 0x125f
+ BLKSECTGET = 0x1267
+ BLKSECTSET = 0x1266
+ BLKSSZGET = 0x1268
+ BOTHER = 0x1000
+ BS1 = 0x2000
+ BSDLY = 0x2000
+ CBAUD = 0x100f
+ CBAUDEX = 0x1000
+ CIBAUD = 0x100f0000
+ CLOCAL = 0x800
+ CR1 = 0x200
+ CR2 = 0x400
+ CR3 = 0x600
+ CRDLY = 0x600
+ CREAD = 0x80
+ CS6 = 0x10
+ CS7 = 0x20
+ CS8 = 0x30
+ CSIZE = 0x30
+ CSTOPB = 0x40
+ ECCGETLAYOUT = 0x81484d11
+ ECCGETSTATS = 0x80104d12
+ ECHOCTL = 0x200
+ ECHOE = 0x10
+ ECHOK = 0x20
+ ECHOKE = 0x800
+ ECHONL = 0x40
+ ECHOPRT = 0x400
+ EFD_CLOEXEC = 0x80000
+ EFD_NONBLOCK = 0x800
+ EPOLL_CLOEXEC = 0x80000
+ EXTPROC = 0x10000
+ FF1 = 0x8000
+ FFDLY = 0x8000
+ FICLONE = 0x40049409
+ FICLONERANGE = 0x4020940d
+ FLUSHO = 0x1000
+ FPU_CTX_MAGIC = 0x46505501
+ FS_IOC_ENABLE_VERITY = 0x40806685
+ FS_IOC_GETFLAGS = 0x80086601
+ FS_IOC_GET_ENCRYPTION_NONCE = 0x8010661b
+ FS_IOC_GET_ENCRYPTION_POLICY = 0x400c6615
+ FS_IOC_GET_ENCRYPTION_PWSALT = 0x40106614
+ FS_IOC_SETFLAGS = 0x40086602
+ FS_IOC_SET_ENCRYPTION_POLICY = 0x800c6613
+ F_GETLK = 0x5
+ F_GETLK64 = 0x5
+ F_GETOWN = 0x9
+ F_RDLCK = 0x0
+ F_SETLK = 0x6
+ F_SETLK64 = 0x6
+ F_SETLKW = 0x7
+ F_SETLKW64 = 0x7
+ F_SETOWN = 0x8
+ F_UNLCK = 0x2
+ F_WRLCK = 0x1
+ HIDIOCGRAWINFO = 0x80084803
+ HIDIOCGRDESC = 0x90044802
+ HIDIOCGRDESCSIZE = 0x80044801
+ HUPCL = 0x400
+ ICANON = 0x2
+ IEXTEN = 0x8000
+ IN_CLOEXEC = 0x80000
+ IN_NONBLOCK = 0x800
+ IOCTL_VM_SOCKETS_GET_LOCAL_CID = 0x7b9
+ ISIG = 0x1
+ IUCLC = 0x200
+ IXOFF = 0x1000
+ IXON = 0x400
+ LASX_CTX_MAGIC = 0x41535801
+ LSX_CTX_MAGIC = 0x53580001
+ MAP_ANON = 0x20
+ MAP_ANONYMOUS = 0x20
+ MAP_DENYWRITE = 0x800
+ MAP_EXECUTABLE = 0x1000
+ MAP_GROWSDOWN = 0x100
+ MAP_HUGETLB = 0x40000
+ MAP_LOCKED = 0x2000
+ MAP_NONBLOCK = 0x10000
+ MAP_NORESERVE = 0x4000
+ MAP_POPULATE = 0x8000
+ MAP_STACK = 0x20000
+ MAP_SYNC = 0x80000
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MCL_ONFAULT = 0x4
+ MEMERASE = 0x40084d02
+ MEMERASE64 = 0x40104d14
+ MEMGETBADBLOCK = 0x40084d0b
+ MEMGETINFO = 0x80204d01
+ MEMGETOOBSEL = 0x80c84d0a
+ MEMGETREGIONCOUNT = 0x80044d07
+ MEMISLOCKED = 0x80084d17
+ MEMLOCK = 0x40084d05
+ MEMREADOOB = 0xc0104d04
+ MEMSETBADBLOCK = 0x40084d0c
+ MEMUNLOCK = 0x40084d06
+ MEMWRITEOOB = 0xc0104d03
+ MTDFILEMODE = 0x4d13
+ NFDBITS = 0x40
+ NLDLY = 0x100
+ NOFLSH = 0x80
+ NS_GET_NSTYPE = 0xb703
+ NS_GET_OWNER_UID = 0xb704
+ NS_GET_PARENT = 0xb702
+ NS_GET_USERNS = 0xb701
+ OLCUC = 0x2
+ ONLCR = 0x4
+ OTPERASE = 0x400c4d19
+ OTPGETREGIONCOUNT = 0x40044d0e
+ OTPGETREGIONINFO = 0x400c4d0f
+ OTPLOCK = 0x800c4d10
+ OTPSELECT = 0x80044d0d
+ O_APPEND = 0x400
+ O_ASYNC = 0x2000
+ O_CLOEXEC = 0x80000
+ O_CREAT = 0x40
+ O_DIRECT = 0x4000
+ O_DIRECTORY = 0x10000
+ O_DSYNC = 0x1000
+ O_EXCL = 0x80
+ O_FSYNC = 0x101000
+ O_LARGEFILE = 0x0
+ O_NDELAY = 0x800
+ O_NOATIME = 0x40000
+ O_NOCTTY = 0x100
+ O_NOFOLLOW = 0x20000
+ O_NONBLOCK = 0x800
+ O_PATH = 0x200000
+ O_RSYNC = 0x101000
+ O_SYNC = 0x101000
+ O_TMPFILE = 0x410000
+ O_TRUNC = 0x200
+ PARENB = 0x100
+ PARODD = 0x200
+ PENDIN = 0x4000
+ PERF_EVENT_IOC_DISABLE = 0x2401
+ PERF_EVENT_IOC_ENABLE = 0x2400
+ PERF_EVENT_IOC_ID = 0x80082407
+ PERF_EVENT_IOC_MODIFY_ATTRIBUTES = 0x4008240b
+ PERF_EVENT_IOC_PAUSE_OUTPUT = 0x40042409
+ PERF_EVENT_IOC_PERIOD = 0x40082404
+ PERF_EVENT_IOC_QUERY_BPF = 0xc008240a
+ PERF_EVENT_IOC_REFRESH = 0x2402
+ PERF_EVENT_IOC_RESET = 0x2403
+ PERF_EVENT_IOC_SET_BPF = 0x40042408
+ PERF_EVENT_IOC_SET_FILTER = 0x40082406
+ PERF_EVENT_IOC_SET_OUTPUT = 0x2405
+ PPPIOCATTACH = 0x4004743d
+ PPPIOCATTCHAN = 0x40047438
+ PPPIOCBRIDGECHAN = 0x40047435
+ PPPIOCCONNECT = 0x4004743a
+ PPPIOCDETACH = 0x4004743c
+ PPPIOCDISCONN = 0x7439
+ PPPIOCGASYNCMAP = 0x80047458
+ PPPIOCGCHAN = 0x80047437
+ PPPIOCGDEBUG = 0x80047441
+ PPPIOCGFLAGS = 0x8004745a
+ PPPIOCGIDLE = 0x8010743f
+ PPPIOCGIDLE32 = 0x8008743f
+ PPPIOCGIDLE64 = 0x8010743f
+ PPPIOCGL2TPSTATS = 0x80487436
+ PPPIOCGMRU = 0x80047453
+ PPPIOCGRASYNCMAP = 0x80047455
+ PPPIOCGUNIT = 0x80047456
+ PPPIOCGXASYNCMAP = 0x80207450
+ PPPIOCSACTIVE = 0x40107446
+ PPPIOCSASYNCMAP = 0x40047457
+ PPPIOCSCOMPRESS = 0x4010744d
+ PPPIOCSDEBUG = 0x40047440
+ PPPIOCSFLAGS = 0x40047459
+ PPPIOCSMAXCID = 0x40047451
+ PPPIOCSMRRU = 0x4004743b
+ PPPIOCSMRU = 0x40047452
+ PPPIOCSNPMODE = 0x4008744b
+ PPPIOCSPASS = 0x40107447
+ PPPIOCSRASYNCMAP = 0x40047454
+ PPPIOCSXASYNCMAP = 0x4020744f
+ PPPIOCUNBRIDGECHAN = 0x7434
+ PPPIOCXFERUNIT = 0x744e
+ PR_SET_PTRACER_ANY = 0xffffffffffffffff
+ PTRACE_SYSEMU = 0x1f
+ PTRACE_SYSEMU_SINGLESTEP = 0x20
+ RLIMIT_AS = 0x9
+ RLIMIT_MEMLOCK = 0x8
+ RLIMIT_NOFILE = 0x7
+ RLIMIT_NPROC = 0x6
+ RLIMIT_RSS = 0x5
+ RNDADDENTROPY = 0x40085203
+ RNDADDTOENTCNT = 0x40045201
+ RNDCLEARPOOL = 0x5206
+ RNDGETENTCNT = 0x80045200
+ RNDGETPOOL = 0x80085202
+ RNDRESEEDCRNG = 0x5207
+ RNDZAPENTCNT = 0x5204
+ RTC_AIE_OFF = 0x7002
+ RTC_AIE_ON = 0x7001
+ RTC_ALM_READ = 0x80247008
+ RTC_ALM_SET = 0x40247007
+ RTC_EPOCH_READ = 0x8008700d
+ RTC_EPOCH_SET = 0x4008700e
+ RTC_IRQP_READ = 0x8008700b
+ RTC_IRQP_SET = 0x4008700c
+ RTC_PARAM_GET = 0x40187013
+ RTC_PARAM_SET = 0x40187014
+ RTC_PIE_OFF = 0x7006
+ RTC_PIE_ON = 0x7005
+ RTC_PLL_GET = 0x80207011
+ RTC_PLL_SET = 0x40207012
+ RTC_RD_TIME = 0x80247009
+ RTC_SET_TIME = 0x4024700a
+ RTC_UIE_OFF = 0x7004
+ RTC_UIE_ON = 0x7003
+ RTC_VL_CLR = 0x7014
+ RTC_VL_READ = 0x80047013
+ RTC_WIE_OFF = 0x7010
+ RTC_WIE_ON = 0x700f
+ RTC_WKALM_RD = 0x80287010
+ RTC_WKALM_SET = 0x4028700f
+ SCM_TIMESTAMPING = 0x25
+ SCM_TIMESTAMPING_OPT_STATS = 0x36
+ SCM_TIMESTAMPING_PKTINFO = 0x3a
+ SCM_TIMESTAMPNS = 0x23
+ SCM_TXTIME = 0x3d
+ SCM_WIFI_STATUS = 0x29
+ SFD_CLOEXEC = 0x80000
+ SFD_NONBLOCK = 0x800
+ SIOCATMARK = 0x8905
+ SIOCGPGRP = 0x8904
+ SIOCGSTAMPNS_NEW = 0x80108907
+ SIOCGSTAMP_NEW = 0x80108906
+ SIOCINQ = 0x541b
+ SIOCOUTQ = 0x5411
+ SIOCSPGRP = 0x8902
+ SOCK_CLOEXEC = 0x80000
+ SOCK_DGRAM = 0x2
+ SOCK_NONBLOCK = 0x800
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0x1
+ SO_ACCEPTCONN = 0x1e
+ SO_ATTACH_BPF = 0x32
+ SO_ATTACH_REUSEPORT_CBPF = 0x33
+ SO_ATTACH_REUSEPORT_EBPF = 0x34
+ SO_BINDTODEVICE = 0x19
+ SO_BINDTOIFINDEX = 0x3e
+ SO_BPF_EXTENSIONS = 0x30
+ SO_BROADCAST = 0x6
+ SO_BSDCOMPAT = 0xe
+ SO_BUF_LOCK = 0x48
+ SO_BUSY_POLL = 0x2e
+ SO_BUSY_POLL_BUDGET = 0x46
+ SO_CNX_ADVICE = 0x35
+ SO_COOKIE = 0x39
+ SO_DETACH_REUSEPORT_BPF = 0x44
+ SO_DOMAIN = 0x27
+ SO_DONTROUTE = 0x5
+ SO_ERROR = 0x4
+ SO_INCOMING_CPU = 0x31
+ SO_INCOMING_NAPI_ID = 0x38
+ SO_KEEPALIVE = 0x9
+ SO_LINGER = 0xd
+ SO_LOCK_FILTER = 0x2c
+ SO_MARK = 0x24
+ SO_MAX_PACING_RATE = 0x2f
+ SO_MEMINFO = 0x37
+ SO_NETNS_COOKIE = 0x47
+ SO_NOFCS = 0x2b
+ SO_OOBINLINE = 0xa
+ SO_PASSCRED = 0x10
+ SO_PASSSEC = 0x22
+ SO_PEEK_OFF = 0x2a
+ SO_PEERCRED = 0x11
+ SO_PEERGROUPS = 0x3b
+ SO_PEERSEC = 0x1f
+ SO_PREFER_BUSY_POLL = 0x45
+ SO_PROTOCOL = 0x26
+ SO_RCVBUF = 0x8
+ SO_RCVBUFFORCE = 0x21
+ SO_RCVLOWAT = 0x12
+ SO_RCVTIMEO = 0x14
+ SO_RCVTIMEO_NEW = 0x42
+ SO_RCVTIMEO_OLD = 0x14
+ SO_RESERVE_MEM = 0x49
+ SO_REUSEADDR = 0x2
+ SO_REUSEPORT = 0xf
+ SO_RXQ_OVFL = 0x28
+ SO_SECURITY_AUTHENTICATION = 0x16
+ SO_SECURITY_ENCRYPTION_NETWORK = 0x18
+ SO_SECURITY_ENCRYPTION_TRANSPORT = 0x17
+ SO_SELECT_ERR_QUEUE = 0x2d
+ SO_SNDBUF = 0x7
+ SO_SNDBUFFORCE = 0x20
+ SO_SNDLOWAT = 0x13
+ SO_SNDTIMEO = 0x15
+ SO_SNDTIMEO_NEW = 0x43
+ SO_SNDTIMEO_OLD = 0x15
+ SO_TIMESTAMPING = 0x25
+ SO_TIMESTAMPING_NEW = 0x41
+ SO_TIMESTAMPING_OLD = 0x25
+ SO_TIMESTAMPNS = 0x23
+ SO_TIMESTAMPNS_NEW = 0x40
+ SO_TIMESTAMPNS_OLD = 0x23
+ SO_TIMESTAMP_NEW = 0x3f
+ SO_TXTIME = 0x3d
+ SO_TYPE = 0x3
+ SO_WIFI_STATUS = 0x29
+ SO_ZEROCOPY = 0x3c
+ TAB1 = 0x800
+ TAB2 = 0x1000
+ TAB3 = 0x1800
+ TABDLY = 0x1800
+ TCFLSH = 0x540b
+ TCGETA = 0x5405
+ TCGETS = 0x5401
+ TCGETS2 = 0x802c542a
+ TCGETX = 0x5432
+ TCSAFLUSH = 0x2
+ TCSBRK = 0x5409
+ TCSBRKP = 0x5425
+ TCSETA = 0x5406
+ TCSETAF = 0x5408
+ TCSETAW = 0x5407
+ TCSETS = 0x5402
+ TCSETS2 = 0x402c542b
+ TCSETSF = 0x5404
+ TCSETSF2 = 0x402c542d
+ TCSETSW = 0x5403
+ TCSETSW2 = 0x402c542c
+ TCSETX = 0x5433
+ TCSETXF = 0x5434
+ TCSETXW = 0x5435
+ TCXONC = 0x540a
+ TFD_CLOEXEC = 0x80000
+ TFD_NONBLOCK = 0x800
+ TIOCCBRK = 0x5428
+ TIOCCONS = 0x541d
+ TIOCEXCL = 0x540c
+ TIOCGDEV = 0x80045432
+ TIOCGETD = 0x5424
+ TIOCGEXCL = 0x80045440
+ TIOCGICOUNT = 0x545d
+ TIOCGISO7816 = 0x80285442
+ TIOCGLCKTRMIOS = 0x5456
+ TIOCGPGRP = 0x540f
+ TIOCGPKT = 0x80045438
+ TIOCGPTLCK = 0x80045439
+ TIOCGPTN = 0x80045430
+ TIOCGPTPEER = 0x5441
+ TIOCGRS485 = 0x542e
+ TIOCGSERIAL = 0x541e
+ TIOCGSID = 0x5429
+ TIOCGSOFTCAR = 0x5419
+ TIOCGWINSZ = 0x5413
+ TIOCINQ = 0x541b
+ TIOCLINUX = 0x541c
+ TIOCMBIC = 0x5417
+ TIOCMBIS = 0x5416
+ TIOCMGET = 0x5415
+ TIOCMIWAIT = 0x545c
+ TIOCMSET = 0x5418
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x5422
+ TIOCNXCL = 0x540d
+ TIOCOUTQ = 0x5411
+ TIOCPKT = 0x5420
+ TIOCSBRK = 0x5427
+ TIOCSCTTY = 0x540e
+ TIOCSERCONFIG = 0x5453
+ TIOCSERGETLSR = 0x5459
+ TIOCSERGETMULTI = 0x545a
+ TIOCSERGSTRUCT = 0x5458
+ TIOCSERGWILD = 0x5454
+ TIOCSERSETMULTI = 0x545b
+ TIOCSERSWILD = 0x5455
+ TIOCSER_TEMT = 0x1
+ TIOCSETD = 0x5423
+ TIOCSIG = 0x40045436
+ TIOCSISO7816 = 0xc0285443
+ TIOCSLCKTRMIOS = 0x5457
+ TIOCSPGRP = 0x5410
+ TIOCSPTLCK = 0x40045431
+ TIOCSRS485 = 0x542f
+ TIOCSSERIAL = 0x541f
+ TIOCSSOFTCAR = 0x541a
+ TIOCSTI = 0x5412
+ TIOCSWINSZ = 0x5414
+ TIOCVHANGUP = 0x5437
+ TOSTOP = 0x100
+ TUNATTACHFILTER = 0x401054d5
+ TUNDETACHFILTER = 0x401054d6
+ TUNGETDEVNETNS = 0x54e3
+ TUNGETFEATURES = 0x800454cf
+ TUNGETFILTER = 0x801054db
+ TUNGETIFF = 0x800454d2
+ TUNGETSNDBUF = 0x800454d3
+ TUNGETVNETBE = 0x800454df
+ TUNGETVNETHDRSZ = 0x800454d7
+ TUNGETVNETLE = 0x800454dd
+ TUNSETCARRIER = 0x400454e2
+ TUNSETDEBUG = 0x400454c9
+ TUNSETFILTEREBPF = 0x800454e1
+ TUNSETGROUP = 0x400454ce
+ TUNSETIFF = 0x400454ca
+ TUNSETIFINDEX = 0x400454da
+ TUNSETLINK = 0x400454cd
+ TUNSETNOCSUM = 0x400454c8
+ TUNSETOFFLOAD = 0x400454d0
+ TUNSETOWNER = 0x400454cc
+ TUNSETPERSIST = 0x400454cb
+ TUNSETQUEUE = 0x400454d9
+ TUNSETSNDBUF = 0x400454d4
+ TUNSETSTEERINGEBPF = 0x800454e0
+ TUNSETTXFILTER = 0x400454d1
+ TUNSETVNETBE = 0x400454de
+ TUNSETVNETHDRSZ = 0x400454d8
+ TUNSETVNETLE = 0x400454dc
+ UBI_IOCATT = 0x40186f40
+ UBI_IOCDET = 0x40046f41
+ UBI_IOCEBCH = 0x40044f02
+ UBI_IOCEBER = 0x40044f01
+ UBI_IOCEBISMAP = 0x80044f05
+ UBI_IOCEBMAP = 0x40084f03
+ UBI_IOCEBUNMAP = 0x40044f04
+ UBI_IOCMKVOL = 0x40986f00
+ UBI_IOCRMVOL = 0x40046f01
+ UBI_IOCRNVOL = 0x51106f03
+ UBI_IOCRPEB = 0x40046f04
+ UBI_IOCRSVOL = 0x400c6f02
+ UBI_IOCSETVOLPROP = 0x40104f06
+ UBI_IOCSPEB = 0x40046f05
+ UBI_IOCVOLCRBLK = 0x40804f07
+ UBI_IOCVOLRMBLK = 0x4f08
+ UBI_IOCVOLUP = 0x40084f00
+ VDISCARD = 0xd
+ VEOF = 0x4
+ VEOL = 0xb
+ VEOL2 = 0x10
+ VMIN = 0x6
+ VREPRINT = 0xc
+ VSTART = 0x8
+ VSTOP = 0x9
+ VSUSP = 0xa
+ VSWTC = 0x7
+ VT1 = 0x4000
+ VTDLY = 0x4000
+ VTIME = 0x5
+ VWERASE = 0xe
+ WDIOC_GETBOOTSTATUS = 0x80045702
+ WDIOC_GETPRETIMEOUT = 0x80045709
+ WDIOC_GETSTATUS = 0x80045701
+ WDIOC_GETSUPPORT = 0x80285700
+ WDIOC_GETTEMP = 0x80045703
+ WDIOC_GETTIMELEFT = 0x8004570a
+ WDIOC_GETTIMEOUT = 0x80045707
+ WDIOC_KEEPALIVE = 0x80045705
+ WDIOC_SETOPTIONS = 0x80045704
+ WORDSIZE = 0x40
+ XCASE = 0x4
+ XTABS = 0x1800
+ _HIDIOCGRAWNAME = 0x80804804
+ _HIDIOCGRAWPHYS = 0x80404805
+ _HIDIOCGRAWUNIQ = 0x80404808
+)
+
+// Errors
+const (
+ EADDRINUSE = syscall.Errno(0x62)
+ EADDRNOTAVAIL = syscall.Errno(0x63)
+ EADV = syscall.Errno(0x44)
+ EAFNOSUPPORT = syscall.Errno(0x61)
+ EALREADY = syscall.Errno(0x72)
+ EBADE = syscall.Errno(0x34)
+ EBADFD = syscall.Errno(0x4d)
+ EBADMSG = syscall.Errno(0x4a)
+ EBADR = syscall.Errno(0x35)
+ EBADRQC = syscall.Errno(0x38)
+ EBADSLT = syscall.Errno(0x39)
+ EBFONT = syscall.Errno(0x3b)
+ ECANCELED = syscall.Errno(0x7d)
+ ECHRNG = syscall.Errno(0x2c)
+ ECOMM = syscall.Errno(0x46)
+ ECONNABORTED = syscall.Errno(0x67)
+ ECONNREFUSED = syscall.Errno(0x6f)
+ ECONNRESET = syscall.Errno(0x68)
+ EDEADLK = syscall.Errno(0x23)
+ EDEADLOCK = syscall.Errno(0x23)
+ EDESTADDRREQ = syscall.Errno(0x59)
+ EDOTDOT = syscall.Errno(0x49)
+ EDQUOT = syscall.Errno(0x7a)
+ EHOSTDOWN = syscall.Errno(0x70)
+ EHOSTUNREACH = syscall.Errno(0x71)
+ EHWPOISON = syscall.Errno(0x85)
+ EIDRM = syscall.Errno(0x2b)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x73)
+ EISCONN = syscall.Errno(0x6a)
+ EISNAM = syscall.Errno(0x78)
+ EKEYEXPIRED = syscall.Errno(0x7f)
+ EKEYREJECTED = syscall.Errno(0x81)
+ EKEYREVOKED = syscall.Errno(0x80)
+ EL2HLT = syscall.Errno(0x33)
+ EL2NSYNC = syscall.Errno(0x2d)
+ EL3HLT = syscall.Errno(0x2e)
+ EL3RST = syscall.Errno(0x2f)
+ ELIBACC = syscall.Errno(0x4f)
+ ELIBBAD = syscall.Errno(0x50)
+ ELIBEXEC = syscall.Errno(0x53)
+ ELIBMAX = syscall.Errno(0x52)
+ ELIBSCN = syscall.Errno(0x51)
+ ELNRNG = syscall.Errno(0x30)
+ ELOOP = syscall.Errno(0x28)
+ EMEDIUMTYPE = syscall.Errno(0x7c)
+ EMSGSIZE = syscall.Errno(0x5a)
+ EMULTIHOP = syscall.Errno(0x48)
+ ENAMETOOLONG = syscall.Errno(0x24)
+ ENAVAIL = syscall.Errno(0x77)
+ ENETDOWN = syscall.Errno(0x64)
+ ENETRESET = syscall.Errno(0x66)
+ ENETUNREACH = syscall.Errno(0x65)
+ ENOANO = syscall.Errno(0x37)
+ ENOBUFS = syscall.Errno(0x69)
+ ENOCSI = syscall.Errno(0x32)
+ ENODATA = syscall.Errno(0x3d)
+ ENOKEY = syscall.Errno(0x7e)
+ ENOLCK = syscall.Errno(0x25)
+ ENOLINK = syscall.Errno(0x43)
+ ENOMEDIUM = syscall.Errno(0x7b)
+ ENOMSG = syscall.Errno(0x2a)
+ ENONET = syscall.Errno(0x40)
+ ENOPKG = syscall.Errno(0x41)
+ ENOPROTOOPT = syscall.Errno(0x5c)
+ ENOSR = syscall.Errno(0x3f)
+ ENOSTR = syscall.Errno(0x3c)
+ ENOSYS = syscall.Errno(0x26)
+ ENOTCONN = syscall.Errno(0x6b)
+ ENOTEMPTY = syscall.Errno(0x27)
+ ENOTNAM = syscall.Errno(0x76)
+ ENOTRECOVERABLE = syscall.Errno(0x83)
+ ENOTSOCK = syscall.Errno(0x58)
+ ENOTSUP = syscall.Errno(0x5f)
+ ENOTUNIQ = syscall.Errno(0x4c)
+ EOPNOTSUPP = syscall.Errno(0x5f)
+ EOVERFLOW = syscall.Errno(0x4b)
+ EOWNERDEAD = syscall.Errno(0x82)
+ EPFNOSUPPORT = syscall.Errno(0x60)
+ EPROTO = syscall.Errno(0x47)
+ EPROTONOSUPPORT = syscall.Errno(0x5d)
+ EPROTOTYPE = syscall.Errno(0x5b)
+ EREMCHG = syscall.Errno(0x4e)
+ EREMOTE = syscall.Errno(0x42)
+ EREMOTEIO = syscall.Errno(0x79)
+ ERESTART = syscall.Errno(0x55)
+ ERFKILL = syscall.Errno(0x84)
+ ESHUTDOWN = syscall.Errno(0x6c)
+ ESOCKTNOSUPPORT = syscall.Errno(0x5e)
+ ESRMNT = syscall.Errno(0x45)
+ ESTALE = syscall.Errno(0x74)
+ ESTRPIPE = syscall.Errno(0x56)
+ ETIME = syscall.Errno(0x3e)
+ ETIMEDOUT = syscall.Errno(0x6e)
+ ETOOMANYREFS = syscall.Errno(0x6d)
+ EUCLEAN = syscall.Errno(0x75)
+ EUNATCH = syscall.Errno(0x31)
+ EUSERS = syscall.Errno(0x57)
+ EXFULL = syscall.Errno(0x36)
+)
+
+// Signals
+const (
+ SIGBUS = syscall.Signal(0x7)
+ SIGCHLD = syscall.Signal(0x11)
+ SIGCLD = syscall.Signal(0x11)
+ SIGCONT = syscall.Signal(0x12)
+ SIGIO = syscall.Signal(0x1d)
+ SIGPOLL = syscall.Signal(0x1d)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGPWR = syscall.Signal(0x1e)
+ SIGSTKFLT = syscall.Signal(0x10)
+ SIGSTOP = syscall.Signal(0x13)
+ SIGSYS = syscall.Signal(0x1f)
+ SIGTSTP = syscall.Signal(0x14)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x17)
+ SIGUSR1 = syscall.Signal(0xa)
+ SIGUSR2 = syscall.Signal(0xc)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "no such device or address"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EAGAIN", "resource temporarily unavailable"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device or resource busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "invalid cross-device link"},
+ {19, "ENODEV", "no such device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "numerical result out of range"},
+ {35, "EDEADLK", "resource deadlock avoided"},
+ {36, "ENAMETOOLONG", "file name too long"},
+ {37, "ENOLCK", "no locks available"},
+ {38, "ENOSYS", "function not implemented"},
+ {39, "ENOTEMPTY", "directory not empty"},
+ {40, "ELOOP", "too many levels of symbolic links"},
+ {42, "ENOMSG", "no message of desired type"},
+ {43, "EIDRM", "identifier removed"},
+ {44, "ECHRNG", "channel number out of range"},
+ {45, "EL2NSYNC", "level 2 not synchronized"},
+ {46, "EL3HLT", "level 3 halted"},
+ {47, "EL3RST", "level 3 reset"},
+ {48, "ELNRNG", "link number out of range"},
+ {49, "EUNATCH", "protocol driver not attached"},
+ {50, "ENOCSI", "no CSI structure available"},
+ {51, "EL2HLT", "level 2 halted"},
+ {52, "EBADE", "invalid exchange"},
+ {53, "EBADR", "invalid request descriptor"},
+ {54, "EXFULL", "exchange full"},
+ {55, "ENOANO", "no anode"},
+ {56, "EBADRQC", "invalid request code"},
+ {57, "EBADSLT", "invalid slot"},
+ {59, "EBFONT", "bad font file format"},
+ {60, "ENOSTR", "device not a stream"},
+ {61, "ENODATA", "no data available"},
+ {62, "ETIME", "timer expired"},
+ {63, "ENOSR", "out of streams resources"},
+ {64, "ENONET", "machine is not on the network"},
+ {65, "ENOPKG", "package not installed"},
+ {66, "EREMOTE", "object is remote"},
+ {67, "ENOLINK", "link has been severed"},
+ {68, "EADV", "advertise error"},
+ {69, "ESRMNT", "srmount error"},
+ {70, "ECOMM", "communication error on send"},
+ {71, "EPROTO", "protocol error"},
+ {72, "EMULTIHOP", "multihop attempted"},
+ {73, "EDOTDOT", "RFS specific error"},
+ {74, "EBADMSG", "bad message"},
+ {75, "EOVERFLOW", "value too large for defined data type"},
+ {76, "ENOTUNIQ", "name not unique on network"},
+ {77, "EBADFD", "file descriptor in bad state"},
+ {78, "EREMCHG", "remote address changed"},
+ {79, "ELIBACC", "can not access a needed shared library"},
+ {80, "ELIBBAD", "accessing a corrupted shared library"},
+ {81, "ELIBSCN", ".lib section in a.out corrupted"},
+ {82, "ELIBMAX", "attempting to link in too many shared libraries"},
+ {83, "ELIBEXEC", "cannot exec a shared library directly"},
+ {84, "EILSEQ", "invalid or incomplete multibyte or wide character"},
+ {85, "ERESTART", "interrupted system call should be restarted"},
+ {86, "ESTRPIPE", "streams pipe error"},
+ {87, "EUSERS", "too many users"},
+ {88, "ENOTSOCK", "socket operation on non-socket"},
+ {89, "EDESTADDRREQ", "destination address required"},
+ {90, "EMSGSIZE", "message too long"},
+ {91, "EPROTOTYPE", "protocol wrong type for socket"},
+ {92, "ENOPROTOOPT", "protocol not available"},
+ {93, "EPROTONOSUPPORT", "protocol not supported"},
+ {94, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {95, "ENOTSUP", "operation not supported"},
+ {96, "EPFNOSUPPORT", "protocol family not supported"},
+ {97, "EAFNOSUPPORT", "address family not supported by protocol"},
+ {98, "EADDRINUSE", "address already in use"},
+ {99, "EADDRNOTAVAIL", "cannot assign requested address"},
+ {100, "ENETDOWN", "network is down"},
+ {101, "ENETUNREACH", "network is unreachable"},
+ {102, "ENETRESET", "network dropped connection on reset"},
+ {103, "ECONNABORTED", "software caused connection abort"},
+ {104, "ECONNRESET", "connection reset by peer"},
+ {105, "ENOBUFS", "no buffer space available"},
+ {106, "EISCONN", "transport endpoint is already connected"},
+ {107, "ENOTCONN", "transport endpoint is not connected"},
+ {108, "ESHUTDOWN", "cannot send after transport endpoint shutdown"},
+ {109, "ETOOMANYREFS", "too many references: cannot splice"},
+ {110, "ETIMEDOUT", "connection timed out"},
+ {111, "ECONNREFUSED", "connection refused"},
+ {112, "EHOSTDOWN", "host is down"},
+ {113, "EHOSTUNREACH", "no route to host"},
+ {114, "EALREADY", "operation already in progress"},
+ {115, "EINPROGRESS", "operation now in progress"},
+ {116, "ESTALE", "stale file handle"},
+ {117, "EUCLEAN", "structure needs cleaning"},
+ {118, "ENOTNAM", "not a XENIX named type file"},
+ {119, "ENAVAIL", "no XENIX semaphores available"},
+ {120, "EISNAM", "is a named type file"},
+ {121, "EREMOTEIO", "remote I/O error"},
+ {122, "EDQUOT", "disk quota exceeded"},
+ {123, "ENOMEDIUM", "no medium found"},
+ {124, "EMEDIUMTYPE", "wrong medium type"},
+ {125, "ECANCELED", "operation canceled"},
+ {126, "ENOKEY", "required key not available"},
+ {127, "EKEYEXPIRED", "key has expired"},
+ {128, "EKEYREVOKED", "key has been revoked"},
+ {129, "EKEYREJECTED", "key was rejected by service"},
+ {130, "EOWNERDEAD", "owner died"},
+ {131, "ENOTRECOVERABLE", "state not recoverable"},
+ {132, "ERFKILL", "operation not possible due to RF-kill"},
+ {133, "EHWPOISON", "memory page has hardware error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/breakpoint trap"},
+ {6, "SIGABRT", "aborted"},
+ {7, "SIGBUS", "bus error"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGUSR1", "user defined signal 1"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGUSR2", "user defined signal 2"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGSTKFLT", "stack fault"},
+ {17, "SIGCHLD", "child exited"},
+ {18, "SIGCONT", "continued"},
+ {19, "SIGSTOP", "stopped (signal)"},
+ {20, "SIGTSTP", "stopped"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGURG", "urgent I/O condition"},
+ {24, "SIGXCPU", "CPU time limit exceeded"},
+ {25, "SIGXFSZ", "file size limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window changed"},
+ {29, "SIGIO", "I/O possible"},
+ {30, "SIGPWR", "power failure"},
+ {31, "SIGSYS", "bad system call"},
+}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 14d7a843..7f44a495 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -5,7 +5,7 @@
// +build mips,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 99e7c4ac..2f92b4e4 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -5,7 +5,7 @@
// +build mips64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 496364c3..f5367a96 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -5,7 +5,7 @@
// +build mips64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 3e408308..2e22337d 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -5,7 +5,7 @@
// +build mipsle,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
index 1151a7df..858c4f30 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
@@ -5,7 +5,7 @@
// +build ppc,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index ed17f249..af2a7ba6 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -5,7 +5,7 @@
// +build ppc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index d84a37c1..eaa2eb8e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -5,7 +5,7 @@
// +build ppc64le,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
index 5cafba83..faaa9f06 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
@@ -5,7 +5,7 @@
// +build riscv64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 6d122da4..0d161f0b 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -5,7 +5,7 @@
// +build s390x,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index 6bd19e51..4fd497a3 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -5,7 +5,7 @@
// +build sparc64,linux
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/_const.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
package unix
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
index 85e0cc38..870215d2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc.go
@@ -975,7 +975,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
@@ -992,7 +992,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
index f1d4a73b..a89b0bfa 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_aix_ppc64.go
@@ -931,7 +931,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
@@ -946,7 +946,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 0ae0ed4c..467deed7 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-var libc_setattrlist_trampoline_addr uintptr
+var libc_utimensat_trampoline_addr uintptr
-//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1638,6 +1643,30 @@ var libc_mknod_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1698,7 +1727,7 @@ var libc_pathconf_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1719,7 +1748,7 @@ var libc_pread_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index eac6ca80..7e308a47 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
-TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setattrlist(SB)
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
-GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
@@ -600,6 +600,12 @@ TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+
+GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_open(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index cf71be3e..35938d34 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -643,17 +643,22 @@ var libc_flistxattr_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func setattrlist(path *byte, list unsafe.Pointer, buf unsafe.Pointer, size uintptr, options int) (err error) {
- _, _, e1 := syscall_syscall6(libc_setattrlist_trampoline_addr, uintptr(unsafe.Pointer(path)), uintptr(list), uintptr(buf), uintptr(size), uintptr(options), 0)
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
-var libc_setattrlist_trampoline_addr uintptr
+var libc_utimensat_trampoline_addr uintptr
-//go:cgo_import_dynamic libc_setattrlist setattrlist "/usr/lib/libSystem.B.dylib"
+//go:cgo_import_dynamic libc_utimensat utimensat "/usr/lib/libSystem.B.dylib"
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -1638,6 +1643,30 @@ var libc_mknod_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsType)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(dir)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mount mount "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
@@ -1698,7 +1727,7 @@ var libc_pathconf_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1719,7 +1748,7 @@ var libc_pread_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index 4ebcf217..b09e5bb0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -228,11 +228,11 @@ TEXT libc_flistxattr_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_flistxattr_trampoline_addr(SB), RODATA, $8
DATA ·libc_flistxattr_trampoline_addr(SB)/8, $libc_flistxattr_trampoline<>(SB)
-TEXT libc_setattrlist_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_setattrlist(SB)
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
-GLOBL ·libc_setattrlist_trampoline_addr(SB), RODATA, $8
-DATA ·libc_setattrlist_trampoline_addr(SB)/8, $libc_setattrlist_trampoline<>(SB)
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
TEXT libc_fcntl_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_fcntl(SB)
@@ -600,6 +600,12 @@ TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mount(SB)
+
+GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB)
+
TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_open(SB)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
index 3e9bddb7..e9d9997e 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_386.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
index c72a462b..edd373b1 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_amd64.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
index 530d5df9..82e9764b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
index 71e7df9e..a6479acd 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_freebsd_arm64.go
@@ -1420,7 +1420,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1437,7 +1437,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index 30fa4055..bc4a2753 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -231,6 +231,16 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Waitid(idType int, id int, info *Siginfo, options int, rusage *Rusage) (err error) {
+ _, _, e1 := Syscall6(SYS_WAITID, uintptr(idType), uintptr(id), uintptr(unsafe.Pointer(info)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func KeyctlInt(cmd int, arg2 int, arg3 int, arg4 int, arg5 int) (ret int, err error) {
r0, _, e1 := Syscall6(SYS_KEYCTL, uintptr(cmd), uintptr(arg2), uintptr(arg3), uintptr(arg4), uintptr(arg5), 0)
ret = int(r0)
@@ -818,6 +828,49 @@ func Fsync(fd int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func Fsmount(fd int, flags int, mountAttrs int) (fsfd int, err error) {
+ r0, _, e1 := Syscall(SYS_FSMOUNT, uintptr(fd), uintptr(flags), uintptr(mountAttrs))
+ fsfd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsopen(fsName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fsName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSOPEN, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fspick(dirfd int, pathName string, flags int) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(pathName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_FSPICK, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Getdents(fd int, buf []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
@@ -1195,6 +1248,26 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MoveMount(fromDirfd int, fromPathName string, toDirfd int, toPathName string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fromPathName)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(toPathName)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_MOVE_MOUNT, uintptr(fromDirfd), uintptr(unsafe.Pointer(_p0)), uintptr(toDirfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
@@ -1205,6 +1278,22 @@ func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func OpenTree(dfd int, fileName string, flags uint) (r int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(fileName)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := Syscall(SYS_OPEN_TREE, uintptr(dfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ r = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func PerfEventOpen(attr *PerfEventAttr, pid int, cpu int, groupFd int, flags int) (fd int, err error) {
r0, _, e1 := Syscall6(SYS_PERF_EVENT_OPEN, uintptr(unsafe.Pointer(attr)), uintptr(pid), uintptr(cpu), uintptr(groupFd), uintptr(flags), 0)
fd = int(r0)
@@ -1992,6 +2081,16 @@ func PidfdGetfd(pidfd int, targetfd int, flags int) (fd int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func PidfdSendSignal(pidfd int, sig Signal, info *Siginfo, flags int) (err error) {
+ _, _, e1 := Syscall6(SYS_PIDFD_SEND_SIGNAL, uintptr(pidfd), uintptr(sig), uintptr(unsafe.Pointer(info)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func shmat(id int, addr uintptr, flag int) (ret uintptr, err error) {
r0, _, e1 := Syscall(SYS_SHMAT, uintptr(id), uintptr(addr), uintptr(flag))
ret = uintptr(r0)
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 2fc6271f..88af526b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -200,7 +200,7 @@ func Lstat(path string, stat *Stat_t) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -217,7 +217,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index 43d9f012..2a0c4aa6 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -215,6 +215,17 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func MemfdSecret(flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func Pause() (err error) {
_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)
if e1 != 0 {
@@ -225,7 +236,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -242,7 +253,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 7df0cb17..4882bde3 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -538,7 +538,7 @@ func utimes(path string, times *[2]Timeval) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -555,7 +555,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index 076e8f1c..9f8c24e4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -180,7 +180,18 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func MemfdSecret(flags int) (fd int, err error) {
+ r0, _, e1 := Syscall(SYS_MEMFD_SECRET, uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -197,7 +208,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
new file mode 100644
index 00000000..8cdfbe71
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
@@ -0,0 +1,552 @@
+// go run mksyscall.go -tags linux,loong64 syscall_linux.go syscall_linux_loong64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build linux && loong64
+// +build linux,loong64
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {
+ _, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fallocate(fd int, mode uint32, off int64, len int64) (err error) {
+ _, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(len), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {
+ r0, _, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)
+ n = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(events) > 0 {
+ _p0 = unsafe.Pointer(&events[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_EPOLL_PWAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
+ _, _, e1 := Syscall6(SYS_FADVISE64, uintptr(fd), uintptr(offset), uintptr(length), uintptr(advice), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, buf *Statfs_t) (err error) {
+ _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEGID, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (euid int) {
+ r0, _ := RawSyscallNoError(SYS_GETEUID, 0, 0, 0)
+ euid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _ := RawSyscallNoError(SYS_GETGID, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _ := RawSyscallNoError(SYS_GETUID, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, n int) (err error) {
+ _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(n), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (off int64, err error) {
+ r0, _, e1 := Syscall(SYS_LSEEK, uintptr(fd), uintptr(offset), uintptr(whence))
+ off = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {
+ r0, _, e1 := Syscall6(SYS_SENDFILE, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)
+ written = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setfsgid(gid int) (prev int, err error) {
+ r0, _, e1 := Syscall(SYS_SETFSGID, uintptr(gid), 0, 0)
+ prev = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setfsuid(uid int) (prev int, err error) {
+ r0, _, e1 := Syscall(SYS_SETFSUID, uintptr(uid), 0, 0)
+ prev = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(fd int, how int) (err error) {
+ _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
+ r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
+ n = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, buf *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func SyncFileRange(fd int, off int64, n int64, flags int) (err error) {
+ _, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(n), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int, err error) {
+ r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(n int, list *_Gid_t) (nn int, err error) {
+ r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ nn = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(n int, list *_Gid_t) (err error) {
+ _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(n), uintptr(unsafe.Pointer(list)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flags int, fd int, offset int64) (xaddr uintptr, err error) {
+ r0, _, e1 := Syscall6(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(offset))
+ xaddr = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func kexecFileLoad(kernelFd int, initrdFd int, cmdlineLen int, cmdline string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(cmdline)
+ if err != nil {
+ return
+ }
+ _, _, e1 := Syscall6(SYS_KEXEC_FILE_LOAD, uintptr(kernelFd), uintptr(initrdFd), uintptr(cmdlineLen), uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index 7b3c8474..d7d6f424 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -150,7 +150,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -167,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index 0d3c45fb..7f1f8e65 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -180,7 +180,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index cb46b2aa..f933d0f5 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -180,7 +180,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 21c9baa6..297d0a99 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -150,7 +150,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -167,7 +167,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
index 02b8f088..2e32e7a4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -210,7 +210,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -227,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index ac8cb09b..3c531704 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -240,7 +240,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -257,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index bd08d887..a00c6744 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -240,7 +240,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -257,7 +257,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index a834d217..a1a9bcbb 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -180,7 +180,7 @@ func Listen(s int, n int) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -197,7 +197,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index 9e462a96..e0dabc60 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -210,7 +210,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -227,7 +227,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 96d34024..368623c0 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -220,7 +220,7 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -237,7 +237,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
index 51d0c074..4af561a4 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_386.go
@@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
index df2efb6d..3b90e944 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_amd64.go
@@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
index c8536c2c..890f4ccd 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm.go
@@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
index 8b981bfc..c79f071f 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_netbsd_arm64.go
@@ -1330,7 +1330,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1347,7 +1347,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index 8f80f4ad..a057fc5d 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 3a47aca7..04db8fa2 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 883a9b45..69f80300 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index aac7fdc9..c96a5051 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
index 87761874..016d959b 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go
@@ -1128,7 +1128,7 @@ func Pathconf(path string, name int) (val int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
@@ -1145,7 +1145,7 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
diff --git a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index b5f926ce..d12f4fbf 100644
--- a/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -227,8 +227,8 @@ import (
//go:linkname procOpenat libc_openat
//go:linkname procPathconf libc_pathconf
//go:linkname procPause libc_pause
-//go:linkname procPread libc_pread
-//go:linkname procPwrite libc_pwrite
+//go:linkname procpread libc_pread
+//go:linkname procpwrite libc_pwrite
//go:linkname procread libc_read
//go:linkname procReadlink libc_readlink
//go:linkname procRename libc_rename
@@ -364,8 +364,8 @@ var (
procOpenat,
procPathconf,
procPause,
- procPread,
- procPwrite,
+ procpread,
+ procpwrite,
procread,
procReadlink,
procRename,
@@ -1380,12 +1380,12 @@ func Pause() (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pread(fd int, p []byte, offset int64) (n int, err error) {
+func pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
}
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpread)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = e1
@@ -1395,12 +1395,12 @@ func Pread(fd int, p []byte, offset int64) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 *byte
if len(p) > 0 {
_p0 = &p[0]
}
- r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procPwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
+ r0, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procpwrite)), 4, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = e1
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
index cac1f758..62192e1d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
@@ -446,4 +446,5 @@ const (
SYS_MEMFD_SECRET = 447
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
index f327e4a0..490aab5d 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
@@ -368,4 +368,5 @@ const (
SYS_MEMFD_SECRET = 447
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
index fb06a08d..aca17b6f 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
@@ -410,4 +410,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
index 58285646..54b4dfa5 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
@@ -313,4 +313,5 @@ const (
SYS_MEMFD_SECRET = 447
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
new file mode 100644
index 00000000..e443f9a3
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
@@ -0,0 +1,313 @@
+// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build loong64 && linux
+// +build loong64,linux
+
+package unix
+
+const (
+ SYS_IO_SETUP = 0
+ SYS_IO_DESTROY = 1
+ SYS_IO_SUBMIT = 2
+ SYS_IO_CANCEL = 3
+ SYS_IO_GETEVENTS = 4
+ SYS_SETXATTR = 5
+ SYS_LSETXATTR = 6
+ SYS_FSETXATTR = 7
+ SYS_GETXATTR = 8
+ SYS_LGETXATTR = 9
+ SYS_FGETXATTR = 10
+ SYS_LISTXATTR = 11
+ SYS_LLISTXATTR = 12
+ SYS_FLISTXATTR = 13
+ SYS_REMOVEXATTR = 14
+ SYS_LREMOVEXATTR = 15
+ SYS_FREMOVEXATTR = 16
+ SYS_GETCWD = 17
+ SYS_LOOKUP_DCOOKIE = 18
+ SYS_EVENTFD2 = 19
+ SYS_EPOLL_CREATE1 = 20
+ SYS_EPOLL_CTL = 21
+ SYS_EPOLL_PWAIT = 22
+ SYS_DUP = 23
+ SYS_DUP3 = 24
+ SYS_FCNTL = 25
+ SYS_INOTIFY_INIT1 = 26
+ SYS_INOTIFY_ADD_WATCH = 27
+ SYS_INOTIFY_RM_WATCH = 28
+ SYS_IOCTL = 29
+ SYS_IOPRIO_SET = 30
+ SYS_IOPRIO_GET = 31
+ SYS_FLOCK = 32
+ SYS_MKNODAT = 33
+ SYS_MKDIRAT = 34
+ SYS_UNLINKAT = 35
+ SYS_SYMLINKAT = 36
+ SYS_LINKAT = 37
+ SYS_UMOUNT2 = 39
+ SYS_MOUNT = 40
+ SYS_PIVOT_ROOT = 41
+ SYS_NFSSERVCTL = 42
+ SYS_STATFS = 43
+ SYS_FSTATFS = 44
+ SYS_TRUNCATE = 45
+ SYS_FTRUNCATE = 46
+ SYS_FALLOCATE = 47
+ SYS_FACCESSAT = 48
+ SYS_CHDIR = 49
+ SYS_FCHDIR = 50
+ SYS_CHROOT = 51
+ SYS_FCHMOD = 52
+ SYS_FCHMODAT = 53
+ SYS_FCHOWNAT = 54
+ SYS_FCHOWN = 55
+ SYS_OPENAT = 56
+ SYS_CLOSE = 57
+ SYS_VHANGUP = 58
+ SYS_PIPE2 = 59
+ SYS_QUOTACTL = 60
+ SYS_GETDENTS64 = 61
+ SYS_LSEEK = 62
+ SYS_READ = 63
+ SYS_WRITE = 64
+ SYS_READV = 65
+ SYS_WRITEV = 66
+ SYS_PREAD64 = 67
+ SYS_PWRITE64 = 68
+ SYS_PREADV = 69
+ SYS_PWRITEV = 70
+ SYS_SENDFILE = 71
+ SYS_PSELECT6 = 72
+ SYS_PPOLL = 73
+ SYS_SIGNALFD4 = 74
+ SYS_VMSPLICE = 75
+ SYS_SPLICE = 76
+ SYS_TEE = 77
+ SYS_READLINKAT = 78
+ SYS_FSTATAT = 79
+ SYS_FSTAT = 80
+ SYS_SYNC = 81
+ SYS_FSYNC = 82
+ SYS_FDATASYNC = 83
+ SYS_SYNC_FILE_RANGE = 84
+ SYS_TIMERFD_CREATE = 85
+ SYS_TIMERFD_SETTIME = 86
+ SYS_TIMERFD_GETTIME = 87
+ SYS_UTIMENSAT = 88
+ SYS_ACCT = 89
+ SYS_CAPGET = 90
+ SYS_CAPSET = 91
+ SYS_PERSONALITY = 92
+ SYS_EXIT = 93
+ SYS_EXIT_GROUP = 94
+ SYS_WAITID = 95
+ SYS_SET_TID_ADDRESS = 96
+ SYS_UNSHARE = 97
+ SYS_FUTEX = 98
+ SYS_SET_ROBUST_LIST = 99
+ SYS_GET_ROBUST_LIST = 100
+ SYS_NANOSLEEP = 101
+ SYS_GETITIMER = 102
+ SYS_SETITIMER = 103
+ SYS_KEXEC_LOAD = 104
+ SYS_INIT_MODULE = 105
+ SYS_DELETE_MODULE = 106
+ SYS_TIMER_CREATE = 107
+ SYS_TIMER_GETTIME = 108
+ SYS_TIMER_GETOVERRUN = 109
+ SYS_TIMER_SETTIME = 110
+ SYS_TIMER_DELETE = 111
+ SYS_CLOCK_SETTIME = 112
+ SYS_CLOCK_GETTIME = 113
+ SYS_CLOCK_GETRES = 114
+ SYS_CLOCK_NANOSLEEP = 115
+ SYS_SYSLOG = 116
+ SYS_PTRACE = 117
+ SYS_SCHED_SETPARAM = 118
+ SYS_SCHED_SETSCHEDULER = 119
+ SYS_SCHED_GETSCHEDULER = 120
+ SYS_SCHED_GETPARAM = 121
+ SYS_SCHED_SETAFFINITY = 122
+ SYS_SCHED_GETAFFINITY = 123
+ SYS_SCHED_YIELD = 124
+ SYS_SCHED_GET_PRIORITY_MAX = 125
+ SYS_SCHED_GET_PRIORITY_MIN = 126
+ SYS_SCHED_RR_GET_INTERVAL = 127
+ SYS_RESTART_SYSCALL = 128
+ SYS_KILL = 129
+ SYS_TKILL = 130
+ SYS_TGKILL = 131
+ SYS_SIGALTSTACK = 132
+ SYS_RT_SIGSUSPEND = 133
+ SYS_RT_SIGACTION = 134
+ SYS_RT_SIGPROCMASK = 135
+ SYS_RT_SIGPENDING = 136
+ SYS_RT_SIGTIMEDWAIT = 137
+ SYS_RT_SIGQUEUEINFO = 138
+ SYS_RT_SIGRETURN = 139
+ SYS_SETPRIORITY = 140
+ SYS_GETPRIORITY = 141
+ SYS_REBOOT = 142
+ SYS_SETREGID = 143
+ SYS_SETGID = 144
+ SYS_SETREUID = 145
+ SYS_SETUID = 146
+ SYS_SETRESUID = 147
+ SYS_GETRESUID = 148
+ SYS_SETRESGID = 149
+ SYS_GETRESGID = 150
+ SYS_SETFSUID = 151
+ SYS_SETFSGID = 152
+ SYS_TIMES = 153
+ SYS_SETPGID = 154
+ SYS_GETPGID = 155
+ SYS_GETSID = 156
+ SYS_SETSID = 157
+ SYS_GETGROUPS = 158
+ SYS_SETGROUPS = 159
+ SYS_UNAME = 160
+ SYS_SETHOSTNAME = 161
+ SYS_SETDOMAINNAME = 162
+ SYS_GETRUSAGE = 165
+ SYS_UMASK = 166
+ SYS_PRCTL = 167
+ SYS_GETCPU = 168
+ SYS_GETTIMEOFDAY = 169
+ SYS_SETTIMEOFDAY = 170
+ SYS_ADJTIMEX = 171
+ SYS_GETPID = 172
+ SYS_GETPPID = 173
+ SYS_GETUID = 174
+ SYS_GETEUID = 175
+ SYS_GETGID = 176
+ SYS_GETEGID = 177
+ SYS_GETTID = 178
+ SYS_SYSINFO = 179
+ SYS_MQ_OPEN = 180
+ SYS_MQ_UNLINK = 181
+ SYS_MQ_TIMEDSEND = 182
+ SYS_MQ_TIMEDRECEIVE = 183
+ SYS_MQ_NOTIFY = 184
+ SYS_MQ_GETSETATTR = 185
+ SYS_MSGGET = 186
+ SYS_MSGCTL = 187
+ SYS_MSGRCV = 188
+ SYS_MSGSND = 189
+ SYS_SEMGET = 190
+ SYS_SEMCTL = 191
+ SYS_SEMTIMEDOP = 192
+ SYS_SEMOP = 193
+ SYS_SHMGET = 194
+ SYS_SHMCTL = 195
+ SYS_SHMAT = 196
+ SYS_SHMDT = 197
+ SYS_SOCKET = 198
+ SYS_SOCKETPAIR = 199
+ SYS_BIND = 200
+ SYS_LISTEN = 201
+ SYS_ACCEPT = 202
+ SYS_CONNECT = 203
+ SYS_GETSOCKNAME = 204
+ SYS_GETPEERNAME = 205
+ SYS_SENDTO = 206
+ SYS_RECVFROM = 207
+ SYS_SETSOCKOPT = 208
+ SYS_GETSOCKOPT = 209
+ SYS_SHUTDOWN = 210
+ SYS_SENDMSG = 211
+ SYS_RECVMSG = 212
+ SYS_READAHEAD = 213
+ SYS_BRK = 214
+ SYS_MUNMAP = 215
+ SYS_MREMAP = 216
+ SYS_ADD_KEY = 217
+ SYS_REQUEST_KEY = 218
+ SYS_KEYCTL = 219
+ SYS_CLONE = 220
+ SYS_EXECVE = 221
+ SYS_MMAP = 222
+ SYS_FADVISE64 = 223
+ SYS_SWAPON = 224
+ SYS_SWAPOFF = 225
+ SYS_MPROTECT = 226
+ SYS_MSYNC = 227
+ SYS_MLOCK = 228
+ SYS_MUNLOCK = 229
+ SYS_MLOCKALL = 230
+ SYS_MUNLOCKALL = 231
+ SYS_MINCORE = 232
+ SYS_MADVISE = 233
+ SYS_REMAP_FILE_PAGES = 234
+ SYS_MBIND = 235
+ SYS_GET_MEMPOLICY = 236
+ SYS_SET_MEMPOLICY = 237
+ SYS_MIGRATE_PAGES = 238
+ SYS_MOVE_PAGES = 239
+ SYS_RT_TGSIGQUEUEINFO = 240
+ SYS_PERF_EVENT_OPEN = 241
+ SYS_ACCEPT4 = 242
+ SYS_RECVMMSG = 243
+ SYS_ARCH_SPECIFIC_SYSCALL = 244
+ SYS_WAIT4 = 260
+ SYS_PRLIMIT64 = 261
+ SYS_FANOTIFY_INIT = 262
+ SYS_FANOTIFY_MARK = 263
+ SYS_NAME_TO_HANDLE_AT = 264
+ SYS_OPEN_BY_HANDLE_AT = 265
+ SYS_CLOCK_ADJTIME = 266
+ SYS_SYNCFS = 267
+ SYS_SETNS = 268
+ SYS_SENDMMSG = 269
+ SYS_PROCESS_VM_READV = 270
+ SYS_PROCESS_VM_WRITEV = 271
+ SYS_KCMP = 272
+ SYS_FINIT_MODULE = 273
+ SYS_SCHED_SETATTR = 274
+ SYS_SCHED_GETATTR = 275
+ SYS_RENAMEAT2 = 276
+ SYS_SECCOMP = 277
+ SYS_GETRANDOM = 278
+ SYS_MEMFD_CREATE = 279
+ SYS_BPF = 280
+ SYS_EXECVEAT = 281
+ SYS_USERFAULTFD = 282
+ SYS_MEMBARRIER = 283
+ SYS_MLOCK2 = 284
+ SYS_COPY_FILE_RANGE = 285
+ SYS_PREADV2 = 286
+ SYS_PWRITEV2 = 287
+ SYS_PKEY_MPROTECT = 288
+ SYS_PKEY_ALLOC = 289
+ SYS_PKEY_FREE = 290
+ SYS_STATX = 291
+ SYS_IO_PGETEVENTS = 292
+ SYS_RSEQ = 293
+ SYS_KEXEC_FILE_LOAD = 294
+ SYS_PIDFD_SEND_SIGNAL = 424
+ SYS_IO_URING_SETUP = 425
+ SYS_IO_URING_ENTER = 426
+ SYS_IO_URING_REGISTER = 427
+ SYS_OPEN_TREE = 428
+ SYS_MOVE_MOUNT = 429
+ SYS_FSOPEN = 430
+ SYS_FSCONFIG = 431
+ SYS_FSMOUNT = 432
+ SYS_FSPICK = 433
+ SYS_PIDFD_OPEN = 434
+ SYS_CLONE3 = 435
+ SYS_CLOSE_RANGE = 436
+ SYS_OPENAT2 = 437
+ SYS_PIDFD_GETFD = 438
+ SYS_FACCESSAT2 = 439
+ SYS_PROCESS_MADVISE = 440
+ SYS_EPOLL_PWAIT2 = 441
+ SYS_MOUNT_SETATTR = 442
+ SYS_QUOTACTL_FD = 443
+ SYS_LANDLOCK_CREATE_RULESET = 444
+ SYS_LANDLOCK_ADD_RULE = 445
+ SYS_LANDLOCK_RESTRICT_SELF = 446
+ SYS_PROCESS_MRELEASE = 448
+ SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
+)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
index 3b0418e6..65a99efc 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
@@ -430,4 +430,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 4446
SYS_PROCESS_MRELEASE = 4448
SYS_FUTEX_WAITV = 4449
+ SYS_SET_MEMPOLICY_HOME_NODE = 4450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
index 314ebf16..841c8a66 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
@@ -360,4 +360,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 5446
SYS_PROCESS_MRELEASE = 5448
SYS_FUTEX_WAITV = 5449
+ SYS_SET_MEMPOLICY_HOME_NODE = 5450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
index b8fbb937..e26a7c76 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
@@ -360,4 +360,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 5446
SYS_PROCESS_MRELEASE = 5448
SYS_FUTEX_WAITV = 5449
+ SYS_SET_MEMPOLICY_HOME_NODE = 5450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
index ee309b2b..26447260 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
@@ -430,4 +430,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 4446
SYS_PROCESS_MRELEASE = 4448
SYS_FUTEX_WAITV = 4449
+ SYS_SET_MEMPOLICY_HOME_NODE = 4450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
index ac374810..26aefc18 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
@@ -437,4 +437,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
index 5aa47211..8d4cd9d9 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
@@ -409,4 +409,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
index 0793ac1a..3b405d1f 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
@@ -409,4 +409,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
index a520962e..c3a5af86 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
@@ -311,4 +311,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
index d1738586..8ffa6646 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
@@ -374,4 +374,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
index dfd5660f..6a39640e 100644
--- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
@@ -388,4 +388,5 @@ const (
SYS_LANDLOCK_RESTRICT_SELF = 446
SYS_PROCESS_MRELEASE = 448
SYS_FUTEX_WAITV = 449
+ SYS_SET_MEMPOLICY_HOME_NODE = 450
)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go
index 2c26466e..9962d26b 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go
@@ -754,6 +754,25 @@ const (
AT_SYMLINK_NOFOLLOW = 0x100
AT_EACCESS = 0x200
+
+ OPEN_TREE_CLONE = 0x1
+
+ MOVE_MOUNT_F_SYMLINKS = 0x1
+ MOVE_MOUNT_F_AUTOMOUNTS = 0x2
+ MOVE_MOUNT_F_EMPTY_PATH = 0x4
+ MOVE_MOUNT_T_SYMLINKS = 0x10
+ MOVE_MOUNT_T_AUTOMOUNTS = 0x20
+ MOVE_MOUNT_T_EMPTY_PATH = 0x40
+ MOVE_MOUNT_SET_GROUP = 0x100
+
+ FSOPEN_CLOEXEC = 0x1
+
+ FSPICK_CLOEXEC = 0x1
+ FSPICK_SYMLINK_NOFOLLOW = 0x2
+ FSPICK_NO_AUTOMOUNT = 0x4
+ FSPICK_EMPTY_PATH = 0x8
+
+ FSMOUNT_CLOEXEC = 0x1
)
type OpenHow struct {
@@ -3619,7 +3638,7 @@ const (
ETHTOOL_A_RINGS_RX_MINI = 0x7
ETHTOOL_A_RINGS_RX_JUMBO = 0x8
ETHTOOL_A_RINGS_TX = 0x9
- ETHTOOL_A_RINGS_MAX = 0x9
+ ETHTOOL_A_RINGS_MAX = 0xa
ETHTOOL_A_CHANNELS_UNSPEC = 0x0
ETHTOOL_A_CHANNELS_HEADER = 0x1
ETHTOOL_A_CHANNELS_RX_MAX = 0x2
@@ -4304,7 +4323,7 @@ const (
NL80211_ATTR_MAC_HINT = 0xc8
NL80211_ATTR_MAC_MASK = 0xd7
NL80211_ATTR_MAX_AP_ASSOC_STA = 0xca
- NL80211_ATTR_MAX = 0x133
+ NL80211_ATTR_MAX = 0x135
NL80211_ATTR_MAX_CRIT_PROT_DURATION = 0xb4
NL80211_ATTR_MAX_CSA_COUNTERS = 0xce
NL80211_ATTR_MAX_MATCH_SETS = 0x85
@@ -4645,7 +4664,7 @@ const (
NL80211_CMD_LEAVE_IBSS = 0x2c
NL80211_CMD_LEAVE_MESH = 0x45
NL80211_CMD_LEAVE_OCB = 0x6d
- NL80211_CMD_MAX = 0x92
+ NL80211_CMD_MAX = 0x93
NL80211_CMD_MICHAEL_MIC_FAILURE = 0x29
NL80211_CMD_NAN_MATCH = 0x78
NL80211_CMD_NEW_BEACON = 0xf
@@ -5532,3 +5551,40 @@ const (
NL80211_WPA_VERSION_2 = 0x2
NL80211_WPA_VERSION_3 = 0x4
)
+
+const (
+ FRA_UNSPEC = 0x0
+ FRA_DST = 0x1
+ FRA_SRC = 0x2
+ FRA_IIFNAME = 0x3
+ FRA_GOTO = 0x4
+ FRA_UNUSED2 = 0x5
+ FRA_PRIORITY = 0x6
+ FRA_UNUSED3 = 0x7
+ FRA_UNUSED4 = 0x8
+ FRA_UNUSED5 = 0x9
+ FRA_FWMARK = 0xa
+ FRA_FLOW = 0xb
+ FRA_TUN_ID = 0xc
+ FRA_SUPPRESS_IFGROUP = 0xd
+ FRA_SUPPRESS_PREFIXLEN = 0xe
+ FRA_TABLE = 0xf
+ FRA_FWMASK = 0x10
+ FRA_OIFNAME = 0x11
+ FRA_PAD = 0x12
+ FRA_L3MDEV = 0x13
+ FRA_UID_RANGE = 0x14
+ FRA_PROTOCOL = 0x15
+ FRA_IP_PROTO = 0x16
+ FRA_SPORT_RANGE = 0x17
+ FRA_DPORT_RANGE = 0x18
+ FR_ACT_UNSPEC = 0x0
+ FR_ACT_TO_TBL = 0x1
+ FR_ACT_GOTO = 0x2
+ FR_ACT_NOP = 0x3
+ FR_ACT_RES3 = 0x4
+ FR_ACT_RES4 = 0x5
+ FR_ACT_BLACKHOLE = 0x6
+ FR_ACT_UNREACHABLE = 0x7
+ FR_ACT_PROHIBIT = 0x8
+)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index bea25494..4948362f 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build 386 && linux
@@ -240,6 +240,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -250,6 +254,13 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -311,6 +322,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index b8c8f289..f64345e0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build amd64 && linux
@@ -255,6 +255,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -265,6 +269,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -324,6 +336,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 4db44301..72469c79 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm && linux
@@ -231,6 +231,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -241,6 +245,13 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -302,6 +313,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 3ebcad8a..68f07228 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build arm64 && linux
@@ -234,6 +234,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -244,6 +248,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -303,6 +315,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
new file mode 100644
index 00000000..090ae46c
--- /dev/null
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
@@ -0,0 +1,679 @@
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build loong64 && linux
+// +build loong64,linux
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofLong = 0x8
+)
+
+type (
+ _C_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Timex struct {
+ Modes uint32
+ Offset int64
+ Freq int64
+ Maxerror int64
+ Esterror int64
+ Status int32
+ Constant int64
+ Precision int64
+ Tolerance int64
+ Time Timeval
+ Tick int64
+ Ppsfreq int64
+ Jitter int64
+ Shift int32
+ Stabil int64
+ Jitcnt int64
+ Calcnt int64
+ Errcnt int64
+ Stbcnt int64
+ Tai int32
+ _ [44]byte
+}
+
+type Time_t int64
+
+type Tms struct {
+ Utime int64
+ Stime int64
+ Cutime int64
+ Cstime int64
+}
+
+type Utimbuf struct {
+ Actime int64
+ Modtime int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Stat_t struct {
+ Dev uint64
+ Ino uint64
+ Mode uint32
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev uint64
+ _ uint64
+ Size int64
+ Blksize int32
+ _ int32
+ Blocks int64
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ _ [2]int32
+}
+
+type Dirent struct {
+ Ino uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Name [256]int8
+ _ [5]byte
+}
+
+type Flock_t struct {
+ Type int16
+ Whence int16
+ Start int64
+ Len int64
+ Pid int32
+ _ [4]byte
+}
+
+type DmNameList struct {
+ Dev uint64
+ Next uint32
+ Name [0]byte
+ _ [4]byte
+}
+
+const (
+ FADV_DONTNEED = 0x4
+ FADV_NOREUSE = 0x5
+)
+
+type RawSockaddrNFCLLCP struct {
+ Sa_family uint16
+ Dev_idx uint32
+ Target_idx uint32
+ Nfc_protocol uint32
+ Dsap uint8
+ Ssap uint8
+ Service_name [63]uint8
+ Service_name_len uint64
+}
+
+type RawSockaddr struct {
+ Family uint16
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [96]int8
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ _ [4]byte
+}
+
+type Cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type ifreq struct {
+ Ifrn [16]byte
+ Ifru [24]byte
+}
+
+const (
+ SizeofSockaddrNFCLLCP = 0x60
+ SizeofIovec = 0x10
+ SizeofMsghdr = 0x38
+ SizeofCmsghdr = 0x10
+)
+
+const (
+ SizeofSockFprog = 0x10
+)
+
+type PtraceRegs struct {
+ Regs [32]uint64
+ Orig_a0 uint64
+ Era uint64
+ Badv uint64
+ Reserved [10]uint64
+}
+
+type FdSet struct {
+ Bits [16]int64
+}
+
+type Sysinfo_t struct {
+ Uptime int64
+ Loads [3]uint64
+ Totalram uint64
+ Freeram uint64
+ Sharedram uint64
+ Bufferram uint64
+ Totalswap uint64
+ Freeswap uint64
+ Procs uint16
+ Pad uint16
+ Totalhigh uint64
+ Freehigh uint64
+ Unit uint32
+ _ [0]int8
+ _ [4]byte
+}
+
+type Ustat_t struct {
+ Tfree int32
+ Tinode uint64
+ Fname [6]int8
+ Fpack [6]int8
+ _ [4]byte
+}
+
+type EpollEvent struct {
+ Events uint32
+ _ int32
+ Fd int32
+ Pad int32
+}
+
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
+const (
+ POLLRDHUP = 0x2000
+)
+
+type Sigset_t struct {
+ Val [16]uint64
+}
+
+const _C__NSIG = 0x41
+
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Line uint8
+ Cc [19]uint8
+ Ispeed uint32
+ Ospeed uint32
+}
+
+type Taskstats struct {
+ Version uint16
+ Ac_exitcode uint32
+ Ac_flag uint8
+ Ac_nice uint8
+ Cpu_count uint64
+ Cpu_delay_total uint64
+ Blkio_count uint64
+ Blkio_delay_total uint64
+ Swapin_count uint64
+ Swapin_delay_total uint64
+ Cpu_run_real_total uint64
+ Cpu_run_virtual_total uint64
+ Ac_comm [32]int8
+ Ac_sched uint8
+ Ac_pad [3]uint8
+ _ [4]byte
+ Ac_uid uint32
+ Ac_gid uint32
+ Ac_pid uint32
+ Ac_ppid uint32
+ Ac_btime uint32
+ Ac_etime uint64
+ Ac_utime uint64
+ Ac_stime uint64
+ Ac_minflt uint64
+ Ac_majflt uint64
+ Coremem uint64
+ Virtmem uint64
+ Hiwater_rss uint64
+ Hiwater_vm uint64
+ Read_char uint64
+ Write_char uint64
+ Read_syscalls uint64
+ Write_syscalls uint64
+ Read_bytes uint64
+ Write_bytes uint64
+ Cancelled_write_bytes uint64
+ Nvcsw uint64
+ Nivcsw uint64
+ Ac_utimescaled uint64
+ Ac_stimescaled uint64
+ Cpu_scaled_run_real_total uint64
+ Freepages_count uint64
+ Freepages_delay_total uint64
+ Thrashing_count uint64
+ Thrashing_delay_total uint64
+ Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
+}
+
+type cpuMask uint64
+
+const (
+ _NCPUBITS = 0x40
+)
+
+const (
+ CBitFieldMaskBit0 = 0x1
+ CBitFieldMaskBit1 = 0x2
+ CBitFieldMaskBit2 = 0x4
+ CBitFieldMaskBit3 = 0x8
+ CBitFieldMaskBit4 = 0x10
+ CBitFieldMaskBit5 = 0x20
+ CBitFieldMaskBit6 = 0x40
+ CBitFieldMaskBit7 = 0x80
+ CBitFieldMaskBit8 = 0x100
+ CBitFieldMaskBit9 = 0x200
+ CBitFieldMaskBit10 = 0x400
+ CBitFieldMaskBit11 = 0x800
+ CBitFieldMaskBit12 = 0x1000
+ CBitFieldMaskBit13 = 0x2000
+ CBitFieldMaskBit14 = 0x4000
+ CBitFieldMaskBit15 = 0x8000
+ CBitFieldMaskBit16 = 0x10000
+ CBitFieldMaskBit17 = 0x20000
+ CBitFieldMaskBit18 = 0x40000
+ CBitFieldMaskBit19 = 0x80000
+ CBitFieldMaskBit20 = 0x100000
+ CBitFieldMaskBit21 = 0x200000
+ CBitFieldMaskBit22 = 0x400000
+ CBitFieldMaskBit23 = 0x800000
+ CBitFieldMaskBit24 = 0x1000000
+ CBitFieldMaskBit25 = 0x2000000
+ CBitFieldMaskBit26 = 0x4000000
+ CBitFieldMaskBit27 = 0x8000000
+ CBitFieldMaskBit28 = 0x10000000
+ CBitFieldMaskBit29 = 0x20000000
+ CBitFieldMaskBit30 = 0x40000000
+ CBitFieldMaskBit31 = 0x80000000
+ CBitFieldMaskBit32 = 0x100000000
+ CBitFieldMaskBit33 = 0x200000000
+ CBitFieldMaskBit34 = 0x400000000
+ CBitFieldMaskBit35 = 0x800000000
+ CBitFieldMaskBit36 = 0x1000000000
+ CBitFieldMaskBit37 = 0x2000000000
+ CBitFieldMaskBit38 = 0x4000000000
+ CBitFieldMaskBit39 = 0x8000000000
+ CBitFieldMaskBit40 = 0x10000000000
+ CBitFieldMaskBit41 = 0x20000000000
+ CBitFieldMaskBit42 = 0x40000000000
+ CBitFieldMaskBit43 = 0x80000000000
+ CBitFieldMaskBit44 = 0x100000000000
+ CBitFieldMaskBit45 = 0x200000000000
+ CBitFieldMaskBit46 = 0x400000000000
+ CBitFieldMaskBit47 = 0x800000000000
+ CBitFieldMaskBit48 = 0x1000000000000
+ CBitFieldMaskBit49 = 0x2000000000000
+ CBitFieldMaskBit50 = 0x4000000000000
+ CBitFieldMaskBit51 = 0x8000000000000
+ CBitFieldMaskBit52 = 0x10000000000000
+ CBitFieldMaskBit53 = 0x20000000000000
+ CBitFieldMaskBit54 = 0x40000000000000
+ CBitFieldMaskBit55 = 0x80000000000000
+ CBitFieldMaskBit56 = 0x100000000000000
+ CBitFieldMaskBit57 = 0x200000000000000
+ CBitFieldMaskBit58 = 0x400000000000000
+ CBitFieldMaskBit59 = 0x800000000000000
+ CBitFieldMaskBit60 = 0x1000000000000000
+ CBitFieldMaskBit61 = 0x2000000000000000
+ CBitFieldMaskBit62 = 0x4000000000000000
+ CBitFieldMaskBit63 = 0x8000000000000000
+)
+
+type SockaddrStorage struct {
+ Family uint16
+ _ [118]int8
+ _ uint64
+}
+
+type HDGeometry struct {
+ Heads uint8
+ Sectors uint8
+ Cylinders uint16
+ Start uint64
+}
+
+type Statfs_t struct {
+ Type int64
+ Bsize int64
+ Blocks uint64
+ Bfree uint64
+ Bavail uint64
+ Files uint64
+ Ffree uint64
+ Fsid Fsid
+ Namelen int64
+ Frsize int64
+ Flags int64
+ Spare [4]int64
+}
+
+type TpacketHdr struct {
+ Status uint64
+ Len uint32
+ Snaplen uint32
+ Mac uint16
+ Net uint16
+ Sec uint32
+ Usec uint32
+ _ [4]byte
+}
+
+const (
+ SizeofTpacketHdr = 0x20
+)
+
+type RTCPLLInfo struct {
+ Ctrl int32
+ Value int32
+ Max int32
+ Min int32
+ Posmult int32
+ Negmult int32
+ Clock int64
+}
+
+type BlkpgPartition struct {
+ Start int64
+ Length int64
+ Pno int32
+ Devname [64]uint8
+ Volname [64]uint8
+ _ [4]byte
+}
+
+const (
+ BLKPG = 0x1269
+)
+
+type XDPUmemReg struct {
+ Addr uint64
+ Len uint64
+ Size uint32
+ Headroom uint32
+ Flags uint32
+ _ [4]byte
+}
+
+type CryptoUserAlg struct {
+ Name [64]int8
+ Driver_name [64]int8
+ Module_name [64]int8
+ Type uint32
+ Mask uint32
+ Refcnt uint32
+ Flags uint32
+}
+
+type CryptoStatAEAD struct {
+ Type [64]int8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatAKCipher struct {
+ Type [64]int8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Verify_cnt uint64
+ Sign_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatCipher struct {
+ Type [64]int8
+ Encrypt_cnt uint64
+ Encrypt_tlen uint64
+ Decrypt_cnt uint64
+ Decrypt_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatCompress struct {
+ Type [64]int8
+ Compress_cnt uint64
+ Compress_tlen uint64
+ Decompress_cnt uint64
+ Decompress_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatHash struct {
+ Type [64]int8
+ Hash_cnt uint64
+ Hash_tlen uint64
+ Err_cnt uint64
+}
+
+type CryptoStatKPP struct {
+ Type [64]int8
+ Setsecret_cnt uint64
+ Generate_public_key_cnt uint64
+ Compute_shared_secret_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatRNG struct {
+ Type [64]int8
+ Generate_cnt uint64
+ Generate_tlen uint64
+ Seed_cnt uint64
+ Err_cnt uint64
+}
+
+type CryptoStatLarval struct {
+ Type [64]int8
+}
+
+type CryptoReportLarval struct {
+ Type [64]int8
+}
+
+type CryptoReportHash struct {
+ Type [64]int8
+ Blocksize uint32
+ Digestsize uint32
+}
+
+type CryptoReportCipher struct {
+ Type [64]int8
+ Blocksize uint32
+ Min_keysize uint32
+ Max_keysize uint32
+}
+
+type CryptoReportBlkCipher struct {
+ Type [64]int8
+ Geniv [64]int8
+ Blocksize uint32
+ Min_keysize uint32
+ Max_keysize uint32
+ Ivsize uint32
+}
+
+type CryptoReportAEAD struct {
+ Type [64]int8
+ Geniv [64]int8
+ Blocksize uint32
+ Maxauthsize uint32
+ Ivsize uint32
+}
+
+type CryptoReportComp struct {
+ Type [64]int8
+}
+
+type CryptoReportRNG struct {
+ Type [64]int8
+ Seedsize uint32
+}
+
+type CryptoReportAKCipher struct {
+ Type [64]int8
+}
+
+type CryptoReportKPP struct {
+ Type [64]int8
+}
+
+type CryptoReportAcomp struct {
+ Type [64]int8
+}
+
+type LoopInfo struct {
+ Number int32
+ Device uint32
+ Inode uint64
+ Rdevice uint32
+ Offset int32
+ Encrypt_type int32
+ Encrypt_key_size int32
+ Flags int32
+ Name [64]int8
+ Encrypt_key [32]uint8
+ Init [2]uint64
+ Reserved [4]int8
+ _ [4]byte
+}
+
+type TIPCSubscr struct {
+ Seq TIPCServiceRange
+ Timeout uint32
+ Filter uint32
+ Handle [8]int8
+}
+
+type TIPCSIOCLNReq struct {
+ Peer uint32
+ Id uint32
+ Linkname [68]int8
+}
+
+type TIPCSIOCNodeIDReq struct {
+ Peer uint32
+ Id [16]int8
+}
+
+type PPSKInfo struct {
+ Assert_sequence uint32
+ Clear_sequence uint32
+ Assert_tu PPSKTime
+ Clear_tu PPSKTime
+ Current_mode int32
+ _ [4]byte
+}
+
+const (
+ PPS_GETPARAMS = 0x800870a1
+ PPS_SETPARAMS = 0x400870a2
+ PPS_GETCAP = 0x800870a3
+ PPS_FETCH = 0xc00870a4
+)
+
+const (
+ PIDFD_NONBLOCK = 0x800
+)
+
+type SysvIpcPerm struct {
+ Key int32
+ Uid uint32
+ Gid uint32
+ Cuid uint32
+ Cgid uint32
+ Mode uint32
+ _ [0]uint8
+ Seq uint16
+ _ uint16
+ _ uint64
+ _ uint64
+}
+type SysvShmDesc struct {
+ Perm SysvIpcPerm
+ Segsz uint64
+ Atime int64
+ Dtime int64
+ Ctime int64
+ Cpid int32
+ Lpid int32
+ Nattch uint64
+ _ uint64
+ _ uint64
+}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 3eb33e48..03604cca 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips && linux
@@ -236,6 +236,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -246,6 +250,13 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -307,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 79a94467..fe57a7b2 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64 && linux
@@ -237,6 +237,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -247,6 +251,14 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -306,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index 8f4b107c..3f0db4da 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mips64le && linux
@@ -237,6 +237,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -247,6 +251,14 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -306,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index e4eb2179..70ecd3b2 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build mipsle && linux
@@ -236,6 +236,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -246,6 +250,13 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+type Siginfo struct {
+ Signo int32
+ Code int32
+ Errno int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -307,6 +318,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index d5b21f0f..4e700120 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc && linux
@@ -243,6 +243,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -253,6 +257,13 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ [116]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -314,6 +325,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint32
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 5188d142..34a57c69 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64 && linux
@@ -244,6 +244,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -254,6 +258,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -313,6 +325,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index de4dd4c7..6b84a472 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build ppc64le && linux
@@ -244,6 +244,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -254,6 +258,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -313,6 +325,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index dccbf9b0..c4a305fe 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build riscv64 && linux
@@ -262,6 +262,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -272,6 +276,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -331,6 +343,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index c426c357..a1f1e4c9 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build s390x && linux
@@ -257,6 +257,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x80000
+)
+
const (
POLLRDHUP = 0x2000
)
@@ -267,6 +271,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -326,6 +338,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 765edc13..df95ebf3 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -1,4 +1,4 @@
-// cgo -godefs -- -Wall -Werror -static -I/tmp/include /build/unix/linux/types.go | go run mkpost.go
+// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build sparc64 && linux
@@ -239,6 +239,10 @@ type EpollEvent struct {
Pad int32
}
+const (
+ OPEN_TREE_CLOEXEC = 0x400000
+)
+
const (
POLLRDHUP = 0x800
)
@@ -249,6 +253,14 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+type Siginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ _ int32
+ _ [112]byte
+}
+
type Termios struct {
Iflag uint32
Oflag uint32
@@ -308,6 +320,8 @@ type Taskstats struct {
Thrashing_count uint64
Thrashing_delay_total uint64
Ac_btime64 uint64
+ Compact_count uint64
+ Compact_delay_total uint64
}
type cpuMask uint64
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
index baf5fe65..2ed718ca 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_386.go
@@ -94,10 +94,10 @@ type Statfs_t struct {
F_namemax uint32
F_owner uint32
F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
Pad_cgo_0 [2]byte
Mount_info [160]byte
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
index e21ae8ec..b4fb97eb 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_amd64.go
@@ -96,10 +96,10 @@ type Statfs_t struct {
F_namemax uint32
F_owner uint32
F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
_ [2]byte
Mount_info [160]byte
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
index f190651c..2c467504 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm.go
@@ -98,10 +98,10 @@ type Statfs_t struct {
F_namemax uint32
F_owner uint32
F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
_ [2]byte
Mount_info [160]byte
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
index 84747c58..ddee0451 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_arm64.go
@@ -94,10 +94,10 @@ type Statfs_t struct {
F_namemax uint32
F_owner uint32
F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
_ [2]byte
Mount_info [160]byte
}
diff --git a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
index ac5c8b63..eb13d4e8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_openbsd_mips64.go
@@ -94,10 +94,10 @@ type Statfs_t struct {
F_namemax uint32
F_owner uint32
F_ctime uint64
- F_fstypename [16]int8
- F_mntonname [90]int8
- F_mntfromname [90]int8
- F_mntfromspec [90]int8
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
_ [2]byte
Mount_info [160]byte
}
diff --git a/vendor/golang.org/x/sys/windows/exec_windows.go b/vendor/golang.org/x/sys/windows/exec_windows.go
index 855698bb..75980fd4 100644
--- a/vendor/golang.org/x/sys/windows/exec_windows.go
+++ b/vendor/golang.org/x/sys/windows/exec_windows.go
@@ -15,11 +15,11 @@ import (
// in http://msdn.microsoft.com/en-us/library/ms880421.
// This function returns "" (2 double quotes) if s is empty.
// Alternatively, these transformations are done:
-// - every back slash (\) is doubled, but only if immediately
-// followed by double quote (");
-// - every double quote (") is escaped by back slash (\);
-// - finally, s is wrapped with double quotes (arg -> "arg"),
-// but only if there is space or tab inside s.
+// - every back slash (\) is doubled, but only if immediately
+// followed by double quote (");
+// - every double quote (") is escaped by back slash (\);
+// - finally, s is wrapped with double quotes (arg -> "arg"),
+// but only if there is space or tab inside s.
func EscapeArg(s string) string {
if len(s) == 0 {
return "\"\""
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index cf44e693..636e5de6 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -10,6 +10,7 @@ import (
errorspkg "errors"
"fmt"
"runtime"
+ "strings"
"sync"
"syscall"
"time"
@@ -86,10 +87,8 @@ func StringToUTF16(s string) []uint16 {
// s, with a terminating NUL added. If s contains a NUL byte at any
// location, it returns (nil, syscall.EINVAL).
func UTF16FromString(s string) ([]uint16, error) {
- for i := 0; i < len(s); i++ {
- if s[i] == 0 {
- return nil, syscall.EINVAL
- }
+ if strings.IndexByte(s, 0) != -1 {
+ return nil, syscall.EINVAL
}
return utf16.Encode([]rune(s + "\x00")), nil
}
@@ -186,8 +185,8 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys GetNamedPipeInfo(pipe Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error)
//sys GetNamedPipeHandleState(pipe Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
//sys SetNamedPipeHandleState(pipe Handle, state *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32) (err error) = SetNamedPipeHandleState
-//sys ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
-//sys WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error)
+//sys readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = ReadFile
+//sys writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) = WriteFile
//sys GetOverlappedResult(handle Handle, overlapped *Overlapped, done *uint32, wait bool) (err error)
//sys SetFilePointer(handle Handle, lowoffset int32, highoffsetptr *int32, whence uint32) (newlowoffset uint32, err error) [failretval==0xffffffff]
//sys CloseHandle(handle Handle) (err error)
@@ -549,12 +548,6 @@ func Read(fd Handle, p []byte) (n int, err error) {
}
return 0, e
}
- if raceenabled {
- if done > 0 {
- raceWriteRange(unsafe.Pointer(&p[0]), int(done))
- }
- raceAcquire(unsafe.Pointer(&ioSync))
- }
return int(done), nil
}
@@ -567,12 +560,31 @@ func Write(fd Handle, p []byte) (n int, err error) {
if e != nil {
return 0, e
}
- if raceenabled && done > 0 {
- raceReadRange(unsafe.Pointer(&p[0]), int(done))
- }
return int(done), nil
}
+func ReadFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {
+ err := readFile(fd, p, done, overlapped)
+ if raceenabled {
+ if *done > 0 {
+ raceWriteRange(unsafe.Pointer(&p[0]), int(*done))
+ }
+ raceAcquire(unsafe.Pointer(&ioSync))
+ }
+ return err
+}
+
+func WriteFile(fd Handle, p []byte, done *uint32, overlapped *Overlapped) error {
+ if raceenabled {
+ raceReleaseMerge(unsafe.Pointer(&ioSync))
+ }
+ err := writeFile(fd, p, done, overlapped)
+ if raceenabled && *done > 0 {
+ raceReadRange(unsafe.Pointer(&p[0]), int(*done))
+ }
+ return err
+}
+
var ioSync int64
func Seek(fd Handle, offset int64, whence int) (newoffset int64, err error) {
@@ -611,7 +623,6 @@ var (
func getStdHandle(stdhandle uint32) (fd Handle) {
r, _ := GetStdHandle(stdhandle)
- CloseOnExec(r)
return r
}
diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 9ea1a44f..68f52c1e 100644
--- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -2761,7 +2761,7 @@ func ReadDirectoryChanges(handle Handle, buf *byte, buflen uint32, watchSubTree
return
}
-func ReadFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
+func readFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
var _p0 *byte
if len(buf) > 0 {
_p0 = &buf[0]
@@ -3203,7 +3203,7 @@ func WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32,
return
}
-func WriteFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
+func writeFile(handle Handle, buf []byte, done *uint32, overlapped *Overlapped) (err error) {
var _p0 *byte
if len(buf) > 0 {
_p0 = &buf[0]
diff --git a/vendor/golang.org/x/text/width/kind_string.go b/vendor/golang.org/x/text/width/kind_string.go
deleted file mode 100644
index dd3febd4..00000000
--- a/vendor/golang.org/x/text/width/kind_string.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Code generated by "stringer -type=Kind"; DO NOT EDIT.
-
-package width
-
-import "strconv"
-
-func _() {
- // An "invalid array index" compiler error signifies that the constant values have changed.
- // Re-run the stringer command to generate them again.
- var x [1]struct{}
- _ = x[Neutral-0]
- _ = x[EastAsianAmbiguous-1]
- _ = x[EastAsianWide-2]
- _ = x[EastAsianNarrow-3]
- _ = x[EastAsianFullwidth-4]
- _ = x[EastAsianHalfwidth-5]
-}
-
-const _Kind_name = "NeutralEastAsianAmbiguousEastAsianWideEastAsianNarrowEastAsianFullwidthEastAsianHalfwidth"
-
-var _Kind_index = [...]uint8{0, 7, 25, 38, 53, 71, 89}
-
-func (i Kind) String() string {
- if i < 0 || i >= Kind(len(_Kind_index)-1) {
- return "Kind(" + strconv.FormatInt(int64(i), 10) + ")"
- }
- return _Kind_name[_Kind_index[i]:_Kind_index[i+1]]
-}
diff --git a/vendor/golang.org/x/text/width/tables10.0.0.go b/vendor/golang.org/x/text/width/tables10.0.0.go
deleted file mode 100644
index 186b1d4e..00000000
--- a/vendor/golang.org/x/text/width/tables10.0.0.go
+++ /dev/null
@@ -1,1319 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-//go:build go1.10 && !go1.13
-// +build go1.10,!go1.13
-
-package width
-
-// UnicodeVersion is the Unicode version from which the tables in this package are derived.
-const UnicodeVersion = "10.0.0"
-
-// lookup returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookup(s []byte) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupUnsafe(s []byte) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// lookupString returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookupString(s string) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupStringUnsafe(s string) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// widthTrie. Total size: 14336 bytes (14.00 KiB). Checksum: c59df54630d3dc4a.
-type widthTrie struct{}
-
-func newWidthTrie(i int) *widthTrie {
- return &widthTrie{}
-}
-
-// lookupValue determines the type of block n and looks up the value for b.
-func (t *widthTrie) lookupValue(n uint32, b byte) uint16 {
- switch {
- default:
- return uint16(widthValues[n<<6+uint32(b)])
- }
-}
-
-// widthValues: 101 blocks, 6464 entries, 12928 bytes
-// The third block is the zero block.
-var widthValues = [6464]uint16{
- // Block 0x0, offset 0x0
- 0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002,
- 0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002,
- 0x2a: 0x6002, 0x2b: 0x6002, 0x2c: 0x6002, 0x2d: 0x6002, 0x2e: 0x6002, 0x2f: 0x6002,
- 0x30: 0x6002, 0x31: 0x6002, 0x32: 0x6002, 0x33: 0x6002, 0x34: 0x6002, 0x35: 0x6002,
- 0x36: 0x6002, 0x37: 0x6002, 0x38: 0x6002, 0x39: 0x6002, 0x3a: 0x6002, 0x3b: 0x6002,
- 0x3c: 0x6002, 0x3d: 0x6002, 0x3e: 0x6002, 0x3f: 0x6002,
- // Block 0x1, offset 0x40
- 0x40: 0x6003, 0x41: 0x6003, 0x42: 0x6003, 0x43: 0x6003, 0x44: 0x6003, 0x45: 0x6003,
- 0x46: 0x6003, 0x47: 0x6003, 0x48: 0x6003, 0x49: 0x6003, 0x4a: 0x6003, 0x4b: 0x6003,
- 0x4c: 0x6003, 0x4d: 0x6003, 0x4e: 0x6003, 0x4f: 0x6003, 0x50: 0x6003, 0x51: 0x6003,
- 0x52: 0x6003, 0x53: 0x6003, 0x54: 0x6003, 0x55: 0x6003, 0x56: 0x6003, 0x57: 0x6003,
- 0x58: 0x6003, 0x59: 0x6003, 0x5a: 0x6003, 0x5b: 0x6003, 0x5c: 0x6003, 0x5d: 0x6003,
- 0x5e: 0x6003, 0x5f: 0x6003, 0x60: 0x6004, 0x61: 0x6004, 0x62: 0x6004, 0x63: 0x6004,
- 0x64: 0x6004, 0x65: 0x6004, 0x66: 0x6004, 0x67: 0x6004, 0x68: 0x6004, 0x69: 0x6004,
- 0x6a: 0x6004, 0x6b: 0x6004, 0x6c: 0x6004, 0x6d: 0x6004, 0x6e: 0x6004, 0x6f: 0x6004,
- 0x70: 0x6004, 0x71: 0x6004, 0x72: 0x6004, 0x73: 0x6004, 0x74: 0x6004, 0x75: 0x6004,
- 0x76: 0x6004, 0x77: 0x6004, 0x78: 0x6004, 0x79: 0x6004, 0x7a: 0x6004, 0x7b: 0x6004,
- 0x7c: 0x6004, 0x7d: 0x6004, 0x7e: 0x6004,
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xe1: 0x2000, 0xe2: 0x6005, 0xe3: 0x6005,
- 0xe4: 0x2000, 0xe5: 0x6006, 0xe6: 0x6005, 0xe7: 0x2000, 0xe8: 0x2000,
- 0xea: 0x2000, 0xec: 0x6007, 0xed: 0x2000, 0xee: 0x2000, 0xef: 0x6008,
- 0xf0: 0x2000, 0xf1: 0x2000, 0xf2: 0x2000, 0xf3: 0x2000, 0xf4: 0x2000,
- 0xf6: 0x2000, 0xf7: 0x2000, 0xf8: 0x2000, 0xf9: 0x2000, 0xfa: 0x2000,
- 0xfc: 0x2000, 0xfd: 0x2000, 0xfe: 0x2000, 0xff: 0x2000,
- // Block 0x4, offset 0x100
- 0x106: 0x2000,
- 0x110: 0x2000,
- 0x117: 0x2000,
- 0x118: 0x2000,
- 0x11e: 0x2000, 0x11f: 0x2000, 0x120: 0x2000, 0x121: 0x2000,
- 0x126: 0x2000, 0x128: 0x2000, 0x129: 0x2000,
- 0x12a: 0x2000, 0x12c: 0x2000, 0x12d: 0x2000,
- 0x130: 0x2000, 0x132: 0x2000, 0x133: 0x2000,
- 0x137: 0x2000, 0x138: 0x2000, 0x139: 0x2000, 0x13a: 0x2000,
- 0x13c: 0x2000, 0x13e: 0x2000,
- // Block 0x5, offset 0x140
- 0x141: 0x2000,
- 0x151: 0x2000,
- 0x153: 0x2000,
- 0x15b: 0x2000,
- 0x166: 0x2000, 0x167: 0x2000,
- 0x16b: 0x2000,
- 0x171: 0x2000, 0x172: 0x2000, 0x173: 0x2000,
- 0x178: 0x2000,
- 0x17f: 0x2000,
- // Block 0x6, offset 0x180
- 0x180: 0x2000, 0x181: 0x2000, 0x182: 0x2000, 0x184: 0x2000,
- 0x188: 0x2000, 0x189: 0x2000, 0x18a: 0x2000, 0x18b: 0x2000,
- 0x18d: 0x2000,
- 0x192: 0x2000, 0x193: 0x2000,
- 0x1a6: 0x2000, 0x1a7: 0x2000,
- 0x1ab: 0x2000,
- // Block 0x7, offset 0x1c0
- 0x1ce: 0x2000, 0x1d0: 0x2000,
- 0x1d2: 0x2000, 0x1d4: 0x2000, 0x1d6: 0x2000,
- 0x1d8: 0x2000, 0x1da: 0x2000, 0x1dc: 0x2000,
- // Block 0x8, offset 0x200
- 0x211: 0x2000,
- 0x221: 0x2000,
- // Block 0x9, offset 0x240
- 0x244: 0x2000,
- 0x247: 0x2000, 0x249: 0x2000, 0x24a: 0x2000, 0x24b: 0x2000,
- 0x24d: 0x2000, 0x250: 0x2000,
- 0x258: 0x2000, 0x259: 0x2000, 0x25a: 0x2000, 0x25b: 0x2000, 0x25d: 0x2000,
- 0x25f: 0x2000,
- // Block 0xa, offset 0x280
- 0x280: 0x2000, 0x281: 0x2000, 0x282: 0x2000, 0x283: 0x2000, 0x284: 0x2000, 0x285: 0x2000,
- 0x286: 0x2000, 0x287: 0x2000, 0x288: 0x2000, 0x289: 0x2000, 0x28a: 0x2000, 0x28b: 0x2000,
- 0x28c: 0x2000, 0x28d: 0x2000, 0x28e: 0x2000, 0x28f: 0x2000, 0x290: 0x2000, 0x291: 0x2000,
- 0x292: 0x2000, 0x293: 0x2000, 0x294: 0x2000, 0x295: 0x2000, 0x296: 0x2000, 0x297: 0x2000,
- 0x298: 0x2000, 0x299: 0x2000, 0x29a: 0x2000, 0x29b: 0x2000, 0x29c: 0x2000, 0x29d: 0x2000,
- 0x29e: 0x2000, 0x29f: 0x2000, 0x2a0: 0x2000, 0x2a1: 0x2000, 0x2a2: 0x2000, 0x2a3: 0x2000,
- 0x2a4: 0x2000, 0x2a5: 0x2000, 0x2a6: 0x2000, 0x2a7: 0x2000, 0x2a8: 0x2000, 0x2a9: 0x2000,
- 0x2aa: 0x2000, 0x2ab: 0x2000, 0x2ac: 0x2000, 0x2ad: 0x2000, 0x2ae: 0x2000, 0x2af: 0x2000,
- 0x2b0: 0x2000, 0x2b1: 0x2000, 0x2b2: 0x2000, 0x2b3: 0x2000, 0x2b4: 0x2000, 0x2b5: 0x2000,
- 0x2b6: 0x2000, 0x2b7: 0x2000, 0x2b8: 0x2000, 0x2b9: 0x2000, 0x2ba: 0x2000, 0x2bb: 0x2000,
- 0x2bc: 0x2000, 0x2bd: 0x2000, 0x2be: 0x2000, 0x2bf: 0x2000,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x2000, 0x2c1: 0x2000, 0x2c2: 0x2000, 0x2c3: 0x2000, 0x2c4: 0x2000, 0x2c5: 0x2000,
- 0x2c6: 0x2000, 0x2c7: 0x2000, 0x2c8: 0x2000, 0x2c9: 0x2000, 0x2ca: 0x2000, 0x2cb: 0x2000,
- 0x2cc: 0x2000, 0x2cd: 0x2000, 0x2ce: 0x2000, 0x2cf: 0x2000, 0x2d0: 0x2000, 0x2d1: 0x2000,
- 0x2d2: 0x2000, 0x2d3: 0x2000, 0x2d4: 0x2000, 0x2d5: 0x2000, 0x2d6: 0x2000, 0x2d7: 0x2000,
- 0x2d8: 0x2000, 0x2d9: 0x2000, 0x2da: 0x2000, 0x2db: 0x2000, 0x2dc: 0x2000, 0x2dd: 0x2000,
- 0x2de: 0x2000, 0x2df: 0x2000, 0x2e0: 0x2000, 0x2e1: 0x2000, 0x2e2: 0x2000, 0x2e3: 0x2000,
- 0x2e4: 0x2000, 0x2e5: 0x2000, 0x2e6: 0x2000, 0x2e7: 0x2000, 0x2e8: 0x2000, 0x2e9: 0x2000,
- 0x2ea: 0x2000, 0x2eb: 0x2000, 0x2ec: 0x2000, 0x2ed: 0x2000, 0x2ee: 0x2000, 0x2ef: 0x2000,
- // Block 0xc, offset 0x300
- 0x311: 0x2000,
- 0x312: 0x2000, 0x313: 0x2000, 0x314: 0x2000, 0x315: 0x2000, 0x316: 0x2000, 0x317: 0x2000,
- 0x318: 0x2000, 0x319: 0x2000, 0x31a: 0x2000, 0x31b: 0x2000, 0x31c: 0x2000, 0x31d: 0x2000,
- 0x31e: 0x2000, 0x31f: 0x2000, 0x320: 0x2000, 0x321: 0x2000, 0x323: 0x2000,
- 0x324: 0x2000, 0x325: 0x2000, 0x326: 0x2000, 0x327: 0x2000, 0x328: 0x2000, 0x329: 0x2000,
- 0x331: 0x2000, 0x332: 0x2000, 0x333: 0x2000, 0x334: 0x2000, 0x335: 0x2000,
- 0x336: 0x2000, 0x337: 0x2000, 0x338: 0x2000, 0x339: 0x2000, 0x33a: 0x2000, 0x33b: 0x2000,
- 0x33c: 0x2000, 0x33d: 0x2000, 0x33e: 0x2000, 0x33f: 0x2000,
- // Block 0xd, offset 0x340
- 0x340: 0x2000, 0x341: 0x2000, 0x343: 0x2000, 0x344: 0x2000, 0x345: 0x2000,
- 0x346: 0x2000, 0x347: 0x2000, 0x348: 0x2000, 0x349: 0x2000,
- // Block 0xe, offset 0x380
- 0x381: 0x2000,
- 0x390: 0x2000, 0x391: 0x2000,
- 0x392: 0x2000, 0x393: 0x2000, 0x394: 0x2000, 0x395: 0x2000, 0x396: 0x2000, 0x397: 0x2000,
- 0x398: 0x2000, 0x399: 0x2000, 0x39a: 0x2000, 0x39b: 0x2000, 0x39c: 0x2000, 0x39d: 0x2000,
- 0x39e: 0x2000, 0x39f: 0x2000, 0x3a0: 0x2000, 0x3a1: 0x2000, 0x3a2: 0x2000, 0x3a3: 0x2000,
- 0x3a4: 0x2000, 0x3a5: 0x2000, 0x3a6: 0x2000, 0x3a7: 0x2000, 0x3a8: 0x2000, 0x3a9: 0x2000,
- 0x3aa: 0x2000, 0x3ab: 0x2000, 0x3ac: 0x2000, 0x3ad: 0x2000, 0x3ae: 0x2000, 0x3af: 0x2000,
- 0x3b0: 0x2000, 0x3b1: 0x2000, 0x3b2: 0x2000, 0x3b3: 0x2000, 0x3b4: 0x2000, 0x3b5: 0x2000,
- 0x3b6: 0x2000, 0x3b7: 0x2000, 0x3b8: 0x2000, 0x3b9: 0x2000, 0x3ba: 0x2000, 0x3bb: 0x2000,
- 0x3bc: 0x2000, 0x3bd: 0x2000, 0x3be: 0x2000, 0x3bf: 0x2000,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x2000, 0x3c1: 0x2000, 0x3c2: 0x2000, 0x3c3: 0x2000, 0x3c4: 0x2000, 0x3c5: 0x2000,
- 0x3c6: 0x2000, 0x3c7: 0x2000, 0x3c8: 0x2000, 0x3c9: 0x2000, 0x3ca: 0x2000, 0x3cb: 0x2000,
- 0x3cc: 0x2000, 0x3cd: 0x2000, 0x3ce: 0x2000, 0x3cf: 0x2000, 0x3d1: 0x2000,
- // Block 0x10, offset 0x400
- 0x400: 0x4000, 0x401: 0x4000, 0x402: 0x4000, 0x403: 0x4000, 0x404: 0x4000, 0x405: 0x4000,
- 0x406: 0x4000, 0x407: 0x4000, 0x408: 0x4000, 0x409: 0x4000, 0x40a: 0x4000, 0x40b: 0x4000,
- 0x40c: 0x4000, 0x40d: 0x4000, 0x40e: 0x4000, 0x40f: 0x4000, 0x410: 0x4000, 0x411: 0x4000,
- 0x412: 0x4000, 0x413: 0x4000, 0x414: 0x4000, 0x415: 0x4000, 0x416: 0x4000, 0x417: 0x4000,
- 0x418: 0x4000, 0x419: 0x4000, 0x41a: 0x4000, 0x41b: 0x4000, 0x41c: 0x4000, 0x41d: 0x4000,
- 0x41e: 0x4000, 0x41f: 0x4000, 0x420: 0x4000, 0x421: 0x4000, 0x422: 0x4000, 0x423: 0x4000,
- 0x424: 0x4000, 0x425: 0x4000, 0x426: 0x4000, 0x427: 0x4000, 0x428: 0x4000, 0x429: 0x4000,
- 0x42a: 0x4000, 0x42b: 0x4000, 0x42c: 0x4000, 0x42d: 0x4000, 0x42e: 0x4000, 0x42f: 0x4000,
- 0x430: 0x4000, 0x431: 0x4000, 0x432: 0x4000, 0x433: 0x4000, 0x434: 0x4000, 0x435: 0x4000,
- 0x436: 0x4000, 0x437: 0x4000, 0x438: 0x4000, 0x439: 0x4000, 0x43a: 0x4000, 0x43b: 0x4000,
- 0x43c: 0x4000, 0x43d: 0x4000, 0x43e: 0x4000, 0x43f: 0x4000,
- // Block 0x11, offset 0x440
- 0x440: 0x4000, 0x441: 0x4000, 0x442: 0x4000, 0x443: 0x4000, 0x444: 0x4000, 0x445: 0x4000,
- 0x446: 0x4000, 0x447: 0x4000, 0x448: 0x4000, 0x449: 0x4000, 0x44a: 0x4000, 0x44b: 0x4000,
- 0x44c: 0x4000, 0x44d: 0x4000, 0x44e: 0x4000, 0x44f: 0x4000, 0x450: 0x4000, 0x451: 0x4000,
- 0x452: 0x4000, 0x453: 0x4000, 0x454: 0x4000, 0x455: 0x4000, 0x456: 0x4000, 0x457: 0x4000,
- 0x458: 0x4000, 0x459: 0x4000, 0x45a: 0x4000, 0x45b: 0x4000, 0x45c: 0x4000, 0x45d: 0x4000,
- 0x45e: 0x4000, 0x45f: 0x4000,
- // Block 0x12, offset 0x480
- 0x490: 0x2000,
- 0x493: 0x2000, 0x494: 0x2000, 0x495: 0x2000, 0x496: 0x2000,
- 0x498: 0x2000, 0x499: 0x2000, 0x49c: 0x2000, 0x49d: 0x2000,
- 0x4a0: 0x2000, 0x4a1: 0x2000, 0x4a2: 0x2000,
- 0x4a4: 0x2000, 0x4a5: 0x2000, 0x4a6: 0x2000, 0x4a7: 0x2000,
- 0x4b0: 0x2000, 0x4b2: 0x2000, 0x4b3: 0x2000, 0x4b5: 0x2000,
- 0x4bb: 0x2000,
- 0x4be: 0x2000,
- // Block 0x13, offset 0x4c0
- 0x4f4: 0x2000,
- 0x4ff: 0x2000,
- // Block 0x14, offset 0x500
- 0x501: 0x2000, 0x502: 0x2000, 0x503: 0x2000, 0x504: 0x2000,
- 0x529: 0xa009,
- 0x52c: 0x2000,
- // Block 0x15, offset 0x540
- 0x543: 0x2000, 0x545: 0x2000,
- 0x549: 0x2000,
- 0x553: 0x2000, 0x556: 0x2000,
- 0x561: 0x2000, 0x562: 0x2000,
- 0x566: 0x2000,
- 0x56b: 0x2000,
- // Block 0x16, offset 0x580
- 0x593: 0x2000, 0x594: 0x2000,
- 0x59b: 0x2000, 0x59c: 0x2000, 0x59d: 0x2000,
- 0x59e: 0x2000, 0x5a0: 0x2000, 0x5a1: 0x2000, 0x5a2: 0x2000, 0x5a3: 0x2000,
- 0x5a4: 0x2000, 0x5a5: 0x2000, 0x5a6: 0x2000, 0x5a7: 0x2000, 0x5a8: 0x2000, 0x5a9: 0x2000,
- 0x5aa: 0x2000, 0x5ab: 0x2000,
- 0x5b0: 0x2000, 0x5b1: 0x2000, 0x5b2: 0x2000, 0x5b3: 0x2000, 0x5b4: 0x2000, 0x5b5: 0x2000,
- 0x5b6: 0x2000, 0x5b7: 0x2000, 0x5b8: 0x2000, 0x5b9: 0x2000,
- // Block 0x17, offset 0x5c0
- 0x5c9: 0x2000,
- 0x5d0: 0x200a, 0x5d1: 0x200b,
- 0x5d2: 0x200a, 0x5d3: 0x200c, 0x5d4: 0x2000, 0x5d5: 0x2000, 0x5d6: 0x2000, 0x5d7: 0x2000,
- 0x5d8: 0x2000, 0x5d9: 0x2000,
- 0x5f8: 0x2000, 0x5f9: 0x2000,
- // Block 0x18, offset 0x600
- 0x612: 0x2000, 0x614: 0x2000,
- 0x627: 0x2000,
- // Block 0x19, offset 0x640
- 0x640: 0x2000, 0x642: 0x2000, 0x643: 0x2000,
- 0x647: 0x2000, 0x648: 0x2000, 0x64b: 0x2000,
- 0x64f: 0x2000, 0x651: 0x2000,
- 0x655: 0x2000,
- 0x65a: 0x2000, 0x65d: 0x2000,
- 0x65e: 0x2000, 0x65f: 0x2000, 0x660: 0x2000, 0x663: 0x2000,
- 0x665: 0x2000, 0x667: 0x2000, 0x668: 0x2000, 0x669: 0x2000,
- 0x66a: 0x2000, 0x66b: 0x2000, 0x66c: 0x2000, 0x66e: 0x2000,
- 0x674: 0x2000, 0x675: 0x2000,
- 0x676: 0x2000, 0x677: 0x2000,
- 0x67c: 0x2000, 0x67d: 0x2000,
- // Block 0x1a, offset 0x680
- 0x688: 0x2000,
- 0x68c: 0x2000,
- 0x692: 0x2000,
- 0x6a0: 0x2000, 0x6a1: 0x2000,
- 0x6a4: 0x2000, 0x6a5: 0x2000, 0x6a6: 0x2000, 0x6a7: 0x2000,
- 0x6aa: 0x2000, 0x6ab: 0x2000, 0x6ae: 0x2000, 0x6af: 0x2000,
- // Block 0x1b, offset 0x6c0
- 0x6c2: 0x2000, 0x6c3: 0x2000,
- 0x6c6: 0x2000, 0x6c7: 0x2000,
- 0x6d5: 0x2000,
- 0x6d9: 0x2000,
- 0x6e5: 0x2000,
- 0x6ff: 0x2000,
- // Block 0x1c, offset 0x700
- 0x712: 0x2000,
- 0x71a: 0x4000, 0x71b: 0x4000,
- 0x729: 0x4000,
- 0x72a: 0x4000,
- // Block 0x1d, offset 0x740
- 0x769: 0x4000,
- 0x76a: 0x4000, 0x76b: 0x4000, 0x76c: 0x4000,
- 0x770: 0x4000, 0x773: 0x4000,
- // Block 0x1e, offset 0x780
- 0x7a0: 0x2000, 0x7a1: 0x2000, 0x7a2: 0x2000, 0x7a3: 0x2000,
- 0x7a4: 0x2000, 0x7a5: 0x2000, 0x7a6: 0x2000, 0x7a7: 0x2000, 0x7a8: 0x2000, 0x7a9: 0x2000,
- 0x7aa: 0x2000, 0x7ab: 0x2000, 0x7ac: 0x2000, 0x7ad: 0x2000, 0x7ae: 0x2000, 0x7af: 0x2000,
- 0x7b0: 0x2000, 0x7b1: 0x2000, 0x7b2: 0x2000, 0x7b3: 0x2000, 0x7b4: 0x2000, 0x7b5: 0x2000,
- 0x7b6: 0x2000, 0x7b7: 0x2000, 0x7b8: 0x2000, 0x7b9: 0x2000, 0x7ba: 0x2000, 0x7bb: 0x2000,
- 0x7bc: 0x2000, 0x7bd: 0x2000, 0x7be: 0x2000, 0x7bf: 0x2000,
- // Block 0x1f, offset 0x7c0
- 0x7c0: 0x2000, 0x7c1: 0x2000, 0x7c2: 0x2000, 0x7c3: 0x2000, 0x7c4: 0x2000, 0x7c5: 0x2000,
- 0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7c9: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000,
- 0x7cc: 0x2000, 0x7cd: 0x2000, 0x7ce: 0x2000, 0x7cf: 0x2000, 0x7d0: 0x2000, 0x7d1: 0x2000,
- 0x7d2: 0x2000, 0x7d3: 0x2000, 0x7d4: 0x2000, 0x7d5: 0x2000, 0x7d6: 0x2000, 0x7d7: 0x2000,
- 0x7d8: 0x2000, 0x7d9: 0x2000, 0x7da: 0x2000, 0x7db: 0x2000, 0x7dc: 0x2000, 0x7dd: 0x2000,
- 0x7de: 0x2000, 0x7df: 0x2000, 0x7e0: 0x2000, 0x7e1: 0x2000, 0x7e2: 0x2000, 0x7e3: 0x2000,
- 0x7e4: 0x2000, 0x7e5: 0x2000, 0x7e6: 0x2000, 0x7e7: 0x2000, 0x7e8: 0x2000, 0x7e9: 0x2000,
- 0x7eb: 0x2000, 0x7ec: 0x2000, 0x7ed: 0x2000, 0x7ee: 0x2000, 0x7ef: 0x2000,
- 0x7f0: 0x2000, 0x7f1: 0x2000, 0x7f2: 0x2000, 0x7f3: 0x2000, 0x7f4: 0x2000, 0x7f5: 0x2000,
- 0x7f6: 0x2000, 0x7f7: 0x2000, 0x7f8: 0x2000, 0x7f9: 0x2000, 0x7fa: 0x2000, 0x7fb: 0x2000,
- 0x7fc: 0x2000, 0x7fd: 0x2000, 0x7fe: 0x2000, 0x7ff: 0x2000,
- // Block 0x20, offset 0x800
- 0x800: 0x2000, 0x801: 0x2000, 0x802: 0x200d, 0x803: 0x2000, 0x804: 0x2000, 0x805: 0x2000,
- 0x806: 0x2000, 0x807: 0x2000, 0x808: 0x2000, 0x809: 0x2000, 0x80a: 0x2000, 0x80b: 0x2000,
- 0x80c: 0x2000, 0x80d: 0x2000, 0x80e: 0x2000, 0x80f: 0x2000, 0x810: 0x2000, 0x811: 0x2000,
- 0x812: 0x2000, 0x813: 0x2000, 0x814: 0x2000, 0x815: 0x2000, 0x816: 0x2000, 0x817: 0x2000,
- 0x818: 0x2000, 0x819: 0x2000, 0x81a: 0x2000, 0x81b: 0x2000, 0x81c: 0x2000, 0x81d: 0x2000,
- 0x81e: 0x2000, 0x81f: 0x2000, 0x820: 0x2000, 0x821: 0x2000, 0x822: 0x2000, 0x823: 0x2000,
- 0x824: 0x2000, 0x825: 0x2000, 0x826: 0x2000, 0x827: 0x2000, 0x828: 0x2000, 0x829: 0x2000,
- 0x82a: 0x2000, 0x82b: 0x2000, 0x82c: 0x2000, 0x82d: 0x2000, 0x82e: 0x2000, 0x82f: 0x2000,
- 0x830: 0x2000, 0x831: 0x2000, 0x832: 0x2000, 0x833: 0x2000, 0x834: 0x2000, 0x835: 0x2000,
- 0x836: 0x2000, 0x837: 0x2000, 0x838: 0x2000, 0x839: 0x2000, 0x83a: 0x2000, 0x83b: 0x2000,
- 0x83c: 0x2000, 0x83d: 0x2000, 0x83e: 0x2000, 0x83f: 0x2000,
- // Block 0x21, offset 0x840
- 0x840: 0x2000, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000, 0x845: 0x2000,
- 0x846: 0x2000, 0x847: 0x2000, 0x848: 0x2000, 0x849: 0x2000, 0x84a: 0x2000, 0x84b: 0x2000,
- 0x850: 0x2000, 0x851: 0x2000,
- 0x852: 0x2000, 0x853: 0x2000, 0x854: 0x2000, 0x855: 0x2000, 0x856: 0x2000, 0x857: 0x2000,
- 0x858: 0x2000, 0x859: 0x2000, 0x85a: 0x2000, 0x85b: 0x2000, 0x85c: 0x2000, 0x85d: 0x2000,
- 0x85e: 0x2000, 0x85f: 0x2000, 0x860: 0x2000, 0x861: 0x2000, 0x862: 0x2000, 0x863: 0x2000,
- 0x864: 0x2000, 0x865: 0x2000, 0x866: 0x2000, 0x867: 0x2000, 0x868: 0x2000, 0x869: 0x2000,
- 0x86a: 0x2000, 0x86b: 0x2000, 0x86c: 0x2000, 0x86d: 0x2000, 0x86e: 0x2000, 0x86f: 0x2000,
- 0x870: 0x2000, 0x871: 0x2000, 0x872: 0x2000, 0x873: 0x2000,
- // Block 0x22, offset 0x880
- 0x880: 0x2000, 0x881: 0x2000, 0x882: 0x2000, 0x883: 0x2000, 0x884: 0x2000, 0x885: 0x2000,
- 0x886: 0x2000, 0x887: 0x2000, 0x888: 0x2000, 0x889: 0x2000, 0x88a: 0x2000, 0x88b: 0x2000,
- 0x88c: 0x2000, 0x88d: 0x2000, 0x88e: 0x2000, 0x88f: 0x2000,
- 0x892: 0x2000, 0x893: 0x2000, 0x894: 0x2000, 0x895: 0x2000,
- 0x8a0: 0x200e, 0x8a1: 0x2000, 0x8a3: 0x2000,
- 0x8a4: 0x2000, 0x8a5: 0x2000, 0x8a6: 0x2000, 0x8a7: 0x2000, 0x8a8: 0x2000, 0x8a9: 0x2000,
- 0x8b2: 0x2000, 0x8b3: 0x2000,
- 0x8b6: 0x2000, 0x8b7: 0x2000,
- 0x8bc: 0x2000, 0x8bd: 0x2000,
- // Block 0x23, offset 0x8c0
- 0x8c0: 0x2000, 0x8c1: 0x2000,
- 0x8c6: 0x2000, 0x8c7: 0x2000, 0x8c8: 0x2000, 0x8cb: 0x200f,
- 0x8ce: 0x2000, 0x8cf: 0x2000, 0x8d0: 0x2000, 0x8d1: 0x2000,
- 0x8e2: 0x2000, 0x8e3: 0x2000,
- 0x8e4: 0x2000, 0x8e5: 0x2000,
- 0x8ef: 0x2000,
- 0x8fd: 0x4000, 0x8fe: 0x4000,
- // Block 0x24, offset 0x900
- 0x905: 0x2000,
- 0x906: 0x2000, 0x909: 0x2000,
- 0x90e: 0x2000, 0x90f: 0x2000,
- 0x914: 0x4000, 0x915: 0x4000,
- 0x91c: 0x2000,
- 0x91e: 0x2000,
- // Block 0x25, offset 0x940
- 0x940: 0x2000, 0x942: 0x2000,
- 0x948: 0x4000, 0x949: 0x4000, 0x94a: 0x4000, 0x94b: 0x4000,
- 0x94c: 0x4000, 0x94d: 0x4000, 0x94e: 0x4000, 0x94f: 0x4000, 0x950: 0x4000, 0x951: 0x4000,
- 0x952: 0x4000, 0x953: 0x4000,
- 0x960: 0x2000, 0x961: 0x2000, 0x963: 0x2000,
- 0x964: 0x2000, 0x965: 0x2000, 0x967: 0x2000, 0x968: 0x2000, 0x969: 0x2000,
- 0x96a: 0x2000, 0x96c: 0x2000, 0x96d: 0x2000, 0x96f: 0x2000,
- 0x97f: 0x4000,
- // Block 0x26, offset 0x980
- 0x993: 0x4000,
- 0x99e: 0x2000, 0x99f: 0x2000, 0x9a1: 0x4000,
- 0x9aa: 0x4000, 0x9ab: 0x4000,
- 0x9bd: 0x4000, 0x9be: 0x4000, 0x9bf: 0x2000,
- // Block 0x27, offset 0x9c0
- 0x9c4: 0x4000, 0x9c5: 0x4000,
- 0x9c6: 0x2000, 0x9c7: 0x2000, 0x9c8: 0x2000, 0x9c9: 0x2000, 0x9ca: 0x2000, 0x9cb: 0x2000,
- 0x9cc: 0x2000, 0x9cd: 0x2000, 0x9ce: 0x4000, 0x9cf: 0x2000, 0x9d0: 0x2000, 0x9d1: 0x2000,
- 0x9d2: 0x2000, 0x9d3: 0x2000, 0x9d4: 0x4000, 0x9d5: 0x2000, 0x9d6: 0x2000, 0x9d7: 0x2000,
- 0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000,
- 0x9de: 0x2000, 0x9df: 0x2000, 0x9e0: 0x2000, 0x9e1: 0x2000, 0x9e3: 0x2000,
- 0x9e8: 0x2000, 0x9e9: 0x2000,
- 0x9ea: 0x4000, 0x9eb: 0x2000, 0x9ec: 0x2000, 0x9ed: 0x2000, 0x9ee: 0x2000, 0x9ef: 0x2000,
- 0x9f0: 0x2000, 0x9f1: 0x2000, 0x9f2: 0x4000, 0x9f3: 0x4000, 0x9f4: 0x2000, 0x9f5: 0x4000,
- 0x9f6: 0x2000, 0x9f7: 0x2000, 0x9f8: 0x2000, 0x9f9: 0x2000, 0x9fa: 0x4000, 0x9fb: 0x2000,
- 0x9fc: 0x2000, 0x9fd: 0x4000, 0x9fe: 0x2000, 0x9ff: 0x2000,
- // Block 0x28, offset 0xa00
- 0xa05: 0x4000,
- 0xa0a: 0x4000, 0xa0b: 0x4000,
- 0xa28: 0x4000,
- 0xa3d: 0x2000,
- // Block 0x29, offset 0xa40
- 0xa4c: 0x4000, 0xa4e: 0x4000,
- 0xa53: 0x4000, 0xa54: 0x4000, 0xa55: 0x4000, 0xa57: 0x4000,
- 0xa76: 0x2000, 0xa77: 0x2000, 0xa78: 0x2000, 0xa79: 0x2000, 0xa7a: 0x2000, 0xa7b: 0x2000,
- 0xa7c: 0x2000, 0xa7d: 0x2000, 0xa7e: 0x2000, 0xa7f: 0x2000,
- // Block 0x2a, offset 0xa80
- 0xa95: 0x4000, 0xa96: 0x4000, 0xa97: 0x4000,
- 0xab0: 0x4000,
- 0xabf: 0x4000,
- // Block 0x2b, offset 0xac0
- 0xae6: 0x6000, 0xae7: 0x6000, 0xae8: 0x6000, 0xae9: 0x6000,
- 0xaea: 0x6000, 0xaeb: 0x6000, 0xaec: 0x6000, 0xaed: 0x6000,
- // Block 0x2c, offset 0xb00
- 0xb05: 0x6010,
- 0xb06: 0x6011,
- // Block 0x2d, offset 0xb40
- 0xb5b: 0x4000, 0xb5c: 0x4000,
- // Block 0x2e, offset 0xb80
- 0xb90: 0x4000,
- 0xb95: 0x4000, 0xb96: 0x2000, 0xb97: 0x2000,
- 0xb98: 0x2000, 0xb99: 0x2000,
- // Block 0x2f, offset 0xbc0
- 0xbc0: 0x4000, 0xbc1: 0x4000, 0xbc2: 0x4000, 0xbc3: 0x4000, 0xbc4: 0x4000, 0xbc5: 0x4000,
- 0xbc6: 0x4000, 0xbc7: 0x4000, 0xbc8: 0x4000, 0xbc9: 0x4000, 0xbca: 0x4000, 0xbcb: 0x4000,
- 0xbcc: 0x4000, 0xbcd: 0x4000, 0xbce: 0x4000, 0xbcf: 0x4000, 0xbd0: 0x4000, 0xbd1: 0x4000,
- 0xbd2: 0x4000, 0xbd3: 0x4000, 0xbd4: 0x4000, 0xbd5: 0x4000, 0xbd6: 0x4000, 0xbd7: 0x4000,
- 0xbd8: 0x4000, 0xbd9: 0x4000, 0xbdb: 0x4000, 0xbdc: 0x4000, 0xbdd: 0x4000,
- 0xbde: 0x4000, 0xbdf: 0x4000, 0xbe0: 0x4000, 0xbe1: 0x4000, 0xbe2: 0x4000, 0xbe3: 0x4000,
- 0xbe4: 0x4000, 0xbe5: 0x4000, 0xbe6: 0x4000, 0xbe7: 0x4000, 0xbe8: 0x4000, 0xbe9: 0x4000,
- 0xbea: 0x4000, 0xbeb: 0x4000, 0xbec: 0x4000, 0xbed: 0x4000, 0xbee: 0x4000, 0xbef: 0x4000,
- 0xbf0: 0x4000, 0xbf1: 0x4000, 0xbf2: 0x4000, 0xbf3: 0x4000, 0xbf4: 0x4000, 0xbf5: 0x4000,
- 0xbf6: 0x4000, 0xbf7: 0x4000, 0xbf8: 0x4000, 0xbf9: 0x4000, 0xbfa: 0x4000, 0xbfb: 0x4000,
- 0xbfc: 0x4000, 0xbfd: 0x4000, 0xbfe: 0x4000, 0xbff: 0x4000,
- // Block 0x30, offset 0xc00
- 0xc00: 0x4000, 0xc01: 0x4000, 0xc02: 0x4000, 0xc03: 0x4000, 0xc04: 0x4000, 0xc05: 0x4000,
- 0xc06: 0x4000, 0xc07: 0x4000, 0xc08: 0x4000, 0xc09: 0x4000, 0xc0a: 0x4000, 0xc0b: 0x4000,
- 0xc0c: 0x4000, 0xc0d: 0x4000, 0xc0e: 0x4000, 0xc0f: 0x4000, 0xc10: 0x4000, 0xc11: 0x4000,
- 0xc12: 0x4000, 0xc13: 0x4000, 0xc14: 0x4000, 0xc15: 0x4000, 0xc16: 0x4000, 0xc17: 0x4000,
- 0xc18: 0x4000, 0xc19: 0x4000, 0xc1a: 0x4000, 0xc1b: 0x4000, 0xc1c: 0x4000, 0xc1d: 0x4000,
- 0xc1e: 0x4000, 0xc1f: 0x4000, 0xc20: 0x4000, 0xc21: 0x4000, 0xc22: 0x4000, 0xc23: 0x4000,
- 0xc24: 0x4000, 0xc25: 0x4000, 0xc26: 0x4000, 0xc27: 0x4000, 0xc28: 0x4000, 0xc29: 0x4000,
- 0xc2a: 0x4000, 0xc2b: 0x4000, 0xc2c: 0x4000, 0xc2d: 0x4000, 0xc2e: 0x4000, 0xc2f: 0x4000,
- 0xc30: 0x4000, 0xc31: 0x4000, 0xc32: 0x4000, 0xc33: 0x4000,
- // Block 0x31, offset 0xc40
- 0xc40: 0x4000, 0xc41: 0x4000, 0xc42: 0x4000, 0xc43: 0x4000, 0xc44: 0x4000, 0xc45: 0x4000,
- 0xc46: 0x4000, 0xc47: 0x4000, 0xc48: 0x4000, 0xc49: 0x4000, 0xc4a: 0x4000, 0xc4b: 0x4000,
- 0xc4c: 0x4000, 0xc4d: 0x4000, 0xc4e: 0x4000, 0xc4f: 0x4000, 0xc50: 0x4000, 0xc51: 0x4000,
- 0xc52: 0x4000, 0xc53: 0x4000, 0xc54: 0x4000, 0xc55: 0x4000,
- 0xc70: 0x4000, 0xc71: 0x4000, 0xc72: 0x4000, 0xc73: 0x4000, 0xc74: 0x4000, 0xc75: 0x4000,
- 0xc76: 0x4000, 0xc77: 0x4000, 0xc78: 0x4000, 0xc79: 0x4000, 0xc7a: 0x4000, 0xc7b: 0x4000,
- // Block 0x32, offset 0xc80
- 0xc80: 0x9012, 0xc81: 0x4013, 0xc82: 0x4014, 0xc83: 0x4000, 0xc84: 0x4000, 0xc85: 0x4000,
- 0xc86: 0x4000, 0xc87: 0x4000, 0xc88: 0x4000, 0xc89: 0x4000, 0xc8a: 0x4000, 0xc8b: 0x4000,
- 0xc8c: 0x4015, 0xc8d: 0x4015, 0xc8e: 0x4000, 0xc8f: 0x4000, 0xc90: 0x4000, 0xc91: 0x4000,
- 0xc92: 0x4000, 0xc93: 0x4000, 0xc94: 0x4000, 0xc95: 0x4000, 0xc96: 0x4000, 0xc97: 0x4000,
- 0xc98: 0x4000, 0xc99: 0x4000, 0xc9a: 0x4000, 0xc9b: 0x4000, 0xc9c: 0x4000, 0xc9d: 0x4000,
- 0xc9e: 0x4000, 0xc9f: 0x4000, 0xca0: 0x4000, 0xca1: 0x4000, 0xca2: 0x4000, 0xca3: 0x4000,
- 0xca4: 0x4000, 0xca5: 0x4000, 0xca6: 0x4000, 0xca7: 0x4000, 0xca8: 0x4000, 0xca9: 0x4000,
- 0xcaa: 0x4000, 0xcab: 0x4000, 0xcac: 0x4000, 0xcad: 0x4000, 0xcae: 0x4000, 0xcaf: 0x4000,
- 0xcb0: 0x4000, 0xcb1: 0x4000, 0xcb2: 0x4000, 0xcb3: 0x4000, 0xcb4: 0x4000, 0xcb5: 0x4000,
- 0xcb6: 0x4000, 0xcb7: 0x4000, 0xcb8: 0x4000, 0xcb9: 0x4000, 0xcba: 0x4000, 0xcbb: 0x4000,
- 0xcbc: 0x4000, 0xcbd: 0x4000, 0xcbe: 0x4000,
- // Block 0x33, offset 0xcc0
- 0xcc1: 0x4000, 0xcc2: 0x4000, 0xcc3: 0x4000, 0xcc4: 0x4000, 0xcc5: 0x4000,
- 0xcc6: 0x4000, 0xcc7: 0x4000, 0xcc8: 0x4000, 0xcc9: 0x4000, 0xcca: 0x4000, 0xccb: 0x4000,
- 0xccc: 0x4000, 0xccd: 0x4000, 0xcce: 0x4000, 0xccf: 0x4000, 0xcd0: 0x4000, 0xcd1: 0x4000,
- 0xcd2: 0x4000, 0xcd3: 0x4000, 0xcd4: 0x4000, 0xcd5: 0x4000, 0xcd6: 0x4000, 0xcd7: 0x4000,
- 0xcd8: 0x4000, 0xcd9: 0x4000, 0xcda: 0x4000, 0xcdb: 0x4000, 0xcdc: 0x4000, 0xcdd: 0x4000,
- 0xcde: 0x4000, 0xcdf: 0x4000, 0xce0: 0x4000, 0xce1: 0x4000, 0xce2: 0x4000, 0xce3: 0x4000,
- 0xce4: 0x4000, 0xce5: 0x4000, 0xce6: 0x4000, 0xce7: 0x4000, 0xce8: 0x4000, 0xce9: 0x4000,
- 0xcea: 0x4000, 0xceb: 0x4000, 0xcec: 0x4000, 0xced: 0x4000, 0xcee: 0x4000, 0xcef: 0x4000,
- 0xcf0: 0x4000, 0xcf1: 0x4000, 0xcf2: 0x4000, 0xcf3: 0x4000, 0xcf4: 0x4000, 0xcf5: 0x4000,
- 0xcf6: 0x4000, 0xcf7: 0x4000, 0xcf8: 0x4000, 0xcf9: 0x4000, 0xcfa: 0x4000, 0xcfb: 0x4000,
- 0xcfc: 0x4000, 0xcfd: 0x4000, 0xcfe: 0x4000, 0xcff: 0x4000,
- // Block 0x34, offset 0xd00
- 0xd00: 0x4000, 0xd01: 0x4000, 0xd02: 0x4000, 0xd03: 0x4000, 0xd04: 0x4000, 0xd05: 0x4000,
- 0xd06: 0x4000, 0xd07: 0x4000, 0xd08: 0x4000, 0xd09: 0x4000, 0xd0a: 0x4000, 0xd0b: 0x4000,
- 0xd0c: 0x4000, 0xd0d: 0x4000, 0xd0e: 0x4000, 0xd0f: 0x4000, 0xd10: 0x4000, 0xd11: 0x4000,
- 0xd12: 0x4000, 0xd13: 0x4000, 0xd14: 0x4000, 0xd15: 0x4000, 0xd16: 0x4000,
- 0xd19: 0x4016, 0xd1a: 0x4017, 0xd1b: 0x4000, 0xd1c: 0x4000, 0xd1d: 0x4000,
- 0xd1e: 0x4000, 0xd1f: 0x4000, 0xd20: 0x4000, 0xd21: 0x4018, 0xd22: 0x4019, 0xd23: 0x401a,
- 0xd24: 0x401b, 0xd25: 0x401c, 0xd26: 0x401d, 0xd27: 0x401e, 0xd28: 0x401f, 0xd29: 0x4020,
- 0xd2a: 0x4021, 0xd2b: 0x4022, 0xd2c: 0x4000, 0xd2d: 0x4010, 0xd2e: 0x4000, 0xd2f: 0x4023,
- 0xd30: 0x4000, 0xd31: 0x4024, 0xd32: 0x4000, 0xd33: 0x4025, 0xd34: 0x4000, 0xd35: 0x4026,
- 0xd36: 0x4000, 0xd37: 0x401a, 0xd38: 0x4000, 0xd39: 0x4027, 0xd3a: 0x4000, 0xd3b: 0x4028,
- 0xd3c: 0x4000, 0xd3d: 0x4020, 0xd3e: 0x4000, 0xd3f: 0x4029,
- // Block 0x35, offset 0xd40
- 0xd40: 0x4000, 0xd41: 0x402a, 0xd42: 0x4000, 0xd43: 0x402b, 0xd44: 0x402c, 0xd45: 0x4000,
- 0xd46: 0x4017, 0xd47: 0x4000, 0xd48: 0x402d, 0xd49: 0x4000, 0xd4a: 0x402e, 0xd4b: 0x402f,
- 0xd4c: 0x4030, 0xd4d: 0x4017, 0xd4e: 0x4016, 0xd4f: 0x4017, 0xd50: 0x4000, 0xd51: 0x4000,
- 0xd52: 0x4031, 0xd53: 0x4000, 0xd54: 0x4000, 0xd55: 0x4031, 0xd56: 0x4000, 0xd57: 0x4000,
- 0xd58: 0x4032, 0xd59: 0x4000, 0xd5a: 0x4000, 0xd5b: 0x4032, 0xd5c: 0x4000, 0xd5d: 0x4000,
- 0xd5e: 0x4033, 0xd5f: 0x402e, 0xd60: 0x4034, 0xd61: 0x4035, 0xd62: 0x4034, 0xd63: 0x4036,
- 0xd64: 0x4037, 0xd65: 0x4024, 0xd66: 0x4035, 0xd67: 0x4025, 0xd68: 0x4038, 0xd69: 0x4038,
- 0xd6a: 0x4039, 0xd6b: 0x4039, 0xd6c: 0x403a, 0xd6d: 0x403a, 0xd6e: 0x4000, 0xd6f: 0x4035,
- 0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x403b, 0xd73: 0x403c, 0xd74: 0x4000, 0xd75: 0x4000,
- 0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x403d,
- 0xd7c: 0x401c, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000,
- // Block 0x36, offset 0xd80
- 0xd85: 0x4000,
- 0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000,
- 0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000,
- 0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000,
- 0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000,
- 0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000,
- 0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000,
- 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, 0xdae: 0x4000,
- 0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e,
- 0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e,
- 0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e,
- // Block 0x37, offset 0xdc0
- 0xdc0: 0x4037, 0xdc1: 0x4037, 0xdc2: 0x4037, 0xdc3: 0x4037, 0xdc4: 0x4037, 0xdc5: 0x4037,
- 0xdc6: 0x4037, 0xdc7: 0x4037, 0xdc8: 0x4037, 0xdc9: 0x4037, 0xdca: 0x4037, 0xdcb: 0x4037,
- 0xdcc: 0x4037, 0xdcd: 0x4037, 0xdce: 0x4037, 0xdcf: 0x400e, 0xdd0: 0x403f, 0xdd1: 0x4040,
- 0xdd2: 0x4041, 0xdd3: 0x4040, 0xdd4: 0x403f, 0xdd5: 0x4042, 0xdd6: 0x4043, 0xdd7: 0x4044,
- 0xdd8: 0x4040, 0xdd9: 0x4041, 0xdda: 0x4040, 0xddb: 0x4045, 0xddc: 0x4009, 0xddd: 0x4045,
- 0xdde: 0x4046, 0xddf: 0x4045, 0xde0: 0x4047, 0xde1: 0x400b, 0xde2: 0x400a, 0xde3: 0x400c,
- 0xde4: 0x4048, 0xde5: 0x4000, 0xde6: 0x4000, 0xde7: 0x4000, 0xde8: 0x4000, 0xde9: 0x4000,
- 0xdea: 0x4000, 0xdeb: 0x4000, 0xdec: 0x4000, 0xded: 0x4000, 0xdee: 0x4000, 0xdef: 0x4000,
- 0xdf0: 0x4000, 0xdf1: 0x4000, 0xdf2: 0x4000, 0xdf3: 0x4000, 0xdf4: 0x4000, 0xdf5: 0x4000,
- 0xdf6: 0x4000, 0xdf7: 0x4000, 0xdf8: 0x4000, 0xdf9: 0x4000, 0xdfa: 0x4000, 0xdfb: 0x4000,
- 0xdfc: 0x4000, 0xdfd: 0x4000, 0xdfe: 0x4000, 0xdff: 0x4000,
- // Block 0x38, offset 0xe00
- 0xe00: 0x4000, 0xe01: 0x4000, 0xe02: 0x4000, 0xe03: 0x4000, 0xe04: 0x4000, 0xe05: 0x4000,
- 0xe06: 0x4000, 0xe07: 0x4000, 0xe08: 0x4000, 0xe09: 0x4000, 0xe0a: 0x4000, 0xe0b: 0x4000,
- 0xe0c: 0x4000, 0xe0d: 0x4000, 0xe0e: 0x4000, 0xe10: 0x4000, 0xe11: 0x4000,
- 0xe12: 0x4000, 0xe13: 0x4000, 0xe14: 0x4000, 0xe15: 0x4000, 0xe16: 0x4000, 0xe17: 0x4000,
- 0xe18: 0x4000, 0xe19: 0x4000, 0xe1a: 0x4000, 0xe1b: 0x4000, 0xe1c: 0x4000, 0xe1d: 0x4000,
- 0xe1e: 0x4000, 0xe1f: 0x4000, 0xe20: 0x4000, 0xe21: 0x4000, 0xe22: 0x4000, 0xe23: 0x4000,
- 0xe24: 0x4000, 0xe25: 0x4000, 0xe26: 0x4000, 0xe27: 0x4000, 0xe28: 0x4000, 0xe29: 0x4000,
- 0xe2a: 0x4000, 0xe2b: 0x4000, 0xe2c: 0x4000, 0xe2d: 0x4000, 0xe2e: 0x4000, 0xe2f: 0x4000,
- 0xe30: 0x4000, 0xe31: 0x4000, 0xe32: 0x4000, 0xe33: 0x4000, 0xe34: 0x4000, 0xe35: 0x4000,
- 0xe36: 0x4000, 0xe37: 0x4000, 0xe38: 0x4000, 0xe39: 0x4000, 0xe3a: 0x4000,
- // Block 0x39, offset 0xe40
- 0xe40: 0x4000, 0xe41: 0x4000, 0xe42: 0x4000, 0xe43: 0x4000, 0xe44: 0x4000, 0xe45: 0x4000,
- 0xe46: 0x4000, 0xe47: 0x4000, 0xe48: 0x4000, 0xe49: 0x4000, 0xe4a: 0x4000, 0xe4b: 0x4000,
- 0xe4c: 0x4000, 0xe4d: 0x4000, 0xe4e: 0x4000, 0xe4f: 0x4000, 0xe50: 0x4000, 0xe51: 0x4000,
- 0xe52: 0x4000, 0xe53: 0x4000, 0xe54: 0x4000, 0xe55: 0x4000, 0xe56: 0x4000, 0xe57: 0x4000,
- 0xe58: 0x4000, 0xe59: 0x4000, 0xe5a: 0x4000, 0xe5b: 0x4000, 0xe5c: 0x4000, 0xe5d: 0x4000,
- 0xe5e: 0x4000, 0xe5f: 0x4000, 0xe60: 0x4000, 0xe61: 0x4000, 0xe62: 0x4000, 0xe63: 0x4000,
- 0xe70: 0x4000, 0xe71: 0x4000, 0xe72: 0x4000, 0xe73: 0x4000, 0xe74: 0x4000, 0xe75: 0x4000,
- 0xe76: 0x4000, 0xe77: 0x4000, 0xe78: 0x4000, 0xe79: 0x4000, 0xe7a: 0x4000, 0xe7b: 0x4000,
- 0xe7c: 0x4000, 0xe7d: 0x4000, 0xe7e: 0x4000, 0xe7f: 0x4000,
- // Block 0x3a, offset 0xe80
- 0xe80: 0x4000, 0xe81: 0x4000, 0xe82: 0x4000, 0xe83: 0x4000, 0xe84: 0x4000, 0xe85: 0x4000,
- 0xe86: 0x4000, 0xe87: 0x4000, 0xe88: 0x4000, 0xe89: 0x4000, 0xe8a: 0x4000, 0xe8b: 0x4000,
- 0xe8c: 0x4000, 0xe8d: 0x4000, 0xe8e: 0x4000, 0xe8f: 0x4000, 0xe90: 0x4000, 0xe91: 0x4000,
- 0xe92: 0x4000, 0xe93: 0x4000, 0xe94: 0x4000, 0xe95: 0x4000, 0xe96: 0x4000, 0xe97: 0x4000,
- 0xe98: 0x4000, 0xe99: 0x4000, 0xe9a: 0x4000, 0xe9b: 0x4000, 0xe9c: 0x4000, 0xe9d: 0x4000,
- 0xe9e: 0x4000, 0xea0: 0x4000, 0xea1: 0x4000, 0xea2: 0x4000, 0xea3: 0x4000,
- 0xea4: 0x4000, 0xea5: 0x4000, 0xea6: 0x4000, 0xea7: 0x4000, 0xea8: 0x4000, 0xea9: 0x4000,
- 0xeaa: 0x4000, 0xeab: 0x4000, 0xeac: 0x4000, 0xead: 0x4000, 0xeae: 0x4000, 0xeaf: 0x4000,
- 0xeb0: 0x4000, 0xeb1: 0x4000, 0xeb2: 0x4000, 0xeb3: 0x4000, 0xeb4: 0x4000, 0xeb5: 0x4000,
- 0xeb6: 0x4000, 0xeb7: 0x4000, 0xeb8: 0x4000, 0xeb9: 0x4000, 0xeba: 0x4000, 0xebb: 0x4000,
- 0xebc: 0x4000, 0xebd: 0x4000, 0xebe: 0x4000, 0xebf: 0x4000,
- // Block 0x3b, offset 0xec0
- 0xec0: 0x4000, 0xec1: 0x4000, 0xec2: 0x4000, 0xec3: 0x4000, 0xec4: 0x4000, 0xec5: 0x4000,
- 0xec6: 0x4000, 0xec7: 0x4000, 0xec8: 0x2000, 0xec9: 0x2000, 0xeca: 0x2000, 0xecb: 0x2000,
- 0xecc: 0x2000, 0xecd: 0x2000, 0xece: 0x2000, 0xecf: 0x2000, 0xed0: 0x4000, 0xed1: 0x4000,
- 0xed2: 0x4000, 0xed3: 0x4000, 0xed4: 0x4000, 0xed5: 0x4000, 0xed6: 0x4000, 0xed7: 0x4000,
- 0xed8: 0x4000, 0xed9: 0x4000, 0xeda: 0x4000, 0xedb: 0x4000, 0xedc: 0x4000, 0xedd: 0x4000,
- 0xede: 0x4000, 0xedf: 0x4000, 0xee0: 0x4000, 0xee1: 0x4000, 0xee2: 0x4000, 0xee3: 0x4000,
- 0xee4: 0x4000, 0xee5: 0x4000, 0xee6: 0x4000, 0xee7: 0x4000, 0xee8: 0x4000, 0xee9: 0x4000,
- 0xeea: 0x4000, 0xeeb: 0x4000, 0xeec: 0x4000, 0xeed: 0x4000, 0xeee: 0x4000, 0xeef: 0x4000,
- 0xef0: 0x4000, 0xef1: 0x4000, 0xef2: 0x4000, 0xef3: 0x4000, 0xef4: 0x4000, 0xef5: 0x4000,
- 0xef6: 0x4000, 0xef7: 0x4000, 0xef8: 0x4000, 0xef9: 0x4000, 0xefa: 0x4000, 0xefb: 0x4000,
- 0xefc: 0x4000, 0xefd: 0x4000, 0xefe: 0x4000, 0xeff: 0x4000,
- // Block 0x3c, offset 0xf00
- 0xf00: 0x4000, 0xf01: 0x4000, 0xf02: 0x4000, 0xf03: 0x4000, 0xf04: 0x4000, 0xf05: 0x4000,
- 0xf06: 0x4000, 0xf07: 0x4000, 0xf08: 0x4000, 0xf09: 0x4000, 0xf0a: 0x4000, 0xf0b: 0x4000,
- 0xf0c: 0x4000, 0xf0d: 0x4000, 0xf0e: 0x4000, 0xf0f: 0x4000, 0xf10: 0x4000, 0xf11: 0x4000,
- 0xf12: 0x4000, 0xf13: 0x4000, 0xf14: 0x4000, 0xf15: 0x4000, 0xf16: 0x4000, 0xf17: 0x4000,
- 0xf18: 0x4000, 0xf19: 0x4000, 0xf1a: 0x4000, 0xf1b: 0x4000, 0xf1c: 0x4000, 0xf1d: 0x4000,
- 0xf1e: 0x4000, 0xf1f: 0x4000, 0xf20: 0x4000, 0xf21: 0x4000, 0xf22: 0x4000, 0xf23: 0x4000,
- 0xf24: 0x4000, 0xf25: 0x4000, 0xf26: 0x4000, 0xf27: 0x4000, 0xf28: 0x4000, 0xf29: 0x4000,
- 0xf2a: 0x4000, 0xf2b: 0x4000, 0xf2c: 0x4000, 0xf2d: 0x4000, 0xf2e: 0x4000, 0xf2f: 0x4000,
- 0xf30: 0x4000, 0xf31: 0x4000, 0xf32: 0x4000, 0xf33: 0x4000, 0xf34: 0x4000, 0xf35: 0x4000,
- 0xf36: 0x4000, 0xf37: 0x4000, 0xf38: 0x4000, 0xf39: 0x4000, 0xf3a: 0x4000, 0xf3b: 0x4000,
- 0xf3c: 0x4000, 0xf3d: 0x4000, 0xf3e: 0x4000,
- // Block 0x3d, offset 0xf40
- 0xf40: 0x4000, 0xf41: 0x4000, 0xf42: 0x4000, 0xf43: 0x4000, 0xf44: 0x4000, 0xf45: 0x4000,
- 0xf46: 0x4000, 0xf47: 0x4000, 0xf48: 0x4000, 0xf49: 0x4000, 0xf4a: 0x4000, 0xf4b: 0x4000,
- 0xf4c: 0x4000, 0xf50: 0x4000, 0xf51: 0x4000,
- 0xf52: 0x4000, 0xf53: 0x4000, 0xf54: 0x4000, 0xf55: 0x4000, 0xf56: 0x4000, 0xf57: 0x4000,
- 0xf58: 0x4000, 0xf59: 0x4000, 0xf5a: 0x4000, 0xf5b: 0x4000, 0xf5c: 0x4000, 0xf5d: 0x4000,
- 0xf5e: 0x4000, 0xf5f: 0x4000, 0xf60: 0x4000, 0xf61: 0x4000, 0xf62: 0x4000, 0xf63: 0x4000,
- 0xf64: 0x4000, 0xf65: 0x4000, 0xf66: 0x4000, 0xf67: 0x4000, 0xf68: 0x4000, 0xf69: 0x4000,
- 0xf6a: 0x4000, 0xf6b: 0x4000, 0xf6c: 0x4000, 0xf6d: 0x4000, 0xf6e: 0x4000, 0xf6f: 0x4000,
- 0xf70: 0x4000, 0xf71: 0x4000, 0xf72: 0x4000, 0xf73: 0x4000, 0xf74: 0x4000, 0xf75: 0x4000,
- 0xf76: 0x4000, 0xf77: 0x4000, 0xf78: 0x4000, 0xf79: 0x4000, 0xf7a: 0x4000, 0xf7b: 0x4000,
- 0xf7c: 0x4000, 0xf7d: 0x4000, 0xf7e: 0x4000, 0xf7f: 0x4000,
- // Block 0x3e, offset 0xf80
- 0xf80: 0x4000, 0xf81: 0x4000, 0xf82: 0x4000, 0xf83: 0x4000, 0xf84: 0x4000, 0xf85: 0x4000,
- 0xf86: 0x4000,
- // Block 0x3f, offset 0xfc0
- 0xfe0: 0x4000, 0xfe1: 0x4000, 0xfe2: 0x4000, 0xfe3: 0x4000,
- 0xfe4: 0x4000, 0xfe5: 0x4000, 0xfe6: 0x4000, 0xfe7: 0x4000, 0xfe8: 0x4000, 0xfe9: 0x4000,
- 0xfea: 0x4000, 0xfeb: 0x4000, 0xfec: 0x4000, 0xfed: 0x4000, 0xfee: 0x4000, 0xfef: 0x4000,
- 0xff0: 0x4000, 0xff1: 0x4000, 0xff2: 0x4000, 0xff3: 0x4000, 0xff4: 0x4000, 0xff5: 0x4000,
- 0xff6: 0x4000, 0xff7: 0x4000, 0xff8: 0x4000, 0xff9: 0x4000, 0xffa: 0x4000, 0xffb: 0x4000,
- 0xffc: 0x4000,
- // Block 0x40, offset 0x1000
- 0x1000: 0x4000, 0x1001: 0x4000, 0x1002: 0x4000, 0x1003: 0x4000, 0x1004: 0x4000, 0x1005: 0x4000,
- 0x1006: 0x4000, 0x1007: 0x4000, 0x1008: 0x4000, 0x1009: 0x4000, 0x100a: 0x4000, 0x100b: 0x4000,
- 0x100c: 0x4000, 0x100d: 0x4000, 0x100e: 0x4000, 0x100f: 0x4000, 0x1010: 0x4000, 0x1011: 0x4000,
- 0x1012: 0x4000, 0x1013: 0x4000, 0x1014: 0x4000, 0x1015: 0x4000, 0x1016: 0x4000, 0x1017: 0x4000,
- 0x1018: 0x4000, 0x1019: 0x4000, 0x101a: 0x4000, 0x101b: 0x4000, 0x101c: 0x4000, 0x101d: 0x4000,
- 0x101e: 0x4000, 0x101f: 0x4000, 0x1020: 0x4000, 0x1021: 0x4000, 0x1022: 0x4000, 0x1023: 0x4000,
- // Block 0x41, offset 0x1040
- 0x1040: 0x2000, 0x1041: 0x2000, 0x1042: 0x2000, 0x1043: 0x2000, 0x1044: 0x2000, 0x1045: 0x2000,
- 0x1046: 0x2000, 0x1047: 0x2000, 0x1048: 0x2000, 0x1049: 0x2000, 0x104a: 0x2000, 0x104b: 0x2000,
- 0x104c: 0x2000, 0x104d: 0x2000, 0x104e: 0x2000, 0x104f: 0x2000, 0x1050: 0x4000, 0x1051: 0x4000,
- 0x1052: 0x4000, 0x1053: 0x4000, 0x1054: 0x4000, 0x1055: 0x4000, 0x1056: 0x4000, 0x1057: 0x4000,
- 0x1058: 0x4000, 0x1059: 0x4000,
- 0x1070: 0x4000, 0x1071: 0x4000, 0x1072: 0x4000, 0x1073: 0x4000, 0x1074: 0x4000, 0x1075: 0x4000,
- 0x1076: 0x4000, 0x1077: 0x4000, 0x1078: 0x4000, 0x1079: 0x4000, 0x107a: 0x4000, 0x107b: 0x4000,
- 0x107c: 0x4000, 0x107d: 0x4000, 0x107e: 0x4000, 0x107f: 0x4000,
- // Block 0x42, offset 0x1080
- 0x1080: 0x4000, 0x1081: 0x4000, 0x1082: 0x4000, 0x1083: 0x4000, 0x1084: 0x4000, 0x1085: 0x4000,
- 0x1086: 0x4000, 0x1087: 0x4000, 0x1088: 0x4000, 0x1089: 0x4000, 0x108a: 0x4000, 0x108b: 0x4000,
- 0x108c: 0x4000, 0x108d: 0x4000, 0x108e: 0x4000, 0x108f: 0x4000, 0x1090: 0x4000, 0x1091: 0x4000,
- 0x1092: 0x4000, 0x1094: 0x4000, 0x1095: 0x4000, 0x1096: 0x4000, 0x1097: 0x4000,
- 0x1098: 0x4000, 0x1099: 0x4000, 0x109a: 0x4000, 0x109b: 0x4000, 0x109c: 0x4000, 0x109d: 0x4000,
- 0x109e: 0x4000, 0x109f: 0x4000, 0x10a0: 0x4000, 0x10a1: 0x4000, 0x10a2: 0x4000, 0x10a3: 0x4000,
- 0x10a4: 0x4000, 0x10a5: 0x4000, 0x10a6: 0x4000, 0x10a8: 0x4000, 0x10a9: 0x4000,
- 0x10aa: 0x4000, 0x10ab: 0x4000,
- // Block 0x43, offset 0x10c0
- 0x10c1: 0x9012, 0x10c2: 0x9012, 0x10c3: 0x9012, 0x10c4: 0x9012, 0x10c5: 0x9012,
- 0x10c6: 0x9012, 0x10c7: 0x9012, 0x10c8: 0x9012, 0x10c9: 0x9012, 0x10ca: 0x9012, 0x10cb: 0x9012,
- 0x10cc: 0x9012, 0x10cd: 0x9012, 0x10ce: 0x9012, 0x10cf: 0x9012, 0x10d0: 0x9012, 0x10d1: 0x9012,
- 0x10d2: 0x9012, 0x10d3: 0x9012, 0x10d4: 0x9012, 0x10d5: 0x9012, 0x10d6: 0x9012, 0x10d7: 0x9012,
- 0x10d8: 0x9012, 0x10d9: 0x9012, 0x10da: 0x9012, 0x10db: 0x9012, 0x10dc: 0x9012, 0x10dd: 0x9012,
- 0x10de: 0x9012, 0x10df: 0x9012, 0x10e0: 0x9049, 0x10e1: 0x9049, 0x10e2: 0x9049, 0x10e3: 0x9049,
- 0x10e4: 0x9049, 0x10e5: 0x9049, 0x10e6: 0x9049, 0x10e7: 0x9049, 0x10e8: 0x9049, 0x10e9: 0x9049,
- 0x10ea: 0x9049, 0x10eb: 0x9049, 0x10ec: 0x9049, 0x10ed: 0x9049, 0x10ee: 0x9049, 0x10ef: 0x9049,
- 0x10f0: 0x9049, 0x10f1: 0x9049, 0x10f2: 0x9049, 0x10f3: 0x9049, 0x10f4: 0x9049, 0x10f5: 0x9049,
- 0x10f6: 0x9049, 0x10f7: 0x9049, 0x10f8: 0x9049, 0x10f9: 0x9049, 0x10fa: 0x9049, 0x10fb: 0x9049,
- 0x10fc: 0x9049, 0x10fd: 0x9049, 0x10fe: 0x9049, 0x10ff: 0x9049,
- // Block 0x44, offset 0x1100
- 0x1100: 0x9049, 0x1101: 0x9049, 0x1102: 0x9049, 0x1103: 0x9049, 0x1104: 0x9049, 0x1105: 0x9049,
- 0x1106: 0x9049, 0x1107: 0x9049, 0x1108: 0x9049, 0x1109: 0x9049, 0x110a: 0x9049, 0x110b: 0x9049,
- 0x110c: 0x9049, 0x110d: 0x9049, 0x110e: 0x9049, 0x110f: 0x9049, 0x1110: 0x9049, 0x1111: 0x9049,
- 0x1112: 0x9049, 0x1113: 0x9049, 0x1114: 0x9049, 0x1115: 0x9049, 0x1116: 0x9049, 0x1117: 0x9049,
- 0x1118: 0x9049, 0x1119: 0x9049, 0x111a: 0x9049, 0x111b: 0x9049, 0x111c: 0x9049, 0x111d: 0x9049,
- 0x111e: 0x9049, 0x111f: 0x904a, 0x1120: 0x904b, 0x1121: 0xb04c, 0x1122: 0xb04d, 0x1123: 0xb04d,
- 0x1124: 0xb04e, 0x1125: 0xb04f, 0x1126: 0xb050, 0x1127: 0xb051, 0x1128: 0xb052, 0x1129: 0xb053,
- 0x112a: 0xb054, 0x112b: 0xb055, 0x112c: 0xb056, 0x112d: 0xb057, 0x112e: 0xb058, 0x112f: 0xb059,
- 0x1130: 0xb05a, 0x1131: 0xb05b, 0x1132: 0xb05c, 0x1133: 0xb05d, 0x1134: 0xb05e, 0x1135: 0xb05f,
- 0x1136: 0xb060, 0x1137: 0xb061, 0x1138: 0xb062, 0x1139: 0xb063, 0x113a: 0xb064, 0x113b: 0xb065,
- 0x113c: 0xb052, 0x113d: 0xb066, 0x113e: 0xb067, 0x113f: 0xb055,
- // Block 0x45, offset 0x1140
- 0x1140: 0xb068, 0x1141: 0xb069, 0x1142: 0xb06a, 0x1143: 0xb06b, 0x1144: 0xb05a, 0x1145: 0xb056,
- 0x1146: 0xb06c, 0x1147: 0xb06d, 0x1148: 0xb06b, 0x1149: 0xb06e, 0x114a: 0xb06b, 0x114b: 0xb06f,
- 0x114c: 0xb06f, 0x114d: 0xb070, 0x114e: 0xb070, 0x114f: 0xb071, 0x1150: 0xb056, 0x1151: 0xb072,
- 0x1152: 0xb073, 0x1153: 0xb072, 0x1154: 0xb074, 0x1155: 0xb073, 0x1156: 0xb075, 0x1157: 0xb075,
- 0x1158: 0xb076, 0x1159: 0xb076, 0x115a: 0xb077, 0x115b: 0xb077, 0x115c: 0xb073, 0x115d: 0xb078,
- 0x115e: 0xb079, 0x115f: 0xb067, 0x1160: 0xb07a, 0x1161: 0xb07b, 0x1162: 0xb07b, 0x1163: 0xb07b,
- 0x1164: 0xb07b, 0x1165: 0xb07b, 0x1166: 0xb07b, 0x1167: 0xb07b, 0x1168: 0xb07b, 0x1169: 0xb07b,
- 0x116a: 0xb07b, 0x116b: 0xb07b, 0x116c: 0xb07b, 0x116d: 0xb07b, 0x116e: 0xb07b, 0x116f: 0xb07b,
- 0x1170: 0xb07c, 0x1171: 0xb07c, 0x1172: 0xb07c, 0x1173: 0xb07c, 0x1174: 0xb07c, 0x1175: 0xb07c,
- 0x1176: 0xb07c, 0x1177: 0xb07c, 0x1178: 0xb07c, 0x1179: 0xb07c, 0x117a: 0xb07c, 0x117b: 0xb07c,
- 0x117c: 0xb07c, 0x117d: 0xb07c, 0x117e: 0xb07c,
- // Block 0x46, offset 0x1180
- 0x1182: 0xb07d, 0x1183: 0xb07e, 0x1184: 0xb07f, 0x1185: 0xb080,
- 0x1186: 0xb07f, 0x1187: 0xb07e, 0x118a: 0xb081, 0x118b: 0xb082,
- 0x118c: 0xb083, 0x118d: 0xb07f, 0x118e: 0xb080, 0x118f: 0xb07f,
- 0x1192: 0xb084, 0x1193: 0xb085, 0x1194: 0xb084, 0x1195: 0xb086, 0x1196: 0xb084, 0x1197: 0xb087,
- 0x119a: 0xb088, 0x119b: 0xb089, 0x119c: 0xb08a,
- 0x11a0: 0x908b, 0x11a1: 0x908b, 0x11a2: 0x908c, 0x11a3: 0x908d,
- 0x11a4: 0x908b, 0x11a5: 0x908e, 0x11a6: 0x908f, 0x11a8: 0xb090, 0x11a9: 0xb091,
- 0x11aa: 0xb092, 0x11ab: 0xb091, 0x11ac: 0xb093, 0x11ad: 0xb094, 0x11ae: 0xb095,
- 0x11bd: 0x2000,
- // Block 0x47, offset 0x11c0
- 0x11e0: 0x4000, 0x11e1: 0x4000,
- // Block 0x48, offset 0x1200
- 0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000,
- 0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000,
- 0x120c: 0x4000, 0x120d: 0x4000, 0x120e: 0x4000, 0x120f: 0x4000, 0x1210: 0x4000, 0x1211: 0x4000,
- 0x1212: 0x4000, 0x1213: 0x4000, 0x1214: 0x4000, 0x1215: 0x4000, 0x1216: 0x4000, 0x1217: 0x4000,
- 0x1218: 0x4000, 0x1219: 0x4000, 0x121a: 0x4000, 0x121b: 0x4000, 0x121c: 0x4000, 0x121d: 0x4000,
- 0x121e: 0x4000, 0x121f: 0x4000, 0x1220: 0x4000, 0x1221: 0x4000, 0x1222: 0x4000, 0x1223: 0x4000,
- 0x1224: 0x4000, 0x1225: 0x4000, 0x1226: 0x4000, 0x1227: 0x4000, 0x1228: 0x4000, 0x1229: 0x4000,
- 0x122a: 0x4000, 0x122b: 0x4000, 0x122c: 0x4000,
- // Block 0x49, offset 0x1240
- 0x1240: 0x4000, 0x1241: 0x4000, 0x1242: 0x4000, 0x1243: 0x4000, 0x1244: 0x4000, 0x1245: 0x4000,
- 0x1246: 0x4000, 0x1247: 0x4000, 0x1248: 0x4000, 0x1249: 0x4000, 0x124a: 0x4000, 0x124b: 0x4000,
- 0x124c: 0x4000, 0x124d: 0x4000, 0x124e: 0x4000, 0x124f: 0x4000, 0x1250: 0x4000, 0x1251: 0x4000,
- 0x1252: 0x4000, 0x1253: 0x4000, 0x1254: 0x4000, 0x1255: 0x4000, 0x1256: 0x4000, 0x1257: 0x4000,
- 0x1258: 0x4000, 0x1259: 0x4000, 0x125a: 0x4000, 0x125b: 0x4000, 0x125c: 0x4000, 0x125d: 0x4000,
- 0x125e: 0x4000, 0x125f: 0x4000, 0x1260: 0x4000, 0x1261: 0x4000, 0x1262: 0x4000, 0x1263: 0x4000,
- 0x1264: 0x4000, 0x1265: 0x4000, 0x1266: 0x4000, 0x1267: 0x4000, 0x1268: 0x4000, 0x1269: 0x4000,
- 0x126a: 0x4000, 0x126b: 0x4000, 0x126c: 0x4000, 0x126d: 0x4000, 0x126e: 0x4000, 0x126f: 0x4000,
- 0x1270: 0x4000, 0x1271: 0x4000, 0x1272: 0x4000,
- // Block 0x4a, offset 0x1280
- 0x1280: 0x4000, 0x1281: 0x4000, 0x1282: 0x4000, 0x1283: 0x4000, 0x1284: 0x4000, 0x1285: 0x4000,
- 0x1286: 0x4000, 0x1287: 0x4000, 0x1288: 0x4000, 0x1289: 0x4000, 0x128a: 0x4000, 0x128b: 0x4000,
- 0x128c: 0x4000, 0x128d: 0x4000, 0x128e: 0x4000, 0x128f: 0x4000, 0x1290: 0x4000, 0x1291: 0x4000,
- 0x1292: 0x4000, 0x1293: 0x4000, 0x1294: 0x4000, 0x1295: 0x4000, 0x1296: 0x4000, 0x1297: 0x4000,
- 0x1298: 0x4000, 0x1299: 0x4000, 0x129a: 0x4000, 0x129b: 0x4000, 0x129c: 0x4000, 0x129d: 0x4000,
- 0x129e: 0x4000,
- // Block 0x4b, offset 0x12c0
- 0x12f0: 0x4000, 0x12f1: 0x4000, 0x12f2: 0x4000, 0x12f3: 0x4000, 0x12f4: 0x4000, 0x12f5: 0x4000,
- 0x12f6: 0x4000, 0x12f7: 0x4000, 0x12f8: 0x4000, 0x12f9: 0x4000, 0x12fa: 0x4000, 0x12fb: 0x4000,
- 0x12fc: 0x4000, 0x12fd: 0x4000, 0x12fe: 0x4000, 0x12ff: 0x4000,
- // Block 0x4c, offset 0x1300
- 0x1300: 0x4000, 0x1301: 0x4000, 0x1302: 0x4000, 0x1303: 0x4000, 0x1304: 0x4000, 0x1305: 0x4000,
- 0x1306: 0x4000, 0x1307: 0x4000, 0x1308: 0x4000, 0x1309: 0x4000, 0x130a: 0x4000, 0x130b: 0x4000,
- 0x130c: 0x4000, 0x130d: 0x4000, 0x130e: 0x4000, 0x130f: 0x4000, 0x1310: 0x4000, 0x1311: 0x4000,
- 0x1312: 0x4000, 0x1313: 0x4000, 0x1314: 0x4000, 0x1315: 0x4000, 0x1316: 0x4000, 0x1317: 0x4000,
- 0x1318: 0x4000, 0x1319: 0x4000, 0x131a: 0x4000, 0x131b: 0x4000, 0x131c: 0x4000, 0x131d: 0x4000,
- 0x131e: 0x4000, 0x131f: 0x4000, 0x1320: 0x4000, 0x1321: 0x4000, 0x1322: 0x4000, 0x1323: 0x4000,
- 0x1324: 0x4000, 0x1325: 0x4000, 0x1326: 0x4000, 0x1327: 0x4000, 0x1328: 0x4000, 0x1329: 0x4000,
- 0x132a: 0x4000, 0x132b: 0x4000, 0x132c: 0x4000, 0x132d: 0x4000, 0x132e: 0x4000, 0x132f: 0x4000,
- 0x1330: 0x4000, 0x1331: 0x4000, 0x1332: 0x4000, 0x1333: 0x4000, 0x1334: 0x4000, 0x1335: 0x4000,
- 0x1336: 0x4000, 0x1337: 0x4000, 0x1338: 0x4000, 0x1339: 0x4000, 0x133a: 0x4000, 0x133b: 0x4000,
- // Block 0x4d, offset 0x1340
- 0x1344: 0x4000,
- // Block 0x4e, offset 0x1380
- 0x138f: 0x4000,
- // Block 0x4f, offset 0x13c0
- 0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000,
- 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000,
- 0x13d0: 0x2000, 0x13d1: 0x2000,
- 0x13d2: 0x2000, 0x13d3: 0x2000, 0x13d4: 0x2000, 0x13d5: 0x2000, 0x13d6: 0x2000, 0x13d7: 0x2000,
- 0x13d8: 0x2000, 0x13d9: 0x2000, 0x13da: 0x2000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000,
- 0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000,
- 0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000,
- 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000, 0x13ed: 0x2000,
- 0x13f0: 0x2000, 0x13f1: 0x2000, 0x13f2: 0x2000, 0x13f3: 0x2000, 0x13f4: 0x2000, 0x13f5: 0x2000,
- 0x13f6: 0x2000, 0x13f7: 0x2000, 0x13f8: 0x2000, 0x13f9: 0x2000, 0x13fa: 0x2000, 0x13fb: 0x2000,
- 0x13fc: 0x2000, 0x13fd: 0x2000, 0x13fe: 0x2000, 0x13ff: 0x2000,
- // Block 0x50, offset 0x1400
- 0x1400: 0x2000, 0x1401: 0x2000, 0x1402: 0x2000, 0x1403: 0x2000, 0x1404: 0x2000, 0x1405: 0x2000,
- 0x1406: 0x2000, 0x1407: 0x2000, 0x1408: 0x2000, 0x1409: 0x2000, 0x140a: 0x2000, 0x140b: 0x2000,
- 0x140c: 0x2000, 0x140d: 0x2000, 0x140e: 0x2000, 0x140f: 0x2000, 0x1410: 0x2000, 0x1411: 0x2000,
- 0x1412: 0x2000, 0x1413: 0x2000, 0x1414: 0x2000, 0x1415: 0x2000, 0x1416: 0x2000, 0x1417: 0x2000,
- 0x1418: 0x2000, 0x1419: 0x2000, 0x141a: 0x2000, 0x141b: 0x2000, 0x141c: 0x2000, 0x141d: 0x2000,
- 0x141e: 0x2000, 0x141f: 0x2000, 0x1420: 0x2000, 0x1421: 0x2000, 0x1422: 0x2000, 0x1423: 0x2000,
- 0x1424: 0x2000, 0x1425: 0x2000, 0x1426: 0x2000, 0x1427: 0x2000, 0x1428: 0x2000, 0x1429: 0x2000,
- 0x1430: 0x2000, 0x1431: 0x2000, 0x1432: 0x2000, 0x1433: 0x2000, 0x1434: 0x2000, 0x1435: 0x2000,
- 0x1436: 0x2000, 0x1437: 0x2000, 0x1438: 0x2000, 0x1439: 0x2000, 0x143a: 0x2000, 0x143b: 0x2000,
- 0x143c: 0x2000, 0x143d: 0x2000, 0x143e: 0x2000, 0x143f: 0x2000,
- // Block 0x51, offset 0x1440
- 0x1440: 0x2000, 0x1441: 0x2000, 0x1442: 0x2000, 0x1443: 0x2000, 0x1444: 0x2000, 0x1445: 0x2000,
- 0x1446: 0x2000, 0x1447: 0x2000, 0x1448: 0x2000, 0x1449: 0x2000, 0x144a: 0x2000, 0x144b: 0x2000,
- 0x144c: 0x2000, 0x144d: 0x2000, 0x144e: 0x4000, 0x144f: 0x2000, 0x1450: 0x2000, 0x1451: 0x4000,
- 0x1452: 0x4000, 0x1453: 0x4000, 0x1454: 0x4000, 0x1455: 0x4000, 0x1456: 0x4000, 0x1457: 0x4000,
- 0x1458: 0x4000, 0x1459: 0x4000, 0x145a: 0x4000, 0x145b: 0x2000, 0x145c: 0x2000, 0x145d: 0x2000,
- 0x145e: 0x2000, 0x145f: 0x2000, 0x1460: 0x2000, 0x1461: 0x2000, 0x1462: 0x2000, 0x1463: 0x2000,
- 0x1464: 0x2000, 0x1465: 0x2000, 0x1466: 0x2000, 0x1467: 0x2000, 0x1468: 0x2000, 0x1469: 0x2000,
- 0x146a: 0x2000, 0x146b: 0x2000, 0x146c: 0x2000,
- // Block 0x52, offset 0x1480
- 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000,
- 0x1490: 0x4000, 0x1491: 0x4000,
- 0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000,
- 0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000,
- 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000, 0x14a1: 0x4000, 0x14a2: 0x4000, 0x14a3: 0x4000,
- 0x14a4: 0x4000, 0x14a5: 0x4000, 0x14a6: 0x4000, 0x14a7: 0x4000, 0x14a8: 0x4000, 0x14a9: 0x4000,
- 0x14aa: 0x4000, 0x14ab: 0x4000, 0x14ac: 0x4000, 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000,
- 0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000,
- 0x14b6: 0x4000, 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000,
- // Block 0x53, offset 0x14c0
- 0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000,
- 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000,
- 0x14d0: 0x4000, 0x14d1: 0x4000,
- 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000,
- 0x14e4: 0x4000, 0x14e5: 0x4000,
- // Block 0x54, offset 0x1500
- 0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000,
- 0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000,
- 0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000,
- 0x1512: 0x4000, 0x1513: 0x4000, 0x1514: 0x4000, 0x1515: 0x4000, 0x1516: 0x4000, 0x1517: 0x4000,
- 0x1518: 0x4000, 0x1519: 0x4000, 0x151a: 0x4000, 0x151b: 0x4000, 0x151c: 0x4000, 0x151d: 0x4000,
- 0x151e: 0x4000, 0x151f: 0x4000, 0x1520: 0x4000,
- 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000,
- 0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000,
- 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000,
- 0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000,
- // Block 0x55, offset 0x1540
- 0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000,
- 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000, 0x154b: 0x4000,
- 0x154c: 0x4000, 0x154d: 0x4000, 0x154e: 0x4000, 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000,
- 0x1552: 0x4000, 0x1553: 0x4000, 0x1554: 0x4000, 0x1555: 0x4000, 0x1556: 0x4000, 0x1557: 0x4000,
- 0x1558: 0x4000, 0x1559: 0x4000, 0x155a: 0x4000, 0x155b: 0x4000, 0x155c: 0x4000, 0x155d: 0x4000,
- 0x155e: 0x4000, 0x155f: 0x4000, 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000,
- 0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000,
- 0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000,
- 0x1570: 0x4000, 0x1571: 0x4000, 0x1572: 0x4000, 0x1573: 0x4000, 0x1574: 0x4000, 0x1575: 0x4000,
- 0x1576: 0x4000, 0x1577: 0x4000, 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000,
- 0x157c: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000,
- // Block 0x56, offset 0x1580
- 0x1580: 0x4000, 0x1581: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000,
- 0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000,
- 0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000,
- 0x1592: 0x4000, 0x1593: 0x4000,
- 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000,
- 0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000,
- 0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000,
- 0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000,
- 0x15b6: 0x4000, 0x15b7: 0x4000, 0x15b8: 0x4000, 0x15b9: 0x4000, 0x15ba: 0x4000, 0x15bb: 0x4000,
- 0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000,
- // Block 0x57, offset 0x15c0
- 0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000,
- 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000,
- 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000,
- 0x15d2: 0x4000, 0x15d3: 0x4000,
- 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000,
- 0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000,
- 0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000,
- 0x15f0: 0x4000, 0x15f4: 0x4000,
- 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000,
- 0x15fc: 0x4000, 0x15fd: 0x4000, 0x15fe: 0x4000, 0x15ff: 0x4000,
- // Block 0x58, offset 0x1600
- 0x1600: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000,
- 0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000,
- 0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000,
- 0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000,
- 0x1618: 0x4000, 0x1619: 0x4000, 0x161a: 0x4000, 0x161b: 0x4000, 0x161c: 0x4000, 0x161d: 0x4000,
- 0x161e: 0x4000, 0x161f: 0x4000, 0x1620: 0x4000, 0x1621: 0x4000, 0x1622: 0x4000, 0x1623: 0x4000,
- 0x1624: 0x4000, 0x1625: 0x4000, 0x1626: 0x4000, 0x1627: 0x4000, 0x1628: 0x4000, 0x1629: 0x4000,
- 0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000,
- 0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000,
- 0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000,
- 0x163c: 0x4000, 0x163d: 0x4000, 0x163e: 0x4000, 0x163f: 0x4000,
- // Block 0x59, offset 0x1640
- 0x1640: 0x4000, 0x1641: 0x4000, 0x1642: 0x4000, 0x1643: 0x4000, 0x1644: 0x4000, 0x1645: 0x4000,
- 0x1646: 0x4000, 0x1647: 0x4000, 0x1648: 0x4000, 0x1649: 0x4000, 0x164a: 0x4000, 0x164b: 0x4000,
- 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x164f: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000,
- 0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000,
- 0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000,
- 0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000,
- 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000, 0x1668: 0x4000, 0x1669: 0x4000,
- 0x166a: 0x4000, 0x166b: 0x4000, 0x166c: 0x4000, 0x166d: 0x4000, 0x166e: 0x4000, 0x166f: 0x4000,
- 0x1670: 0x4000, 0x1671: 0x4000, 0x1672: 0x4000, 0x1673: 0x4000, 0x1674: 0x4000, 0x1675: 0x4000,
- 0x1676: 0x4000, 0x1677: 0x4000, 0x1678: 0x4000, 0x1679: 0x4000, 0x167a: 0x4000, 0x167b: 0x4000,
- 0x167c: 0x4000, 0x167f: 0x4000,
- // Block 0x5a, offset 0x1680
- 0x1680: 0x4000, 0x1681: 0x4000, 0x1682: 0x4000, 0x1683: 0x4000, 0x1684: 0x4000, 0x1685: 0x4000,
- 0x1686: 0x4000, 0x1687: 0x4000, 0x1688: 0x4000, 0x1689: 0x4000, 0x168a: 0x4000, 0x168b: 0x4000,
- 0x168c: 0x4000, 0x168d: 0x4000, 0x168e: 0x4000, 0x168f: 0x4000, 0x1690: 0x4000, 0x1691: 0x4000,
- 0x1692: 0x4000, 0x1693: 0x4000, 0x1694: 0x4000, 0x1695: 0x4000, 0x1696: 0x4000, 0x1697: 0x4000,
- 0x1698: 0x4000, 0x1699: 0x4000, 0x169a: 0x4000, 0x169b: 0x4000, 0x169c: 0x4000, 0x169d: 0x4000,
- 0x169e: 0x4000, 0x169f: 0x4000, 0x16a0: 0x4000, 0x16a1: 0x4000, 0x16a2: 0x4000, 0x16a3: 0x4000,
- 0x16a4: 0x4000, 0x16a5: 0x4000, 0x16a6: 0x4000, 0x16a7: 0x4000, 0x16a8: 0x4000, 0x16a9: 0x4000,
- 0x16aa: 0x4000, 0x16ab: 0x4000, 0x16ac: 0x4000, 0x16ad: 0x4000, 0x16ae: 0x4000, 0x16af: 0x4000,
- 0x16b0: 0x4000, 0x16b1: 0x4000, 0x16b2: 0x4000, 0x16b3: 0x4000, 0x16b4: 0x4000, 0x16b5: 0x4000,
- 0x16b6: 0x4000, 0x16b7: 0x4000, 0x16b8: 0x4000, 0x16b9: 0x4000, 0x16ba: 0x4000, 0x16bb: 0x4000,
- 0x16bc: 0x4000, 0x16bd: 0x4000,
- // Block 0x5b, offset 0x16c0
- 0x16cb: 0x4000,
- 0x16cc: 0x4000, 0x16cd: 0x4000, 0x16ce: 0x4000, 0x16d0: 0x4000, 0x16d1: 0x4000,
- 0x16d2: 0x4000, 0x16d3: 0x4000, 0x16d4: 0x4000, 0x16d5: 0x4000, 0x16d6: 0x4000, 0x16d7: 0x4000,
- 0x16d8: 0x4000, 0x16d9: 0x4000, 0x16da: 0x4000, 0x16db: 0x4000, 0x16dc: 0x4000, 0x16dd: 0x4000,
- 0x16de: 0x4000, 0x16df: 0x4000, 0x16e0: 0x4000, 0x16e1: 0x4000, 0x16e2: 0x4000, 0x16e3: 0x4000,
- 0x16e4: 0x4000, 0x16e5: 0x4000, 0x16e6: 0x4000, 0x16e7: 0x4000,
- 0x16fa: 0x4000,
- // Block 0x5c, offset 0x1700
- 0x1715: 0x4000, 0x1716: 0x4000,
- 0x1724: 0x4000,
- // Block 0x5d, offset 0x1740
- 0x177b: 0x4000,
- 0x177c: 0x4000, 0x177d: 0x4000, 0x177e: 0x4000, 0x177f: 0x4000,
- // Block 0x5e, offset 0x1780
- 0x1780: 0x4000, 0x1781: 0x4000, 0x1782: 0x4000, 0x1783: 0x4000, 0x1784: 0x4000, 0x1785: 0x4000,
- 0x1786: 0x4000, 0x1787: 0x4000, 0x1788: 0x4000, 0x1789: 0x4000, 0x178a: 0x4000, 0x178b: 0x4000,
- 0x178c: 0x4000, 0x178d: 0x4000, 0x178e: 0x4000, 0x178f: 0x4000,
- // Block 0x5f, offset 0x17c0
- 0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000,
- 0x17cc: 0x4000, 0x17d0: 0x4000, 0x17d1: 0x4000,
- 0x17d2: 0x4000,
- 0x17eb: 0x4000, 0x17ec: 0x4000,
- 0x17f4: 0x4000, 0x17f5: 0x4000,
- 0x17f6: 0x4000, 0x17f7: 0x4000, 0x17f8: 0x4000,
- // Block 0x60, offset 0x1800
- 0x1810: 0x4000, 0x1811: 0x4000,
- 0x1812: 0x4000, 0x1813: 0x4000, 0x1814: 0x4000, 0x1815: 0x4000, 0x1816: 0x4000, 0x1817: 0x4000,
- 0x1818: 0x4000, 0x1819: 0x4000, 0x181a: 0x4000, 0x181b: 0x4000, 0x181c: 0x4000, 0x181d: 0x4000,
- 0x181e: 0x4000, 0x181f: 0x4000, 0x1820: 0x4000, 0x1821: 0x4000, 0x1822: 0x4000, 0x1823: 0x4000,
- 0x1824: 0x4000, 0x1825: 0x4000, 0x1826: 0x4000, 0x1827: 0x4000, 0x1828: 0x4000, 0x1829: 0x4000,
- 0x182a: 0x4000, 0x182b: 0x4000, 0x182c: 0x4000, 0x182d: 0x4000, 0x182e: 0x4000, 0x182f: 0x4000,
- 0x1830: 0x4000, 0x1831: 0x4000, 0x1832: 0x4000, 0x1833: 0x4000, 0x1834: 0x4000, 0x1835: 0x4000,
- 0x1836: 0x4000, 0x1837: 0x4000, 0x1838: 0x4000, 0x1839: 0x4000, 0x183a: 0x4000, 0x183b: 0x4000,
- 0x183c: 0x4000, 0x183d: 0x4000, 0x183e: 0x4000,
- // Block 0x61, offset 0x1840
- 0x1840: 0x4000, 0x1841: 0x4000, 0x1842: 0x4000, 0x1843: 0x4000, 0x1844: 0x4000, 0x1845: 0x4000,
- 0x1846: 0x4000, 0x1847: 0x4000, 0x1848: 0x4000, 0x1849: 0x4000, 0x184a: 0x4000, 0x184b: 0x4000,
- 0x184c: 0x4000, 0x1850: 0x4000, 0x1851: 0x4000,
- 0x1852: 0x4000, 0x1853: 0x4000, 0x1854: 0x4000, 0x1855: 0x4000, 0x1856: 0x4000, 0x1857: 0x4000,
- 0x1858: 0x4000, 0x1859: 0x4000, 0x185a: 0x4000, 0x185b: 0x4000, 0x185c: 0x4000, 0x185d: 0x4000,
- 0x185e: 0x4000, 0x185f: 0x4000, 0x1860: 0x4000, 0x1861: 0x4000, 0x1862: 0x4000, 0x1863: 0x4000,
- 0x1864: 0x4000, 0x1865: 0x4000, 0x1866: 0x4000, 0x1867: 0x4000, 0x1868: 0x4000, 0x1869: 0x4000,
- 0x186a: 0x4000, 0x186b: 0x4000,
- // Block 0x62, offset 0x1880
- 0x1880: 0x4000, 0x1881: 0x4000, 0x1882: 0x4000, 0x1883: 0x4000, 0x1884: 0x4000, 0x1885: 0x4000,
- 0x1886: 0x4000, 0x1887: 0x4000, 0x1888: 0x4000, 0x1889: 0x4000, 0x188a: 0x4000, 0x188b: 0x4000,
- 0x188c: 0x4000, 0x188d: 0x4000, 0x188e: 0x4000, 0x188f: 0x4000, 0x1890: 0x4000, 0x1891: 0x4000,
- 0x1892: 0x4000, 0x1893: 0x4000, 0x1894: 0x4000, 0x1895: 0x4000, 0x1896: 0x4000, 0x1897: 0x4000,
- // Block 0x63, offset 0x18c0
- 0x18c0: 0x4000,
- 0x18d0: 0x4000, 0x18d1: 0x4000,
- 0x18d2: 0x4000, 0x18d3: 0x4000, 0x18d4: 0x4000, 0x18d5: 0x4000, 0x18d6: 0x4000, 0x18d7: 0x4000,
- 0x18d8: 0x4000, 0x18d9: 0x4000, 0x18da: 0x4000, 0x18db: 0x4000, 0x18dc: 0x4000, 0x18dd: 0x4000,
- 0x18de: 0x4000, 0x18df: 0x4000, 0x18e0: 0x4000, 0x18e1: 0x4000, 0x18e2: 0x4000, 0x18e3: 0x4000,
- 0x18e4: 0x4000, 0x18e5: 0x4000, 0x18e6: 0x4000,
- // Block 0x64, offset 0x1900
- 0x1900: 0x2000, 0x1901: 0x2000, 0x1902: 0x2000, 0x1903: 0x2000, 0x1904: 0x2000, 0x1905: 0x2000,
- 0x1906: 0x2000, 0x1907: 0x2000, 0x1908: 0x2000, 0x1909: 0x2000, 0x190a: 0x2000, 0x190b: 0x2000,
- 0x190c: 0x2000, 0x190d: 0x2000, 0x190e: 0x2000, 0x190f: 0x2000, 0x1910: 0x2000, 0x1911: 0x2000,
- 0x1912: 0x2000, 0x1913: 0x2000, 0x1914: 0x2000, 0x1915: 0x2000, 0x1916: 0x2000, 0x1917: 0x2000,
- 0x1918: 0x2000, 0x1919: 0x2000, 0x191a: 0x2000, 0x191b: 0x2000, 0x191c: 0x2000, 0x191d: 0x2000,
- 0x191e: 0x2000, 0x191f: 0x2000, 0x1920: 0x2000, 0x1921: 0x2000, 0x1922: 0x2000, 0x1923: 0x2000,
- 0x1924: 0x2000, 0x1925: 0x2000, 0x1926: 0x2000, 0x1927: 0x2000, 0x1928: 0x2000, 0x1929: 0x2000,
- 0x192a: 0x2000, 0x192b: 0x2000, 0x192c: 0x2000, 0x192d: 0x2000, 0x192e: 0x2000, 0x192f: 0x2000,
- 0x1930: 0x2000, 0x1931: 0x2000, 0x1932: 0x2000, 0x1933: 0x2000, 0x1934: 0x2000, 0x1935: 0x2000,
- 0x1936: 0x2000, 0x1937: 0x2000, 0x1938: 0x2000, 0x1939: 0x2000, 0x193a: 0x2000, 0x193b: 0x2000,
- 0x193c: 0x2000, 0x193d: 0x2000,
-}
-
-// widthIndex: 22 blocks, 1408 entries, 1408 bytes
-// Block 0 is the zero block.
-var widthIndex = [1408]uint8{
- // Block 0x0, offset 0x0
- // Block 0x1, offset 0x40
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc7: 0x05,
- 0xc9: 0x06, 0xcb: 0x07, 0xcc: 0x08, 0xcd: 0x09, 0xce: 0x0a, 0xcf: 0x0b,
- 0xd0: 0x0c, 0xd1: 0x0d,
- 0xe1: 0x02, 0xe2: 0x03, 0xe3: 0x04, 0xe4: 0x05, 0xe5: 0x06, 0xe6: 0x06, 0xe7: 0x06,
- 0xe8: 0x06, 0xe9: 0x06, 0xea: 0x07, 0xeb: 0x06, 0xec: 0x06, 0xed: 0x08, 0xee: 0x09, 0xef: 0x0a,
- 0xf0: 0x0f, 0xf3: 0x12, 0xf4: 0x13,
- // Block 0x4, offset 0x100
- 0x104: 0x0e, 0x105: 0x0f,
- // Block 0x5, offset 0x140
- 0x140: 0x10, 0x141: 0x11, 0x142: 0x12, 0x144: 0x13, 0x145: 0x14, 0x146: 0x15, 0x147: 0x16,
- 0x148: 0x17, 0x149: 0x18, 0x14a: 0x19, 0x14c: 0x1a, 0x14f: 0x1b,
- 0x151: 0x1c, 0x152: 0x08, 0x153: 0x1d, 0x154: 0x1e, 0x155: 0x1f, 0x156: 0x20, 0x157: 0x21,
- 0x158: 0x22, 0x159: 0x23, 0x15a: 0x24, 0x15b: 0x25, 0x15c: 0x26, 0x15d: 0x27, 0x15e: 0x28, 0x15f: 0x29,
- 0x166: 0x2a,
- 0x16c: 0x2b, 0x16d: 0x2c,
- 0x17a: 0x2d, 0x17b: 0x2e, 0x17c: 0x0e, 0x17d: 0x0e, 0x17e: 0x0e, 0x17f: 0x2f,
- // Block 0x6, offset 0x180
- 0x180: 0x30, 0x181: 0x31, 0x182: 0x32, 0x183: 0x33, 0x184: 0x34, 0x185: 0x35, 0x186: 0x36, 0x187: 0x37,
- 0x188: 0x38, 0x189: 0x39, 0x18a: 0x0e, 0x18b: 0x3a, 0x18c: 0x0e, 0x18d: 0x0e, 0x18e: 0x0e, 0x18f: 0x0e,
- 0x190: 0x0e, 0x191: 0x0e, 0x192: 0x0e, 0x193: 0x0e, 0x194: 0x0e, 0x195: 0x0e, 0x196: 0x0e, 0x197: 0x0e,
- 0x198: 0x0e, 0x199: 0x0e, 0x19a: 0x0e, 0x19b: 0x0e, 0x19c: 0x0e, 0x19d: 0x0e, 0x19e: 0x0e, 0x19f: 0x0e,
- 0x1a0: 0x0e, 0x1a1: 0x0e, 0x1a2: 0x0e, 0x1a3: 0x0e, 0x1a4: 0x0e, 0x1a5: 0x0e, 0x1a6: 0x0e, 0x1a7: 0x0e,
- 0x1a8: 0x0e, 0x1a9: 0x0e, 0x1aa: 0x0e, 0x1ab: 0x0e, 0x1ac: 0x0e, 0x1ad: 0x0e, 0x1ae: 0x0e, 0x1af: 0x0e,
- 0x1b0: 0x0e, 0x1b1: 0x0e, 0x1b2: 0x0e, 0x1b3: 0x0e, 0x1b4: 0x0e, 0x1b5: 0x0e, 0x1b6: 0x0e, 0x1b7: 0x0e,
- 0x1b8: 0x0e, 0x1b9: 0x0e, 0x1ba: 0x0e, 0x1bb: 0x0e, 0x1bc: 0x0e, 0x1bd: 0x0e, 0x1be: 0x0e, 0x1bf: 0x0e,
- // Block 0x7, offset 0x1c0
- 0x1c0: 0x0e, 0x1c1: 0x0e, 0x1c2: 0x0e, 0x1c3: 0x0e, 0x1c4: 0x0e, 0x1c5: 0x0e, 0x1c6: 0x0e, 0x1c7: 0x0e,
- 0x1c8: 0x0e, 0x1c9: 0x0e, 0x1ca: 0x0e, 0x1cb: 0x0e, 0x1cc: 0x0e, 0x1cd: 0x0e, 0x1ce: 0x0e, 0x1cf: 0x0e,
- 0x1d0: 0x0e, 0x1d1: 0x0e, 0x1d2: 0x0e, 0x1d3: 0x0e, 0x1d4: 0x0e, 0x1d5: 0x0e, 0x1d6: 0x0e, 0x1d7: 0x0e,
- 0x1d8: 0x0e, 0x1d9: 0x0e, 0x1da: 0x0e, 0x1db: 0x0e, 0x1dc: 0x0e, 0x1dd: 0x0e, 0x1de: 0x0e, 0x1df: 0x0e,
- 0x1e0: 0x0e, 0x1e1: 0x0e, 0x1e2: 0x0e, 0x1e3: 0x0e, 0x1e4: 0x0e, 0x1e5: 0x0e, 0x1e6: 0x0e, 0x1e7: 0x0e,
- 0x1e8: 0x0e, 0x1e9: 0x0e, 0x1ea: 0x0e, 0x1eb: 0x0e, 0x1ec: 0x0e, 0x1ed: 0x0e, 0x1ee: 0x0e, 0x1ef: 0x0e,
- 0x1f0: 0x0e, 0x1f1: 0x0e, 0x1f2: 0x0e, 0x1f3: 0x0e, 0x1f4: 0x0e, 0x1f5: 0x0e, 0x1f6: 0x0e,
- 0x1f8: 0x0e, 0x1f9: 0x0e, 0x1fa: 0x0e, 0x1fb: 0x0e, 0x1fc: 0x0e, 0x1fd: 0x0e, 0x1fe: 0x0e, 0x1ff: 0x0e,
- // Block 0x8, offset 0x200
- 0x200: 0x0e, 0x201: 0x0e, 0x202: 0x0e, 0x203: 0x0e, 0x204: 0x0e, 0x205: 0x0e, 0x206: 0x0e, 0x207: 0x0e,
- 0x208: 0x0e, 0x209: 0x0e, 0x20a: 0x0e, 0x20b: 0x0e, 0x20c: 0x0e, 0x20d: 0x0e, 0x20e: 0x0e, 0x20f: 0x0e,
- 0x210: 0x0e, 0x211: 0x0e, 0x212: 0x0e, 0x213: 0x0e, 0x214: 0x0e, 0x215: 0x0e, 0x216: 0x0e, 0x217: 0x0e,
- 0x218: 0x0e, 0x219: 0x0e, 0x21a: 0x0e, 0x21b: 0x0e, 0x21c: 0x0e, 0x21d: 0x0e, 0x21e: 0x0e, 0x21f: 0x0e,
- 0x220: 0x0e, 0x221: 0x0e, 0x222: 0x0e, 0x223: 0x0e, 0x224: 0x0e, 0x225: 0x0e, 0x226: 0x0e, 0x227: 0x0e,
- 0x228: 0x0e, 0x229: 0x0e, 0x22a: 0x0e, 0x22b: 0x0e, 0x22c: 0x0e, 0x22d: 0x0e, 0x22e: 0x0e, 0x22f: 0x0e,
- 0x230: 0x0e, 0x231: 0x0e, 0x232: 0x0e, 0x233: 0x0e, 0x234: 0x0e, 0x235: 0x0e, 0x236: 0x0e, 0x237: 0x0e,
- 0x238: 0x0e, 0x239: 0x0e, 0x23a: 0x0e, 0x23b: 0x0e, 0x23c: 0x0e, 0x23d: 0x0e, 0x23e: 0x0e, 0x23f: 0x0e,
- // Block 0x9, offset 0x240
- 0x240: 0x0e, 0x241: 0x0e, 0x242: 0x0e, 0x243: 0x0e, 0x244: 0x0e, 0x245: 0x0e, 0x246: 0x0e, 0x247: 0x0e,
- 0x248: 0x0e, 0x249: 0x0e, 0x24a: 0x0e, 0x24b: 0x0e, 0x24c: 0x0e, 0x24d: 0x0e, 0x24e: 0x0e, 0x24f: 0x0e,
- 0x250: 0x0e, 0x251: 0x0e, 0x252: 0x3b, 0x253: 0x3c,
- 0x265: 0x3d,
- 0x270: 0x0e, 0x271: 0x0e, 0x272: 0x0e, 0x273: 0x0e, 0x274: 0x0e, 0x275: 0x0e, 0x276: 0x0e, 0x277: 0x0e,
- 0x278: 0x0e, 0x279: 0x0e, 0x27a: 0x0e, 0x27b: 0x0e, 0x27c: 0x0e, 0x27d: 0x0e, 0x27e: 0x0e, 0x27f: 0x0e,
- // Block 0xa, offset 0x280
- 0x280: 0x0e, 0x281: 0x0e, 0x282: 0x0e, 0x283: 0x0e, 0x284: 0x0e, 0x285: 0x0e, 0x286: 0x0e, 0x287: 0x0e,
- 0x288: 0x0e, 0x289: 0x0e, 0x28a: 0x0e, 0x28b: 0x0e, 0x28c: 0x0e, 0x28d: 0x0e, 0x28e: 0x0e, 0x28f: 0x0e,
- 0x290: 0x0e, 0x291: 0x0e, 0x292: 0x0e, 0x293: 0x0e, 0x294: 0x0e, 0x295: 0x0e, 0x296: 0x0e, 0x297: 0x0e,
- 0x298: 0x0e, 0x299: 0x0e, 0x29a: 0x0e, 0x29b: 0x0e, 0x29c: 0x0e, 0x29d: 0x0e, 0x29e: 0x3e,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x08, 0x2c1: 0x08, 0x2c2: 0x08, 0x2c3: 0x08, 0x2c4: 0x08, 0x2c5: 0x08, 0x2c6: 0x08, 0x2c7: 0x08,
- 0x2c8: 0x08, 0x2c9: 0x08, 0x2ca: 0x08, 0x2cb: 0x08, 0x2cc: 0x08, 0x2cd: 0x08, 0x2ce: 0x08, 0x2cf: 0x08,
- 0x2d0: 0x08, 0x2d1: 0x08, 0x2d2: 0x08, 0x2d3: 0x08, 0x2d4: 0x08, 0x2d5: 0x08, 0x2d6: 0x08, 0x2d7: 0x08,
- 0x2d8: 0x08, 0x2d9: 0x08, 0x2da: 0x08, 0x2db: 0x08, 0x2dc: 0x08, 0x2dd: 0x08, 0x2de: 0x08, 0x2df: 0x08,
- 0x2e0: 0x08, 0x2e1: 0x08, 0x2e2: 0x08, 0x2e3: 0x08, 0x2e4: 0x08, 0x2e5: 0x08, 0x2e6: 0x08, 0x2e7: 0x08,
- 0x2e8: 0x08, 0x2e9: 0x08, 0x2ea: 0x08, 0x2eb: 0x08, 0x2ec: 0x08, 0x2ed: 0x08, 0x2ee: 0x08, 0x2ef: 0x08,
- 0x2f0: 0x08, 0x2f1: 0x08, 0x2f2: 0x08, 0x2f3: 0x08, 0x2f4: 0x08, 0x2f5: 0x08, 0x2f6: 0x08, 0x2f7: 0x08,
- 0x2f8: 0x08, 0x2f9: 0x08, 0x2fa: 0x08, 0x2fb: 0x08, 0x2fc: 0x08, 0x2fd: 0x08, 0x2fe: 0x08, 0x2ff: 0x08,
- // Block 0xc, offset 0x300
- 0x300: 0x08, 0x301: 0x08, 0x302: 0x08, 0x303: 0x08, 0x304: 0x08, 0x305: 0x08, 0x306: 0x08, 0x307: 0x08,
- 0x308: 0x08, 0x309: 0x08, 0x30a: 0x08, 0x30b: 0x08, 0x30c: 0x08, 0x30d: 0x08, 0x30e: 0x08, 0x30f: 0x08,
- 0x310: 0x08, 0x311: 0x08, 0x312: 0x08, 0x313: 0x08, 0x314: 0x08, 0x315: 0x08, 0x316: 0x08, 0x317: 0x08,
- 0x318: 0x08, 0x319: 0x08, 0x31a: 0x08, 0x31b: 0x08, 0x31c: 0x08, 0x31d: 0x08, 0x31e: 0x08, 0x31f: 0x08,
- 0x320: 0x08, 0x321: 0x08, 0x322: 0x08, 0x323: 0x08, 0x324: 0x0e, 0x325: 0x0e, 0x326: 0x0e, 0x327: 0x0e,
- 0x328: 0x0e, 0x329: 0x0e, 0x32a: 0x0e, 0x32b: 0x0e,
- 0x338: 0x3f, 0x339: 0x40, 0x33c: 0x41, 0x33d: 0x42, 0x33e: 0x43, 0x33f: 0x44,
- // Block 0xd, offset 0x340
- 0x37f: 0x45,
- // Block 0xe, offset 0x380
- 0x380: 0x0e, 0x381: 0x0e, 0x382: 0x0e, 0x383: 0x0e, 0x384: 0x0e, 0x385: 0x0e, 0x386: 0x0e, 0x387: 0x0e,
- 0x388: 0x0e, 0x389: 0x0e, 0x38a: 0x0e, 0x38b: 0x0e, 0x38c: 0x0e, 0x38d: 0x0e, 0x38e: 0x0e, 0x38f: 0x0e,
- 0x390: 0x0e, 0x391: 0x0e, 0x392: 0x0e, 0x393: 0x0e, 0x394: 0x0e, 0x395: 0x0e, 0x396: 0x0e, 0x397: 0x0e,
- 0x398: 0x0e, 0x399: 0x0e, 0x39a: 0x0e, 0x39b: 0x0e, 0x39c: 0x0e, 0x39d: 0x0e, 0x39e: 0x0e, 0x39f: 0x46,
- 0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e,
- 0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x47,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x0e, 0x3c1: 0x0e, 0x3c2: 0x0e, 0x3c3: 0x0e, 0x3c4: 0x48, 0x3c5: 0x49, 0x3c6: 0x0e, 0x3c7: 0x0e,
- 0x3c8: 0x0e, 0x3c9: 0x0e, 0x3ca: 0x0e, 0x3cb: 0x4a,
- // Block 0x10, offset 0x400
- 0x400: 0x4b, 0x403: 0x4c, 0x404: 0x4d, 0x405: 0x4e, 0x406: 0x4f,
- 0x408: 0x50, 0x409: 0x51, 0x40c: 0x52, 0x40d: 0x53, 0x40e: 0x54, 0x40f: 0x55,
- 0x410: 0x3a, 0x411: 0x56, 0x412: 0x0e, 0x413: 0x57, 0x414: 0x58, 0x415: 0x59, 0x416: 0x5a, 0x417: 0x5b,
- 0x418: 0x0e, 0x419: 0x5c, 0x41a: 0x0e, 0x41b: 0x5d,
- 0x424: 0x5e, 0x425: 0x5f, 0x426: 0x60, 0x427: 0x61,
- // Block 0x11, offset 0x440
- 0x456: 0x0b, 0x457: 0x06,
- 0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e,
- 0x460: 0x06, 0x461: 0x06, 0x462: 0x06, 0x463: 0x06, 0x464: 0x06, 0x465: 0x06, 0x466: 0x06, 0x467: 0x06,
- 0x468: 0x06, 0x469: 0x06, 0x46a: 0x06, 0x46b: 0x06, 0x46c: 0x06, 0x46d: 0x06, 0x46e: 0x06, 0x46f: 0x06,
- 0x470: 0x06, 0x471: 0x06, 0x472: 0x06, 0x473: 0x06, 0x474: 0x06, 0x475: 0x06, 0x476: 0x06, 0x477: 0x06,
- 0x478: 0x06, 0x479: 0x06, 0x47a: 0x06, 0x47b: 0x06, 0x47c: 0x06, 0x47d: 0x06, 0x47e: 0x06, 0x47f: 0x06,
- // Block 0x12, offset 0x480
- 0x484: 0x08, 0x485: 0x08, 0x486: 0x08, 0x487: 0x09,
- // Block 0x13, offset 0x4c0
- 0x4c0: 0x08, 0x4c1: 0x08, 0x4c2: 0x08, 0x4c3: 0x08, 0x4c4: 0x08, 0x4c5: 0x08, 0x4c6: 0x08, 0x4c7: 0x08,
- 0x4c8: 0x08, 0x4c9: 0x08, 0x4ca: 0x08, 0x4cb: 0x08, 0x4cc: 0x08, 0x4cd: 0x08, 0x4ce: 0x08, 0x4cf: 0x08,
- 0x4d0: 0x08, 0x4d1: 0x08, 0x4d2: 0x08, 0x4d3: 0x08, 0x4d4: 0x08, 0x4d5: 0x08, 0x4d6: 0x08, 0x4d7: 0x08,
- 0x4d8: 0x08, 0x4d9: 0x08, 0x4da: 0x08, 0x4db: 0x08, 0x4dc: 0x08, 0x4dd: 0x08, 0x4de: 0x08, 0x4df: 0x08,
- 0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08,
- 0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08,
- 0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08,
- 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x62,
- // Block 0x14, offset 0x500
- 0x520: 0x10,
- 0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09,
- 0x538: 0x09, 0x539: 0x09, 0x53a: 0x09, 0x53b: 0x09, 0x53c: 0x09, 0x53d: 0x09, 0x53e: 0x09, 0x53f: 0x11,
- // Block 0x15, offset 0x540
- 0x540: 0x09, 0x541: 0x09, 0x542: 0x09, 0x543: 0x09, 0x544: 0x09, 0x545: 0x09, 0x546: 0x09, 0x547: 0x09,
- 0x548: 0x09, 0x549: 0x09, 0x54a: 0x09, 0x54b: 0x09, 0x54c: 0x09, 0x54d: 0x09, 0x54e: 0x09, 0x54f: 0x11,
-}
-
-// inverseData contains 4-byte entries of the following format:
-// <0 padding>
-// The last byte of the UTF-8-encoded rune is xor-ed with the last byte of the
-// UTF-8 encoding of the original rune. Mappings often have the following
-// pattern:
-// A -> A (U+FF21 -> U+0041)
-// B -> B (U+FF22 -> U+0042)
-// ...
-// By xor-ing the last byte the same entry can be shared by many mappings. This
-// reduces the total number of distinct entries by about two thirds.
-// The resulting entry for the aforementioned mappings is
-// { 0x01, 0xE0, 0x00, 0x00 }
-// Using this entry to map U+FF21 (UTF-8 [EF BC A1]), we get
-// E0 ^ A1 = 41.
-// Similarly, for U+FF22 (UTF-8 [EF BC A2]), we get
-// E0 ^ A2 = 42.
-// Note that because of the xor-ing, the byte sequence stored in the entry is
-// not valid UTF-8.
-var inverseData = [150][4]byte{
- {0x00, 0x00, 0x00, 0x00},
- {0x03, 0xe3, 0x80, 0xa0},
- {0x03, 0xef, 0xbc, 0xa0},
- {0x03, 0xef, 0xbc, 0xe0},
- {0x03, 0xef, 0xbd, 0xe0},
- {0x03, 0xef, 0xbf, 0x02},
- {0x03, 0xef, 0xbf, 0x00},
- {0x03, 0xef, 0xbf, 0x0e},
- {0x03, 0xef, 0xbf, 0x0c},
- {0x03, 0xef, 0xbf, 0x0f},
- {0x03, 0xef, 0xbf, 0x39},
- {0x03, 0xef, 0xbf, 0x3b},
- {0x03, 0xef, 0xbf, 0x3f},
- {0x03, 0xef, 0xbf, 0x2a},
- {0x03, 0xef, 0xbf, 0x0d},
- {0x03, 0xef, 0xbf, 0x25},
- {0x03, 0xef, 0xbd, 0x1a},
- {0x03, 0xef, 0xbd, 0x26},
- {0x01, 0xa0, 0x00, 0x00},
- {0x03, 0xef, 0xbd, 0x25},
- {0x03, 0xef, 0xbd, 0x23},
- {0x03, 0xef, 0xbd, 0x2e},
- {0x03, 0xef, 0xbe, 0x07},
- {0x03, 0xef, 0xbe, 0x05},
- {0x03, 0xef, 0xbd, 0x06},
- {0x03, 0xef, 0xbd, 0x13},
- {0x03, 0xef, 0xbd, 0x0b},
- {0x03, 0xef, 0xbd, 0x16},
- {0x03, 0xef, 0xbd, 0x0c},
- {0x03, 0xef, 0xbd, 0x15},
- {0x03, 0xef, 0xbd, 0x0d},
- {0x03, 0xef, 0xbd, 0x1c},
- {0x03, 0xef, 0xbd, 0x02},
- {0x03, 0xef, 0xbd, 0x1f},
- {0x03, 0xef, 0xbd, 0x1d},
- {0x03, 0xef, 0xbd, 0x17},
- {0x03, 0xef, 0xbd, 0x08},
- {0x03, 0xef, 0xbd, 0x09},
- {0x03, 0xef, 0xbd, 0x0e},
- {0x03, 0xef, 0xbd, 0x04},
- {0x03, 0xef, 0xbd, 0x05},
- {0x03, 0xef, 0xbe, 0x3f},
- {0x03, 0xef, 0xbe, 0x00},
- {0x03, 0xef, 0xbd, 0x2c},
- {0x03, 0xef, 0xbe, 0x06},
- {0x03, 0xef, 0xbe, 0x0c},
- {0x03, 0xef, 0xbe, 0x0f},
- {0x03, 0xef, 0xbe, 0x0d},
- {0x03, 0xef, 0xbe, 0x0b},
- {0x03, 0xef, 0xbe, 0x19},
- {0x03, 0xef, 0xbe, 0x15},
- {0x03, 0xef, 0xbe, 0x11},
- {0x03, 0xef, 0xbe, 0x31},
- {0x03, 0xef, 0xbe, 0x33},
- {0x03, 0xef, 0xbd, 0x0f},
- {0x03, 0xef, 0xbe, 0x30},
- {0x03, 0xef, 0xbe, 0x3e},
- {0x03, 0xef, 0xbe, 0x32},
- {0x03, 0xef, 0xbe, 0x36},
- {0x03, 0xef, 0xbd, 0x14},
- {0x03, 0xef, 0xbe, 0x2e},
- {0x03, 0xef, 0xbd, 0x1e},
- {0x03, 0xef, 0xbe, 0x10},
- {0x03, 0xef, 0xbf, 0x13},
- {0x03, 0xef, 0xbf, 0x15},
- {0x03, 0xef, 0xbf, 0x17},
- {0x03, 0xef, 0xbf, 0x1f},
- {0x03, 0xef, 0xbf, 0x1d},
- {0x03, 0xef, 0xbf, 0x1b},
- {0x03, 0xef, 0xbf, 0x09},
- {0x03, 0xef, 0xbf, 0x0b},
- {0x03, 0xef, 0xbf, 0x37},
- {0x03, 0xef, 0xbe, 0x04},
- {0x01, 0xe0, 0x00, 0x00},
- {0x03, 0xe2, 0xa6, 0x1a},
- {0x03, 0xe2, 0xa6, 0x26},
- {0x03, 0xe3, 0x80, 0x23},
- {0x03, 0xe3, 0x80, 0x2e},
- {0x03, 0xe3, 0x80, 0x25},
- {0x03, 0xe3, 0x83, 0x1e},
- {0x03, 0xe3, 0x83, 0x14},
- {0x03, 0xe3, 0x82, 0x06},
- {0x03, 0xe3, 0x82, 0x0b},
- {0x03, 0xe3, 0x82, 0x0c},
- {0x03, 0xe3, 0x82, 0x0d},
- {0x03, 0xe3, 0x82, 0x02},
- {0x03, 0xe3, 0x83, 0x0f},
- {0x03, 0xe3, 0x83, 0x08},
- {0x03, 0xe3, 0x83, 0x09},
- {0x03, 0xe3, 0x83, 0x2c},
- {0x03, 0xe3, 0x83, 0x0c},
- {0x03, 0xe3, 0x82, 0x13},
- {0x03, 0xe3, 0x82, 0x16},
- {0x03, 0xe3, 0x82, 0x15},
- {0x03, 0xe3, 0x82, 0x1c},
- {0x03, 0xe3, 0x82, 0x1f},
- {0x03, 0xe3, 0x82, 0x1d},
- {0x03, 0xe3, 0x82, 0x1a},
- {0x03, 0xe3, 0x82, 0x17},
- {0x03, 0xe3, 0x82, 0x08},
- {0x03, 0xe3, 0x82, 0x09},
- {0x03, 0xe3, 0x82, 0x0e},
- {0x03, 0xe3, 0x82, 0x04},
- {0x03, 0xe3, 0x82, 0x05},
- {0x03, 0xe3, 0x82, 0x3f},
- {0x03, 0xe3, 0x83, 0x00},
- {0x03, 0xe3, 0x83, 0x06},
- {0x03, 0xe3, 0x83, 0x05},
- {0x03, 0xe3, 0x83, 0x0d},
- {0x03, 0xe3, 0x83, 0x0b},
- {0x03, 0xe3, 0x83, 0x07},
- {0x03, 0xe3, 0x83, 0x19},
- {0x03, 0xe3, 0x83, 0x15},
- {0x03, 0xe3, 0x83, 0x11},
- {0x03, 0xe3, 0x83, 0x31},
- {0x03, 0xe3, 0x83, 0x33},
- {0x03, 0xe3, 0x83, 0x30},
- {0x03, 0xe3, 0x83, 0x3e},
- {0x03, 0xe3, 0x83, 0x32},
- {0x03, 0xe3, 0x83, 0x36},
- {0x03, 0xe3, 0x83, 0x2e},
- {0x03, 0xe3, 0x82, 0x07},
- {0x03, 0xe3, 0x85, 0x04},
- {0x03, 0xe3, 0x84, 0x10},
- {0x03, 0xe3, 0x85, 0x30},
- {0x03, 0xe3, 0x85, 0x0d},
- {0x03, 0xe3, 0x85, 0x13},
- {0x03, 0xe3, 0x85, 0x15},
- {0x03, 0xe3, 0x85, 0x17},
- {0x03, 0xe3, 0x85, 0x1f},
- {0x03, 0xe3, 0x85, 0x1d},
- {0x03, 0xe3, 0x85, 0x1b},
- {0x03, 0xe3, 0x85, 0x09},
- {0x03, 0xe3, 0x85, 0x0f},
- {0x03, 0xe3, 0x85, 0x0b},
- {0x03, 0xe3, 0x85, 0x37},
- {0x03, 0xe3, 0x85, 0x3b},
- {0x03, 0xe3, 0x85, 0x39},
- {0x03, 0xe3, 0x85, 0x3f},
- {0x02, 0xc2, 0x02, 0x00},
- {0x02, 0xc2, 0x0e, 0x00},
- {0x02, 0xc2, 0x0c, 0x00},
- {0x02, 0xc2, 0x00, 0x00},
- {0x03, 0xe2, 0x82, 0x0f},
- {0x03, 0xe2, 0x94, 0x2a},
- {0x03, 0xe2, 0x86, 0x39},
- {0x03, 0xe2, 0x86, 0x3b},
- {0x03, 0xe2, 0x86, 0x3f},
- {0x03, 0xe2, 0x96, 0x0d},
- {0x03, 0xe2, 0x97, 0x25},
-}
-
-// Total table size 14936 bytes (14KiB)
diff --git a/vendor/golang.org/x/text/width/tables11.0.0.go b/vendor/golang.org/x/text/width/tables11.0.0.go
deleted file mode 100644
index 990f7622..00000000
--- a/vendor/golang.org/x/text/width/tables11.0.0.go
+++ /dev/null
@@ -1,1331 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-//go:build go1.13 && !go1.14
-// +build go1.13,!go1.14
-
-package width
-
-// UnicodeVersion is the Unicode version from which the tables in this package are derived.
-const UnicodeVersion = "11.0.0"
-
-// lookup returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookup(s []byte) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupUnsafe(s []byte) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// lookupString returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookupString(s string) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupStringUnsafe(s string) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// widthTrie. Total size: 14336 bytes (14.00 KiB). Checksum: c0f7712776e71cd4.
-type widthTrie struct{}
-
-func newWidthTrie(i int) *widthTrie {
- return &widthTrie{}
-}
-
-// lookupValue determines the type of block n and looks up the value for b.
-func (t *widthTrie) lookupValue(n uint32, b byte) uint16 {
- switch {
- default:
- return uint16(widthValues[n<<6+uint32(b)])
- }
-}
-
-// widthValues: 101 blocks, 6464 entries, 12928 bytes
-// The third block is the zero block.
-var widthValues = [6464]uint16{
- // Block 0x0, offset 0x0
- 0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002,
- 0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002,
- 0x2a: 0x6002, 0x2b: 0x6002, 0x2c: 0x6002, 0x2d: 0x6002, 0x2e: 0x6002, 0x2f: 0x6002,
- 0x30: 0x6002, 0x31: 0x6002, 0x32: 0x6002, 0x33: 0x6002, 0x34: 0x6002, 0x35: 0x6002,
- 0x36: 0x6002, 0x37: 0x6002, 0x38: 0x6002, 0x39: 0x6002, 0x3a: 0x6002, 0x3b: 0x6002,
- 0x3c: 0x6002, 0x3d: 0x6002, 0x3e: 0x6002, 0x3f: 0x6002,
- // Block 0x1, offset 0x40
- 0x40: 0x6003, 0x41: 0x6003, 0x42: 0x6003, 0x43: 0x6003, 0x44: 0x6003, 0x45: 0x6003,
- 0x46: 0x6003, 0x47: 0x6003, 0x48: 0x6003, 0x49: 0x6003, 0x4a: 0x6003, 0x4b: 0x6003,
- 0x4c: 0x6003, 0x4d: 0x6003, 0x4e: 0x6003, 0x4f: 0x6003, 0x50: 0x6003, 0x51: 0x6003,
- 0x52: 0x6003, 0x53: 0x6003, 0x54: 0x6003, 0x55: 0x6003, 0x56: 0x6003, 0x57: 0x6003,
- 0x58: 0x6003, 0x59: 0x6003, 0x5a: 0x6003, 0x5b: 0x6003, 0x5c: 0x6003, 0x5d: 0x6003,
- 0x5e: 0x6003, 0x5f: 0x6003, 0x60: 0x6004, 0x61: 0x6004, 0x62: 0x6004, 0x63: 0x6004,
- 0x64: 0x6004, 0x65: 0x6004, 0x66: 0x6004, 0x67: 0x6004, 0x68: 0x6004, 0x69: 0x6004,
- 0x6a: 0x6004, 0x6b: 0x6004, 0x6c: 0x6004, 0x6d: 0x6004, 0x6e: 0x6004, 0x6f: 0x6004,
- 0x70: 0x6004, 0x71: 0x6004, 0x72: 0x6004, 0x73: 0x6004, 0x74: 0x6004, 0x75: 0x6004,
- 0x76: 0x6004, 0x77: 0x6004, 0x78: 0x6004, 0x79: 0x6004, 0x7a: 0x6004, 0x7b: 0x6004,
- 0x7c: 0x6004, 0x7d: 0x6004, 0x7e: 0x6004,
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xe1: 0x2000, 0xe2: 0x6005, 0xe3: 0x6005,
- 0xe4: 0x2000, 0xe5: 0x6006, 0xe6: 0x6005, 0xe7: 0x2000, 0xe8: 0x2000,
- 0xea: 0x2000, 0xec: 0x6007, 0xed: 0x2000, 0xee: 0x2000, 0xef: 0x6008,
- 0xf0: 0x2000, 0xf1: 0x2000, 0xf2: 0x2000, 0xf3: 0x2000, 0xf4: 0x2000,
- 0xf6: 0x2000, 0xf7: 0x2000, 0xf8: 0x2000, 0xf9: 0x2000, 0xfa: 0x2000,
- 0xfc: 0x2000, 0xfd: 0x2000, 0xfe: 0x2000, 0xff: 0x2000,
- // Block 0x4, offset 0x100
- 0x106: 0x2000,
- 0x110: 0x2000,
- 0x117: 0x2000,
- 0x118: 0x2000,
- 0x11e: 0x2000, 0x11f: 0x2000, 0x120: 0x2000, 0x121: 0x2000,
- 0x126: 0x2000, 0x128: 0x2000, 0x129: 0x2000,
- 0x12a: 0x2000, 0x12c: 0x2000, 0x12d: 0x2000,
- 0x130: 0x2000, 0x132: 0x2000, 0x133: 0x2000,
- 0x137: 0x2000, 0x138: 0x2000, 0x139: 0x2000, 0x13a: 0x2000,
- 0x13c: 0x2000, 0x13e: 0x2000,
- // Block 0x5, offset 0x140
- 0x141: 0x2000,
- 0x151: 0x2000,
- 0x153: 0x2000,
- 0x15b: 0x2000,
- 0x166: 0x2000, 0x167: 0x2000,
- 0x16b: 0x2000,
- 0x171: 0x2000, 0x172: 0x2000, 0x173: 0x2000,
- 0x178: 0x2000,
- 0x17f: 0x2000,
- // Block 0x6, offset 0x180
- 0x180: 0x2000, 0x181: 0x2000, 0x182: 0x2000, 0x184: 0x2000,
- 0x188: 0x2000, 0x189: 0x2000, 0x18a: 0x2000, 0x18b: 0x2000,
- 0x18d: 0x2000,
- 0x192: 0x2000, 0x193: 0x2000,
- 0x1a6: 0x2000, 0x1a7: 0x2000,
- 0x1ab: 0x2000,
- // Block 0x7, offset 0x1c0
- 0x1ce: 0x2000, 0x1d0: 0x2000,
- 0x1d2: 0x2000, 0x1d4: 0x2000, 0x1d6: 0x2000,
- 0x1d8: 0x2000, 0x1da: 0x2000, 0x1dc: 0x2000,
- // Block 0x8, offset 0x200
- 0x211: 0x2000,
- 0x221: 0x2000,
- // Block 0x9, offset 0x240
- 0x244: 0x2000,
- 0x247: 0x2000, 0x249: 0x2000, 0x24a: 0x2000, 0x24b: 0x2000,
- 0x24d: 0x2000, 0x250: 0x2000,
- 0x258: 0x2000, 0x259: 0x2000, 0x25a: 0x2000, 0x25b: 0x2000, 0x25d: 0x2000,
- 0x25f: 0x2000,
- // Block 0xa, offset 0x280
- 0x280: 0x2000, 0x281: 0x2000, 0x282: 0x2000, 0x283: 0x2000, 0x284: 0x2000, 0x285: 0x2000,
- 0x286: 0x2000, 0x287: 0x2000, 0x288: 0x2000, 0x289: 0x2000, 0x28a: 0x2000, 0x28b: 0x2000,
- 0x28c: 0x2000, 0x28d: 0x2000, 0x28e: 0x2000, 0x28f: 0x2000, 0x290: 0x2000, 0x291: 0x2000,
- 0x292: 0x2000, 0x293: 0x2000, 0x294: 0x2000, 0x295: 0x2000, 0x296: 0x2000, 0x297: 0x2000,
- 0x298: 0x2000, 0x299: 0x2000, 0x29a: 0x2000, 0x29b: 0x2000, 0x29c: 0x2000, 0x29d: 0x2000,
- 0x29e: 0x2000, 0x29f: 0x2000, 0x2a0: 0x2000, 0x2a1: 0x2000, 0x2a2: 0x2000, 0x2a3: 0x2000,
- 0x2a4: 0x2000, 0x2a5: 0x2000, 0x2a6: 0x2000, 0x2a7: 0x2000, 0x2a8: 0x2000, 0x2a9: 0x2000,
- 0x2aa: 0x2000, 0x2ab: 0x2000, 0x2ac: 0x2000, 0x2ad: 0x2000, 0x2ae: 0x2000, 0x2af: 0x2000,
- 0x2b0: 0x2000, 0x2b1: 0x2000, 0x2b2: 0x2000, 0x2b3: 0x2000, 0x2b4: 0x2000, 0x2b5: 0x2000,
- 0x2b6: 0x2000, 0x2b7: 0x2000, 0x2b8: 0x2000, 0x2b9: 0x2000, 0x2ba: 0x2000, 0x2bb: 0x2000,
- 0x2bc: 0x2000, 0x2bd: 0x2000, 0x2be: 0x2000, 0x2bf: 0x2000,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x2000, 0x2c1: 0x2000, 0x2c2: 0x2000, 0x2c3: 0x2000, 0x2c4: 0x2000, 0x2c5: 0x2000,
- 0x2c6: 0x2000, 0x2c7: 0x2000, 0x2c8: 0x2000, 0x2c9: 0x2000, 0x2ca: 0x2000, 0x2cb: 0x2000,
- 0x2cc: 0x2000, 0x2cd: 0x2000, 0x2ce: 0x2000, 0x2cf: 0x2000, 0x2d0: 0x2000, 0x2d1: 0x2000,
- 0x2d2: 0x2000, 0x2d3: 0x2000, 0x2d4: 0x2000, 0x2d5: 0x2000, 0x2d6: 0x2000, 0x2d7: 0x2000,
- 0x2d8: 0x2000, 0x2d9: 0x2000, 0x2da: 0x2000, 0x2db: 0x2000, 0x2dc: 0x2000, 0x2dd: 0x2000,
- 0x2de: 0x2000, 0x2df: 0x2000, 0x2e0: 0x2000, 0x2e1: 0x2000, 0x2e2: 0x2000, 0x2e3: 0x2000,
- 0x2e4: 0x2000, 0x2e5: 0x2000, 0x2e6: 0x2000, 0x2e7: 0x2000, 0x2e8: 0x2000, 0x2e9: 0x2000,
- 0x2ea: 0x2000, 0x2eb: 0x2000, 0x2ec: 0x2000, 0x2ed: 0x2000, 0x2ee: 0x2000, 0x2ef: 0x2000,
- // Block 0xc, offset 0x300
- 0x311: 0x2000,
- 0x312: 0x2000, 0x313: 0x2000, 0x314: 0x2000, 0x315: 0x2000, 0x316: 0x2000, 0x317: 0x2000,
- 0x318: 0x2000, 0x319: 0x2000, 0x31a: 0x2000, 0x31b: 0x2000, 0x31c: 0x2000, 0x31d: 0x2000,
- 0x31e: 0x2000, 0x31f: 0x2000, 0x320: 0x2000, 0x321: 0x2000, 0x323: 0x2000,
- 0x324: 0x2000, 0x325: 0x2000, 0x326: 0x2000, 0x327: 0x2000, 0x328: 0x2000, 0x329: 0x2000,
- 0x331: 0x2000, 0x332: 0x2000, 0x333: 0x2000, 0x334: 0x2000, 0x335: 0x2000,
- 0x336: 0x2000, 0x337: 0x2000, 0x338: 0x2000, 0x339: 0x2000, 0x33a: 0x2000, 0x33b: 0x2000,
- 0x33c: 0x2000, 0x33d: 0x2000, 0x33e: 0x2000, 0x33f: 0x2000,
- // Block 0xd, offset 0x340
- 0x340: 0x2000, 0x341: 0x2000, 0x343: 0x2000, 0x344: 0x2000, 0x345: 0x2000,
- 0x346: 0x2000, 0x347: 0x2000, 0x348: 0x2000, 0x349: 0x2000,
- // Block 0xe, offset 0x380
- 0x381: 0x2000,
- 0x390: 0x2000, 0x391: 0x2000,
- 0x392: 0x2000, 0x393: 0x2000, 0x394: 0x2000, 0x395: 0x2000, 0x396: 0x2000, 0x397: 0x2000,
- 0x398: 0x2000, 0x399: 0x2000, 0x39a: 0x2000, 0x39b: 0x2000, 0x39c: 0x2000, 0x39d: 0x2000,
- 0x39e: 0x2000, 0x39f: 0x2000, 0x3a0: 0x2000, 0x3a1: 0x2000, 0x3a2: 0x2000, 0x3a3: 0x2000,
- 0x3a4: 0x2000, 0x3a5: 0x2000, 0x3a6: 0x2000, 0x3a7: 0x2000, 0x3a8: 0x2000, 0x3a9: 0x2000,
- 0x3aa: 0x2000, 0x3ab: 0x2000, 0x3ac: 0x2000, 0x3ad: 0x2000, 0x3ae: 0x2000, 0x3af: 0x2000,
- 0x3b0: 0x2000, 0x3b1: 0x2000, 0x3b2: 0x2000, 0x3b3: 0x2000, 0x3b4: 0x2000, 0x3b5: 0x2000,
- 0x3b6: 0x2000, 0x3b7: 0x2000, 0x3b8: 0x2000, 0x3b9: 0x2000, 0x3ba: 0x2000, 0x3bb: 0x2000,
- 0x3bc: 0x2000, 0x3bd: 0x2000, 0x3be: 0x2000, 0x3bf: 0x2000,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x2000, 0x3c1: 0x2000, 0x3c2: 0x2000, 0x3c3: 0x2000, 0x3c4: 0x2000, 0x3c5: 0x2000,
- 0x3c6: 0x2000, 0x3c7: 0x2000, 0x3c8: 0x2000, 0x3c9: 0x2000, 0x3ca: 0x2000, 0x3cb: 0x2000,
- 0x3cc: 0x2000, 0x3cd: 0x2000, 0x3ce: 0x2000, 0x3cf: 0x2000, 0x3d1: 0x2000,
- // Block 0x10, offset 0x400
- 0x400: 0x4000, 0x401: 0x4000, 0x402: 0x4000, 0x403: 0x4000, 0x404: 0x4000, 0x405: 0x4000,
- 0x406: 0x4000, 0x407: 0x4000, 0x408: 0x4000, 0x409: 0x4000, 0x40a: 0x4000, 0x40b: 0x4000,
- 0x40c: 0x4000, 0x40d: 0x4000, 0x40e: 0x4000, 0x40f: 0x4000, 0x410: 0x4000, 0x411: 0x4000,
- 0x412: 0x4000, 0x413: 0x4000, 0x414: 0x4000, 0x415: 0x4000, 0x416: 0x4000, 0x417: 0x4000,
- 0x418: 0x4000, 0x419: 0x4000, 0x41a: 0x4000, 0x41b: 0x4000, 0x41c: 0x4000, 0x41d: 0x4000,
- 0x41e: 0x4000, 0x41f: 0x4000, 0x420: 0x4000, 0x421: 0x4000, 0x422: 0x4000, 0x423: 0x4000,
- 0x424: 0x4000, 0x425: 0x4000, 0x426: 0x4000, 0x427: 0x4000, 0x428: 0x4000, 0x429: 0x4000,
- 0x42a: 0x4000, 0x42b: 0x4000, 0x42c: 0x4000, 0x42d: 0x4000, 0x42e: 0x4000, 0x42f: 0x4000,
- 0x430: 0x4000, 0x431: 0x4000, 0x432: 0x4000, 0x433: 0x4000, 0x434: 0x4000, 0x435: 0x4000,
- 0x436: 0x4000, 0x437: 0x4000, 0x438: 0x4000, 0x439: 0x4000, 0x43a: 0x4000, 0x43b: 0x4000,
- 0x43c: 0x4000, 0x43d: 0x4000, 0x43e: 0x4000, 0x43f: 0x4000,
- // Block 0x11, offset 0x440
- 0x440: 0x4000, 0x441: 0x4000, 0x442: 0x4000, 0x443: 0x4000, 0x444: 0x4000, 0x445: 0x4000,
- 0x446: 0x4000, 0x447: 0x4000, 0x448: 0x4000, 0x449: 0x4000, 0x44a: 0x4000, 0x44b: 0x4000,
- 0x44c: 0x4000, 0x44d: 0x4000, 0x44e: 0x4000, 0x44f: 0x4000, 0x450: 0x4000, 0x451: 0x4000,
- 0x452: 0x4000, 0x453: 0x4000, 0x454: 0x4000, 0x455: 0x4000, 0x456: 0x4000, 0x457: 0x4000,
- 0x458: 0x4000, 0x459: 0x4000, 0x45a: 0x4000, 0x45b: 0x4000, 0x45c: 0x4000, 0x45d: 0x4000,
- 0x45e: 0x4000, 0x45f: 0x4000,
- // Block 0x12, offset 0x480
- 0x490: 0x2000,
- 0x493: 0x2000, 0x494: 0x2000, 0x495: 0x2000, 0x496: 0x2000,
- 0x498: 0x2000, 0x499: 0x2000, 0x49c: 0x2000, 0x49d: 0x2000,
- 0x4a0: 0x2000, 0x4a1: 0x2000, 0x4a2: 0x2000,
- 0x4a4: 0x2000, 0x4a5: 0x2000, 0x4a6: 0x2000, 0x4a7: 0x2000,
- 0x4b0: 0x2000, 0x4b2: 0x2000, 0x4b3: 0x2000, 0x4b5: 0x2000,
- 0x4bb: 0x2000,
- 0x4be: 0x2000,
- // Block 0x13, offset 0x4c0
- 0x4f4: 0x2000,
- 0x4ff: 0x2000,
- // Block 0x14, offset 0x500
- 0x501: 0x2000, 0x502: 0x2000, 0x503: 0x2000, 0x504: 0x2000,
- 0x529: 0xa009,
- 0x52c: 0x2000,
- // Block 0x15, offset 0x540
- 0x543: 0x2000, 0x545: 0x2000,
- 0x549: 0x2000,
- 0x553: 0x2000, 0x556: 0x2000,
- 0x561: 0x2000, 0x562: 0x2000,
- 0x566: 0x2000,
- 0x56b: 0x2000,
- // Block 0x16, offset 0x580
- 0x593: 0x2000, 0x594: 0x2000,
- 0x59b: 0x2000, 0x59c: 0x2000, 0x59d: 0x2000,
- 0x59e: 0x2000, 0x5a0: 0x2000, 0x5a1: 0x2000, 0x5a2: 0x2000, 0x5a3: 0x2000,
- 0x5a4: 0x2000, 0x5a5: 0x2000, 0x5a6: 0x2000, 0x5a7: 0x2000, 0x5a8: 0x2000, 0x5a9: 0x2000,
- 0x5aa: 0x2000, 0x5ab: 0x2000,
- 0x5b0: 0x2000, 0x5b1: 0x2000, 0x5b2: 0x2000, 0x5b3: 0x2000, 0x5b4: 0x2000, 0x5b5: 0x2000,
- 0x5b6: 0x2000, 0x5b7: 0x2000, 0x5b8: 0x2000, 0x5b9: 0x2000,
- // Block 0x17, offset 0x5c0
- 0x5c9: 0x2000,
- 0x5d0: 0x200a, 0x5d1: 0x200b,
- 0x5d2: 0x200a, 0x5d3: 0x200c, 0x5d4: 0x2000, 0x5d5: 0x2000, 0x5d6: 0x2000, 0x5d7: 0x2000,
- 0x5d8: 0x2000, 0x5d9: 0x2000,
- 0x5f8: 0x2000, 0x5f9: 0x2000,
- // Block 0x18, offset 0x600
- 0x612: 0x2000, 0x614: 0x2000,
- 0x627: 0x2000,
- // Block 0x19, offset 0x640
- 0x640: 0x2000, 0x642: 0x2000, 0x643: 0x2000,
- 0x647: 0x2000, 0x648: 0x2000, 0x64b: 0x2000,
- 0x64f: 0x2000, 0x651: 0x2000,
- 0x655: 0x2000,
- 0x65a: 0x2000, 0x65d: 0x2000,
- 0x65e: 0x2000, 0x65f: 0x2000, 0x660: 0x2000, 0x663: 0x2000,
- 0x665: 0x2000, 0x667: 0x2000, 0x668: 0x2000, 0x669: 0x2000,
- 0x66a: 0x2000, 0x66b: 0x2000, 0x66c: 0x2000, 0x66e: 0x2000,
- 0x674: 0x2000, 0x675: 0x2000,
- 0x676: 0x2000, 0x677: 0x2000,
- 0x67c: 0x2000, 0x67d: 0x2000,
- // Block 0x1a, offset 0x680
- 0x688: 0x2000,
- 0x68c: 0x2000,
- 0x692: 0x2000,
- 0x6a0: 0x2000, 0x6a1: 0x2000,
- 0x6a4: 0x2000, 0x6a5: 0x2000, 0x6a6: 0x2000, 0x6a7: 0x2000,
- 0x6aa: 0x2000, 0x6ab: 0x2000, 0x6ae: 0x2000, 0x6af: 0x2000,
- // Block 0x1b, offset 0x6c0
- 0x6c2: 0x2000, 0x6c3: 0x2000,
- 0x6c6: 0x2000, 0x6c7: 0x2000,
- 0x6d5: 0x2000,
- 0x6d9: 0x2000,
- 0x6e5: 0x2000,
- 0x6ff: 0x2000,
- // Block 0x1c, offset 0x700
- 0x712: 0x2000,
- 0x71a: 0x4000, 0x71b: 0x4000,
- 0x729: 0x4000,
- 0x72a: 0x4000,
- // Block 0x1d, offset 0x740
- 0x769: 0x4000,
- 0x76a: 0x4000, 0x76b: 0x4000, 0x76c: 0x4000,
- 0x770: 0x4000, 0x773: 0x4000,
- // Block 0x1e, offset 0x780
- 0x7a0: 0x2000, 0x7a1: 0x2000, 0x7a2: 0x2000, 0x7a3: 0x2000,
- 0x7a4: 0x2000, 0x7a5: 0x2000, 0x7a6: 0x2000, 0x7a7: 0x2000, 0x7a8: 0x2000, 0x7a9: 0x2000,
- 0x7aa: 0x2000, 0x7ab: 0x2000, 0x7ac: 0x2000, 0x7ad: 0x2000, 0x7ae: 0x2000, 0x7af: 0x2000,
- 0x7b0: 0x2000, 0x7b1: 0x2000, 0x7b2: 0x2000, 0x7b3: 0x2000, 0x7b4: 0x2000, 0x7b5: 0x2000,
- 0x7b6: 0x2000, 0x7b7: 0x2000, 0x7b8: 0x2000, 0x7b9: 0x2000, 0x7ba: 0x2000, 0x7bb: 0x2000,
- 0x7bc: 0x2000, 0x7bd: 0x2000, 0x7be: 0x2000, 0x7bf: 0x2000,
- // Block 0x1f, offset 0x7c0
- 0x7c0: 0x2000, 0x7c1: 0x2000, 0x7c2: 0x2000, 0x7c3: 0x2000, 0x7c4: 0x2000, 0x7c5: 0x2000,
- 0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7c9: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000,
- 0x7cc: 0x2000, 0x7cd: 0x2000, 0x7ce: 0x2000, 0x7cf: 0x2000, 0x7d0: 0x2000, 0x7d1: 0x2000,
- 0x7d2: 0x2000, 0x7d3: 0x2000, 0x7d4: 0x2000, 0x7d5: 0x2000, 0x7d6: 0x2000, 0x7d7: 0x2000,
- 0x7d8: 0x2000, 0x7d9: 0x2000, 0x7da: 0x2000, 0x7db: 0x2000, 0x7dc: 0x2000, 0x7dd: 0x2000,
- 0x7de: 0x2000, 0x7df: 0x2000, 0x7e0: 0x2000, 0x7e1: 0x2000, 0x7e2: 0x2000, 0x7e3: 0x2000,
- 0x7e4: 0x2000, 0x7e5: 0x2000, 0x7e6: 0x2000, 0x7e7: 0x2000, 0x7e8: 0x2000, 0x7e9: 0x2000,
- 0x7eb: 0x2000, 0x7ec: 0x2000, 0x7ed: 0x2000, 0x7ee: 0x2000, 0x7ef: 0x2000,
- 0x7f0: 0x2000, 0x7f1: 0x2000, 0x7f2: 0x2000, 0x7f3: 0x2000, 0x7f4: 0x2000, 0x7f5: 0x2000,
- 0x7f6: 0x2000, 0x7f7: 0x2000, 0x7f8: 0x2000, 0x7f9: 0x2000, 0x7fa: 0x2000, 0x7fb: 0x2000,
- 0x7fc: 0x2000, 0x7fd: 0x2000, 0x7fe: 0x2000, 0x7ff: 0x2000,
- // Block 0x20, offset 0x800
- 0x800: 0x2000, 0x801: 0x2000, 0x802: 0x200d, 0x803: 0x2000, 0x804: 0x2000, 0x805: 0x2000,
- 0x806: 0x2000, 0x807: 0x2000, 0x808: 0x2000, 0x809: 0x2000, 0x80a: 0x2000, 0x80b: 0x2000,
- 0x80c: 0x2000, 0x80d: 0x2000, 0x80e: 0x2000, 0x80f: 0x2000, 0x810: 0x2000, 0x811: 0x2000,
- 0x812: 0x2000, 0x813: 0x2000, 0x814: 0x2000, 0x815: 0x2000, 0x816: 0x2000, 0x817: 0x2000,
- 0x818: 0x2000, 0x819: 0x2000, 0x81a: 0x2000, 0x81b: 0x2000, 0x81c: 0x2000, 0x81d: 0x2000,
- 0x81e: 0x2000, 0x81f: 0x2000, 0x820: 0x2000, 0x821: 0x2000, 0x822: 0x2000, 0x823: 0x2000,
- 0x824: 0x2000, 0x825: 0x2000, 0x826: 0x2000, 0x827: 0x2000, 0x828: 0x2000, 0x829: 0x2000,
- 0x82a: 0x2000, 0x82b: 0x2000, 0x82c: 0x2000, 0x82d: 0x2000, 0x82e: 0x2000, 0x82f: 0x2000,
- 0x830: 0x2000, 0x831: 0x2000, 0x832: 0x2000, 0x833: 0x2000, 0x834: 0x2000, 0x835: 0x2000,
- 0x836: 0x2000, 0x837: 0x2000, 0x838: 0x2000, 0x839: 0x2000, 0x83a: 0x2000, 0x83b: 0x2000,
- 0x83c: 0x2000, 0x83d: 0x2000, 0x83e: 0x2000, 0x83f: 0x2000,
- // Block 0x21, offset 0x840
- 0x840: 0x2000, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000, 0x845: 0x2000,
- 0x846: 0x2000, 0x847: 0x2000, 0x848: 0x2000, 0x849: 0x2000, 0x84a: 0x2000, 0x84b: 0x2000,
- 0x850: 0x2000, 0x851: 0x2000,
- 0x852: 0x2000, 0x853: 0x2000, 0x854: 0x2000, 0x855: 0x2000, 0x856: 0x2000, 0x857: 0x2000,
- 0x858: 0x2000, 0x859: 0x2000, 0x85a: 0x2000, 0x85b: 0x2000, 0x85c: 0x2000, 0x85d: 0x2000,
- 0x85e: 0x2000, 0x85f: 0x2000, 0x860: 0x2000, 0x861: 0x2000, 0x862: 0x2000, 0x863: 0x2000,
- 0x864: 0x2000, 0x865: 0x2000, 0x866: 0x2000, 0x867: 0x2000, 0x868: 0x2000, 0x869: 0x2000,
- 0x86a: 0x2000, 0x86b: 0x2000, 0x86c: 0x2000, 0x86d: 0x2000, 0x86e: 0x2000, 0x86f: 0x2000,
- 0x870: 0x2000, 0x871: 0x2000, 0x872: 0x2000, 0x873: 0x2000,
- // Block 0x22, offset 0x880
- 0x880: 0x2000, 0x881: 0x2000, 0x882: 0x2000, 0x883: 0x2000, 0x884: 0x2000, 0x885: 0x2000,
- 0x886: 0x2000, 0x887: 0x2000, 0x888: 0x2000, 0x889: 0x2000, 0x88a: 0x2000, 0x88b: 0x2000,
- 0x88c: 0x2000, 0x88d: 0x2000, 0x88e: 0x2000, 0x88f: 0x2000,
- 0x892: 0x2000, 0x893: 0x2000, 0x894: 0x2000, 0x895: 0x2000,
- 0x8a0: 0x200e, 0x8a1: 0x2000, 0x8a3: 0x2000,
- 0x8a4: 0x2000, 0x8a5: 0x2000, 0x8a6: 0x2000, 0x8a7: 0x2000, 0x8a8: 0x2000, 0x8a9: 0x2000,
- 0x8b2: 0x2000, 0x8b3: 0x2000,
- 0x8b6: 0x2000, 0x8b7: 0x2000,
- 0x8bc: 0x2000, 0x8bd: 0x2000,
- // Block 0x23, offset 0x8c0
- 0x8c0: 0x2000, 0x8c1: 0x2000,
- 0x8c6: 0x2000, 0x8c7: 0x2000, 0x8c8: 0x2000, 0x8cb: 0x200f,
- 0x8ce: 0x2000, 0x8cf: 0x2000, 0x8d0: 0x2000, 0x8d1: 0x2000,
- 0x8e2: 0x2000, 0x8e3: 0x2000,
- 0x8e4: 0x2000, 0x8e5: 0x2000,
- 0x8ef: 0x2000,
- 0x8fd: 0x4000, 0x8fe: 0x4000,
- // Block 0x24, offset 0x900
- 0x905: 0x2000,
- 0x906: 0x2000, 0x909: 0x2000,
- 0x90e: 0x2000, 0x90f: 0x2000,
- 0x914: 0x4000, 0x915: 0x4000,
- 0x91c: 0x2000,
- 0x91e: 0x2000,
- // Block 0x25, offset 0x940
- 0x940: 0x2000, 0x942: 0x2000,
- 0x948: 0x4000, 0x949: 0x4000, 0x94a: 0x4000, 0x94b: 0x4000,
- 0x94c: 0x4000, 0x94d: 0x4000, 0x94e: 0x4000, 0x94f: 0x4000, 0x950: 0x4000, 0x951: 0x4000,
- 0x952: 0x4000, 0x953: 0x4000,
- 0x960: 0x2000, 0x961: 0x2000, 0x963: 0x2000,
- 0x964: 0x2000, 0x965: 0x2000, 0x967: 0x2000, 0x968: 0x2000, 0x969: 0x2000,
- 0x96a: 0x2000, 0x96c: 0x2000, 0x96d: 0x2000, 0x96f: 0x2000,
- 0x97f: 0x4000,
- // Block 0x26, offset 0x980
- 0x993: 0x4000,
- 0x99e: 0x2000, 0x99f: 0x2000, 0x9a1: 0x4000,
- 0x9aa: 0x4000, 0x9ab: 0x4000,
- 0x9bd: 0x4000, 0x9be: 0x4000, 0x9bf: 0x2000,
- // Block 0x27, offset 0x9c0
- 0x9c4: 0x4000, 0x9c5: 0x4000,
- 0x9c6: 0x2000, 0x9c7: 0x2000, 0x9c8: 0x2000, 0x9c9: 0x2000, 0x9ca: 0x2000, 0x9cb: 0x2000,
- 0x9cc: 0x2000, 0x9cd: 0x2000, 0x9ce: 0x4000, 0x9cf: 0x2000, 0x9d0: 0x2000, 0x9d1: 0x2000,
- 0x9d2: 0x2000, 0x9d3: 0x2000, 0x9d4: 0x4000, 0x9d5: 0x2000, 0x9d6: 0x2000, 0x9d7: 0x2000,
- 0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000,
- 0x9de: 0x2000, 0x9df: 0x2000, 0x9e0: 0x2000, 0x9e1: 0x2000, 0x9e3: 0x2000,
- 0x9e8: 0x2000, 0x9e9: 0x2000,
- 0x9ea: 0x4000, 0x9eb: 0x2000, 0x9ec: 0x2000, 0x9ed: 0x2000, 0x9ee: 0x2000, 0x9ef: 0x2000,
- 0x9f0: 0x2000, 0x9f1: 0x2000, 0x9f2: 0x4000, 0x9f3: 0x4000, 0x9f4: 0x2000, 0x9f5: 0x4000,
- 0x9f6: 0x2000, 0x9f7: 0x2000, 0x9f8: 0x2000, 0x9f9: 0x2000, 0x9fa: 0x4000, 0x9fb: 0x2000,
- 0x9fc: 0x2000, 0x9fd: 0x4000, 0x9fe: 0x2000, 0x9ff: 0x2000,
- // Block 0x28, offset 0xa00
- 0xa05: 0x4000,
- 0xa0a: 0x4000, 0xa0b: 0x4000,
- 0xa28: 0x4000,
- 0xa3d: 0x2000,
- // Block 0x29, offset 0xa40
- 0xa4c: 0x4000, 0xa4e: 0x4000,
- 0xa53: 0x4000, 0xa54: 0x4000, 0xa55: 0x4000, 0xa57: 0x4000,
- 0xa76: 0x2000, 0xa77: 0x2000, 0xa78: 0x2000, 0xa79: 0x2000, 0xa7a: 0x2000, 0xa7b: 0x2000,
- 0xa7c: 0x2000, 0xa7d: 0x2000, 0xa7e: 0x2000, 0xa7f: 0x2000,
- // Block 0x2a, offset 0xa80
- 0xa95: 0x4000, 0xa96: 0x4000, 0xa97: 0x4000,
- 0xab0: 0x4000,
- 0xabf: 0x4000,
- // Block 0x2b, offset 0xac0
- 0xae6: 0x6000, 0xae7: 0x6000, 0xae8: 0x6000, 0xae9: 0x6000,
- 0xaea: 0x6000, 0xaeb: 0x6000, 0xaec: 0x6000, 0xaed: 0x6000,
- // Block 0x2c, offset 0xb00
- 0xb05: 0x6010,
- 0xb06: 0x6011,
- // Block 0x2d, offset 0xb40
- 0xb5b: 0x4000, 0xb5c: 0x4000,
- // Block 0x2e, offset 0xb80
- 0xb90: 0x4000,
- 0xb95: 0x4000, 0xb96: 0x2000, 0xb97: 0x2000,
- 0xb98: 0x2000, 0xb99: 0x2000,
- // Block 0x2f, offset 0xbc0
- 0xbc0: 0x4000, 0xbc1: 0x4000, 0xbc2: 0x4000, 0xbc3: 0x4000, 0xbc4: 0x4000, 0xbc5: 0x4000,
- 0xbc6: 0x4000, 0xbc7: 0x4000, 0xbc8: 0x4000, 0xbc9: 0x4000, 0xbca: 0x4000, 0xbcb: 0x4000,
- 0xbcc: 0x4000, 0xbcd: 0x4000, 0xbce: 0x4000, 0xbcf: 0x4000, 0xbd0: 0x4000, 0xbd1: 0x4000,
- 0xbd2: 0x4000, 0xbd3: 0x4000, 0xbd4: 0x4000, 0xbd5: 0x4000, 0xbd6: 0x4000, 0xbd7: 0x4000,
- 0xbd8: 0x4000, 0xbd9: 0x4000, 0xbdb: 0x4000, 0xbdc: 0x4000, 0xbdd: 0x4000,
- 0xbde: 0x4000, 0xbdf: 0x4000, 0xbe0: 0x4000, 0xbe1: 0x4000, 0xbe2: 0x4000, 0xbe3: 0x4000,
- 0xbe4: 0x4000, 0xbe5: 0x4000, 0xbe6: 0x4000, 0xbe7: 0x4000, 0xbe8: 0x4000, 0xbe9: 0x4000,
- 0xbea: 0x4000, 0xbeb: 0x4000, 0xbec: 0x4000, 0xbed: 0x4000, 0xbee: 0x4000, 0xbef: 0x4000,
- 0xbf0: 0x4000, 0xbf1: 0x4000, 0xbf2: 0x4000, 0xbf3: 0x4000, 0xbf4: 0x4000, 0xbf5: 0x4000,
- 0xbf6: 0x4000, 0xbf7: 0x4000, 0xbf8: 0x4000, 0xbf9: 0x4000, 0xbfa: 0x4000, 0xbfb: 0x4000,
- 0xbfc: 0x4000, 0xbfd: 0x4000, 0xbfe: 0x4000, 0xbff: 0x4000,
- // Block 0x30, offset 0xc00
- 0xc00: 0x4000, 0xc01: 0x4000, 0xc02: 0x4000, 0xc03: 0x4000, 0xc04: 0x4000, 0xc05: 0x4000,
- 0xc06: 0x4000, 0xc07: 0x4000, 0xc08: 0x4000, 0xc09: 0x4000, 0xc0a: 0x4000, 0xc0b: 0x4000,
- 0xc0c: 0x4000, 0xc0d: 0x4000, 0xc0e: 0x4000, 0xc0f: 0x4000, 0xc10: 0x4000, 0xc11: 0x4000,
- 0xc12: 0x4000, 0xc13: 0x4000, 0xc14: 0x4000, 0xc15: 0x4000, 0xc16: 0x4000, 0xc17: 0x4000,
- 0xc18: 0x4000, 0xc19: 0x4000, 0xc1a: 0x4000, 0xc1b: 0x4000, 0xc1c: 0x4000, 0xc1d: 0x4000,
- 0xc1e: 0x4000, 0xc1f: 0x4000, 0xc20: 0x4000, 0xc21: 0x4000, 0xc22: 0x4000, 0xc23: 0x4000,
- 0xc24: 0x4000, 0xc25: 0x4000, 0xc26: 0x4000, 0xc27: 0x4000, 0xc28: 0x4000, 0xc29: 0x4000,
- 0xc2a: 0x4000, 0xc2b: 0x4000, 0xc2c: 0x4000, 0xc2d: 0x4000, 0xc2e: 0x4000, 0xc2f: 0x4000,
- 0xc30: 0x4000, 0xc31: 0x4000, 0xc32: 0x4000, 0xc33: 0x4000,
- // Block 0x31, offset 0xc40
- 0xc40: 0x4000, 0xc41: 0x4000, 0xc42: 0x4000, 0xc43: 0x4000, 0xc44: 0x4000, 0xc45: 0x4000,
- 0xc46: 0x4000, 0xc47: 0x4000, 0xc48: 0x4000, 0xc49: 0x4000, 0xc4a: 0x4000, 0xc4b: 0x4000,
- 0xc4c: 0x4000, 0xc4d: 0x4000, 0xc4e: 0x4000, 0xc4f: 0x4000, 0xc50: 0x4000, 0xc51: 0x4000,
- 0xc52: 0x4000, 0xc53: 0x4000, 0xc54: 0x4000, 0xc55: 0x4000,
- 0xc70: 0x4000, 0xc71: 0x4000, 0xc72: 0x4000, 0xc73: 0x4000, 0xc74: 0x4000, 0xc75: 0x4000,
- 0xc76: 0x4000, 0xc77: 0x4000, 0xc78: 0x4000, 0xc79: 0x4000, 0xc7a: 0x4000, 0xc7b: 0x4000,
- // Block 0x32, offset 0xc80
- 0xc80: 0x9012, 0xc81: 0x4013, 0xc82: 0x4014, 0xc83: 0x4000, 0xc84: 0x4000, 0xc85: 0x4000,
- 0xc86: 0x4000, 0xc87: 0x4000, 0xc88: 0x4000, 0xc89: 0x4000, 0xc8a: 0x4000, 0xc8b: 0x4000,
- 0xc8c: 0x4015, 0xc8d: 0x4015, 0xc8e: 0x4000, 0xc8f: 0x4000, 0xc90: 0x4000, 0xc91: 0x4000,
- 0xc92: 0x4000, 0xc93: 0x4000, 0xc94: 0x4000, 0xc95: 0x4000, 0xc96: 0x4000, 0xc97: 0x4000,
- 0xc98: 0x4000, 0xc99: 0x4000, 0xc9a: 0x4000, 0xc9b: 0x4000, 0xc9c: 0x4000, 0xc9d: 0x4000,
- 0xc9e: 0x4000, 0xc9f: 0x4000, 0xca0: 0x4000, 0xca1: 0x4000, 0xca2: 0x4000, 0xca3: 0x4000,
- 0xca4: 0x4000, 0xca5: 0x4000, 0xca6: 0x4000, 0xca7: 0x4000, 0xca8: 0x4000, 0xca9: 0x4000,
- 0xcaa: 0x4000, 0xcab: 0x4000, 0xcac: 0x4000, 0xcad: 0x4000, 0xcae: 0x4000, 0xcaf: 0x4000,
- 0xcb0: 0x4000, 0xcb1: 0x4000, 0xcb2: 0x4000, 0xcb3: 0x4000, 0xcb4: 0x4000, 0xcb5: 0x4000,
- 0xcb6: 0x4000, 0xcb7: 0x4000, 0xcb8: 0x4000, 0xcb9: 0x4000, 0xcba: 0x4000, 0xcbb: 0x4000,
- 0xcbc: 0x4000, 0xcbd: 0x4000, 0xcbe: 0x4000,
- // Block 0x33, offset 0xcc0
- 0xcc1: 0x4000, 0xcc2: 0x4000, 0xcc3: 0x4000, 0xcc4: 0x4000, 0xcc5: 0x4000,
- 0xcc6: 0x4000, 0xcc7: 0x4000, 0xcc8: 0x4000, 0xcc9: 0x4000, 0xcca: 0x4000, 0xccb: 0x4000,
- 0xccc: 0x4000, 0xccd: 0x4000, 0xcce: 0x4000, 0xccf: 0x4000, 0xcd0: 0x4000, 0xcd1: 0x4000,
- 0xcd2: 0x4000, 0xcd3: 0x4000, 0xcd4: 0x4000, 0xcd5: 0x4000, 0xcd6: 0x4000, 0xcd7: 0x4000,
- 0xcd8: 0x4000, 0xcd9: 0x4000, 0xcda: 0x4000, 0xcdb: 0x4000, 0xcdc: 0x4000, 0xcdd: 0x4000,
- 0xcde: 0x4000, 0xcdf: 0x4000, 0xce0: 0x4000, 0xce1: 0x4000, 0xce2: 0x4000, 0xce3: 0x4000,
- 0xce4: 0x4000, 0xce5: 0x4000, 0xce6: 0x4000, 0xce7: 0x4000, 0xce8: 0x4000, 0xce9: 0x4000,
- 0xcea: 0x4000, 0xceb: 0x4000, 0xcec: 0x4000, 0xced: 0x4000, 0xcee: 0x4000, 0xcef: 0x4000,
- 0xcf0: 0x4000, 0xcf1: 0x4000, 0xcf2: 0x4000, 0xcf3: 0x4000, 0xcf4: 0x4000, 0xcf5: 0x4000,
- 0xcf6: 0x4000, 0xcf7: 0x4000, 0xcf8: 0x4000, 0xcf9: 0x4000, 0xcfa: 0x4000, 0xcfb: 0x4000,
- 0xcfc: 0x4000, 0xcfd: 0x4000, 0xcfe: 0x4000, 0xcff: 0x4000,
- // Block 0x34, offset 0xd00
- 0xd00: 0x4000, 0xd01: 0x4000, 0xd02: 0x4000, 0xd03: 0x4000, 0xd04: 0x4000, 0xd05: 0x4000,
- 0xd06: 0x4000, 0xd07: 0x4000, 0xd08: 0x4000, 0xd09: 0x4000, 0xd0a: 0x4000, 0xd0b: 0x4000,
- 0xd0c: 0x4000, 0xd0d: 0x4000, 0xd0e: 0x4000, 0xd0f: 0x4000, 0xd10: 0x4000, 0xd11: 0x4000,
- 0xd12: 0x4000, 0xd13: 0x4000, 0xd14: 0x4000, 0xd15: 0x4000, 0xd16: 0x4000,
- 0xd19: 0x4016, 0xd1a: 0x4017, 0xd1b: 0x4000, 0xd1c: 0x4000, 0xd1d: 0x4000,
- 0xd1e: 0x4000, 0xd1f: 0x4000, 0xd20: 0x4000, 0xd21: 0x4018, 0xd22: 0x4019, 0xd23: 0x401a,
- 0xd24: 0x401b, 0xd25: 0x401c, 0xd26: 0x401d, 0xd27: 0x401e, 0xd28: 0x401f, 0xd29: 0x4020,
- 0xd2a: 0x4021, 0xd2b: 0x4022, 0xd2c: 0x4000, 0xd2d: 0x4010, 0xd2e: 0x4000, 0xd2f: 0x4023,
- 0xd30: 0x4000, 0xd31: 0x4024, 0xd32: 0x4000, 0xd33: 0x4025, 0xd34: 0x4000, 0xd35: 0x4026,
- 0xd36: 0x4000, 0xd37: 0x401a, 0xd38: 0x4000, 0xd39: 0x4027, 0xd3a: 0x4000, 0xd3b: 0x4028,
- 0xd3c: 0x4000, 0xd3d: 0x4020, 0xd3e: 0x4000, 0xd3f: 0x4029,
- // Block 0x35, offset 0xd40
- 0xd40: 0x4000, 0xd41: 0x402a, 0xd42: 0x4000, 0xd43: 0x402b, 0xd44: 0x402c, 0xd45: 0x4000,
- 0xd46: 0x4017, 0xd47: 0x4000, 0xd48: 0x402d, 0xd49: 0x4000, 0xd4a: 0x402e, 0xd4b: 0x402f,
- 0xd4c: 0x4030, 0xd4d: 0x4017, 0xd4e: 0x4016, 0xd4f: 0x4017, 0xd50: 0x4000, 0xd51: 0x4000,
- 0xd52: 0x4031, 0xd53: 0x4000, 0xd54: 0x4000, 0xd55: 0x4031, 0xd56: 0x4000, 0xd57: 0x4000,
- 0xd58: 0x4032, 0xd59: 0x4000, 0xd5a: 0x4000, 0xd5b: 0x4032, 0xd5c: 0x4000, 0xd5d: 0x4000,
- 0xd5e: 0x4033, 0xd5f: 0x402e, 0xd60: 0x4034, 0xd61: 0x4035, 0xd62: 0x4034, 0xd63: 0x4036,
- 0xd64: 0x4037, 0xd65: 0x4024, 0xd66: 0x4035, 0xd67: 0x4025, 0xd68: 0x4038, 0xd69: 0x4038,
- 0xd6a: 0x4039, 0xd6b: 0x4039, 0xd6c: 0x403a, 0xd6d: 0x403a, 0xd6e: 0x4000, 0xd6f: 0x4035,
- 0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x403b, 0xd73: 0x403c, 0xd74: 0x4000, 0xd75: 0x4000,
- 0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x403d,
- 0xd7c: 0x401c, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000,
- // Block 0x36, offset 0xd80
- 0xd85: 0x4000,
- 0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000,
- 0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000,
- 0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000,
- 0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000,
- 0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000,
- 0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000,
- 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, 0xdae: 0x4000, 0xdaf: 0x4000,
- 0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e,
- 0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e,
- 0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e,
- // Block 0x37, offset 0xdc0
- 0xdc0: 0x4037, 0xdc1: 0x4037, 0xdc2: 0x4037, 0xdc3: 0x4037, 0xdc4: 0x4037, 0xdc5: 0x4037,
- 0xdc6: 0x4037, 0xdc7: 0x4037, 0xdc8: 0x4037, 0xdc9: 0x4037, 0xdca: 0x4037, 0xdcb: 0x4037,
- 0xdcc: 0x4037, 0xdcd: 0x4037, 0xdce: 0x4037, 0xdcf: 0x400e, 0xdd0: 0x403f, 0xdd1: 0x4040,
- 0xdd2: 0x4041, 0xdd3: 0x4040, 0xdd4: 0x403f, 0xdd5: 0x4042, 0xdd6: 0x4043, 0xdd7: 0x4044,
- 0xdd8: 0x4040, 0xdd9: 0x4041, 0xdda: 0x4040, 0xddb: 0x4045, 0xddc: 0x4009, 0xddd: 0x4045,
- 0xdde: 0x4046, 0xddf: 0x4045, 0xde0: 0x4047, 0xde1: 0x400b, 0xde2: 0x400a, 0xde3: 0x400c,
- 0xde4: 0x4048, 0xde5: 0x4000, 0xde6: 0x4000, 0xde7: 0x4000, 0xde8: 0x4000, 0xde9: 0x4000,
- 0xdea: 0x4000, 0xdeb: 0x4000, 0xdec: 0x4000, 0xded: 0x4000, 0xdee: 0x4000, 0xdef: 0x4000,
- 0xdf0: 0x4000, 0xdf1: 0x4000, 0xdf2: 0x4000, 0xdf3: 0x4000, 0xdf4: 0x4000, 0xdf5: 0x4000,
- 0xdf6: 0x4000, 0xdf7: 0x4000, 0xdf8: 0x4000, 0xdf9: 0x4000, 0xdfa: 0x4000, 0xdfb: 0x4000,
- 0xdfc: 0x4000, 0xdfd: 0x4000, 0xdfe: 0x4000, 0xdff: 0x4000,
- // Block 0x38, offset 0xe00
- 0xe00: 0x4000, 0xe01: 0x4000, 0xe02: 0x4000, 0xe03: 0x4000, 0xe04: 0x4000, 0xe05: 0x4000,
- 0xe06: 0x4000, 0xe07: 0x4000, 0xe08: 0x4000, 0xe09: 0x4000, 0xe0a: 0x4000, 0xe0b: 0x4000,
- 0xe0c: 0x4000, 0xe0d: 0x4000, 0xe0e: 0x4000, 0xe10: 0x4000, 0xe11: 0x4000,
- 0xe12: 0x4000, 0xe13: 0x4000, 0xe14: 0x4000, 0xe15: 0x4000, 0xe16: 0x4000, 0xe17: 0x4000,
- 0xe18: 0x4000, 0xe19: 0x4000, 0xe1a: 0x4000, 0xe1b: 0x4000, 0xe1c: 0x4000, 0xe1d: 0x4000,
- 0xe1e: 0x4000, 0xe1f: 0x4000, 0xe20: 0x4000, 0xe21: 0x4000, 0xe22: 0x4000, 0xe23: 0x4000,
- 0xe24: 0x4000, 0xe25: 0x4000, 0xe26: 0x4000, 0xe27: 0x4000, 0xe28: 0x4000, 0xe29: 0x4000,
- 0xe2a: 0x4000, 0xe2b: 0x4000, 0xe2c: 0x4000, 0xe2d: 0x4000, 0xe2e: 0x4000, 0xe2f: 0x4000,
- 0xe30: 0x4000, 0xe31: 0x4000, 0xe32: 0x4000, 0xe33: 0x4000, 0xe34: 0x4000, 0xe35: 0x4000,
- 0xe36: 0x4000, 0xe37: 0x4000, 0xe38: 0x4000, 0xe39: 0x4000, 0xe3a: 0x4000,
- // Block 0x39, offset 0xe40
- 0xe40: 0x4000, 0xe41: 0x4000, 0xe42: 0x4000, 0xe43: 0x4000, 0xe44: 0x4000, 0xe45: 0x4000,
- 0xe46: 0x4000, 0xe47: 0x4000, 0xe48: 0x4000, 0xe49: 0x4000, 0xe4a: 0x4000, 0xe4b: 0x4000,
- 0xe4c: 0x4000, 0xe4d: 0x4000, 0xe4e: 0x4000, 0xe4f: 0x4000, 0xe50: 0x4000, 0xe51: 0x4000,
- 0xe52: 0x4000, 0xe53: 0x4000, 0xe54: 0x4000, 0xe55: 0x4000, 0xe56: 0x4000, 0xe57: 0x4000,
- 0xe58: 0x4000, 0xe59: 0x4000, 0xe5a: 0x4000, 0xe5b: 0x4000, 0xe5c: 0x4000, 0xe5d: 0x4000,
- 0xe5e: 0x4000, 0xe5f: 0x4000, 0xe60: 0x4000, 0xe61: 0x4000, 0xe62: 0x4000, 0xe63: 0x4000,
- 0xe70: 0x4000, 0xe71: 0x4000, 0xe72: 0x4000, 0xe73: 0x4000, 0xe74: 0x4000, 0xe75: 0x4000,
- 0xe76: 0x4000, 0xe77: 0x4000, 0xe78: 0x4000, 0xe79: 0x4000, 0xe7a: 0x4000, 0xe7b: 0x4000,
- 0xe7c: 0x4000, 0xe7d: 0x4000, 0xe7e: 0x4000, 0xe7f: 0x4000,
- // Block 0x3a, offset 0xe80
- 0xe80: 0x4000, 0xe81: 0x4000, 0xe82: 0x4000, 0xe83: 0x4000, 0xe84: 0x4000, 0xe85: 0x4000,
- 0xe86: 0x4000, 0xe87: 0x4000, 0xe88: 0x4000, 0xe89: 0x4000, 0xe8a: 0x4000, 0xe8b: 0x4000,
- 0xe8c: 0x4000, 0xe8d: 0x4000, 0xe8e: 0x4000, 0xe8f: 0x4000, 0xe90: 0x4000, 0xe91: 0x4000,
- 0xe92: 0x4000, 0xe93: 0x4000, 0xe94: 0x4000, 0xe95: 0x4000, 0xe96: 0x4000, 0xe97: 0x4000,
- 0xe98: 0x4000, 0xe99: 0x4000, 0xe9a: 0x4000, 0xe9b: 0x4000, 0xe9c: 0x4000, 0xe9d: 0x4000,
- 0xe9e: 0x4000, 0xea0: 0x4000, 0xea1: 0x4000, 0xea2: 0x4000, 0xea3: 0x4000,
- 0xea4: 0x4000, 0xea5: 0x4000, 0xea6: 0x4000, 0xea7: 0x4000, 0xea8: 0x4000, 0xea9: 0x4000,
- 0xeaa: 0x4000, 0xeab: 0x4000, 0xeac: 0x4000, 0xead: 0x4000, 0xeae: 0x4000, 0xeaf: 0x4000,
- 0xeb0: 0x4000, 0xeb1: 0x4000, 0xeb2: 0x4000, 0xeb3: 0x4000, 0xeb4: 0x4000, 0xeb5: 0x4000,
- 0xeb6: 0x4000, 0xeb7: 0x4000, 0xeb8: 0x4000, 0xeb9: 0x4000, 0xeba: 0x4000, 0xebb: 0x4000,
- 0xebc: 0x4000, 0xebd: 0x4000, 0xebe: 0x4000, 0xebf: 0x4000,
- // Block 0x3b, offset 0xec0
- 0xec0: 0x4000, 0xec1: 0x4000, 0xec2: 0x4000, 0xec3: 0x4000, 0xec4: 0x4000, 0xec5: 0x4000,
- 0xec6: 0x4000, 0xec7: 0x4000, 0xec8: 0x2000, 0xec9: 0x2000, 0xeca: 0x2000, 0xecb: 0x2000,
- 0xecc: 0x2000, 0xecd: 0x2000, 0xece: 0x2000, 0xecf: 0x2000, 0xed0: 0x4000, 0xed1: 0x4000,
- 0xed2: 0x4000, 0xed3: 0x4000, 0xed4: 0x4000, 0xed5: 0x4000, 0xed6: 0x4000, 0xed7: 0x4000,
- 0xed8: 0x4000, 0xed9: 0x4000, 0xeda: 0x4000, 0xedb: 0x4000, 0xedc: 0x4000, 0xedd: 0x4000,
- 0xede: 0x4000, 0xedf: 0x4000, 0xee0: 0x4000, 0xee1: 0x4000, 0xee2: 0x4000, 0xee3: 0x4000,
- 0xee4: 0x4000, 0xee5: 0x4000, 0xee6: 0x4000, 0xee7: 0x4000, 0xee8: 0x4000, 0xee9: 0x4000,
- 0xeea: 0x4000, 0xeeb: 0x4000, 0xeec: 0x4000, 0xeed: 0x4000, 0xeee: 0x4000, 0xeef: 0x4000,
- 0xef0: 0x4000, 0xef1: 0x4000, 0xef2: 0x4000, 0xef3: 0x4000, 0xef4: 0x4000, 0xef5: 0x4000,
- 0xef6: 0x4000, 0xef7: 0x4000, 0xef8: 0x4000, 0xef9: 0x4000, 0xefa: 0x4000, 0xefb: 0x4000,
- 0xefc: 0x4000, 0xefd: 0x4000, 0xefe: 0x4000, 0xeff: 0x4000,
- // Block 0x3c, offset 0xf00
- 0xf00: 0x4000, 0xf01: 0x4000, 0xf02: 0x4000, 0xf03: 0x4000, 0xf04: 0x4000, 0xf05: 0x4000,
- 0xf06: 0x4000, 0xf07: 0x4000, 0xf08: 0x4000, 0xf09: 0x4000, 0xf0a: 0x4000, 0xf0b: 0x4000,
- 0xf0c: 0x4000, 0xf0d: 0x4000, 0xf0e: 0x4000, 0xf0f: 0x4000, 0xf10: 0x4000, 0xf11: 0x4000,
- 0xf12: 0x4000, 0xf13: 0x4000, 0xf14: 0x4000, 0xf15: 0x4000, 0xf16: 0x4000, 0xf17: 0x4000,
- 0xf18: 0x4000, 0xf19: 0x4000, 0xf1a: 0x4000, 0xf1b: 0x4000, 0xf1c: 0x4000, 0xf1d: 0x4000,
- 0xf1e: 0x4000, 0xf1f: 0x4000, 0xf20: 0x4000, 0xf21: 0x4000, 0xf22: 0x4000, 0xf23: 0x4000,
- 0xf24: 0x4000, 0xf25: 0x4000, 0xf26: 0x4000, 0xf27: 0x4000, 0xf28: 0x4000, 0xf29: 0x4000,
- 0xf2a: 0x4000, 0xf2b: 0x4000, 0xf2c: 0x4000, 0xf2d: 0x4000, 0xf2e: 0x4000, 0xf2f: 0x4000,
- 0xf30: 0x4000, 0xf31: 0x4000, 0xf32: 0x4000, 0xf33: 0x4000, 0xf34: 0x4000, 0xf35: 0x4000,
- 0xf36: 0x4000, 0xf37: 0x4000, 0xf38: 0x4000, 0xf39: 0x4000, 0xf3a: 0x4000, 0xf3b: 0x4000,
- 0xf3c: 0x4000, 0xf3d: 0x4000, 0xf3e: 0x4000,
- // Block 0x3d, offset 0xf40
- 0xf40: 0x4000, 0xf41: 0x4000, 0xf42: 0x4000, 0xf43: 0x4000, 0xf44: 0x4000, 0xf45: 0x4000,
- 0xf46: 0x4000, 0xf47: 0x4000, 0xf48: 0x4000, 0xf49: 0x4000, 0xf4a: 0x4000, 0xf4b: 0x4000,
- 0xf4c: 0x4000, 0xf50: 0x4000, 0xf51: 0x4000,
- 0xf52: 0x4000, 0xf53: 0x4000, 0xf54: 0x4000, 0xf55: 0x4000, 0xf56: 0x4000, 0xf57: 0x4000,
- 0xf58: 0x4000, 0xf59: 0x4000, 0xf5a: 0x4000, 0xf5b: 0x4000, 0xf5c: 0x4000, 0xf5d: 0x4000,
- 0xf5e: 0x4000, 0xf5f: 0x4000, 0xf60: 0x4000, 0xf61: 0x4000, 0xf62: 0x4000, 0xf63: 0x4000,
- 0xf64: 0x4000, 0xf65: 0x4000, 0xf66: 0x4000, 0xf67: 0x4000, 0xf68: 0x4000, 0xf69: 0x4000,
- 0xf6a: 0x4000, 0xf6b: 0x4000, 0xf6c: 0x4000, 0xf6d: 0x4000, 0xf6e: 0x4000, 0xf6f: 0x4000,
- 0xf70: 0x4000, 0xf71: 0x4000, 0xf72: 0x4000, 0xf73: 0x4000, 0xf74: 0x4000, 0xf75: 0x4000,
- 0xf76: 0x4000, 0xf77: 0x4000, 0xf78: 0x4000, 0xf79: 0x4000, 0xf7a: 0x4000, 0xf7b: 0x4000,
- 0xf7c: 0x4000, 0xf7d: 0x4000, 0xf7e: 0x4000, 0xf7f: 0x4000,
- // Block 0x3e, offset 0xf80
- 0xf80: 0x4000, 0xf81: 0x4000, 0xf82: 0x4000, 0xf83: 0x4000, 0xf84: 0x4000, 0xf85: 0x4000,
- 0xf86: 0x4000,
- // Block 0x3f, offset 0xfc0
- 0xfe0: 0x4000, 0xfe1: 0x4000, 0xfe2: 0x4000, 0xfe3: 0x4000,
- 0xfe4: 0x4000, 0xfe5: 0x4000, 0xfe6: 0x4000, 0xfe7: 0x4000, 0xfe8: 0x4000, 0xfe9: 0x4000,
- 0xfea: 0x4000, 0xfeb: 0x4000, 0xfec: 0x4000, 0xfed: 0x4000, 0xfee: 0x4000, 0xfef: 0x4000,
- 0xff0: 0x4000, 0xff1: 0x4000, 0xff2: 0x4000, 0xff3: 0x4000, 0xff4: 0x4000, 0xff5: 0x4000,
- 0xff6: 0x4000, 0xff7: 0x4000, 0xff8: 0x4000, 0xff9: 0x4000, 0xffa: 0x4000, 0xffb: 0x4000,
- 0xffc: 0x4000,
- // Block 0x40, offset 0x1000
- 0x1000: 0x4000, 0x1001: 0x4000, 0x1002: 0x4000, 0x1003: 0x4000, 0x1004: 0x4000, 0x1005: 0x4000,
- 0x1006: 0x4000, 0x1007: 0x4000, 0x1008: 0x4000, 0x1009: 0x4000, 0x100a: 0x4000, 0x100b: 0x4000,
- 0x100c: 0x4000, 0x100d: 0x4000, 0x100e: 0x4000, 0x100f: 0x4000, 0x1010: 0x4000, 0x1011: 0x4000,
- 0x1012: 0x4000, 0x1013: 0x4000, 0x1014: 0x4000, 0x1015: 0x4000, 0x1016: 0x4000, 0x1017: 0x4000,
- 0x1018: 0x4000, 0x1019: 0x4000, 0x101a: 0x4000, 0x101b: 0x4000, 0x101c: 0x4000, 0x101d: 0x4000,
- 0x101e: 0x4000, 0x101f: 0x4000, 0x1020: 0x4000, 0x1021: 0x4000, 0x1022: 0x4000, 0x1023: 0x4000,
- // Block 0x41, offset 0x1040
- 0x1040: 0x2000, 0x1041: 0x2000, 0x1042: 0x2000, 0x1043: 0x2000, 0x1044: 0x2000, 0x1045: 0x2000,
- 0x1046: 0x2000, 0x1047: 0x2000, 0x1048: 0x2000, 0x1049: 0x2000, 0x104a: 0x2000, 0x104b: 0x2000,
- 0x104c: 0x2000, 0x104d: 0x2000, 0x104e: 0x2000, 0x104f: 0x2000, 0x1050: 0x4000, 0x1051: 0x4000,
- 0x1052: 0x4000, 0x1053: 0x4000, 0x1054: 0x4000, 0x1055: 0x4000, 0x1056: 0x4000, 0x1057: 0x4000,
- 0x1058: 0x4000, 0x1059: 0x4000,
- 0x1070: 0x4000, 0x1071: 0x4000, 0x1072: 0x4000, 0x1073: 0x4000, 0x1074: 0x4000, 0x1075: 0x4000,
- 0x1076: 0x4000, 0x1077: 0x4000, 0x1078: 0x4000, 0x1079: 0x4000, 0x107a: 0x4000, 0x107b: 0x4000,
- 0x107c: 0x4000, 0x107d: 0x4000, 0x107e: 0x4000, 0x107f: 0x4000,
- // Block 0x42, offset 0x1080
- 0x1080: 0x4000, 0x1081: 0x4000, 0x1082: 0x4000, 0x1083: 0x4000, 0x1084: 0x4000, 0x1085: 0x4000,
- 0x1086: 0x4000, 0x1087: 0x4000, 0x1088: 0x4000, 0x1089: 0x4000, 0x108a: 0x4000, 0x108b: 0x4000,
- 0x108c: 0x4000, 0x108d: 0x4000, 0x108e: 0x4000, 0x108f: 0x4000, 0x1090: 0x4000, 0x1091: 0x4000,
- 0x1092: 0x4000, 0x1094: 0x4000, 0x1095: 0x4000, 0x1096: 0x4000, 0x1097: 0x4000,
- 0x1098: 0x4000, 0x1099: 0x4000, 0x109a: 0x4000, 0x109b: 0x4000, 0x109c: 0x4000, 0x109d: 0x4000,
- 0x109e: 0x4000, 0x109f: 0x4000, 0x10a0: 0x4000, 0x10a1: 0x4000, 0x10a2: 0x4000, 0x10a3: 0x4000,
- 0x10a4: 0x4000, 0x10a5: 0x4000, 0x10a6: 0x4000, 0x10a8: 0x4000, 0x10a9: 0x4000,
- 0x10aa: 0x4000, 0x10ab: 0x4000,
- // Block 0x43, offset 0x10c0
- 0x10c1: 0x9012, 0x10c2: 0x9012, 0x10c3: 0x9012, 0x10c4: 0x9012, 0x10c5: 0x9012,
- 0x10c6: 0x9012, 0x10c7: 0x9012, 0x10c8: 0x9012, 0x10c9: 0x9012, 0x10ca: 0x9012, 0x10cb: 0x9012,
- 0x10cc: 0x9012, 0x10cd: 0x9012, 0x10ce: 0x9012, 0x10cf: 0x9012, 0x10d0: 0x9012, 0x10d1: 0x9012,
- 0x10d2: 0x9012, 0x10d3: 0x9012, 0x10d4: 0x9012, 0x10d5: 0x9012, 0x10d6: 0x9012, 0x10d7: 0x9012,
- 0x10d8: 0x9012, 0x10d9: 0x9012, 0x10da: 0x9012, 0x10db: 0x9012, 0x10dc: 0x9012, 0x10dd: 0x9012,
- 0x10de: 0x9012, 0x10df: 0x9012, 0x10e0: 0x9049, 0x10e1: 0x9049, 0x10e2: 0x9049, 0x10e3: 0x9049,
- 0x10e4: 0x9049, 0x10e5: 0x9049, 0x10e6: 0x9049, 0x10e7: 0x9049, 0x10e8: 0x9049, 0x10e9: 0x9049,
- 0x10ea: 0x9049, 0x10eb: 0x9049, 0x10ec: 0x9049, 0x10ed: 0x9049, 0x10ee: 0x9049, 0x10ef: 0x9049,
- 0x10f0: 0x9049, 0x10f1: 0x9049, 0x10f2: 0x9049, 0x10f3: 0x9049, 0x10f4: 0x9049, 0x10f5: 0x9049,
- 0x10f6: 0x9049, 0x10f7: 0x9049, 0x10f8: 0x9049, 0x10f9: 0x9049, 0x10fa: 0x9049, 0x10fb: 0x9049,
- 0x10fc: 0x9049, 0x10fd: 0x9049, 0x10fe: 0x9049, 0x10ff: 0x9049,
- // Block 0x44, offset 0x1100
- 0x1100: 0x9049, 0x1101: 0x9049, 0x1102: 0x9049, 0x1103: 0x9049, 0x1104: 0x9049, 0x1105: 0x9049,
- 0x1106: 0x9049, 0x1107: 0x9049, 0x1108: 0x9049, 0x1109: 0x9049, 0x110a: 0x9049, 0x110b: 0x9049,
- 0x110c: 0x9049, 0x110d: 0x9049, 0x110e: 0x9049, 0x110f: 0x9049, 0x1110: 0x9049, 0x1111: 0x9049,
- 0x1112: 0x9049, 0x1113: 0x9049, 0x1114: 0x9049, 0x1115: 0x9049, 0x1116: 0x9049, 0x1117: 0x9049,
- 0x1118: 0x9049, 0x1119: 0x9049, 0x111a: 0x9049, 0x111b: 0x9049, 0x111c: 0x9049, 0x111d: 0x9049,
- 0x111e: 0x9049, 0x111f: 0x904a, 0x1120: 0x904b, 0x1121: 0xb04c, 0x1122: 0xb04d, 0x1123: 0xb04d,
- 0x1124: 0xb04e, 0x1125: 0xb04f, 0x1126: 0xb050, 0x1127: 0xb051, 0x1128: 0xb052, 0x1129: 0xb053,
- 0x112a: 0xb054, 0x112b: 0xb055, 0x112c: 0xb056, 0x112d: 0xb057, 0x112e: 0xb058, 0x112f: 0xb059,
- 0x1130: 0xb05a, 0x1131: 0xb05b, 0x1132: 0xb05c, 0x1133: 0xb05d, 0x1134: 0xb05e, 0x1135: 0xb05f,
- 0x1136: 0xb060, 0x1137: 0xb061, 0x1138: 0xb062, 0x1139: 0xb063, 0x113a: 0xb064, 0x113b: 0xb065,
- 0x113c: 0xb052, 0x113d: 0xb066, 0x113e: 0xb067, 0x113f: 0xb055,
- // Block 0x45, offset 0x1140
- 0x1140: 0xb068, 0x1141: 0xb069, 0x1142: 0xb06a, 0x1143: 0xb06b, 0x1144: 0xb05a, 0x1145: 0xb056,
- 0x1146: 0xb06c, 0x1147: 0xb06d, 0x1148: 0xb06b, 0x1149: 0xb06e, 0x114a: 0xb06b, 0x114b: 0xb06f,
- 0x114c: 0xb06f, 0x114d: 0xb070, 0x114e: 0xb070, 0x114f: 0xb071, 0x1150: 0xb056, 0x1151: 0xb072,
- 0x1152: 0xb073, 0x1153: 0xb072, 0x1154: 0xb074, 0x1155: 0xb073, 0x1156: 0xb075, 0x1157: 0xb075,
- 0x1158: 0xb076, 0x1159: 0xb076, 0x115a: 0xb077, 0x115b: 0xb077, 0x115c: 0xb073, 0x115d: 0xb078,
- 0x115e: 0xb079, 0x115f: 0xb067, 0x1160: 0xb07a, 0x1161: 0xb07b, 0x1162: 0xb07b, 0x1163: 0xb07b,
- 0x1164: 0xb07b, 0x1165: 0xb07b, 0x1166: 0xb07b, 0x1167: 0xb07b, 0x1168: 0xb07b, 0x1169: 0xb07b,
- 0x116a: 0xb07b, 0x116b: 0xb07b, 0x116c: 0xb07b, 0x116d: 0xb07b, 0x116e: 0xb07b, 0x116f: 0xb07b,
- 0x1170: 0xb07c, 0x1171: 0xb07c, 0x1172: 0xb07c, 0x1173: 0xb07c, 0x1174: 0xb07c, 0x1175: 0xb07c,
- 0x1176: 0xb07c, 0x1177: 0xb07c, 0x1178: 0xb07c, 0x1179: 0xb07c, 0x117a: 0xb07c, 0x117b: 0xb07c,
- 0x117c: 0xb07c, 0x117d: 0xb07c, 0x117e: 0xb07c,
- // Block 0x46, offset 0x1180
- 0x1182: 0xb07d, 0x1183: 0xb07e, 0x1184: 0xb07f, 0x1185: 0xb080,
- 0x1186: 0xb07f, 0x1187: 0xb07e, 0x118a: 0xb081, 0x118b: 0xb082,
- 0x118c: 0xb083, 0x118d: 0xb07f, 0x118e: 0xb080, 0x118f: 0xb07f,
- 0x1192: 0xb084, 0x1193: 0xb085, 0x1194: 0xb084, 0x1195: 0xb086, 0x1196: 0xb084, 0x1197: 0xb087,
- 0x119a: 0xb088, 0x119b: 0xb089, 0x119c: 0xb08a,
- 0x11a0: 0x908b, 0x11a1: 0x908b, 0x11a2: 0x908c, 0x11a3: 0x908d,
- 0x11a4: 0x908b, 0x11a5: 0x908e, 0x11a6: 0x908f, 0x11a8: 0xb090, 0x11a9: 0xb091,
- 0x11aa: 0xb092, 0x11ab: 0xb091, 0x11ac: 0xb093, 0x11ad: 0xb094, 0x11ae: 0xb095,
- 0x11bd: 0x2000,
- // Block 0x47, offset 0x11c0
- 0x11e0: 0x4000, 0x11e1: 0x4000,
- // Block 0x48, offset 0x1200
- 0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000,
- 0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000,
- 0x120c: 0x4000, 0x120d: 0x4000, 0x120e: 0x4000, 0x120f: 0x4000, 0x1210: 0x4000, 0x1211: 0x4000,
- 0x1212: 0x4000, 0x1213: 0x4000, 0x1214: 0x4000, 0x1215: 0x4000, 0x1216: 0x4000, 0x1217: 0x4000,
- 0x1218: 0x4000, 0x1219: 0x4000, 0x121a: 0x4000, 0x121b: 0x4000, 0x121c: 0x4000, 0x121d: 0x4000,
- 0x121e: 0x4000, 0x121f: 0x4000, 0x1220: 0x4000, 0x1221: 0x4000, 0x1222: 0x4000, 0x1223: 0x4000,
- 0x1224: 0x4000, 0x1225: 0x4000, 0x1226: 0x4000, 0x1227: 0x4000, 0x1228: 0x4000, 0x1229: 0x4000,
- 0x122a: 0x4000, 0x122b: 0x4000, 0x122c: 0x4000, 0x122d: 0x4000, 0x122e: 0x4000, 0x122f: 0x4000,
- 0x1230: 0x4000, 0x1231: 0x4000,
- // Block 0x49, offset 0x1240
- 0x1240: 0x4000, 0x1241: 0x4000, 0x1242: 0x4000, 0x1243: 0x4000, 0x1244: 0x4000, 0x1245: 0x4000,
- 0x1246: 0x4000, 0x1247: 0x4000, 0x1248: 0x4000, 0x1249: 0x4000, 0x124a: 0x4000, 0x124b: 0x4000,
- 0x124c: 0x4000, 0x124d: 0x4000, 0x124e: 0x4000, 0x124f: 0x4000, 0x1250: 0x4000, 0x1251: 0x4000,
- 0x1252: 0x4000, 0x1253: 0x4000, 0x1254: 0x4000, 0x1255: 0x4000, 0x1256: 0x4000, 0x1257: 0x4000,
- 0x1258: 0x4000, 0x1259: 0x4000, 0x125a: 0x4000, 0x125b: 0x4000, 0x125c: 0x4000, 0x125d: 0x4000,
- 0x125e: 0x4000, 0x125f: 0x4000, 0x1260: 0x4000, 0x1261: 0x4000, 0x1262: 0x4000, 0x1263: 0x4000,
- 0x1264: 0x4000, 0x1265: 0x4000, 0x1266: 0x4000, 0x1267: 0x4000, 0x1268: 0x4000, 0x1269: 0x4000,
- 0x126a: 0x4000, 0x126b: 0x4000, 0x126c: 0x4000, 0x126d: 0x4000, 0x126e: 0x4000, 0x126f: 0x4000,
- 0x1270: 0x4000, 0x1271: 0x4000, 0x1272: 0x4000,
- // Block 0x4a, offset 0x1280
- 0x1280: 0x4000, 0x1281: 0x4000, 0x1282: 0x4000, 0x1283: 0x4000, 0x1284: 0x4000, 0x1285: 0x4000,
- 0x1286: 0x4000, 0x1287: 0x4000, 0x1288: 0x4000, 0x1289: 0x4000, 0x128a: 0x4000, 0x128b: 0x4000,
- 0x128c: 0x4000, 0x128d: 0x4000, 0x128e: 0x4000, 0x128f: 0x4000, 0x1290: 0x4000, 0x1291: 0x4000,
- 0x1292: 0x4000, 0x1293: 0x4000, 0x1294: 0x4000, 0x1295: 0x4000, 0x1296: 0x4000, 0x1297: 0x4000,
- 0x1298: 0x4000, 0x1299: 0x4000, 0x129a: 0x4000, 0x129b: 0x4000, 0x129c: 0x4000, 0x129d: 0x4000,
- 0x129e: 0x4000,
- // Block 0x4b, offset 0x12c0
- 0x12f0: 0x4000, 0x12f1: 0x4000, 0x12f2: 0x4000, 0x12f3: 0x4000, 0x12f4: 0x4000, 0x12f5: 0x4000,
- 0x12f6: 0x4000, 0x12f7: 0x4000, 0x12f8: 0x4000, 0x12f9: 0x4000, 0x12fa: 0x4000, 0x12fb: 0x4000,
- 0x12fc: 0x4000, 0x12fd: 0x4000, 0x12fe: 0x4000, 0x12ff: 0x4000,
- // Block 0x4c, offset 0x1300
- 0x1300: 0x4000, 0x1301: 0x4000, 0x1302: 0x4000, 0x1303: 0x4000, 0x1304: 0x4000, 0x1305: 0x4000,
- 0x1306: 0x4000, 0x1307: 0x4000, 0x1308: 0x4000, 0x1309: 0x4000, 0x130a: 0x4000, 0x130b: 0x4000,
- 0x130c: 0x4000, 0x130d: 0x4000, 0x130e: 0x4000, 0x130f: 0x4000, 0x1310: 0x4000, 0x1311: 0x4000,
- 0x1312: 0x4000, 0x1313: 0x4000, 0x1314: 0x4000, 0x1315: 0x4000, 0x1316: 0x4000, 0x1317: 0x4000,
- 0x1318: 0x4000, 0x1319: 0x4000, 0x131a: 0x4000, 0x131b: 0x4000, 0x131c: 0x4000, 0x131d: 0x4000,
- 0x131e: 0x4000, 0x131f: 0x4000, 0x1320: 0x4000, 0x1321: 0x4000, 0x1322: 0x4000, 0x1323: 0x4000,
- 0x1324: 0x4000, 0x1325: 0x4000, 0x1326: 0x4000, 0x1327: 0x4000, 0x1328: 0x4000, 0x1329: 0x4000,
- 0x132a: 0x4000, 0x132b: 0x4000, 0x132c: 0x4000, 0x132d: 0x4000, 0x132e: 0x4000, 0x132f: 0x4000,
- 0x1330: 0x4000, 0x1331: 0x4000, 0x1332: 0x4000, 0x1333: 0x4000, 0x1334: 0x4000, 0x1335: 0x4000,
- 0x1336: 0x4000, 0x1337: 0x4000, 0x1338: 0x4000, 0x1339: 0x4000, 0x133a: 0x4000, 0x133b: 0x4000,
- // Block 0x4d, offset 0x1340
- 0x1344: 0x4000,
- // Block 0x4e, offset 0x1380
- 0x138f: 0x4000,
- // Block 0x4f, offset 0x13c0
- 0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000,
- 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000,
- 0x13d0: 0x2000, 0x13d1: 0x2000,
- 0x13d2: 0x2000, 0x13d3: 0x2000, 0x13d4: 0x2000, 0x13d5: 0x2000, 0x13d6: 0x2000, 0x13d7: 0x2000,
- 0x13d8: 0x2000, 0x13d9: 0x2000, 0x13da: 0x2000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000,
- 0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000,
- 0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000,
- 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000, 0x13ed: 0x2000,
- 0x13f0: 0x2000, 0x13f1: 0x2000, 0x13f2: 0x2000, 0x13f3: 0x2000, 0x13f4: 0x2000, 0x13f5: 0x2000,
- 0x13f6: 0x2000, 0x13f7: 0x2000, 0x13f8: 0x2000, 0x13f9: 0x2000, 0x13fa: 0x2000, 0x13fb: 0x2000,
- 0x13fc: 0x2000, 0x13fd: 0x2000, 0x13fe: 0x2000, 0x13ff: 0x2000,
- // Block 0x50, offset 0x1400
- 0x1400: 0x2000, 0x1401: 0x2000, 0x1402: 0x2000, 0x1403: 0x2000, 0x1404: 0x2000, 0x1405: 0x2000,
- 0x1406: 0x2000, 0x1407: 0x2000, 0x1408: 0x2000, 0x1409: 0x2000, 0x140a: 0x2000, 0x140b: 0x2000,
- 0x140c: 0x2000, 0x140d: 0x2000, 0x140e: 0x2000, 0x140f: 0x2000, 0x1410: 0x2000, 0x1411: 0x2000,
- 0x1412: 0x2000, 0x1413: 0x2000, 0x1414: 0x2000, 0x1415: 0x2000, 0x1416: 0x2000, 0x1417: 0x2000,
- 0x1418: 0x2000, 0x1419: 0x2000, 0x141a: 0x2000, 0x141b: 0x2000, 0x141c: 0x2000, 0x141d: 0x2000,
- 0x141e: 0x2000, 0x141f: 0x2000, 0x1420: 0x2000, 0x1421: 0x2000, 0x1422: 0x2000, 0x1423: 0x2000,
- 0x1424: 0x2000, 0x1425: 0x2000, 0x1426: 0x2000, 0x1427: 0x2000, 0x1428: 0x2000, 0x1429: 0x2000,
- 0x1430: 0x2000, 0x1431: 0x2000, 0x1432: 0x2000, 0x1433: 0x2000, 0x1434: 0x2000, 0x1435: 0x2000,
- 0x1436: 0x2000, 0x1437: 0x2000, 0x1438: 0x2000, 0x1439: 0x2000, 0x143a: 0x2000, 0x143b: 0x2000,
- 0x143c: 0x2000, 0x143d: 0x2000, 0x143e: 0x2000, 0x143f: 0x2000,
- // Block 0x51, offset 0x1440
- 0x1440: 0x2000, 0x1441: 0x2000, 0x1442: 0x2000, 0x1443: 0x2000, 0x1444: 0x2000, 0x1445: 0x2000,
- 0x1446: 0x2000, 0x1447: 0x2000, 0x1448: 0x2000, 0x1449: 0x2000, 0x144a: 0x2000, 0x144b: 0x2000,
- 0x144c: 0x2000, 0x144d: 0x2000, 0x144e: 0x4000, 0x144f: 0x2000, 0x1450: 0x2000, 0x1451: 0x4000,
- 0x1452: 0x4000, 0x1453: 0x4000, 0x1454: 0x4000, 0x1455: 0x4000, 0x1456: 0x4000, 0x1457: 0x4000,
- 0x1458: 0x4000, 0x1459: 0x4000, 0x145a: 0x4000, 0x145b: 0x2000, 0x145c: 0x2000, 0x145d: 0x2000,
- 0x145e: 0x2000, 0x145f: 0x2000, 0x1460: 0x2000, 0x1461: 0x2000, 0x1462: 0x2000, 0x1463: 0x2000,
- 0x1464: 0x2000, 0x1465: 0x2000, 0x1466: 0x2000, 0x1467: 0x2000, 0x1468: 0x2000, 0x1469: 0x2000,
- 0x146a: 0x2000, 0x146b: 0x2000, 0x146c: 0x2000,
- // Block 0x52, offset 0x1480
- 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000,
- 0x1490: 0x4000, 0x1491: 0x4000,
- 0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000,
- 0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000,
- 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000, 0x14a1: 0x4000, 0x14a2: 0x4000, 0x14a3: 0x4000,
- 0x14a4: 0x4000, 0x14a5: 0x4000, 0x14a6: 0x4000, 0x14a7: 0x4000, 0x14a8: 0x4000, 0x14a9: 0x4000,
- 0x14aa: 0x4000, 0x14ab: 0x4000, 0x14ac: 0x4000, 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000,
- 0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000,
- 0x14b6: 0x4000, 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000,
- // Block 0x53, offset 0x14c0
- 0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000,
- 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000,
- 0x14d0: 0x4000, 0x14d1: 0x4000,
- 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000,
- 0x14e4: 0x4000, 0x14e5: 0x4000,
- // Block 0x54, offset 0x1500
- 0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000,
- 0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000,
- 0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000,
- 0x1512: 0x4000, 0x1513: 0x4000, 0x1514: 0x4000, 0x1515: 0x4000, 0x1516: 0x4000, 0x1517: 0x4000,
- 0x1518: 0x4000, 0x1519: 0x4000, 0x151a: 0x4000, 0x151b: 0x4000, 0x151c: 0x4000, 0x151d: 0x4000,
- 0x151e: 0x4000, 0x151f: 0x4000, 0x1520: 0x4000,
- 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000,
- 0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000,
- 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000,
- 0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000,
- // Block 0x55, offset 0x1540
- 0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000,
- 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000, 0x154b: 0x4000,
- 0x154c: 0x4000, 0x154d: 0x4000, 0x154e: 0x4000, 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000,
- 0x1552: 0x4000, 0x1553: 0x4000, 0x1554: 0x4000, 0x1555: 0x4000, 0x1556: 0x4000, 0x1557: 0x4000,
- 0x1558: 0x4000, 0x1559: 0x4000, 0x155a: 0x4000, 0x155b: 0x4000, 0x155c: 0x4000, 0x155d: 0x4000,
- 0x155e: 0x4000, 0x155f: 0x4000, 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000,
- 0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000,
- 0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000,
- 0x1570: 0x4000, 0x1571: 0x4000, 0x1572: 0x4000, 0x1573: 0x4000, 0x1574: 0x4000, 0x1575: 0x4000,
- 0x1576: 0x4000, 0x1577: 0x4000, 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000,
- 0x157c: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000,
- // Block 0x56, offset 0x1580
- 0x1580: 0x4000, 0x1581: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000,
- 0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000,
- 0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000,
- 0x1592: 0x4000, 0x1593: 0x4000,
- 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000,
- 0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000,
- 0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000,
- 0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000,
- 0x15b6: 0x4000, 0x15b7: 0x4000, 0x15b8: 0x4000, 0x15b9: 0x4000, 0x15ba: 0x4000, 0x15bb: 0x4000,
- 0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000,
- // Block 0x57, offset 0x15c0
- 0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000,
- 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000,
- 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000,
- 0x15d2: 0x4000, 0x15d3: 0x4000,
- 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000,
- 0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000,
- 0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000,
- 0x15f0: 0x4000, 0x15f4: 0x4000,
- 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000,
- 0x15fc: 0x4000, 0x15fd: 0x4000, 0x15fe: 0x4000, 0x15ff: 0x4000,
- // Block 0x58, offset 0x1600
- 0x1600: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000,
- 0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000,
- 0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000,
- 0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000,
- 0x1618: 0x4000, 0x1619: 0x4000, 0x161a: 0x4000, 0x161b: 0x4000, 0x161c: 0x4000, 0x161d: 0x4000,
- 0x161e: 0x4000, 0x161f: 0x4000, 0x1620: 0x4000, 0x1621: 0x4000, 0x1622: 0x4000, 0x1623: 0x4000,
- 0x1624: 0x4000, 0x1625: 0x4000, 0x1626: 0x4000, 0x1627: 0x4000, 0x1628: 0x4000, 0x1629: 0x4000,
- 0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000,
- 0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000,
- 0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000,
- 0x163c: 0x4000, 0x163d: 0x4000, 0x163e: 0x4000, 0x163f: 0x4000,
- // Block 0x59, offset 0x1640
- 0x1640: 0x4000, 0x1641: 0x4000, 0x1642: 0x4000, 0x1643: 0x4000, 0x1644: 0x4000, 0x1645: 0x4000,
- 0x1646: 0x4000, 0x1647: 0x4000, 0x1648: 0x4000, 0x1649: 0x4000, 0x164a: 0x4000, 0x164b: 0x4000,
- 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x164f: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000,
- 0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000,
- 0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000,
- 0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000,
- 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000, 0x1668: 0x4000, 0x1669: 0x4000,
- 0x166a: 0x4000, 0x166b: 0x4000, 0x166c: 0x4000, 0x166d: 0x4000, 0x166e: 0x4000, 0x166f: 0x4000,
- 0x1670: 0x4000, 0x1671: 0x4000, 0x1672: 0x4000, 0x1673: 0x4000, 0x1674: 0x4000, 0x1675: 0x4000,
- 0x1676: 0x4000, 0x1677: 0x4000, 0x1678: 0x4000, 0x1679: 0x4000, 0x167a: 0x4000, 0x167b: 0x4000,
- 0x167c: 0x4000, 0x167f: 0x4000,
- // Block 0x5a, offset 0x1680
- 0x1680: 0x4000, 0x1681: 0x4000, 0x1682: 0x4000, 0x1683: 0x4000, 0x1684: 0x4000, 0x1685: 0x4000,
- 0x1686: 0x4000, 0x1687: 0x4000, 0x1688: 0x4000, 0x1689: 0x4000, 0x168a: 0x4000, 0x168b: 0x4000,
- 0x168c: 0x4000, 0x168d: 0x4000, 0x168e: 0x4000, 0x168f: 0x4000, 0x1690: 0x4000, 0x1691: 0x4000,
- 0x1692: 0x4000, 0x1693: 0x4000, 0x1694: 0x4000, 0x1695: 0x4000, 0x1696: 0x4000, 0x1697: 0x4000,
- 0x1698: 0x4000, 0x1699: 0x4000, 0x169a: 0x4000, 0x169b: 0x4000, 0x169c: 0x4000, 0x169d: 0x4000,
- 0x169e: 0x4000, 0x169f: 0x4000, 0x16a0: 0x4000, 0x16a1: 0x4000, 0x16a2: 0x4000, 0x16a3: 0x4000,
- 0x16a4: 0x4000, 0x16a5: 0x4000, 0x16a6: 0x4000, 0x16a7: 0x4000, 0x16a8: 0x4000, 0x16a9: 0x4000,
- 0x16aa: 0x4000, 0x16ab: 0x4000, 0x16ac: 0x4000, 0x16ad: 0x4000, 0x16ae: 0x4000, 0x16af: 0x4000,
- 0x16b0: 0x4000, 0x16b1: 0x4000, 0x16b2: 0x4000, 0x16b3: 0x4000, 0x16b4: 0x4000, 0x16b5: 0x4000,
- 0x16b6: 0x4000, 0x16b7: 0x4000, 0x16b8: 0x4000, 0x16b9: 0x4000, 0x16ba: 0x4000, 0x16bb: 0x4000,
- 0x16bc: 0x4000, 0x16bd: 0x4000,
- // Block 0x5b, offset 0x16c0
- 0x16cb: 0x4000,
- 0x16cc: 0x4000, 0x16cd: 0x4000, 0x16ce: 0x4000, 0x16d0: 0x4000, 0x16d1: 0x4000,
- 0x16d2: 0x4000, 0x16d3: 0x4000, 0x16d4: 0x4000, 0x16d5: 0x4000, 0x16d6: 0x4000, 0x16d7: 0x4000,
- 0x16d8: 0x4000, 0x16d9: 0x4000, 0x16da: 0x4000, 0x16db: 0x4000, 0x16dc: 0x4000, 0x16dd: 0x4000,
- 0x16de: 0x4000, 0x16df: 0x4000, 0x16e0: 0x4000, 0x16e1: 0x4000, 0x16e2: 0x4000, 0x16e3: 0x4000,
- 0x16e4: 0x4000, 0x16e5: 0x4000, 0x16e6: 0x4000, 0x16e7: 0x4000,
- 0x16fa: 0x4000,
- // Block 0x5c, offset 0x1700
- 0x1715: 0x4000, 0x1716: 0x4000,
- 0x1724: 0x4000,
- // Block 0x5d, offset 0x1740
- 0x177b: 0x4000,
- 0x177c: 0x4000, 0x177d: 0x4000, 0x177e: 0x4000, 0x177f: 0x4000,
- // Block 0x5e, offset 0x1780
- 0x1780: 0x4000, 0x1781: 0x4000, 0x1782: 0x4000, 0x1783: 0x4000, 0x1784: 0x4000, 0x1785: 0x4000,
- 0x1786: 0x4000, 0x1787: 0x4000, 0x1788: 0x4000, 0x1789: 0x4000, 0x178a: 0x4000, 0x178b: 0x4000,
- 0x178c: 0x4000, 0x178d: 0x4000, 0x178e: 0x4000, 0x178f: 0x4000,
- // Block 0x5f, offset 0x17c0
- 0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000,
- 0x17cc: 0x4000, 0x17d0: 0x4000, 0x17d1: 0x4000,
- 0x17d2: 0x4000,
- 0x17eb: 0x4000, 0x17ec: 0x4000,
- 0x17f4: 0x4000, 0x17f5: 0x4000,
- 0x17f6: 0x4000, 0x17f7: 0x4000, 0x17f8: 0x4000, 0x17f9: 0x4000,
- // Block 0x60, offset 0x1800
- 0x1810: 0x4000, 0x1811: 0x4000,
- 0x1812: 0x4000, 0x1813: 0x4000, 0x1814: 0x4000, 0x1815: 0x4000, 0x1816: 0x4000, 0x1817: 0x4000,
- 0x1818: 0x4000, 0x1819: 0x4000, 0x181a: 0x4000, 0x181b: 0x4000, 0x181c: 0x4000, 0x181d: 0x4000,
- 0x181e: 0x4000, 0x181f: 0x4000, 0x1820: 0x4000, 0x1821: 0x4000, 0x1822: 0x4000, 0x1823: 0x4000,
- 0x1824: 0x4000, 0x1825: 0x4000, 0x1826: 0x4000, 0x1827: 0x4000, 0x1828: 0x4000, 0x1829: 0x4000,
- 0x182a: 0x4000, 0x182b: 0x4000, 0x182c: 0x4000, 0x182d: 0x4000, 0x182e: 0x4000, 0x182f: 0x4000,
- 0x1830: 0x4000, 0x1831: 0x4000, 0x1832: 0x4000, 0x1833: 0x4000, 0x1834: 0x4000, 0x1835: 0x4000,
- 0x1836: 0x4000, 0x1837: 0x4000, 0x1838: 0x4000, 0x1839: 0x4000, 0x183a: 0x4000, 0x183b: 0x4000,
- 0x183c: 0x4000, 0x183d: 0x4000, 0x183e: 0x4000,
- // Block 0x61, offset 0x1840
- 0x1840: 0x4000, 0x1841: 0x4000, 0x1842: 0x4000, 0x1843: 0x4000, 0x1844: 0x4000, 0x1845: 0x4000,
- 0x1846: 0x4000, 0x1847: 0x4000, 0x1848: 0x4000, 0x1849: 0x4000, 0x184a: 0x4000, 0x184b: 0x4000,
- 0x184c: 0x4000, 0x184d: 0x4000, 0x184e: 0x4000, 0x184f: 0x4000, 0x1850: 0x4000, 0x1851: 0x4000,
- 0x1852: 0x4000, 0x1853: 0x4000, 0x1854: 0x4000, 0x1855: 0x4000, 0x1856: 0x4000, 0x1857: 0x4000,
- 0x1858: 0x4000, 0x1859: 0x4000, 0x185a: 0x4000, 0x185b: 0x4000, 0x185c: 0x4000, 0x185d: 0x4000,
- 0x185e: 0x4000, 0x185f: 0x4000, 0x1860: 0x4000, 0x1861: 0x4000, 0x1862: 0x4000, 0x1863: 0x4000,
- 0x1864: 0x4000, 0x1865: 0x4000, 0x1866: 0x4000, 0x1867: 0x4000, 0x1868: 0x4000, 0x1869: 0x4000,
- 0x186a: 0x4000, 0x186b: 0x4000, 0x186c: 0x4000, 0x186d: 0x4000, 0x186e: 0x4000, 0x186f: 0x4000,
- 0x1870: 0x4000, 0x1873: 0x4000, 0x1874: 0x4000, 0x1875: 0x4000,
- 0x1876: 0x4000, 0x187a: 0x4000,
- 0x187c: 0x4000, 0x187d: 0x4000, 0x187e: 0x4000, 0x187f: 0x4000,
- // Block 0x62, offset 0x1880
- 0x1880: 0x4000, 0x1881: 0x4000, 0x1882: 0x4000, 0x1883: 0x4000, 0x1884: 0x4000, 0x1885: 0x4000,
- 0x1886: 0x4000, 0x1887: 0x4000, 0x1888: 0x4000, 0x1889: 0x4000, 0x188a: 0x4000, 0x188b: 0x4000,
- 0x188c: 0x4000, 0x188d: 0x4000, 0x188e: 0x4000, 0x188f: 0x4000, 0x1890: 0x4000, 0x1891: 0x4000,
- 0x1892: 0x4000, 0x1893: 0x4000, 0x1894: 0x4000, 0x1895: 0x4000, 0x1896: 0x4000, 0x1897: 0x4000,
- 0x1898: 0x4000, 0x1899: 0x4000, 0x189a: 0x4000, 0x189b: 0x4000, 0x189c: 0x4000, 0x189d: 0x4000,
- 0x189e: 0x4000, 0x189f: 0x4000, 0x18a0: 0x4000, 0x18a1: 0x4000, 0x18a2: 0x4000,
- 0x18b0: 0x4000, 0x18b1: 0x4000, 0x18b2: 0x4000, 0x18b3: 0x4000, 0x18b4: 0x4000, 0x18b5: 0x4000,
- 0x18b6: 0x4000, 0x18b7: 0x4000, 0x18b8: 0x4000, 0x18b9: 0x4000,
- // Block 0x63, offset 0x18c0
- 0x18c0: 0x4000, 0x18c1: 0x4000, 0x18c2: 0x4000,
- 0x18d0: 0x4000, 0x18d1: 0x4000,
- 0x18d2: 0x4000, 0x18d3: 0x4000, 0x18d4: 0x4000, 0x18d5: 0x4000, 0x18d6: 0x4000, 0x18d7: 0x4000,
- 0x18d8: 0x4000, 0x18d9: 0x4000, 0x18da: 0x4000, 0x18db: 0x4000, 0x18dc: 0x4000, 0x18dd: 0x4000,
- 0x18de: 0x4000, 0x18df: 0x4000, 0x18e0: 0x4000, 0x18e1: 0x4000, 0x18e2: 0x4000, 0x18e3: 0x4000,
- 0x18e4: 0x4000, 0x18e5: 0x4000, 0x18e6: 0x4000, 0x18e7: 0x4000, 0x18e8: 0x4000, 0x18e9: 0x4000,
- 0x18ea: 0x4000, 0x18eb: 0x4000, 0x18ec: 0x4000, 0x18ed: 0x4000, 0x18ee: 0x4000, 0x18ef: 0x4000,
- 0x18f0: 0x4000, 0x18f1: 0x4000, 0x18f2: 0x4000, 0x18f3: 0x4000, 0x18f4: 0x4000, 0x18f5: 0x4000,
- 0x18f6: 0x4000, 0x18f7: 0x4000, 0x18f8: 0x4000, 0x18f9: 0x4000, 0x18fa: 0x4000, 0x18fb: 0x4000,
- 0x18fc: 0x4000, 0x18fd: 0x4000, 0x18fe: 0x4000, 0x18ff: 0x4000,
- // Block 0x64, offset 0x1900
- 0x1900: 0x2000, 0x1901: 0x2000, 0x1902: 0x2000, 0x1903: 0x2000, 0x1904: 0x2000, 0x1905: 0x2000,
- 0x1906: 0x2000, 0x1907: 0x2000, 0x1908: 0x2000, 0x1909: 0x2000, 0x190a: 0x2000, 0x190b: 0x2000,
- 0x190c: 0x2000, 0x190d: 0x2000, 0x190e: 0x2000, 0x190f: 0x2000, 0x1910: 0x2000, 0x1911: 0x2000,
- 0x1912: 0x2000, 0x1913: 0x2000, 0x1914: 0x2000, 0x1915: 0x2000, 0x1916: 0x2000, 0x1917: 0x2000,
- 0x1918: 0x2000, 0x1919: 0x2000, 0x191a: 0x2000, 0x191b: 0x2000, 0x191c: 0x2000, 0x191d: 0x2000,
- 0x191e: 0x2000, 0x191f: 0x2000, 0x1920: 0x2000, 0x1921: 0x2000, 0x1922: 0x2000, 0x1923: 0x2000,
- 0x1924: 0x2000, 0x1925: 0x2000, 0x1926: 0x2000, 0x1927: 0x2000, 0x1928: 0x2000, 0x1929: 0x2000,
- 0x192a: 0x2000, 0x192b: 0x2000, 0x192c: 0x2000, 0x192d: 0x2000, 0x192e: 0x2000, 0x192f: 0x2000,
- 0x1930: 0x2000, 0x1931: 0x2000, 0x1932: 0x2000, 0x1933: 0x2000, 0x1934: 0x2000, 0x1935: 0x2000,
- 0x1936: 0x2000, 0x1937: 0x2000, 0x1938: 0x2000, 0x1939: 0x2000, 0x193a: 0x2000, 0x193b: 0x2000,
- 0x193c: 0x2000, 0x193d: 0x2000,
-}
-
-// widthIndex: 22 blocks, 1408 entries, 1408 bytes
-// Block 0 is the zero block.
-var widthIndex = [1408]uint8{
- // Block 0x0, offset 0x0
- // Block 0x1, offset 0x40
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc7: 0x05,
- 0xc9: 0x06, 0xcb: 0x07, 0xcc: 0x08, 0xcd: 0x09, 0xce: 0x0a, 0xcf: 0x0b,
- 0xd0: 0x0c, 0xd1: 0x0d,
- 0xe1: 0x02, 0xe2: 0x03, 0xe3: 0x04, 0xe4: 0x05, 0xe5: 0x06, 0xe6: 0x06, 0xe7: 0x06,
- 0xe8: 0x06, 0xe9: 0x06, 0xea: 0x07, 0xeb: 0x06, 0xec: 0x06, 0xed: 0x08, 0xee: 0x09, 0xef: 0x0a,
- 0xf0: 0x0f, 0xf3: 0x12, 0xf4: 0x13,
- // Block 0x4, offset 0x100
- 0x104: 0x0e, 0x105: 0x0f,
- // Block 0x5, offset 0x140
- 0x140: 0x10, 0x141: 0x11, 0x142: 0x12, 0x144: 0x13, 0x145: 0x14, 0x146: 0x15, 0x147: 0x16,
- 0x148: 0x17, 0x149: 0x18, 0x14a: 0x19, 0x14c: 0x1a, 0x14f: 0x1b,
- 0x151: 0x1c, 0x152: 0x08, 0x153: 0x1d, 0x154: 0x1e, 0x155: 0x1f, 0x156: 0x20, 0x157: 0x21,
- 0x158: 0x22, 0x159: 0x23, 0x15a: 0x24, 0x15b: 0x25, 0x15c: 0x26, 0x15d: 0x27, 0x15e: 0x28, 0x15f: 0x29,
- 0x166: 0x2a,
- 0x16c: 0x2b, 0x16d: 0x2c,
- 0x17a: 0x2d, 0x17b: 0x2e, 0x17c: 0x0e, 0x17d: 0x0e, 0x17e: 0x0e, 0x17f: 0x2f,
- // Block 0x6, offset 0x180
- 0x180: 0x30, 0x181: 0x31, 0x182: 0x32, 0x183: 0x33, 0x184: 0x34, 0x185: 0x35, 0x186: 0x36, 0x187: 0x37,
- 0x188: 0x38, 0x189: 0x39, 0x18a: 0x0e, 0x18b: 0x3a, 0x18c: 0x0e, 0x18d: 0x0e, 0x18e: 0x0e, 0x18f: 0x0e,
- 0x190: 0x0e, 0x191: 0x0e, 0x192: 0x0e, 0x193: 0x0e, 0x194: 0x0e, 0x195: 0x0e, 0x196: 0x0e, 0x197: 0x0e,
- 0x198: 0x0e, 0x199: 0x0e, 0x19a: 0x0e, 0x19b: 0x0e, 0x19c: 0x0e, 0x19d: 0x0e, 0x19e: 0x0e, 0x19f: 0x0e,
- 0x1a0: 0x0e, 0x1a1: 0x0e, 0x1a2: 0x0e, 0x1a3: 0x0e, 0x1a4: 0x0e, 0x1a5: 0x0e, 0x1a6: 0x0e, 0x1a7: 0x0e,
- 0x1a8: 0x0e, 0x1a9: 0x0e, 0x1aa: 0x0e, 0x1ab: 0x0e, 0x1ac: 0x0e, 0x1ad: 0x0e, 0x1ae: 0x0e, 0x1af: 0x0e,
- 0x1b0: 0x0e, 0x1b1: 0x0e, 0x1b2: 0x0e, 0x1b3: 0x0e, 0x1b4: 0x0e, 0x1b5: 0x0e, 0x1b6: 0x0e, 0x1b7: 0x0e,
- 0x1b8: 0x0e, 0x1b9: 0x0e, 0x1ba: 0x0e, 0x1bb: 0x0e, 0x1bc: 0x0e, 0x1bd: 0x0e, 0x1be: 0x0e, 0x1bf: 0x0e,
- // Block 0x7, offset 0x1c0
- 0x1c0: 0x0e, 0x1c1: 0x0e, 0x1c2: 0x0e, 0x1c3: 0x0e, 0x1c4: 0x0e, 0x1c5: 0x0e, 0x1c6: 0x0e, 0x1c7: 0x0e,
- 0x1c8: 0x0e, 0x1c9: 0x0e, 0x1ca: 0x0e, 0x1cb: 0x0e, 0x1cc: 0x0e, 0x1cd: 0x0e, 0x1ce: 0x0e, 0x1cf: 0x0e,
- 0x1d0: 0x0e, 0x1d1: 0x0e, 0x1d2: 0x0e, 0x1d3: 0x0e, 0x1d4: 0x0e, 0x1d5: 0x0e, 0x1d6: 0x0e, 0x1d7: 0x0e,
- 0x1d8: 0x0e, 0x1d9: 0x0e, 0x1da: 0x0e, 0x1db: 0x0e, 0x1dc: 0x0e, 0x1dd: 0x0e, 0x1de: 0x0e, 0x1df: 0x0e,
- 0x1e0: 0x0e, 0x1e1: 0x0e, 0x1e2: 0x0e, 0x1e3: 0x0e, 0x1e4: 0x0e, 0x1e5: 0x0e, 0x1e6: 0x0e, 0x1e7: 0x0e,
- 0x1e8: 0x0e, 0x1e9: 0x0e, 0x1ea: 0x0e, 0x1eb: 0x0e, 0x1ec: 0x0e, 0x1ed: 0x0e, 0x1ee: 0x0e, 0x1ef: 0x0e,
- 0x1f0: 0x0e, 0x1f1: 0x0e, 0x1f2: 0x0e, 0x1f3: 0x0e, 0x1f4: 0x0e, 0x1f5: 0x0e, 0x1f6: 0x0e,
- 0x1f8: 0x0e, 0x1f9: 0x0e, 0x1fa: 0x0e, 0x1fb: 0x0e, 0x1fc: 0x0e, 0x1fd: 0x0e, 0x1fe: 0x0e, 0x1ff: 0x0e,
- // Block 0x8, offset 0x200
- 0x200: 0x0e, 0x201: 0x0e, 0x202: 0x0e, 0x203: 0x0e, 0x204: 0x0e, 0x205: 0x0e, 0x206: 0x0e, 0x207: 0x0e,
- 0x208: 0x0e, 0x209: 0x0e, 0x20a: 0x0e, 0x20b: 0x0e, 0x20c: 0x0e, 0x20d: 0x0e, 0x20e: 0x0e, 0x20f: 0x0e,
- 0x210: 0x0e, 0x211: 0x0e, 0x212: 0x0e, 0x213: 0x0e, 0x214: 0x0e, 0x215: 0x0e, 0x216: 0x0e, 0x217: 0x0e,
- 0x218: 0x0e, 0x219: 0x0e, 0x21a: 0x0e, 0x21b: 0x0e, 0x21c: 0x0e, 0x21d: 0x0e, 0x21e: 0x0e, 0x21f: 0x0e,
- 0x220: 0x0e, 0x221: 0x0e, 0x222: 0x0e, 0x223: 0x0e, 0x224: 0x0e, 0x225: 0x0e, 0x226: 0x0e, 0x227: 0x0e,
- 0x228: 0x0e, 0x229: 0x0e, 0x22a: 0x0e, 0x22b: 0x0e, 0x22c: 0x0e, 0x22d: 0x0e, 0x22e: 0x0e, 0x22f: 0x0e,
- 0x230: 0x0e, 0x231: 0x0e, 0x232: 0x0e, 0x233: 0x0e, 0x234: 0x0e, 0x235: 0x0e, 0x236: 0x0e, 0x237: 0x0e,
- 0x238: 0x0e, 0x239: 0x0e, 0x23a: 0x0e, 0x23b: 0x0e, 0x23c: 0x0e, 0x23d: 0x0e, 0x23e: 0x0e, 0x23f: 0x0e,
- // Block 0x9, offset 0x240
- 0x240: 0x0e, 0x241: 0x0e, 0x242: 0x0e, 0x243: 0x0e, 0x244: 0x0e, 0x245: 0x0e, 0x246: 0x0e, 0x247: 0x0e,
- 0x248: 0x0e, 0x249: 0x0e, 0x24a: 0x0e, 0x24b: 0x0e, 0x24c: 0x0e, 0x24d: 0x0e, 0x24e: 0x0e, 0x24f: 0x0e,
- 0x250: 0x0e, 0x251: 0x0e, 0x252: 0x3b, 0x253: 0x3c,
- 0x265: 0x3d,
- 0x270: 0x0e, 0x271: 0x0e, 0x272: 0x0e, 0x273: 0x0e, 0x274: 0x0e, 0x275: 0x0e, 0x276: 0x0e, 0x277: 0x0e,
- 0x278: 0x0e, 0x279: 0x0e, 0x27a: 0x0e, 0x27b: 0x0e, 0x27c: 0x0e, 0x27d: 0x0e, 0x27e: 0x0e, 0x27f: 0x0e,
- // Block 0xa, offset 0x280
- 0x280: 0x0e, 0x281: 0x0e, 0x282: 0x0e, 0x283: 0x0e, 0x284: 0x0e, 0x285: 0x0e, 0x286: 0x0e, 0x287: 0x0e,
- 0x288: 0x0e, 0x289: 0x0e, 0x28a: 0x0e, 0x28b: 0x0e, 0x28c: 0x0e, 0x28d: 0x0e, 0x28e: 0x0e, 0x28f: 0x0e,
- 0x290: 0x0e, 0x291: 0x0e, 0x292: 0x0e, 0x293: 0x0e, 0x294: 0x0e, 0x295: 0x0e, 0x296: 0x0e, 0x297: 0x0e,
- 0x298: 0x0e, 0x299: 0x0e, 0x29a: 0x0e, 0x29b: 0x0e, 0x29c: 0x0e, 0x29d: 0x0e, 0x29e: 0x3e,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x08, 0x2c1: 0x08, 0x2c2: 0x08, 0x2c3: 0x08, 0x2c4: 0x08, 0x2c5: 0x08, 0x2c6: 0x08, 0x2c7: 0x08,
- 0x2c8: 0x08, 0x2c9: 0x08, 0x2ca: 0x08, 0x2cb: 0x08, 0x2cc: 0x08, 0x2cd: 0x08, 0x2ce: 0x08, 0x2cf: 0x08,
- 0x2d0: 0x08, 0x2d1: 0x08, 0x2d2: 0x08, 0x2d3: 0x08, 0x2d4: 0x08, 0x2d5: 0x08, 0x2d6: 0x08, 0x2d7: 0x08,
- 0x2d8: 0x08, 0x2d9: 0x08, 0x2da: 0x08, 0x2db: 0x08, 0x2dc: 0x08, 0x2dd: 0x08, 0x2de: 0x08, 0x2df: 0x08,
- 0x2e0: 0x08, 0x2e1: 0x08, 0x2e2: 0x08, 0x2e3: 0x08, 0x2e4: 0x08, 0x2e5: 0x08, 0x2e6: 0x08, 0x2e7: 0x08,
- 0x2e8: 0x08, 0x2e9: 0x08, 0x2ea: 0x08, 0x2eb: 0x08, 0x2ec: 0x08, 0x2ed: 0x08, 0x2ee: 0x08, 0x2ef: 0x08,
- 0x2f0: 0x08, 0x2f1: 0x08, 0x2f2: 0x08, 0x2f3: 0x08, 0x2f4: 0x08, 0x2f5: 0x08, 0x2f6: 0x08, 0x2f7: 0x08,
- 0x2f8: 0x08, 0x2f9: 0x08, 0x2fa: 0x08, 0x2fb: 0x08, 0x2fc: 0x08, 0x2fd: 0x08, 0x2fe: 0x08, 0x2ff: 0x08,
- // Block 0xc, offset 0x300
- 0x300: 0x08, 0x301: 0x08, 0x302: 0x08, 0x303: 0x08, 0x304: 0x08, 0x305: 0x08, 0x306: 0x08, 0x307: 0x08,
- 0x308: 0x08, 0x309: 0x08, 0x30a: 0x08, 0x30b: 0x08, 0x30c: 0x08, 0x30d: 0x08, 0x30e: 0x08, 0x30f: 0x08,
- 0x310: 0x08, 0x311: 0x08, 0x312: 0x08, 0x313: 0x08, 0x314: 0x08, 0x315: 0x08, 0x316: 0x08, 0x317: 0x08,
- 0x318: 0x08, 0x319: 0x08, 0x31a: 0x08, 0x31b: 0x08, 0x31c: 0x08, 0x31d: 0x08, 0x31e: 0x08, 0x31f: 0x08,
- 0x320: 0x08, 0x321: 0x08, 0x322: 0x08, 0x323: 0x08, 0x324: 0x0e, 0x325: 0x0e, 0x326: 0x0e, 0x327: 0x0e,
- 0x328: 0x0e, 0x329: 0x0e, 0x32a: 0x0e, 0x32b: 0x0e,
- 0x338: 0x3f, 0x339: 0x40, 0x33c: 0x41, 0x33d: 0x42, 0x33e: 0x43, 0x33f: 0x44,
- // Block 0xd, offset 0x340
- 0x37f: 0x45,
- // Block 0xe, offset 0x380
- 0x380: 0x0e, 0x381: 0x0e, 0x382: 0x0e, 0x383: 0x0e, 0x384: 0x0e, 0x385: 0x0e, 0x386: 0x0e, 0x387: 0x0e,
- 0x388: 0x0e, 0x389: 0x0e, 0x38a: 0x0e, 0x38b: 0x0e, 0x38c: 0x0e, 0x38d: 0x0e, 0x38e: 0x0e, 0x38f: 0x0e,
- 0x390: 0x0e, 0x391: 0x0e, 0x392: 0x0e, 0x393: 0x0e, 0x394: 0x0e, 0x395: 0x0e, 0x396: 0x0e, 0x397: 0x0e,
- 0x398: 0x0e, 0x399: 0x0e, 0x39a: 0x0e, 0x39b: 0x0e, 0x39c: 0x0e, 0x39d: 0x0e, 0x39e: 0x0e, 0x39f: 0x46,
- 0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e,
- 0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x47,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x0e, 0x3c1: 0x0e, 0x3c2: 0x0e, 0x3c3: 0x0e, 0x3c4: 0x48, 0x3c5: 0x49, 0x3c6: 0x0e, 0x3c7: 0x0e,
- 0x3c8: 0x0e, 0x3c9: 0x0e, 0x3ca: 0x0e, 0x3cb: 0x4a,
- // Block 0x10, offset 0x400
- 0x400: 0x4b, 0x403: 0x4c, 0x404: 0x4d, 0x405: 0x4e, 0x406: 0x4f,
- 0x408: 0x50, 0x409: 0x51, 0x40c: 0x52, 0x40d: 0x53, 0x40e: 0x54, 0x40f: 0x55,
- 0x410: 0x3a, 0x411: 0x56, 0x412: 0x0e, 0x413: 0x57, 0x414: 0x58, 0x415: 0x59, 0x416: 0x5a, 0x417: 0x5b,
- 0x418: 0x0e, 0x419: 0x5c, 0x41a: 0x0e, 0x41b: 0x5d,
- 0x424: 0x5e, 0x425: 0x5f, 0x426: 0x60, 0x427: 0x61,
- // Block 0x11, offset 0x440
- 0x456: 0x0b, 0x457: 0x06,
- 0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e,
- 0x460: 0x06, 0x461: 0x06, 0x462: 0x06, 0x463: 0x06, 0x464: 0x06, 0x465: 0x06, 0x466: 0x06, 0x467: 0x06,
- 0x468: 0x06, 0x469: 0x06, 0x46a: 0x06, 0x46b: 0x06, 0x46c: 0x06, 0x46d: 0x06, 0x46e: 0x06, 0x46f: 0x06,
- 0x470: 0x06, 0x471: 0x06, 0x472: 0x06, 0x473: 0x06, 0x474: 0x06, 0x475: 0x06, 0x476: 0x06, 0x477: 0x06,
- 0x478: 0x06, 0x479: 0x06, 0x47a: 0x06, 0x47b: 0x06, 0x47c: 0x06, 0x47d: 0x06, 0x47e: 0x06, 0x47f: 0x06,
- // Block 0x12, offset 0x480
- 0x484: 0x08, 0x485: 0x08, 0x486: 0x08, 0x487: 0x09,
- // Block 0x13, offset 0x4c0
- 0x4c0: 0x08, 0x4c1: 0x08, 0x4c2: 0x08, 0x4c3: 0x08, 0x4c4: 0x08, 0x4c5: 0x08, 0x4c6: 0x08, 0x4c7: 0x08,
- 0x4c8: 0x08, 0x4c9: 0x08, 0x4ca: 0x08, 0x4cb: 0x08, 0x4cc: 0x08, 0x4cd: 0x08, 0x4ce: 0x08, 0x4cf: 0x08,
- 0x4d0: 0x08, 0x4d1: 0x08, 0x4d2: 0x08, 0x4d3: 0x08, 0x4d4: 0x08, 0x4d5: 0x08, 0x4d6: 0x08, 0x4d7: 0x08,
- 0x4d8: 0x08, 0x4d9: 0x08, 0x4da: 0x08, 0x4db: 0x08, 0x4dc: 0x08, 0x4dd: 0x08, 0x4de: 0x08, 0x4df: 0x08,
- 0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08,
- 0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08,
- 0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08,
- 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x62,
- // Block 0x14, offset 0x500
- 0x520: 0x10,
- 0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09,
- 0x538: 0x09, 0x539: 0x09, 0x53a: 0x09, 0x53b: 0x09, 0x53c: 0x09, 0x53d: 0x09, 0x53e: 0x09, 0x53f: 0x11,
- // Block 0x15, offset 0x540
- 0x540: 0x09, 0x541: 0x09, 0x542: 0x09, 0x543: 0x09, 0x544: 0x09, 0x545: 0x09, 0x546: 0x09, 0x547: 0x09,
- 0x548: 0x09, 0x549: 0x09, 0x54a: 0x09, 0x54b: 0x09, 0x54c: 0x09, 0x54d: 0x09, 0x54e: 0x09, 0x54f: 0x11,
-}
-
-// inverseData contains 4-byte entries of the following format:
-// <0 padding>
-// The last byte of the UTF-8-encoded rune is xor-ed with the last byte of the
-// UTF-8 encoding of the original rune. Mappings often have the following
-// pattern:
-// A -> A (U+FF21 -> U+0041)
-// B -> B (U+FF22 -> U+0042)
-// ...
-// By xor-ing the last byte the same entry can be shared by many mappings. This
-// reduces the total number of distinct entries by about two thirds.
-// The resulting entry for the aforementioned mappings is
-// { 0x01, 0xE0, 0x00, 0x00 }
-// Using this entry to map U+FF21 (UTF-8 [EF BC A1]), we get
-// E0 ^ A1 = 41.
-// Similarly, for U+FF22 (UTF-8 [EF BC A2]), we get
-// E0 ^ A2 = 42.
-// Note that because of the xor-ing, the byte sequence stored in the entry is
-// not valid UTF-8.
-var inverseData = [150][4]byte{
- {0x00, 0x00, 0x00, 0x00},
- {0x03, 0xe3, 0x80, 0xa0},
- {0x03, 0xef, 0xbc, 0xa0},
- {0x03, 0xef, 0xbc, 0xe0},
- {0x03, 0xef, 0xbd, 0xe0},
- {0x03, 0xef, 0xbf, 0x02},
- {0x03, 0xef, 0xbf, 0x00},
- {0x03, 0xef, 0xbf, 0x0e},
- {0x03, 0xef, 0xbf, 0x0c},
- {0x03, 0xef, 0xbf, 0x0f},
- {0x03, 0xef, 0xbf, 0x39},
- {0x03, 0xef, 0xbf, 0x3b},
- {0x03, 0xef, 0xbf, 0x3f},
- {0x03, 0xef, 0xbf, 0x2a},
- {0x03, 0xef, 0xbf, 0x0d},
- {0x03, 0xef, 0xbf, 0x25},
- {0x03, 0xef, 0xbd, 0x1a},
- {0x03, 0xef, 0xbd, 0x26},
- {0x01, 0xa0, 0x00, 0x00},
- {0x03, 0xef, 0xbd, 0x25},
- {0x03, 0xef, 0xbd, 0x23},
- {0x03, 0xef, 0xbd, 0x2e},
- {0x03, 0xef, 0xbe, 0x07},
- {0x03, 0xef, 0xbe, 0x05},
- {0x03, 0xef, 0xbd, 0x06},
- {0x03, 0xef, 0xbd, 0x13},
- {0x03, 0xef, 0xbd, 0x0b},
- {0x03, 0xef, 0xbd, 0x16},
- {0x03, 0xef, 0xbd, 0x0c},
- {0x03, 0xef, 0xbd, 0x15},
- {0x03, 0xef, 0xbd, 0x0d},
- {0x03, 0xef, 0xbd, 0x1c},
- {0x03, 0xef, 0xbd, 0x02},
- {0x03, 0xef, 0xbd, 0x1f},
- {0x03, 0xef, 0xbd, 0x1d},
- {0x03, 0xef, 0xbd, 0x17},
- {0x03, 0xef, 0xbd, 0x08},
- {0x03, 0xef, 0xbd, 0x09},
- {0x03, 0xef, 0xbd, 0x0e},
- {0x03, 0xef, 0xbd, 0x04},
- {0x03, 0xef, 0xbd, 0x05},
- {0x03, 0xef, 0xbe, 0x3f},
- {0x03, 0xef, 0xbe, 0x00},
- {0x03, 0xef, 0xbd, 0x2c},
- {0x03, 0xef, 0xbe, 0x06},
- {0x03, 0xef, 0xbe, 0x0c},
- {0x03, 0xef, 0xbe, 0x0f},
- {0x03, 0xef, 0xbe, 0x0d},
- {0x03, 0xef, 0xbe, 0x0b},
- {0x03, 0xef, 0xbe, 0x19},
- {0x03, 0xef, 0xbe, 0x15},
- {0x03, 0xef, 0xbe, 0x11},
- {0x03, 0xef, 0xbe, 0x31},
- {0x03, 0xef, 0xbe, 0x33},
- {0x03, 0xef, 0xbd, 0x0f},
- {0x03, 0xef, 0xbe, 0x30},
- {0x03, 0xef, 0xbe, 0x3e},
- {0x03, 0xef, 0xbe, 0x32},
- {0x03, 0xef, 0xbe, 0x36},
- {0x03, 0xef, 0xbd, 0x14},
- {0x03, 0xef, 0xbe, 0x2e},
- {0x03, 0xef, 0xbd, 0x1e},
- {0x03, 0xef, 0xbe, 0x10},
- {0x03, 0xef, 0xbf, 0x13},
- {0x03, 0xef, 0xbf, 0x15},
- {0x03, 0xef, 0xbf, 0x17},
- {0x03, 0xef, 0xbf, 0x1f},
- {0x03, 0xef, 0xbf, 0x1d},
- {0x03, 0xef, 0xbf, 0x1b},
- {0x03, 0xef, 0xbf, 0x09},
- {0x03, 0xef, 0xbf, 0x0b},
- {0x03, 0xef, 0xbf, 0x37},
- {0x03, 0xef, 0xbe, 0x04},
- {0x01, 0xe0, 0x00, 0x00},
- {0x03, 0xe2, 0xa6, 0x1a},
- {0x03, 0xe2, 0xa6, 0x26},
- {0x03, 0xe3, 0x80, 0x23},
- {0x03, 0xe3, 0x80, 0x2e},
- {0x03, 0xe3, 0x80, 0x25},
- {0x03, 0xe3, 0x83, 0x1e},
- {0x03, 0xe3, 0x83, 0x14},
- {0x03, 0xe3, 0x82, 0x06},
- {0x03, 0xe3, 0x82, 0x0b},
- {0x03, 0xe3, 0x82, 0x0c},
- {0x03, 0xe3, 0x82, 0x0d},
- {0x03, 0xe3, 0x82, 0x02},
- {0x03, 0xe3, 0x83, 0x0f},
- {0x03, 0xe3, 0x83, 0x08},
- {0x03, 0xe3, 0x83, 0x09},
- {0x03, 0xe3, 0x83, 0x2c},
- {0x03, 0xe3, 0x83, 0x0c},
- {0x03, 0xe3, 0x82, 0x13},
- {0x03, 0xe3, 0x82, 0x16},
- {0x03, 0xe3, 0x82, 0x15},
- {0x03, 0xe3, 0x82, 0x1c},
- {0x03, 0xe3, 0x82, 0x1f},
- {0x03, 0xe3, 0x82, 0x1d},
- {0x03, 0xe3, 0x82, 0x1a},
- {0x03, 0xe3, 0x82, 0x17},
- {0x03, 0xe3, 0x82, 0x08},
- {0x03, 0xe3, 0x82, 0x09},
- {0x03, 0xe3, 0x82, 0x0e},
- {0x03, 0xe3, 0x82, 0x04},
- {0x03, 0xe3, 0x82, 0x05},
- {0x03, 0xe3, 0x82, 0x3f},
- {0x03, 0xe3, 0x83, 0x00},
- {0x03, 0xe3, 0x83, 0x06},
- {0x03, 0xe3, 0x83, 0x05},
- {0x03, 0xe3, 0x83, 0x0d},
- {0x03, 0xe3, 0x83, 0x0b},
- {0x03, 0xe3, 0x83, 0x07},
- {0x03, 0xe3, 0x83, 0x19},
- {0x03, 0xe3, 0x83, 0x15},
- {0x03, 0xe3, 0x83, 0x11},
- {0x03, 0xe3, 0x83, 0x31},
- {0x03, 0xe3, 0x83, 0x33},
- {0x03, 0xe3, 0x83, 0x30},
- {0x03, 0xe3, 0x83, 0x3e},
- {0x03, 0xe3, 0x83, 0x32},
- {0x03, 0xe3, 0x83, 0x36},
- {0x03, 0xe3, 0x83, 0x2e},
- {0x03, 0xe3, 0x82, 0x07},
- {0x03, 0xe3, 0x85, 0x04},
- {0x03, 0xe3, 0x84, 0x10},
- {0x03, 0xe3, 0x85, 0x30},
- {0x03, 0xe3, 0x85, 0x0d},
- {0x03, 0xe3, 0x85, 0x13},
- {0x03, 0xe3, 0x85, 0x15},
- {0x03, 0xe3, 0x85, 0x17},
- {0x03, 0xe3, 0x85, 0x1f},
- {0x03, 0xe3, 0x85, 0x1d},
- {0x03, 0xe3, 0x85, 0x1b},
- {0x03, 0xe3, 0x85, 0x09},
- {0x03, 0xe3, 0x85, 0x0f},
- {0x03, 0xe3, 0x85, 0x0b},
- {0x03, 0xe3, 0x85, 0x37},
- {0x03, 0xe3, 0x85, 0x3b},
- {0x03, 0xe3, 0x85, 0x39},
- {0x03, 0xe3, 0x85, 0x3f},
- {0x02, 0xc2, 0x02, 0x00},
- {0x02, 0xc2, 0x0e, 0x00},
- {0x02, 0xc2, 0x0c, 0x00},
- {0x02, 0xc2, 0x00, 0x00},
- {0x03, 0xe2, 0x82, 0x0f},
- {0x03, 0xe2, 0x94, 0x2a},
- {0x03, 0xe2, 0x86, 0x39},
- {0x03, 0xe2, 0x86, 0x3b},
- {0x03, 0xe2, 0x86, 0x3f},
- {0x03, 0xe2, 0x96, 0x0d},
- {0x03, 0xe2, 0x97, 0x25},
-}
-
-// Total table size 14936 bytes (14KiB)
diff --git a/vendor/golang.org/x/text/width/tables12.0.0.go b/vendor/golang.org/x/text/width/tables12.0.0.go
deleted file mode 100644
index 85296297..00000000
--- a/vendor/golang.org/x/text/width/tables12.0.0.go
+++ /dev/null
@@ -1,1351 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-//go:build go1.14 && !go1.16
-// +build go1.14,!go1.16
-
-package width
-
-// UnicodeVersion is the Unicode version from which the tables in this package are derived.
-const UnicodeVersion = "12.0.0"
-
-// lookup returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookup(s []byte) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupUnsafe(s []byte) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// lookupString returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookupString(s string) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupStringUnsafe(s string) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// widthTrie. Total size: 14720 bytes (14.38 KiB). Checksum: 3f4f2516ded5489b.
-type widthTrie struct{}
-
-func newWidthTrie(i int) *widthTrie {
- return &widthTrie{}
-}
-
-// lookupValue determines the type of block n and looks up the value for b.
-func (t *widthTrie) lookupValue(n uint32, b byte) uint16 {
- switch {
- default:
- return uint16(widthValues[n<<6+uint32(b)])
- }
-}
-
-// widthValues: 104 blocks, 6656 entries, 13312 bytes
-// The third block is the zero block.
-var widthValues = [6656]uint16{
- // Block 0x0, offset 0x0
- 0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002,
- 0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002,
- 0x2a: 0x6002, 0x2b: 0x6002, 0x2c: 0x6002, 0x2d: 0x6002, 0x2e: 0x6002, 0x2f: 0x6002,
- 0x30: 0x6002, 0x31: 0x6002, 0x32: 0x6002, 0x33: 0x6002, 0x34: 0x6002, 0x35: 0x6002,
- 0x36: 0x6002, 0x37: 0x6002, 0x38: 0x6002, 0x39: 0x6002, 0x3a: 0x6002, 0x3b: 0x6002,
- 0x3c: 0x6002, 0x3d: 0x6002, 0x3e: 0x6002, 0x3f: 0x6002,
- // Block 0x1, offset 0x40
- 0x40: 0x6003, 0x41: 0x6003, 0x42: 0x6003, 0x43: 0x6003, 0x44: 0x6003, 0x45: 0x6003,
- 0x46: 0x6003, 0x47: 0x6003, 0x48: 0x6003, 0x49: 0x6003, 0x4a: 0x6003, 0x4b: 0x6003,
- 0x4c: 0x6003, 0x4d: 0x6003, 0x4e: 0x6003, 0x4f: 0x6003, 0x50: 0x6003, 0x51: 0x6003,
- 0x52: 0x6003, 0x53: 0x6003, 0x54: 0x6003, 0x55: 0x6003, 0x56: 0x6003, 0x57: 0x6003,
- 0x58: 0x6003, 0x59: 0x6003, 0x5a: 0x6003, 0x5b: 0x6003, 0x5c: 0x6003, 0x5d: 0x6003,
- 0x5e: 0x6003, 0x5f: 0x6003, 0x60: 0x6004, 0x61: 0x6004, 0x62: 0x6004, 0x63: 0x6004,
- 0x64: 0x6004, 0x65: 0x6004, 0x66: 0x6004, 0x67: 0x6004, 0x68: 0x6004, 0x69: 0x6004,
- 0x6a: 0x6004, 0x6b: 0x6004, 0x6c: 0x6004, 0x6d: 0x6004, 0x6e: 0x6004, 0x6f: 0x6004,
- 0x70: 0x6004, 0x71: 0x6004, 0x72: 0x6004, 0x73: 0x6004, 0x74: 0x6004, 0x75: 0x6004,
- 0x76: 0x6004, 0x77: 0x6004, 0x78: 0x6004, 0x79: 0x6004, 0x7a: 0x6004, 0x7b: 0x6004,
- 0x7c: 0x6004, 0x7d: 0x6004, 0x7e: 0x6004,
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xe1: 0x2000, 0xe2: 0x6005, 0xe3: 0x6005,
- 0xe4: 0x2000, 0xe5: 0x6006, 0xe6: 0x6005, 0xe7: 0x2000, 0xe8: 0x2000,
- 0xea: 0x2000, 0xec: 0x6007, 0xed: 0x2000, 0xee: 0x2000, 0xef: 0x6008,
- 0xf0: 0x2000, 0xf1: 0x2000, 0xf2: 0x2000, 0xf3: 0x2000, 0xf4: 0x2000,
- 0xf6: 0x2000, 0xf7: 0x2000, 0xf8: 0x2000, 0xf9: 0x2000, 0xfa: 0x2000,
- 0xfc: 0x2000, 0xfd: 0x2000, 0xfe: 0x2000, 0xff: 0x2000,
- // Block 0x4, offset 0x100
- 0x106: 0x2000,
- 0x110: 0x2000,
- 0x117: 0x2000,
- 0x118: 0x2000,
- 0x11e: 0x2000, 0x11f: 0x2000, 0x120: 0x2000, 0x121: 0x2000,
- 0x126: 0x2000, 0x128: 0x2000, 0x129: 0x2000,
- 0x12a: 0x2000, 0x12c: 0x2000, 0x12d: 0x2000,
- 0x130: 0x2000, 0x132: 0x2000, 0x133: 0x2000,
- 0x137: 0x2000, 0x138: 0x2000, 0x139: 0x2000, 0x13a: 0x2000,
- 0x13c: 0x2000, 0x13e: 0x2000,
- // Block 0x5, offset 0x140
- 0x141: 0x2000,
- 0x151: 0x2000,
- 0x153: 0x2000,
- 0x15b: 0x2000,
- 0x166: 0x2000, 0x167: 0x2000,
- 0x16b: 0x2000,
- 0x171: 0x2000, 0x172: 0x2000, 0x173: 0x2000,
- 0x178: 0x2000,
- 0x17f: 0x2000,
- // Block 0x6, offset 0x180
- 0x180: 0x2000, 0x181: 0x2000, 0x182: 0x2000, 0x184: 0x2000,
- 0x188: 0x2000, 0x189: 0x2000, 0x18a: 0x2000, 0x18b: 0x2000,
- 0x18d: 0x2000,
- 0x192: 0x2000, 0x193: 0x2000,
- 0x1a6: 0x2000, 0x1a7: 0x2000,
- 0x1ab: 0x2000,
- // Block 0x7, offset 0x1c0
- 0x1ce: 0x2000, 0x1d0: 0x2000,
- 0x1d2: 0x2000, 0x1d4: 0x2000, 0x1d6: 0x2000,
- 0x1d8: 0x2000, 0x1da: 0x2000, 0x1dc: 0x2000,
- // Block 0x8, offset 0x200
- 0x211: 0x2000,
- 0x221: 0x2000,
- // Block 0x9, offset 0x240
- 0x244: 0x2000,
- 0x247: 0x2000, 0x249: 0x2000, 0x24a: 0x2000, 0x24b: 0x2000,
- 0x24d: 0x2000, 0x250: 0x2000,
- 0x258: 0x2000, 0x259: 0x2000, 0x25a: 0x2000, 0x25b: 0x2000, 0x25d: 0x2000,
- 0x25f: 0x2000,
- // Block 0xa, offset 0x280
- 0x280: 0x2000, 0x281: 0x2000, 0x282: 0x2000, 0x283: 0x2000, 0x284: 0x2000, 0x285: 0x2000,
- 0x286: 0x2000, 0x287: 0x2000, 0x288: 0x2000, 0x289: 0x2000, 0x28a: 0x2000, 0x28b: 0x2000,
- 0x28c: 0x2000, 0x28d: 0x2000, 0x28e: 0x2000, 0x28f: 0x2000, 0x290: 0x2000, 0x291: 0x2000,
- 0x292: 0x2000, 0x293: 0x2000, 0x294: 0x2000, 0x295: 0x2000, 0x296: 0x2000, 0x297: 0x2000,
- 0x298: 0x2000, 0x299: 0x2000, 0x29a: 0x2000, 0x29b: 0x2000, 0x29c: 0x2000, 0x29d: 0x2000,
- 0x29e: 0x2000, 0x29f: 0x2000, 0x2a0: 0x2000, 0x2a1: 0x2000, 0x2a2: 0x2000, 0x2a3: 0x2000,
- 0x2a4: 0x2000, 0x2a5: 0x2000, 0x2a6: 0x2000, 0x2a7: 0x2000, 0x2a8: 0x2000, 0x2a9: 0x2000,
- 0x2aa: 0x2000, 0x2ab: 0x2000, 0x2ac: 0x2000, 0x2ad: 0x2000, 0x2ae: 0x2000, 0x2af: 0x2000,
- 0x2b0: 0x2000, 0x2b1: 0x2000, 0x2b2: 0x2000, 0x2b3: 0x2000, 0x2b4: 0x2000, 0x2b5: 0x2000,
- 0x2b6: 0x2000, 0x2b7: 0x2000, 0x2b8: 0x2000, 0x2b9: 0x2000, 0x2ba: 0x2000, 0x2bb: 0x2000,
- 0x2bc: 0x2000, 0x2bd: 0x2000, 0x2be: 0x2000, 0x2bf: 0x2000,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x2000, 0x2c1: 0x2000, 0x2c2: 0x2000, 0x2c3: 0x2000, 0x2c4: 0x2000, 0x2c5: 0x2000,
- 0x2c6: 0x2000, 0x2c7: 0x2000, 0x2c8: 0x2000, 0x2c9: 0x2000, 0x2ca: 0x2000, 0x2cb: 0x2000,
- 0x2cc: 0x2000, 0x2cd: 0x2000, 0x2ce: 0x2000, 0x2cf: 0x2000, 0x2d0: 0x2000, 0x2d1: 0x2000,
- 0x2d2: 0x2000, 0x2d3: 0x2000, 0x2d4: 0x2000, 0x2d5: 0x2000, 0x2d6: 0x2000, 0x2d7: 0x2000,
- 0x2d8: 0x2000, 0x2d9: 0x2000, 0x2da: 0x2000, 0x2db: 0x2000, 0x2dc: 0x2000, 0x2dd: 0x2000,
- 0x2de: 0x2000, 0x2df: 0x2000, 0x2e0: 0x2000, 0x2e1: 0x2000, 0x2e2: 0x2000, 0x2e3: 0x2000,
- 0x2e4: 0x2000, 0x2e5: 0x2000, 0x2e6: 0x2000, 0x2e7: 0x2000, 0x2e8: 0x2000, 0x2e9: 0x2000,
- 0x2ea: 0x2000, 0x2eb: 0x2000, 0x2ec: 0x2000, 0x2ed: 0x2000, 0x2ee: 0x2000, 0x2ef: 0x2000,
- // Block 0xc, offset 0x300
- 0x311: 0x2000,
- 0x312: 0x2000, 0x313: 0x2000, 0x314: 0x2000, 0x315: 0x2000, 0x316: 0x2000, 0x317: 0x2000,
- 0x318: 0x2000, 0x319: 0x2000, 0x31a: 0x2000, 0x31b: 0x2000, 0x31c: 0x2000, 0x31d: 0x2000,
- 0x31e: 0x2000, 0x31f: 0x2000, 0x320: 0x2000, 0x321: 0x2000, 0x323: 0x2000,
- 0x324: 0x2000, 0x325: 0x2000, 0x326: 0x2000, 0x327: 0x2000, 0x328: 0x2000, 0x329: 0x2000,
- 0x331: 0x2000, 0x332: 0x2000, 0x333: 0x2000, 0x334: 0x2000, 0x335: 0x2000,
- 0x336: 0x2000, 0x337: 0x2000, 0x338: 0x2000, 0x339: 0x2000, 0x33a: 0x2000, 0x33b: 0x2000,
- 0x33c: 0x2000, 0x33d: 0x2000, 0x33e: 0x2000, 0x33f: 0x2000,
- // Block 0xd, offset 0x340
- 0x340: 0x2000, 0x341: 0x2000, 0x343: 0x2000, 0x344: 0x2000, 0x345: 0x2000,
- 0x346: 0x2000, 0x347: 0x2000, 0x348: 0x2000, 0x349: 0x2000,
- // Block 0xe, offset 0x380
- 0x381: 0x2000,
- 0x390: 0x2000, 0x391: 0x2000,
- 0x392: 0x2000, 0x393: 0x2000, 0x394: 0x2000, 0x395: 0x2000, 0x396: 0x2000, 0x397: 0x2000,
- 0x398: 0x2000, 0x399: 0x2000, 0x39a: 0x2000, 0x39b: 0x2000, 0x39c: 0x2000, 0x39d: 0x2000,
- 0x39e: 0x2000, 0x39f: 0x2000, 0x3a0: 0x2000, 0x3a1: 0x2000, 0x3a2: 0x2000, 0x3a3: 0x2000,
- 0x3a4: 0x2000, 0x3a5: 0x2000, 0x3a6: 0x2000, 0x3a7: 0x2000, 0x3a8: 0x2000, 0x3a9: 0x2000,
- 0x3aa: 0x2000, 0x3ab: 0x2000, 0x3ac: 0x2000, 0x3ad: 0x2000, 0x3ae: 0x2000, 0x3af: 0x2000,
- 0x3b0: 0x2000, 0x3b1: 0x2000, 0x3b2: 0x2000, 0x3b3: 0x2000, 0x3b4: 0x2000, 0x3b5: 0x2000,
- 0x3b6: 0x2000, 0x3b7: 0x2000, 0x3b8: 0x2000, 0x3b9: 0x2000, 0x3ba: 0x2000, 0x3bb: 0x2000,
- 0x3bc: 0x2000, 0x3bd: 0x2000, 0x3be: 0x2000, 0x3bf: 0x2000,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x2000, 0x3c1: 0x2000, 0x3c2: 0x2000, 0x3c3: 0x2000, 0x3c4: 0x2000, 0x3c5: 0x2000,
- 0x3c6: 0x2000, 0x3c7: 0x2000, 0x3c8: 0x2000, 0x3c9: 0x2000, 0x3ca: 0x2000, 0x3cb: 0x2000,
- 0x3cc: 0x2000, 0x3cd: 0x2000, 0x3ce: 0x2000, 0x3cf: 0x2000, 0x3d1: 0x2000,
- // Block 0x10, offset 0x400
- 0x400: 0x4000, 0x401: 0x4000, 0x402: 0x4000, 0x403: 0x4000, 0x404: 0x4000, 0x405: 0x4000,
- 0x406: 0x4000, 0x407: 0x4000, 0x408: 0x4000, 0x409: 0x4000, 0x40a: 0x4000, 0x40b: 0x4000,
- 0x40c: 0x4000, 0x40d: 0x4000, 0x40e: 0x4000, 0x40f: 0x4000, 0x410: 0x4000, 0x411: 0x4000,
- 0x412: 0x4000, 0x413: 0x4000, 0x414: 0x4000, 0x415: 0x4000, 0x416: 0x4000, 0x417: 0x4000,
- 0x418: 0x4000, 0x419: 0x4000, 0x41a: 0x4000, 0x41b: 0x4000, 0x41c: 0x4000, 0x41d: 0x4000,
- 0x41e: 0x4000, 0x41f: 0x4000, 0x420: 0x4000, 0x421: 0x4000, 0x422: 0x4000, 0x423: 0x4000,
- 0x424: 0x4000, 0x425: 0x4000, 0x426: 0x4000, 0x427: 0x4000, 0x428: 0x4000, 0x429: 0x4000,
- 0x42a: 0x4000, 0x42b: 0x4000, 0x42c: 0x4000, 0x42d: 0x4000, 0x42e: 0x4000, 0x42f: 0x4000,
- 0x430: 0x4000, 0x431: 0x4000, 0x432: 0x4000, 0x433: 0x4000, 0x434: 0x4000, 0x435: 0x4000,
- 0x436: 0x4000, 0x437: 0x4000, 0x438: 0x4000, 0x439: 0x4000, 0x43a: 0x4000, 0x43b: 0x4000,
- 0x43c: 0x4000, 0x43d: 0x4000, 0x43e: 0x4000, 0x43f: 0x4000,
- // Block 0x11, offset 0x440
- 0x440: 0x4000, 0x441: 0x4000, 0x442: 0x4000, 0x443: 0x4000, 0x444: 0x4000, 0x445: 0x4000,
- 0x446: 0x4000, 0x447: 0x4000, 0x448: 0x4000, 0x449: 0x4000, 0x44a: 0x4000, 0x44b: 0x4000,
- 0x44c: 0x4000, 0x44d: 0x4000, 0x44e: 0x4000, 0x44f: 0x4000, 0x450: 0x4000, 0x451: 0x4000,
- 0x452: 0x4000, 0x453: 0x4000, 0x454: 0x4000, 0x455: 0x4000, 0x456: 0x4000, 0x457: 0x4000,
- 0x458: 0x4000, 0x459: 0x4000, 0x45a: 0x4000, 0x45b: 0x4000, 0x45c: 0x4000, 0x45d: 0x4000,
- 0x45e: 0x4000, 0x45f: 0x4000,
- // Block 0x12, offset 0x480
- 0x490: 0x2000,
- 0x493: 0x2000, 0x494: 0x2000, 0x495: 0x2000, 0x496: 0x2000,
- 0x498: 0x2000, 0x499: 0x2000, 0x49c: 0x2000, 0x49d: 0x2000,
- 0x4a0: 0x2000, 0x4a1: 0x2000, 0x4a2: 0x2000,
- 0x4a4: 0x2000, 0x4a5: 0x2000, 0x4a6: 0x2000, 0x4a7: 0x2000,
- 0x4b0: 0x2000, 0x4b2: 0x2000, 0x4b3: 0x2000, 0x4b5: 0x2000,
- 0x4bb: 0x2000,
- 0x4be: 0x2000,
- // Block 0x13, offset 0x4c0
- 0x4f4: 0x2000,
- 0x4ff: 0x2000,
- // Block 0x14, offset 0x500
- 0x501: 0x2000, 0x502: 0x2000, 0x503: 0x2000, 0x504: 0x2000,
- 0x529: 0xa009,
- 0x52c: 0x2000,
- // Block 0x15, offset 0x540
- 0x543: 0x2000, 0x545: 0x2000,
- 0x549: 0x2000,
- 0x553: 0x2000, 0x556: 0x2000,
- 0x561: 0x2000, 0x562: 0x2000,
- 0x566: 0x2000,
- 0x56b: 0x2000,
- // Block 0x16, offset 0x580
- 0x593: 0x2000, 0x594: 0x2000,
- 0x59b: 0x2000, 0x59c: 0x2000, 0x59d: 0x2000,
- 0x59e: 0x2000, 0x5a0: 0x2000, 0x5a1: 0x2000, 0x5a2: 0x2000, 0x5a3: 0x2000,
- 0x5a4: 0x2000, 0x5a5: 0x2000, 0x5a6: 0x2000, 0x5a7: 0x2000, 0x5a8: 0x2000, 0x5a9: 0x2000,
- 0x5aa: 0x2000, 0x5ab: 0x2000,
- 0x5b0: 0x2000, 0x5b1: 0x2000, 0x5b2: 0x2000, 0x5b3: 0x2000, 0x5b4: 0x2000, 0x5b5: 0x2000,
- 0x5b6: 0x2000, 0x5b7: 0x2000, 0x5b8: 0x2000, 0x5b9: 0x2000,
- // Block 0x17, offset 0x5c0
- 0x5c9: 0x2000,
- 0x5d0: 0x200a, 0x5d1: 0x200b,
- 0x5d2: 0x200a, 0x5d3: 0x200c, 0x5d4: 0x2000, 0x5d5: 0x2000, 0x5d6: 0x2000, 0x5d7: 0x2000,
- 0x5d8: 0x2000, 0x5d9: 0x2000,
- 0x5f8: 0x2000, 0x5f9: 0x2000,
- // Block 0x18, offset 0x600
- 0x612: 0x2000, 0x614: 0x2000,
- 0x627: 0x2000,
- // Block 0x19, offset 0x640
- 0x640: 0x2000, 0x642: 0x2000, 0x643: 0x2000,
- 0x647: 0x2000, 0x648: 0x2000, 0x64b: 0x2000,
- 0x64f: 0x2000, 0x651: 0x2000,
- 0x655: 0x2000,
- 0x65a: 0x2000, 0x65d: 0x2000,
- 0x65e: 0x2000, 0x65f: 0x2000, 0x660: 0x2000, 0x663: 0x2000,
- 0x665: 0x2000, 0x667: 0x2000, 0x668: 0x2000, 0x669: 0x2000,
- 0x66a: 0x2000, 0x66b: 0x2000, 0x66c: 0x2000, 0x66e: 0x2000,
- 0x674: 0x2000, 0x675: 0x2000,
- 0x676: 0x2000, 0x677: 0x2000,
- 0x67c: 0x2000, 0x67d: 0x2000,
- // Block 0x1a, offset 0x680
- 0x688: 0x2000,
- 0x68c: 0x2000,
- 0x692: 0x2000,
- 0x6a0: 0x2000, 0x6a1: 0x2000,
- 0x6a4: 0x2000, 0x6a5: 0x2000, 0x6a6: 0x2000, 0x6a7: 0x2000,
- 0x6aa: 0x2000, 0x6ab: 0x2000, 0x6ae: 0x2000, 0x6af: 0x2000,
- // Block 0x1b, offset 0x6c0
- 0x6c2: 0x2000, 0x6c3: 0x2000,
- 0x6c6: 0x2000, 0x6c7: 0x2000,
- 0x6d5: 0x2000,
- 0x6d9: 0x2000,
- 0x6e5: 0x2000,
- 0x6ff: 0x2000,
- // Block 0x1c, offset 0x700
- 0x712: 0x2000,
- 0x71a: 0x4000, 0x71b: 0x4000,
- 0x729: 0x4000,
- 0x72a: 0x4000,
- // Block 0x1d, offset 0x740
- 0x769: 0x4000,
- 0x76a: 0x4000, 0x76b: 0x4000, 0x76c: 0x4000,
- 0x770: 0x4000, 0x773: 0x4000,
- // Block 0x1e, offset 0x780
- 0x7a0: 0x2000, 0x7a1: 0x2000, 0x7a2: 0x2000, 0x7a3: 0x2000,
- 0x7a4: 0x2000, 0x7a5: 0x2000, 0x7a6: 0x2000, 0x7a7: 0x2000, 0x7a8: 0x2000, 0x7a9: 0x2000,
- 0x7aa: 0x2000, 0x7ab: 0x2000, 0x7ac: 0x2000, 0x7ad: 0x2000, 0x7ae: 0x2000, 0x7af: 0x2000,
- 0x7b0: 0x2000, 0x7b1: 0x2000, 0x7b2: 0x2000, 0x7b3: 0x2000, 0x7b4: 0x2000, 0x7b5: 0x2000,
- 0x7b6: 0x2000, 0x7b7: 0x2000, 0x7b8: 0x2000, 0x7b9: 0x2000, 0x7ba: 0x2000, 0x7bb: 0x2000,
- 0x7bc: 0x2000, 0x7bd: 0x2000, 0x7be: 0x2000, 0x7bf: 0x2000,
- // Block 0x1f, offset 0x7c0
- 0x7c0: 0x2000, 0x7c1: 0x2000, 0x7c2: 0x2000, 0x7c3: 0x2000, 0x7c4: 0x2000, 0x7c5: 0x2000,
- 0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7c9: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000,
- 0x7cc: 0x2000, 0x7cd: 0x2000, 0x7ce: 0x2000, 0x7cf: 0x2000, 0x7d0: 0x2000, 0x7d1: 0x2000,
- 0x7d2: 0x2000, 0x7d3: 0x2000, 0x7d4: 0x2000, 0x7d5: 0x2000, 0x7d6: 0x2000, 0x7d7: 0x2000,
- 0x7d8: 0x2000, 0x7d9: 0x2000, 0x7da: 0x2000, 0x7db: 0x2000, 0x7dc: 0x2000, 0x7dd: 0x2000,
- 0x7de: 0x2000, 0x7df: 0x2000, 0x7e0: 0x2000, 0x7e1: 0x2000, 0x7e2: 0x2000, 0x7e3: 0x2000,
- 0x7e4: 0x2000, 0x7e5: 0x2000, 0x7e6: 0x2000, 0x7e7: 0x2000, 0x7e8: 0x2000, 0x7e9: 0x2000,
- 0x7eb: 0x2000, 0x7ec: 0x2000, 0x7ed: 0x2000, 0x7ee: 0x2000, 0x7ef: 0x2000,
- 0x7f0: 0x2000, 0x7f1: 0x2000, 0x7f2: 0x2000, 0x7f3: 0x2000, 0x7f4: 0x2000, 0x7f5: 0x2000,
- 0x7f6: 0x2000, 0x7f7: 0x2000, 0x7f8: 0x2000, 0x7f9: 0x2000, 0x7fa: 0x2000, 0x7fb: 0x2000,
- 0x7fc: 0x2000, 0x7fd: 0x2000, 0x7fe: 0x2000, 0x7ff: 0x2000,
- // Block 0x20, offset 0x800
- 0x800: 0x2000, 0x801: 0x2000, 0x802: 0x200d, 0x803: 0x2000, 0x804: 0x2000, 0x805: 0x2000,
- 0x806: 0x2000, 0x807: 0x2000, 0x808: 0x2000, 0x809: 0x2000, 0x80a: 0x2000, 0x80b: 0x2000,
- 0x80c: 0x2000, 0x80d: 0x2000, 0x80e: 0x2000, 0x80f: 0x2000, 0x810: 0x2000, 0x811: 0x2000,
- 0x812: 0x2000, 0x813: 0x2000, 0x814: 0x2000, 0x815: 0x2000, 0x816: 0x2000, 0x817: 0x2000,
- 0x818: 0x2000, 0x819: 0x2000, 0x81a: 0x2000, 0x81b: 0x2000, 0x81c: 0x2000, 0x81d: 0x2000,
- 0x81e: 0x2000, 0x81f: 0x2000, 0x820: 0x2000, 0x821: 0x2000, 0x822: 0x2000, 0x823: 0x2000,
- 0x824: 0x2000, 0x825: 0x2000, 0x826: 0x2000, 0x827: 0x2000, 0x828: 0x2000, 0x829: 0x2000,
- 0x82a: 0x2000, 0x82b: 0x2000, 0x82c: 0x2000, 0x82d: 0x2000, 0x82e: 0x2000, 0x82f: 0x2000,
- 0x830: 0x2000, 0x831: 0x2000, 0x832: 0x2000, 0x833: 0x2000, 0x834: 0x2000, 0x835: 0x2000,
- 0x836: 0x2000, 0x837: 0x2000, 0x838: 0x2000, 0x839: 0x2000, 0x83a: 0x2000, 0x83b: 0x2000,
- 0x83c: 0x2000, 0x83d: 0x2000, 0x83e: 0x2000, 0x83f: 0x2000,
- // Block 0x21, offset 0x840
- 0x840: 0x2000, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000, 0x845: 0x2000,
- 0x846: 0x2000, 0x847: 0x2000, 0x848: 0x2000, 0x849: 0x2000, 0x84a: 0x2000, 0x84b: 0x2000,
- 0x850: 0x2000, 0x851: 0x2000,
- 0x852: 0x2000, 0x853: 0x2000, 0x854: 0x2000, 0x855: 0x2000, 0x856: 0x2000, 0x857: 0x2000,
- 0x858: 0x2000, 0x859: 0x2000, 0x85a: 0x2000, 0x85b: 0x2000, 0x85c: 0x2000, 0x85d: 0x2000,
- 0x85e: 0x2000, 0x85f: 0x2000, 0x860: 0x2000, 0x861: 0x2000, 0x862: 0x2000, 0x863: 0x2000,
- 0x864: 0x2000, 0x865: 0x2000, 0x866: 0x2000, 0x867: 0x2000, 0x868: 0x2000, 0x869: 0x2000,
- 0x86a: 0x2000, 0x86b: 0x2000, 0x86c: 0x2000, 0x86d: 0x2000, 0x86e: 0x2000, 0x86f: 0x2000,
- 0x870: 0x2000, 0x871: 0x2000, 0x872: 0x2000, 0x873: 0x2000,
- // Block 0x22, offset 0x880
- 0x880: 0x2000, 0x881: 0x2000, 0x882: 0x2000, 0x883: 0x2000, 0x884: 0x2000, 0x885: 0x2000,
- 0x886: 0x2000, 0x887: 0x2000, 0x888: 0x2000, 0x889: 0x2000, 0x88a: 0x2000, 0x88b: 0x2000,
- 0x88c: 0x2000, 0x88d: 0x2000, 0x88e: 0x2000, 0x88f: 0x2000,
- 0x892: 0x2000, 0x893: 0x2000, 0x894: 0x2000, 0x895: 0x2000,
- 0x8a0: 0x200e, 0x8a1: 0x2000, 0x8a3: 0x2000,
- 0x8a4: 0x2000, 0x8a5: 0x2000, 0x8a6: 0x2000, 0x8a7: 0x2000, 0x8a8: 0x2000, 0x8a9: 0x2000,
- 0x8b2: 0x2000, 0x8b3: 0x2000,
- 0x8b6: 0x2000, 0x8b7: 0x2000,
- 0x8bc: 0x2000, 0x8bd: 0x2000,
- // Block 0x23, offset 0x8c0
- 0x8c0: 0x2000, 0x8c1: 0x2000,
- 0x8c6: 0x2000, 0x8c7: 0x2000, 0x8c8: 0x2000, 0x8cb: 0x200f,
- 0x8ce: 0x2000, 0x8cf: 0x2000, 0x8d0: 0x2000, 0x8d1: 0x2000,
- 0x8e2: 0x2000, 0x8e3: 0x2000,
- 0x8e4: 0x2000, 0x8e5: 0x2000,
- 0x8ef: 0x2000,
- 0x8fd: 0x4000, 0x8fe: 0x4000,
- // Block 0x24, offset 0x900
- 0x905: 0x2000,
- 0x906: 0x2000, 0x909: 0x2000,
- 0x90e: 0x2000, 0x90f: 0x2000,
- 0x914: 0x4000, 0x915: 0x4000,
- 0x91c: 0x2000,
- 0x91e: 0x2000,
- // Block 0x25, offset 0x940
- 0x940: 0x2000, 0x942: 0x2000,
- 0x948: 0x4000, 0x949: 0x4000, 0x94a: 0x4000, 0x94b: 0x4000,
- 0x94c: 0x4000, 0x94d: 0x4000, 0x94e: 0x4000, 0x94f: 0x4000, 0x950: 0x4000, 0x951: 0x4000,
- 0x952: 0x4000, 0x953: 0x4000,
- 0x960: 0x2000, 0x961: 0x2000, 0x963: 0x2000,
- 0x964: 0x2000, 0x965: 0x2000, 0x967: 0x2000, 0x968: 0x2000, 0x969: 0x2000,
- 0x96a: 0x2000, 0x96c: 0x2000, 0x96d: 0x2000, 0x96f: 0x2000,
- 0x97f: 0x4000,
- // Block 0x26, offset 0x980
- 0x993: 0x4000,
- 0x99e: 0x2000, 0x99f: 0x2000, 0x9a1: 0x4000,
- 0x9aa: 0x4000, 0x9ab: 0x4000,
- 0x9bd: 0x4000, 0x9be: 0x4000, 0x9bf: 0x2000,
- // Block 0x27, offset 0x9c0
- 0x9c4: 0x4000, 0x9c5: 0x4000,
- 0x9c6: 0x2000, 0x9c7: 0x2000, 0x9c8: 0x2000, 0x9c9: 0x2000, 0x9ca: 0x2000, 0x9cb: 0x2000,
- 0x9cc: 0x2000, 0x9cd: 0x2000, 0x9ce: 0x4000, 0x9cf: 0x2000, 0x9d0: 0x2000, 0x9d1: 0x2000,
- 0x9d2: 0x2000, 0x9d3: 0x2000, 0x9d4: 0x4000, 0x9d5: 0x2000, 0x9d6: 0x2000, 0x9d7: 0x2000,
- 0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000,
- 0x9de: 0x2000, 0x9df: 0x2000, 0x9e0: 0x2000, 0x9e1: 0x2000, 0x9e3: 0x2000,
- 0x9e8: 0x2000, 0x9e9: 0x2000,
- 0x9ea: 0x4000, 0x9eb: 0x2000, 0x9ec: 0x2000, 0x9ed: 0x2000, 0x9ee: 0x2000, 0x9ef: 0x2000,
- 0x9f0: 0x2000, 0x9f1: 0x2000, 0x9f2: 0x4000, 0x9f3: 0x4000, 0x9f4: 0x2000, 0x9f5: 0x4000,
- 0x9f6: 0x2000, 0x9f7: 0x2000, 0x9f8: 0x2000, 0x9f9: 0x2000, 0x9fa: 0x4000, 0x9fb: 0x2000,
- 0x9fc: 0x2000, 0x9fd: 0x4000, 0x9fe: 0x2000, 0x9ff: 0x2000,
- // Block 0x28, offset 0xa00
- 0xa05: 0x4000,
- 0xa0a: 0x4000, 0xa0b: 0x4000,
- 0xa28: 0x4000,
- 0xa3d: 0x2000,
- // Block 0x29, offset 0xa40
- 0xa4c: 0x4000, 0xa4e: 0x4000,
- 0xa53: 0x4000, 0xa54: 0x4000, 0xa55: 0x4000, 0xa57: 0x4000,
- 0xa76: 0x2000, 0xa77: 0x2000, 0xa78: 0x2000, 0xa79: 0x2000, 0xa7a: 0x2000, 0xa7b: 0x2000,
- 0xa7c: 0x2000, 0xa7d: 0x2000, 0xa7e: 0x2000, 0xa7f: 0x2000,
- // Block 0x2a, offset 0xa80
- 0xa95: 0x4000, 0xa96: 0x4000, 0xa97: 0x4000,
- 0xab0: 0x4000,
- 0xabf: 0x4000,
- // Block 0x2b, offset 0xac0
- 0xae6: 0x6000, 0xae7: 0x6000, 0xae8: 0x6000, 0xae9: 0x6000,
- 0xaea: 0x6000, 0xaeb: 0x6000, 0xaec: 0x6000, 0xaed: 0x6000,
- // Block 0x2c, offset 0xb00
- 0xb05: 0x6010,
- 0xb06: 0x6011,
- // Block 0x2d, offset 0xb40
- 0xb5b: 0x4000, 0xb5c: 0x4000,
- // Block 0x2e, offset 0xb80
- 0xb90: 0x4000,
- 0xb95: 0x4000, 0xb96: 0x2000, 0xb97: 0x2000,
- 0xb98: 0x2000, 0xb99: 0x2000,
- // Block 0x2f, offset 0xbc0
- 0xbc0: 0x4000, 0xbc1: 0x4000, 0xbc2: 0x4000, 0xbc3: 0x4000, 0xbc4: 0x4000, 0xbc5: 0x4000,
- 0xbc6: 0x4000, 0xbc7: 0x4000, 0xbc8: 0x4000, 0xbc9: 0x4000, 0xbca: 0x4000, 0xbcb: 0x4000,
- 0xbcc: 0x4000, 0xbcd: 0x4000, 0xbce: 0x4000, 0xbcf: 0x4000, 0xbd0: 0x4000, 0xbd1: 0x4000,
- 0xbd2: 0x4000, 0xbd3: 0x4000, 0xbd4: 0x4000, 0xbd5: 0x4000, 0xbd6: 0x4000, 0xbd7: 0x4000,
- 0xbd8: 0x4000, 0xbd9: 0x4000, 0xbdb: 0x4000, 0xbdc: 0x4000, 0xbdd: 0x4000,
- 0xbde: 0x4000, 0xbdf: 0x4000, 0xbe0: 0x4000, 0xbe1: 0x4000, 0xbe2: 0x4000, 0xbe3: 0x4000,
- 0xbe4: 0x4000, 0xbe5: 0x4000, 0xbe6: 0x4000, 0xbe7: 0x4000, 0xbe8: 0x4000, 0xbe9: 0x4000,
- 0xbea: 0x4000, 0xbeb: 0x4000, 0xbec: 0x4000, 0xbed: 0x4000, 0xbee: 0x4000, 0xbef: 0x4000,
- 0xbf0: 0x4000, 0xbf1: 0x4000, 0xbf2: 0x4000, 0xbf3: 0x4000, 0xbf4: 0x4000, 0xbf5: 0x4000,
- 0xbf6: 0x4000, 0xbf7: 0x4000, 0xbf8: 0x4000, 0xbf9: 0x4000, 0xbfa: 0x4000, 0xbfb: 0x4000,
- 0xbfc: 0x4000, 0xbfd: 0x4000, 0xbfe: 0x4000, 0xbff: 0x4000,
- // Block 0x30, offset 0xc00
- 0xc00: 0x4000, 0xc01: 0x4000, 0xc02: 0x4000, 0xc03: 0x4000, 0xc04: 0x4000, 0xc05: 0x4000,
- 0xc06: 0x4000, 0xc07: 0x4000, 0xc08: 0x4000, 0xc09: 0x4000, 0xc0a: 0x4000, 0xc0b: 0x4000,
- 0xc0c: 0x4000, 0xc0d: 0x4000, 0xc0e: 0x4000, 0xc0f: 0x4000, 0xc10: 0x4000, 0xc11: 0x4000,
- 0xc12: 0x4000, 0xc13: 0x4000, 0xc14: 0x4000, 0xc15: 0x4000, 0xc16: 0x4000, 0xc17: 0x4000,
- 0xc18: 0x4000, 0xc19: 0x4000, 0xc1a: 0x4000, 0xc1b: 0x4000, 0xc1c: 0x4000, 0xc1d: 0x4000,
- 0xc1e: 0x4000, 0xc1f: 0x4000, 0xc20: 0x4000, 0xc21: 0x4000, 0xc22: 0x4000, 0xc23: 0x4000,
- 0xc24: 0x4000, 0xc25: 0x4000, 0xc26: 0x4000, 0xc27: 0x4000, 0xc28: 0x4000, 0xc29: 0x4000,
- 0xc2a: 0x4000, 0xc2b: 0x4000, 0xc2c: 0x4000, 0xc2d: 0x4000, 0xc2e: 0x4000, 0xc2f: 0x4000,
- 0xc30: 0x4000, 0xc31: 0x4000, 0xc32: 0x4000, 0xc33: 0x4000,
- // Block 0x31, offset 0xc40
- 0xc40: 0x4000, 0xc41: 0x4000, 0xc42: 0x4000, 0xc43: 0x4000, 0xc44: 0x4000, 0xc45: 0x4000,
- 0xc46: 0x4000, 0xc47: 0x4000, 0xc48: 0x4000, 0xc49: 0x4000, 0xc4a: 0x4000, 0xc4b: 0x4000,
- 0xc4c: 0x4000, 0xc4d: 0x4000, 0xc4e: 0x4000, 0xc4f: 0x4000, 0xc50: 0x4000, 0xc51: 0x4000,
- 0xc52: 0x4000, 0xc53: 0x4000, 0xc54: 0x4000, 0xc55: 0x4000,
- 0xc70: 0x4000, 0xc71: 0x4000, 0xc72: 0x4000, 0xc73: 0x4000, 0xc74: 0x4000, 0xc75: 0x4000,
- 0xc76: 0x4000, 0xc77: 0x4000, 0xc78: 0x4000, 0xc79: 0x4000, 0xc7a: 0x4000, 0xc7b: 0x4000,
- // Block 0x32, offset 0xc80
- 0xc80: 0x9012, 0xc81: 0x4013, 0xc82: 0x4014, 0xc83: 0x4000, 0xc84: 0x4000, 0xc85: 0x4000,
- 0xc86: 0x4000, 0xc87: 0x4000, 0xc88: 0x4000, 0xc89: 0x4000, 0xc8a: 0x4000, 0xc8b: 0x4000,
- 0xc8c: 0x4015, 0xc8d: 0x4015, 0xc8e: 0x4000, 0xc8f: 0x4000, 0xc90: 0x4000, 0xc91: 0x4000,
- 0xc92: 0x4000, 0xc93: 0x4000, 0xc94: 0x4000, 0xc95: 0x4000, 0xc96: 0x4000, 0xc97: 0x4000,
- 0xc98: 0x4000, 0xc99: 0x4000, 0xc9a: 0x4000, 0xc9b: 0x4000, 0xc9c: 0x4000, 0xc9d: 0x4000,
- 0xc9e: 0x4000, 0xc9f: 0x4000, 0xca0: 0x4000, 0xca1: 0x4000, 0xca2: 0x4000, 0xca3: 0x4000,
- 0xca4: 0x4000, 0xca5: 0x4000, 0xca6: 0x4000, 0xca7: 0x4000, 0xca8: 0x4000, 0xca9: 0x4000,
- 0xcaa: 0x4000, 0xcab: 0x4000, 0xcac: 0x4000, 0xcad: 0x4000, 0xcae: 0x4000, 0xcaf: 0x4000,
- 0xcb0: 0x4000, 0xcb1: 0x4000, 0xcb2: 0x4000, 0xcb3: 0x4000, 0xcb4: 0x4000, 0xcb5: 0x4000,
- 0xcb6: 0x4000, 0xcb7: 0x4000, 0xcb8: 0x4000, 0xcb9: 0x4000, 0xcba: 0x4000, 0xcbb: 0x4000,
- 0xcbc: 0x4000, 0xcbd: 0x4000, 0xcbe: 0x4000,
- // Block 0x33, offset 0xcc0
- 0xcc1: 0x4000, 0xcc2: 0x4000, 0xcc3: 0x4000, 0xcc4: 0x4000, 0xcc5: 0x4000,
- 0xcc6: 0x4000, 0xcc7: 0x4000, 0xcc8: 0x4000, 0xcc9: 0x4000, 0xcca: 0x4000, 0xccb: 0x4000,
- 0xccc: 0x4000, 0xccd: 0x4000, 0xcce: 0x4000, 0xccf: 0x4000, 0xcd0: 0x4000, 0xcd1: 0x4000,
- 0xcd2: 0x4000, 0xcd3: 0x4000, 0xcd4: 0x4000, 0xcd5: 0x4000, 0xcd6: 0x4000, 0xcd7: 0x4000,
- 0xcd8: 0x4000, 0xcd9: 0x4000, 0xcda: 0x4000, 0xcdb: 0x4000, 0xcdc: 0x4000, 0xcdd: 0x4000,
- 0xcde: 0x4000, 0xcdf: 0x4000, 0xce0: 0x4000, 0xce1: 0x4000, 0xce2: 0x4000, 0xce3: 0x4000,
- 0xce4: 0x4000, 0xce5: 0x4000, 0xce6: 0x4000, 0xce7: 0x4000, 0xce8: 0x4000, 0xce9: 0x4000,
- 0xcea: 0x4000, 0xceb: 0x4000, 0xcec: 0x4000, 0xced: 0x4000, 0xcee: 0x4000, 0xcef: 0x4000,
- 0xcf0: 0x4000, 0xcf1: 0x4000, 0xcf2: 0x4000, 0xcf3: 0x4000, 0xcf4: 0x4000, 0xcf5: 0x4000,
- 0xcf6: 0x4000, 0xcf7: 0x4000, 0xcf8: 0x4000, 0xcf9: 0x4000, 0xcfa: 0x4000, 0xcfb: 0x4000,
- 0xcfc: 0x4000, 0xcfd: 0x4000, 0xcfe: 0x4000, 0xcff: 0x4000,
- // Block 0x34, offset 0xd00
- 0xd00: 0x4000, 0xd01: 0x4000, 0xd02: 0x4000, 0xd03: 0x4000, 0xd04: 0x4000, 0xd05: 0x4000,
- 0xd06: 0x4000, 0xd07: 0x4000, 0xd08: 0x4000, 0xd09: 0x4000, 0xd0a: 0x4000, 0xd0b: 0x4000,
- 0xd0c: 0x4000, 0xd0d: 0x4000, 0xd0e: 0x4000, 0xd0f: 0x4000, 0xd10: 0x4000, 0xd11: 0x4000,
- 0xd12: 0x4000, 0xd13: 0x4000, 0xd14: 0x4000, 0xd15: 0x4000, 0xd16: 0x4000,
- 0xd19: 0x4016, 0xd1a: 0x4017, 0xd1b: 0x4000, 0xd1c: 0x4000, 0xd1d: 0x4000,
- 0xd1e: 0x4000, 0xd1f: 0x4000, 0xd20: 0x4000, 0xd21: 0x4018, 0xd22: 0x4019, 0xd23: 0x401a,
- 0xd24: 0x401b, 0xd25: 0x401c, 0xd26: 0x401d, 0xd27: 0x401e, 0xd28: 0x401f, 0xd29: 0x4020,
- 0xd2a: 0x4021, 0xd2b: 0x4022, 0xd2c: 0x4000, 0xd2d: 0x4010, 0xd2e: 0x4000, 0xd2f: 0x4023,
- 0xd30: 0x4000, 0xd31: 0x4024, 0xd32: 0x4000, 0xd33: 0x4025, 0xd34: 0x4000, 0xd35: 0x4026,
- 0xd36: 0x4000, 0xd37: 0x401a, 0xd38: 0x4000, 0xd39: 0x4027, 0xd3a: 0x4000, 0xd3b: 0x4028,
- 0xd3c: 0x4000, 0xd3d: 0x4020, 0xd3e: 0x4000, 0xd3f: 0x4029,
- // Block 0x35, offset 0xd40
- 0xd40: 0x4000, 0xd41: 0x402a, 0xd42: 0x4000, 0xd43: 0x402b, 0xd44: 0x402c, 0xd45: 0x4000,
- 0xd46: 0x4017, 0xd47: 0x4000, 0xd48: 0x402d, 0xd49: 0x4000, 0xd4a: 0x402e, 0xd4b: 0x402f,
- 0xd4c: 0x4030, 0xd4d: 0x4017, 0xd4e: 0x4016, 0xd4f: 0x4017, 0xd50: 0x4000, 0xd51: 0x4000,
- 0xd52: 0x4031, 0xd53: 0x4000, 0xd54: 0x4000, 0xd55: 0x4031, 0xd56: 0x4000, 0xd57: 0x4000,
- 0xd58: 0x4032, 0xd59: 0x4000, 0xd5a: 0x4000, 0xd5b: 0x4032, 0xd5c: 0x4000, 0xd5d: 0x4000,
- 0xd5e: 0x4033, 0xd5f: 0x402e, 0xd60: 0x4034, 0xd61: 0x4035, 0xd62: 0x4034, 0xd63: 0x4036,
- 0xd64: 0x4037, 0xd65: 0x4024, 0xd66: 0x4035, 0xd67: 0x4025, 0xd68: 0x4038, 0xd69: 0x4038,
- 0xd6a: 0x4039, 0xd6b: 0x4039, 0xd6c: 0x403a, 0xd6d: 0x403a, 0xd6e: 0x4000, 0xd6f: 0x4035,
- 0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x403b, 0xd73: 0x403c, 0xd74: 0x4000, 0xd75: 0x4000,
- 0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x403d,
- 0xd7c: 0x401c, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000,
- // Block 0x36, offset 0xd80
- 0xd85: 0x4000,
- 0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000,
- 0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000,
- 0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000,
- 0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000,
- 0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000,
- 0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000,
- 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, 0xdae: 0x4000, 0xdaf: 0x4000,
- 0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e,
- 0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e,
- 0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e,
- // Block 0x37, offset 0xdc0
- 0xdc0: 0x4037, 0xdc1: 0x4037, 0xdc2: 0x4037, 0xdc3: 0x4037, 0xdc4: 0x4037, 0xdc5: 0x4037,
- 0xdc6: 0x4037, 0xdc7: 0x4037, 0xdc8: 0x4037, 0xdc9: 0x4037, 0xdca: 0x4037, 0xdcb: 0x4037,
- 0xdcc: 0x4037, 0xdcd: 0x4037, 0xdce: 0x4037, 0xdcf: 0x400e, 0xdd0: 0x403f, 0xdd1: 0x4040,
- 0xdd2: 0x4041, 0xdd3: 0x4040, 0xdd4: 0x403f, 0xdd5: 0x4042, 0xdd6: 0x4043, 0xdd7: 0x4044,
- 0xdd8: 0x4040, 0xdd9: 0x4041, 0xdda: 0x4040, 0xddb: 0x4045, 0xddc: 0x4009, 0xddd: 0x4045,
- 0xdde: 0x4046, 0xddf: 0x4045, 0xde0: 0x4047, 0xde1: 0x400b, 0xde2: 0x400a, 0xde3: 0x400c,
- 0xde4: 0x4048, 0xde5: 0x4000, 0xde6: 0x4000, 0xde7: 0x4000, 0xde8: 0x4000, 0xde9: 0x4000,
- 0xdea: 0x4000, 0xdeb: 0x4000, 0xdec: 0x4000, 0xded: 0x4000, 0xdee: 0x4000, 0xdef: 0x4000,
- 0xdf0: 0x4000, 0xdf1: 0x4000, 0xdf2: 0x4000, 0xdf3: 0x4000, 0xdf4: 0x4000, 0xdf5: 0x4000,
- 0xdf6: 0x4000, 0xdf7: 0x4000, 0xdf8: 0x4000, 0xdf9: 0x4000, 0xdfa: 0x4000, 0xdfb: 0x4000,
- 0xdfc: 0x4000, 0xdfd: 0x4000, 0xdfe: 0x4000, 0xdff: 0x4000,
- // Block 0x38, offset 0xe00
- 0xe00: 0x4000, 0xe01: 0x4000, 0xe02: 0x4000, 0xe03: 0x4000, 0xe04: 0x4000, 0xe05: 0x4000,
- 0xe06: 0x4000, 0xe07: 0x4000, 0xe08: 0x4000, 0xe09: 0x4000, 0xe0a: 0x4000, 0xe0b: 0x4000,
- 0xe0c: 0x4000, 0xe0d: 0x4000, 0xe0e: 0x4000, 0xe10: 0x4000, 0xe11: 0x4000,
- 0xe12: 0x4000, 0xe13: 0x4000, 0xe14: 0x4000, 0xe15: 0x4000, 0xe16: 0x4000, 0xe17: 0x4000,
- 0xe18: 0x4000, 0xe19: 0x4000, 0xe1a: 0x4000, 0xe1b: 0x4000, 0xe1c: 0x4000, 0xe1d: 0x4000,
- 0xe1e: 0x4000, 0xe1f: 0x4000, 0xe20: 0x4000, 0xe21: 0x4000, 0xe22: 0x4000, 0xe23: 0x4000,
- 0xe24: 0x4000, 0xe25: 0x4000, 0xe26: 0x4000, 0xe27: 0x4000, 0xe28: 0x4000, 0xe29: 0x4000,
- 0xe2a: 0x4000, 0xe2b: 0x4000, 0xe2c: 0x4000, 0xe2d: 0x4000, 0xe2e: 0x4000, 0xe2f: 0x4000,
- 0xe30: 0x4000, 0xe31: 0x4000, 0xe32: 0x4000, 0xe33: 0x4000, 0xe34: 0x4000, 0xe35: 0x4000,
- 0xe36: 0x4000, 0xe37: 0x4000, 0xe38: 0x4000, 0xe39: 0x4000, 0xe3a: 0x4000,
- // Block 0x39, offset 0xe40
- 0xe40: 0x4000, 0xe41: 0x4000, 0xe42: 0x4000, 0xe43: 0x4000, 0xe44: 0x4000, 0xe45: 0x4000,
- 0xe46: 0x4000, 0xe47: 0x4000, 0xe48: 0x4000, 0xe49: 0x4000, 0xe4a: 0x4000, 0xe4b: 0x4000,
- 0xe4c: 0x4000, 0xe4d: 0x4000, 0xe4e: 0x4000, 0xe4f: 0x4000, 0xe50: 0x4000, 0xe51: 0x4000,
- 0xe52: 0x4000, 0xe53: 0x4000, 0xe54: 0x4000, 0xe55: 0x4000, 0xe56: 0x4000, 0xe57: 0x4000,
- 0xe58: 0x4000, 0xe59: 0x4000, 0xe5a: 0x4000, 0xe5b: 0x4000, 0xe5c: 0x4000, 0xe5d: 0x4000,
- 0xe5e: 0x4000, 0xe5f: 0x4000, 0xe60: 0x4000, 0xe61: 0x4000, 0xe62: 0x4000, 0xe63: 0x4000,
- 0xe70: 0x4000, 0xe71: 0x4000, 0xe72: 0x4000, 0xe73: 0x4000, 0xe74: 0x4000, 0xe75: 0x4000,
- 0xe76: 0x4000, 0xe77: 0x4000, 0xe78: 0x4000, 0xe79: 0x4000, 0xe7a: 0x4000, 0xe7b: 0x4000,
- 0xe7c: 0x4000, 0xe7d: 0x4000, 0xe7e: 0x4000, 0xe7f: 0x4000,
- // Block 0x3a, offset 0xe80
- 0xe80: 0x4000, 0xe81: 0x4000, 0xe82: 0x4000, 0xe83: 0x4000, 0xe84: 0x4000, 0xe85: 0x4000,
- 0xe86: 0x4000, 0xe87: 0x4000, 0xe88: 0x4000, 0xe89: 0x4000, 0xe8a: 0x4000, 0xe8b: 0x4000,
- 0xe8c: 0x4000, 0xe8d: 0x4000, 0xe8e: 0x4000, 0xe8f: 0x4000, 0xe90: 0x4000, 0xe91: 0x4000,
- 0xe92: 0x4000, 0xe93: 0x4000, 0xe94: 0x4000, 0xe95: 0x4000, 0xe96: 0x4000, 0xe97: 0x4000,
- 0xe98: 0x4000, 0xe99: 0x4000, 0xe9a: 0x4000, 0xe9b: 0x4000, 0xe9c: 0x4000, 0xe9d: 0x4000,
- 0xe9e: 0x4000, 0xea0: 0x4000, 0xea1: 0x4000, 0xea2: 0x4000, 0xea3: 0x4000,
- 0xea4: 0x4000, 0xea5: 0x4000, 0xea6: 0x4000, 0xea7: 0x4000, 0xea8: 0x4000, 0xea9: 0x4000,
- 0xeaa: 0x4000, 0xeab: 0x4000, 0xeac: 0x4000, 0xead: 0x4000, 0xeae: 0x4000, 0xeaf: 0x4000,
- 0xeb0: 0x4000, 0xeb1: 0x4000, 0xeb2: 0x4000, 0xeb3: 0x4000, 0xeb4: 0x4000, 0xeb5: 0x4000,
- 0xeb6: 0x4000, 0xeb7: 0x4000, 0xeb8: 0x4000, 0xeb9: 0x4000, 0xeba: 0x4000, 0xebb: 0x4000,
- 0xebc: 0x4000, 0xebd: 0x4000, 0xebe: 0x4000, 0xebf: 0x4000,
- // Block 0x3b, offset 0xec0
- 0xec0: 0x4000, 0xec1: 0x4000, 0xec2: 0x4000, 0xec3: 0x4000, 0xec4: 0x4000, 0xec5: 0x4000,
- 0xec6: 0x4000, 0xec7: 0x4000, 0xec8: 0x2000, 0xec9: 0x2000, 0xeca: 0x2000, 0xecb: 0x2000,
- 0xecc: 0x2000, 0xecd: 0x2000, 0xece: 0x2000, 0xecf: 0x2000, 0xed0: 0x4000, 0xed1: 0x4000,
- 0xed2: 0x4000, 0xed3: 0x4000, 0xed4: 0x4000, 0xed5: 0x4000, 0xed6: 0x4000, 0xed7: 0x4000,
- 0xed8: 0x4000, 0xed9: 0x4000, 0xeda: 0x4000, 0xedb: 0x4000, 0xedc: 0x4000, 0xedd: 0x4000,
- 0xede: 0x4000, 0xedf: 0x4000, 0xee0: 0x4000, 0xee1: 0x4000, 0xee2: 0x4000, 0xee3: 0x4000,
- 0xee4: 0x4000, 0xee5: 0x4000, 0xee6: 0x4000, 0xee7: 0x4000, 0xee8: 0x4000, 0xee9: 0x4000,
- 0xeea: 0x4000, 0xeeb: 0x4000, 0xeec: 0x4000, 0xeed: 0x4000, 0xeee: 0x4000, 0xeef: 0x4000,
- 0xef0: 0x4000, 0xef1: 0x4000, 0xef2: 0x4000, 0xef3: 0x4000, 0xef4: 0x4000, 0xef5: 0x4000,
- 0xef6: 0x4000, 0xef7: 0x4000, 0xef8: 0x4000, 0xef9: 0x4000, 0xefa: 0x4000, 0xefb: 0x4000,
- 0xefc: 0x4000, 0xefd: 0x4000, 0xefe: 0x4000, 0xeff: 0x4000,
- // Block 0x3c, offset 0xf00
- 0xf00: 0x4000, 0xf01: 0x4000, 0xf02: 0x4000, 0xf03: 0x4000, 0xf04: 0x4000, 0xf05: 0x4000,
- 0xf06: 0x4000, 0xf07: 0x4000, 0xf08: 0x4000, 0xf09: 0x4000, 0xf0a: 0x4000, 0xf0b: 0x4000,
- 0xf0c: 0x4000, 0xf0d: 0x4000, 0xf0e: 0x4000, 0xf0f: 0x4000, 0xf10: 0x4000, 0xf11: 0x4000,
- 0xf12: 0x4000, 0xf13: 0x4000, 0xf14: 0x4000, 0xf15: 0x4000, 0xf16: 0x4000, 0xf17: 0x4000,
- 0xf18: 0x4000, 0xf19: 0x4000, 0xf1a: 0x4000, 0xf1b: 0x4000, 0xf1c: 0x4000, 0xf1d: 0x4000,
- 0xf1e: 0x4000, 0xf1f: 0x4000, 0xf20: 0x4000, 0xf21: 0x4000, 0xf22: 0x4000, 0xf23: 0x4000,
- 0xf24: 0x4000, 0xf25: 0x4000, 0xf26: 0x4000, 0xf27: 0x4000, 0xf28: 0x4000, 0xf29: 0x4000,
- 0xf2a: 0x4000, 0xf2b: 0x4000, 0xf2c: 0x4000, 0xf2d: 0x4000, 0xf2e: 0x4000, 0xf2f: 0x4000,
- 0xf30: 0x4000, 0xf31: 0x4000, 0xf32: 0x4000, 0xf33: 0x4000, 0xf34: 0x4000, 0xf35: 0x4000,
- 0xf36: 0x4000, 0xf37: 0x4000, 0xf38: 0x4000, 0xf39: 0x4000, 0xf3a: 0x4000, 0xf3b: 0x4000,
- 0xf3c: 0x4000, 0xf3d: 0x4000, 0xf3e: 0x4000,
- // Block 0x3d, offset 0xf40
- 0xf40: 0x4000, 0xf41: 0x4000, 0xf42: 0x4000, 0xf43: 0x4000, 0xf44: 0x4000, 0xf45: 0x4000,
- 0xf46: 0x4000, 0xf47: 0x4000, 0xf48: 0x4000, 0xf49: 0x4000, 0xf4a: 0x4000, 0xf4b: 0x4000,
- 0xf4c: 0x4000, 0xf50: 0x4000, 0xf51: 0x4000,
- 0xf52: 0x4000, 0xf53: 0x4000, 0xf54: 0x4000, 0xf55: 0x4000, 0xf56: 0x4000, 0xf57: 0x4000,
- 0xf58: 0x4000, 0xf59: 0x4000, 0xf5a: 0x4000, 0xf5b: 0x4000, 0xf5c: 0x4000, 0xf5d: 0x4000,
- 0xf5e: 0x4000, 0xf5f: 0x4000, 0xf60: 0x4000, 0xf61: 0x4000, 0xf62: 0x4000, 0xf63: 0x4000,
- 0xf64: 0x4000, 0xf65: 0x4000, 0xf66: 0x4000, 0xf67: 0x4000, 0xf68: 0x4000, 0xf69: 0x4000,
- 0xf6a: 0x4000, 0xf6b: 0x4000, 0xf6c: 0x4000, 0xf6d: 0x4000, 0xf6e: 0x4000, 0xf6f: 0x4000,
- 0xf70: 0x4000, 0xf71: 0x4000, 0xf72: 0x4000, 0xf73: 0x4000, 0xf74: 0x4000, 0xf75: 0x4000,
- 0xf76: 0x4000, 0xf77: 0x4000, 0xf78: 0x4000, 0xf79: 0x4000, 0xf7a: 0x4000, 0xf7b: 0x4000,
- 0xf7c: 0x4000, 0xf7d: 0x4000, 0xf7e: 0x4000, 0xf7f: 0x4000,
- // Block 0x3e, offset 0xf80
- 0xf80: 0x4000, 0xf81: 0x4000, 0xf82: 0x4000, 0xf83: 0x4000, 0xf84: 0x4000, 0xf85: 0x4000,
- 0xf86: 0x4000,
- // Block 0x3f, offset 0xfc0
- 0xfe0: 0x4000, 0xfe1: 0x4000, 0xfe2: 0x4000, 0xfe3: 0x4000,
- 0xfe4: 0x4000, 0xfe5: 0x4000, 0xfe6: 0x4000, 0xfe7: 0x4000, 0xfe8: 0x4000, 0xfe9: 0x4000,
- 0xfea: 0x4000, 0xfeb: 0x4000, 0xfec: 0x4000, 0xfed: 0x4000, 0xfee: 0x4000, 0xfef: 0x4000,
- 0xff0: 0x4000, 0xff1: 0x4000, 0xff2: 0x4000, 0xff3: 0x4000, 0xff4: 0x4000, 0xff5: 0x4000,
- 0xff6: 0x4000, 0xff7: 0x4000, 0xff8: 0x4000, 0xff9: 0x4000, 0xffa: 0x4000, 0xffb: 0x4000,
- 0xffc: 0x4000,
- // Block 0x40, offset 0x1000
- 0x1000: 0x4000, 0x1001: 0x4000, 0x1002: 0x4000, 0x1003: 0x4000, 0x1004: 0x4000, 0x1005: 0x4000,
- 0x1006: 0x4000, 0x1007: 0x4000, 0x1008: 0x4000, 0x1009: 0x4000, 0x100a: 0x4000, 0x100b: 0x4000,
- 0x100c: 0x4000, 0x100d: 0x4000, 0x100e: 0x4000, 0x100f: 0x4000, 0x1010: 0x4000, 0x1011: 0x4000,
- 0x1012: 0x4000, 0x1013: 0x4000, 0x1014: 0x4000, 0x1015: 0x4000, 0x1016: 0x4000, 0x1017: 0x4000,
- 0x1018: 0x4000, 0x1019: 0x4000, 0x101a: 0x4000, 0x101b: 0x4000, 0x101c: 0x4000, 0x101d: 0x4000,
- 0x101e: 0x4000, 0x101f: 0x4000, 0x1020: 0x4000, 0x1021: 0x4000, 0x1022: 0x4000, 0x1023: 0x4000,
- // Block 0x41, offset 0x1040
- 0x1040: 0x2000, 0x1041: 0x2000, 0x1042: 0x2000, 0x1043: 0x2000, 0x1044: 0x2000, 0x1045: 0x2000,
- 0x1046: 0x2000, 0x1047: 0x2000, 0x1048: 0x2000, 0x1049: 0x2000, 0x104a: 0x2000, 0x104b: 0x2000,
- 0x104c: 0x2000, 0x104d: 0x2000, 0x104e: 0x2000, 0x104f: 0x2000, 0x1050: 0x4000, 0x1051: 0x4000,
- 0x1052: 0x4000, 0x1053: 0x4000, 0x1054: 0x4000, 0x1055: 0x4000, 0x1056: 0x4000, 0x1057: 0x4000,
- 0x1058: 0x4000, 0x1059: 0x4000,
- 0x1070: 0x4000, 0x1071: 0x4000, 0x1072: 0x4000, 0x1073: 0x4000, 0x1074: 0x4000, 0x1075: 0x4000,
- 0x1076: 0x4000, 0x1077: 0x4000, 0x1078: 0x4000, 0x1079: 0x4000, 0x107a: 0x4000, 0x107b: 0x4000,
- 0x107c: 0x4000, 0x107d: 0x4000, 0x107e: 0x4000, 0x107f: 0x4000,
- // Block 0x42, offset 0x1080
- 0x1080: 0x4000, 0x1081: 0x4000, 0x1082: 0x4000, 0x1083: 0x4000, 0x1084: 0x4000, 0x1085: 0x4000,
- 0x1086: 0x4000, 0x1087: 0x4000, 0x1088: 0x4000, 0x1089: 0x4000, 0x108a: 0x4000, 0x108b: 0x4000,
- 0x108c: 0x4000, 0x108d: 0x4000, 0x108e: 0x4000, 0x108f: 0x4000, 0x1090: 0x4000, 0x1091: 0x4000,
- 0x1092: 0x4000, 0x1094: 0x4000, 0x1095: 0x4000, 0x1096: 0x4000, 0x1097: 0x4000,
- 0x1098: 0x4000, 0x1099: 0x4000, 0x109a: 0x4000, 0x109b: 0x4000, 0x109c: 0x4000, 0x109d: 0x4000,
- 0x109e: 0x4000, 0x109f: 0x4000, 0x10a0: 0x4000, 0x10a1: 0x4000, 0x10a2: 0x4000, 0x10a3: 0x4000,
- 0x10a4: 0x4000, 0x10a5: 0x4000, 0x10a6: 0x4000, 0x10a8: 0x4000, 0x10a9: 0x4000,
- 0x10aa: 0x4000, 0x10ab: 0x4000,
- // Block 0x43, offset 0x10c0
- 0x10c1: 0x9012, 0x10c2: 0x9012, 0x10c3: 0x9012, 0x10c4: 0x9012, 0x10c5: 0x9012,
- 0x10c6: 0x9012, 0x10c7: 0x9012, 0x10c8: 0x9012, 0x10c9: 0x9012, 0x10ca: 0x9012, 0x10cb: 0x9012,
- 0x10cc: 0x9012, 0x10cd: 0x9012, 0x10ce: 0x9012, 0x10cf: 0x9012, 0x10d0: 0x9012, 0x10d1: 0x9012,
- 0x10d2: 0x9012, 0x10d3: 0x9012, 0x10d4: 0x9012, 0x10d5: 0x9012, 0x10d6: 0x9012, 0x10d7: 0x9012,
- 0x10d8: 0x9012, 0x10d9: 0x9012, 0x10da: 0x9012, 0x10db: 0x9012, 0x10dc: 0x9012, 0x10dd: 0x9012,
- 0x10de: 0x9012, 0x10df: 0x9012, 0x10e0: 0x9049, 0x10e1: 0x9049, 0x10e2: 0x9049, 0x10e3: 0x9049,
- 0x10e4: 0x9049, 0x10e5: 0x9049, 0x10e6: 0x9049, 0x10e7: 0x9049, 0x10e8: 0x9049, 0x10e9: 0x9049,
- 0x10ea: 0x9049, 0x10eb: 0x9049, 0x10ec: 0x9049, 0x10ed: 0x9049, 0x10ee: 0x9049, 0x10ef: 0x9049,
- 0x10f0: 0x9049, 0x10f1: 0x9049, 0x10f2: 0x9049, 0x10f3: 0x9049, 0x10f4: 0x9049, 0x10f5: 0x9049,
- 0x10f6: 0x9049, 0x10f7: 0x9049, 0x10f8: 0x9049, 0x10f9: 0x9049, 0x10fa: 0x9049, 0x10fb: 0x9049,
- 0x10fc: 0x9049, 0x10fd: 0x9049, 0x10fe: 0x9049, 0x10ff: 0x9049,
- // Block 0x44, offset 0x1100
- 0x1100: 0x9049, 0x1101: 0x9049, 0x1102: 0x9049, 0x1103: 0x9049, 0x1104: 0x9049, 0x1105: 0x9049,
- 0x1106: 0x9049, 0x1107: 0x9049, 0x1108: 0x9049, 0x1109: 0x9049, 0x110a: 0x9049, 0x110b: 0x9049,
- 0x110c: 0x9049, 0x110d: 0x9049, 0x110e: 0x9049, 0x110f: 0x9049, 0x1110: 0x9049, 0x1111: 0x9049,
- 0x1112: 0x9049, 0x1113: 0x9049, 0x1114: 0x9049, 0x1115: 0x9049, 0x1116: 0x9049, 0x1117: 0x9049,
- 0x1118: 0x9049, 0x1119: 0x9049, 0x111a: 0x9049, 0x111b: 0x9049, 0x111c: 0x9049, 0x111d: 0x9049,
- 0x111e: 0x9049, 0x111f: 0x904a, 0x1120: 0x904b, 0x1121: 0xb04c, 0x1122: 0xb04d, 0x1123: 0xb04d,
- 0x1124: 0xb04e, 0x1125: 0xb04f, 0x1126: 0xb050, 0x1127: 0xb051, 0x1128: 0xb052, 0x1129: 0xb053,
- 0x112a: 0xb054, 0x112b: 0xb055, 0x112c: 0xb056, 0x112d: 0xb057, 0x112e: 0xb058, 0x112f: 0xb059,
- 0x1130: 0xb05a, 0x1131: 0xb05b, 0x1132: 0xb05c, 0x1133: 0xb05d, 0x1134: 0xb05e, 0x1135: 0xb05f,
- 0x1136: 0xb060, 0x1137: 0xb061, 0x1138: 0xb062, 0x1139: 0xb063, 0x113a: 0xb064, 0x113b: 0xb065,
- 0x113c: 0xb052, 0x113d: 0xb066, 0x113e: 0xb067, 0x113f: 0xb055,
- // Block 0x45, offset 0x1140
- 0x1140: 0xb068, 0x1141: 0xb069, 0x1142: 0xb06a, 0x1143: 0xb06b, 0x1144: 0xb05a, 0x1145: 0xb056,
- 0x1146: 0xb06c, 0x1147: 0xb06d, 0x1148: 0xb06b, 0x1149: 0xb06e, 0x114a: 0xb06b, 0x114b: 0xb06f,
- 0x114c: 0xb06f, 0x114d: 0xb070, 0x114e: 0xb070, 0x114f: 0xb071, 0x1150: 0xb056, 0x1151: 0xb072,
- 0x1152: 0xb073, 0x1153: 0xb072, 0x1154: 0xb074, 0x1155: 0xb073, 0x1156: 0xb075, 0x1157: 0xb075,
- 0x1158: 0xb076, 0x1159: 0xb076, 0x115a: 0xb077, 0x115b: 0xb077, 0x115c: 0xb073, 0x115d: 0xb078,
- 0x115e: 0xb079, 0x115f: 0xb067, 0x1160: 0xb07a, 0x1161: 0xb07b, 0x1162: 0xb07b, 0x1163: 0xb07b,
- 0x1164: 0xb07b, 0x1165: 0xb07b, 0x1166: 0xb07b, 0x1167: 0xb07b, 0x1168: 0xb07b, 0x1169: 0xb07b,
- 0x116a: 0xb07b, 0x116b: 0xb07b, 0x116c: 0xb07b, 0x116d: 0xb07b, 0x116e: 0xb07b, 0x116f: 0xb07b,
- 0x1170: 0xb07c, 0x1171: 0xb07c, 0x1172: 0xb07c, 0x1173: 0xb07c, 0x1174: 0xb07c, 0x1175: 0xb07c,
- 0x1176: 0xb07c, 0x1177: 0xb07c, 0x1178: 0xb07c, 0x1179: 0xb07c, 0x117a: 0xb07c, 0x117b: 0xb07c,
- 0x117c: 0xb07c, 0x117d: 0xb07c, 0x117e: 0xb07c,
- // Block 0x46, offset 0x1180
- 0x1182: 0xb07d, 0x1183: 0xb07e, 0x1184: 0xb07f, 0x1185: 0xb080,
- 0x1186: 0xb07f, 0x1187: 0xb07e, 0x118a: 0xb081, 0x118b: 0xb082,
- 0x118c: 0xb083, 0x118d: 0xb07f, 0x118e: 0xb080, 0x118f: 0xb07f,
- 0x1192: 0xb084, 0x1193: 0xb085, 0x1194: 0xb084, 0x1195: 0xb086, 0x1196: 0xb084, 0x1197: 0xb087,
- 0x119a: 0xb088, 0x119b: 0xb089, 0x119c: 0xb08a,
- 0x11a0: 0x908b, 0x11a1: 0x908b, 0x11a2: 0x908c, 0x11a3: 0x908d,
- 0x11a4: 0x908b, 0x11a5: 0x908e, 0x11a6: 0x908f, 0x11a8: 0xb090, 0x11a9: 0xb091,
- 0x11aa: 0xb092, 0x11ab: 0xb091, 0x11ac: 0xb093, 0x11ad: 0xb094, 0x11ae: 0xb095,
- 0x11bd: 0x2000,
- // Block 0x47, offset 0x11c0
- 0x11e0: 0x4000, 0x11e1: 0x4000, 0x11e2: 0x4000, 0x11e3: 0x4000,
- // Block 0x48, offset 0x1200
- 0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000,
- 0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000,
- 0x120c: 0x4000, 0x120d: 0x4000, 0x120e: 0x4000, 0x120f: 0x4000, 0x1210: 0x4000, 0x1211: 0x4000,
- 0x1212: 0x4000, 0x1213: 0x4000, 0x1214: 0x4000, 0x1215: 0x4000, 0x1216: 0x4000, 0x1217: 0x4000,
- 0x1218: 0x4000, 0x1219: 0x4000, 0x121a: 0x4000, 0x121b: 0x4000, 0x121c: 0x4000, 0x121d: 0x4000,
- 0x121e: 0x4000, 0x121f: 0x4000, 0x1220: 0x4000, 0x1221: 0x4000, 0x1222: 0x4000, 0x1223: 0x4000,
- 0x1224: 0x4000, 0x1225: 0x4000, 0x1226: 0x4000, 0x1227: 0x4000, 0x1228: 0x4000, 0x1229: 0x4000,
- 0x122a: 0x4000, 0x122b: 0x4000, 0x122c: 0x4000, 0x122d: 0x4000, 0x122e: 0x4000, 0x122f: 0x4000,
- 0x1230: 0x4000, 0x1231: 0x4000, 0x1232: 0x4000, 0x1233: 0x4000, 0x1234: 0x4000, 0x1235: 0x4000,
- 0x1236: 0x4000, 0x1237: 0x4000,
- // Block 0x49, offset 0x1240
- 0x1240: 0x4000, 0x1241: 0x4000, 0x1242: 0x4000, 0x1243: 0x4000, 0x1244: 0x4000, 0x1245: 0x4000,
- 0x1246: 0x4000, 0x1247: 0x4000, 0x1248: 0x4000, 0x1249: 0x4000, 0x124a: 0x4000, 0x124b: 0x4000,
- 0x124c: 0x4000, 0x124d: 0x4000, 0x124e: 0x4000, 0x124f: 0x4000, 0x1250: 0x4000, 0x1251: 0x4000,
- 0x1252: 0x4000, 0x1253: 0x4000, 0x1254: 0x4000, 0x1255: 0x4000, 0x1256: 0x4000, 0x1257: 0x4000,
- 0x1258: 0x4000, 0x1259: 0x4000, 0x125a: 0x4000, 0x125b: 0x4000, 0x125c: 0x4000, 0x125d: 0x4000,
- 0x125e: 0x4000, 0x125f: 0x4000, 0x1260: 0x4000, 0x1261: 0x4000, 0x1262: 0x4000, 0x1263: 0x4000,
- 0x1264: 0x4000, 0x1265: 0x4000, 0x1266: 0x4000, 0x1267: 0x4000, 0x1268: 0x4000, 0x1269: 0x4000,
- 0x126a: 0x4000, 0x126b: 0x4000, 0x126c: 0x4000, 0x126d: 0x4000, 0x126e: 0x4000, 0x126f: 0x4000,
- 0x1270: 0x4000, 0x1271: 0x4000, 0x1272: 0x4000,
- // Block 0x4a, offset 0x1280
- 0x1280: 0x4000, 0x1281: 0x4000, 0x1282: 0x4000, 0x1283: 0x4000, 0x1284: 0x4000, 0x1285: 0x4000,
- 0x1286: 0x4000, 0x1287: 0x4000, 0x1288: 0x4000, 0x1289: 0x4000, 0x128a: 0x4000, 0x128b: 0x4000,
- 0x128c: 0x4000, 0x128d: 0x4000, 0x128e: 0x4000, 0x128f: 0x4000, 0x1290: 0x4000, 0x1291: 0x4000,
- 0x1292: 0x4000, 0x1293: 0x4000, 0x1294: 0x4000, 0x1295: 0x4000, 0x1296: 0x4000, 0x1297: 0x4000,
- 0x1298: 0x4000, 0x1299: 0x4000, 0x129a: 0x4000, 0x129b: 0x4000, 0x129c: 0x4000, 0x129d: 0x4000,
- 0x129e: 0x4000,
- // Block 0x4b, offset 0x12c0
- 0x12d0: 0x4000, 0x12d1: 0x4000,
- 0x12d2: 0x4000,
- 0x12e4: 0x4000, 0x12e5: 0x4000, 0x12e6: 0x4000, 0x12e7: 0x4000,
- 0x12f0: 0x4000, 0x12f1: 0x4000, 0x12f2: 0x4000, 0x12f3: 0x4000, 0x12f4: 0x4000, 0x12f5: 0x4000,
- 0x12f6: 0x4000, 0x12f7: 0x4000, 0x12f8: 0x4000, 0x12f9: 0x4000, 0x12fa: 0x4000, 0x12fb: 0x4000,
- 0x12fc: 0x4000, 0x12fd: 0x4000, 0x12fe: 0x4000, 0x12ff: 0x4000,
- // Block 0x4c, offset 0x1300
- 0x1300: 0x4000, 0x1301: 0x4000, 0x1302: 0x4000, 0x1303: 0x4000, 0x1304: 0x4000, 0x1305: 0x4000,
- 0x1306: 0x4000, 0x1307: 0x4000, 0x1308: 0x4000, 0x1309: 0x4000, 0x130a: 0x4000, 0x130b: 0x4000,
- 0x130c: 0x4000, 0x130d: 0x4000, 0x130e: 0x4000, 0x130f: 0x4000, 0x1310: 0x4000, 0x1311: 0x4000,
- 0x1312: 0x4000, 0x1313: 0x4000, 0x1314: 0x4000, 0x1315: 0x4000, 0x1316: 0x4000, 0x1317: 0x4000,
- 0x1318: 0x4000, 0x1319: 0x4000, 0x131a: 0x4000, 0x131b: 0x4000, 0x131c: 0x4000, 0x131d: 0x4000,
- 0x131e: 0x4000, 0x131f: 0x4000, 0x1320: 0x4000, 0x1321: 0x4000, 0x1322: 0x4000, 0x1323: 0x4000,
- 0x1324: 0x4000, 0x1325: 0x4000, 0x1326: 0x4000, 0x1327: 0x4000, 0x1328: 0x4000, 0x1329: 0x4000,
- 0x132a: 0x4000, 0x132b: 0x4000, 0x132c: 0x4000, 0x132d: 0x4000, 0x132e: 0x4000, 0x132f: 0x4000,
- 0x1330: 0x4000, 0x1331: 0x4000, 0x1332: 0x4000, 0x1333: 0x4000, 0x1334: 0x4000, 0x1335: 0x4000,
- 0x1336: 0x4000, 0x1337: 0x4000, 0x1338: 0x4000, 0x1339: 0x4000, 0x133a: 0x4000, 0x133b: 0x4000,
- // Block 0x4d, offset 0x1340
- 0x1344: 0x4000,
- // Block 0x4e, offset 0x1380
- 0x138f: 0x4000,
- // Block 0x4f, offset 0x13c0
- 0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000,
- 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000,
- 0x13d0: 0x2000, 0x13d1: 0x2000,
- 0x13d2: 0x2000, 0x13d3: 0x2000, 0x13d4: 0x2000, 0x13d5: 0x2000, 0x13d6: 0x2000, 0x13d7: 0x2000,
- 0x13d8: 0x2000, 0x13d9: 0x2000, 0x13da: 0x2000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000,
- 0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000,
- 0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000,
- 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000, 0x13ed: 0x2000,
- 0x13f0: 0x2000, 0x13f1: 0x2000, 0x13f2: 0x2000, 0x13f3: 0x2000, 0x13f4: 0x2000, 0x13f5: 0x2000,
- 0x13f6: 0x2000, 0x13f7: 0x2000, 0x13f8: 0x2000, 0x13f9: 0x2000, 0x13fa: 0x2000, 0x13fb: 0x2000,
- 0x13fc: 0x2000, 0x13fd: 0x2000, 0x13fe: 0x2000, 0x13ff: 0x2000,
- // Block 0x50, offset 0x1400
- 0x1400: 0x2000, 0x1401: 0x2000, 0x1402: 0x2000, 0x1403: 0x2000, 0x1404: 0x2000, 0x1405: 0x2000,
- 0x1406: 0x2000, 0x1407: 0x2000, 0x1408: 0x2000, 0x1409: 0x2000, 0x140a: 0x2000, 0x140b: 0x2000,
- 0x140c: 0x2000, 0x140d: 0x2000, 0x140e: 0x2000, 0x140f: 0x2000, 0x1410: 0x2000, 0x1411: 0x2000,
- 0x1412: 0x2000, 0x1413: 0x2000, 0x1414: 0x2000, 0x1415: 0x2000, 0x1416: 0x2000, 0x1417: 0x2000,
- 0x1418: 0x2000, 0x1419: 0x2000, 0x141a: 0x2000, 0x141b: 0x2000, 0x141c: 0x2000, 0x141d: 0x2000,
- 0x141e: 0x2000, 0x141f: 0x2000, 0x1420: 0x2000, 0x1421: 0x2000, 0x1422: 0x2000, 0x1423: 0x2000,
- 0x1424: 0x2000, 0x1425: 0x2000, 0x1426: 0x2000, 0x1427: 0x2000, 0x1428: 0x2000, 0x1429: 0x2000,
- 0x1430: 0x2000, 0x1431: 0x2000, 0x1432: 0x2000, 0x1433: 0x2000, 0x1434: 0x2000, 0x1435: 0x2000,
- 0x1436: 0x2000, 0x1437: 0x2000, 0x1438: 0x2000, 0x1439: 0x2000, 0x143a: 0x2000, 0x143b: 0x2000,
- 0x143c: 0x2000, 0x143d: 0x2000, 0x143e: 0x2000, 0x143f: 0x2000,
- // Block 0x51, offset 0x1440
- 0x1440: 0x2000, 0x1441: 0x2000, 0x1442: 0x2000, 0x1443: 0x2000, 0x1444: 0x2000, 0x1445: 0x2000,
- 0x1446: 0x2000, 0x1447: 0x2000, 0x1448: 0x2000, 0x1449: 0x2000, 0x144a: 0x2000, 0x144b: 0x2000,
- 0x144c: 0x2000, 0x144d: 0x2000, 0x144e: 0x4000, 0x144f: 0x2000, 0x1450: 0x2000, 0x1451: 0x4000,
- 0x1452: 0x4000, 0x1453: 0x4000, 0x1454: 0x4000, 0x1455: 0x4000, 0x1456: 0x4000, 0x1457: 0x4000,
- 0x1458: 0x4000, 0x1459: 0x4000, 0x145a: 0x4000, 0x145b: 0x2000, 0x145c: 0x2000, 0x145d: 0x2000,
- 0x145e: 0x2000, 0x145f: 0x2000, 0x1460: 0x2000, 0x1461: 0x2000, 0x1462: 0x2000, 0x1463: 0x2000,
- 0x1464: 0x2000, 0x1465: 0x2000, 0x1466: 0x2000, 0x1467: 0x2000, 0x1468: 0x2000, 0x1469: 0x2000,
- 0x146a: 0x2000, 0x146b: 0x2000, 0x146c: 0x2000,
- // Block 0x52, offset 0x1480
- 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000,
- 0x1490: 0x4000, 0x1491: 0x4000,
- 0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000,
- 0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000,
- 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000, 0x14a1: 0x4000, 0x14a2: 0x4000, 0x14a3: 0x4000,
- 0x14a4: 0x4000, 0x14a5: 0x4000, 0x14a6: 0x4000, 0x14a7: 0x4000, 0x14a8: 0x4000, 0x14a9: 0x4000,
- 0x14aa: 0x4000, 0x14ab: 0x4000, 0x14ac: 0x4000, 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000,
- 0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000,
- 0x14b6: 0x4000, 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000,
- // Block 0x53, offset 0x14c0
- 0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000,
- 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000,
- 0x14d0: 0x4000, 0x14d1: 0x4000,
- 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000,
- 0x14e4: 0x4000, 0x14e5: 0x4000,
- // Block 0x54, offset 0x1500
- 0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000,
- 0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000,
- 0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000,
- 0x1512: 0x4000, 0x1513: 0x4000, 0x1514: 0x4000, 0x1515: 0x4000, 0x1516: 0x4000, 0x1517: 0x4000,
- 0x1518: 0x4000, 0x1519: 0x4000, 0x151a: 0x4000, 0x151b: 0x4000, 0x151c: 0x4000, 0x151d: 0x4000,
- 0x151e: 0x4000, 0x151f: 0x4000, 0x1520: 0x4000,
- 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000,
- 0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000,
- 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000,
- 0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000,
- // Block 0x55, offset 0x1540
- 0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000,
- 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000, 0x154b: 0x4000,
- 0x154c: 0x4000, 0x154d: 0x4000, 0x154e: 0x4000, 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000,
- 0x1552: 0x4000, 0x1553: 0x4000, 0x1554: 0x4000, 0x1555: 0x4000, 0x1556: 0x4000, 0x1557: 0x4000,
- 0x1558: 0x4000, 0x1559: 0x4000, 0x155a: 0x4000, 0x155b: 0x4000, 0x155c: 0x4000, 0x155d: 0x4000,
- 0x155e: 0x4000, 0x155f: 0x4000, 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000,
- 0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000,
- 0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000,
- 0x1570: 0x4000, 0x1571: 0x4000, 0x1572: 0x4000, 0x1573: 0x4000, 0x1574: 0x4000, 0x1575: 0x4000,
- 0x1576: 0x4000, 0x1577: 0x4000, 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000,
- 0x157c: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000,
- // Block 0x56, offset 0x1580
- 0x1580: 0x4000, 0x1581: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000,
- 0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000,
- 0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000,
- 0x1592: 0x4000, 0x1593: 0x4000,
- 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000,
- 0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000,
- 0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000,
- 0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000,
- 0x15b6: 0x4000, 0x15b7: 0x4000, 0x15b8: 0x4000, 0x15b9: 0x4000, 0x15ba: 0x4000, 0x15bb: 0x4000,
- 0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000,
- // Block 0x57, offset 0x15c0
- 0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000,
- 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000,
- 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000,
- 0x15d2: 0x4000, 0x15d3: 0x4000,
- 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000,
- 0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000,
- 0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000,
- 0x15f0: 0x4000, 0x15f4: 0x4000,
- 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000,
- 0x15fc: 0x4000, 0x15fd: 0x4000, 0x15fe: 0x4000, 0x15ff: 0x4000,
- // Block 0x58, offset 0x1600
- 0x1600: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000,
- 0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000,
- 0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000,
- 0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000,
- 0x1618: 0x4000, 0x1619: 0x4000, 0x161a: 0x4000, 0x161b: 0x4000, 0x161c: 0x4000, 0x161d: 0x4000,
- 0x161e: 0x4000, 0x161f: 0x4000, 0x1620: 0x4000, 0x1621: 0x4000, 0x1622: 0x4000, 0x1623: 0x4000,
- 0x1624: 0x4000, 0x1625: 0x4000, 0x1626: 0x4000, 0x1627: 0x4000, 0x1628: 0x4000, 0x1629: 0x4000,
- 0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000,
- 0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000,
- 0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000,
- 0x163c: 0x4000, 0x163d: 0x4000, 0x163e: 0x4000, 0x163f: 0x4000,
- // Block 0x59, offset 0x1640
- 0x1640: 0x4000, 0x1641: 0x4000, 0x1642: 0x4000, 0x1643: 0x4000, 0x1644: 0x4000, 0x1645: 0x4000,
- 0x1646: 0x4000, 0x1647: 0x4000, 0x1648: 0x4000, 0x1649: 0x4000, 0x164a: 0x4000, 0x164b: 0x4000,
- 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x164f: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000,
- 0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000,
- 0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000,
- 0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000,
- 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000, 0x1668: 0x4000, 0x1669: 0x4000,
- 0x166a: 0x4000, 0x166b: 0x4000, 0x166c: 0x4000, 0x166d: 0x4000, 0x166e: 0x4000, 0x166f: 0x4000,
- 0x1670: 0x4000, 0x1671: 0x4000, 0x1672: 0x4000, 0x1673: 0x4000, 0x1674: 0x4000, 0x1675: 0x4000,
- 0x1676: 0x4000, 0x1677: 0x4000, 0x1678: 0x4000, 0x1679: 0x4000, 0x167a: 0x4000, 0x167b: 0x4000,
- 0x167c: 0x4000, 0x167f: 0x4000,
- // Block 0x5a, offset 0x1680
- 0x1680: 0x4000, 0x1681: 0x4000, 0x1682: 0x4000, 0x1683: 0x4000, 0x1684: 0x4000, 0x1685: 0x4000,
- 0x1686: 0x4000, 0x1687: 0x4000, 0x1688: 0x4000, 0x1689: 0x4000, 0x168a: 0x4000, 0x168b: 0x4000,
- 0x168c: 0x4000, 0x168d: 0x4000, 0x168e: 0x4000, 0x168f: 0x4000, 0x1690: 0x4000, 0x1691: 0x4000,
- 0x1692: 0x4000, 0x1693: 0x4000, 0x1694: 0x4000, 0x1695: 0x4000, 0x1696: 0x4000, 0x1697: 0x4000,
- 0x1698: 0x4000, 0x1699: 0x4000, 0x169a: 0x4000, 0x169b: 0x4000, 0x169c: 0x4000, 0x169d: 0x4000,
- 0x169e: 0x4000, 0x169f: 0x4000, 0x16a0: 0x4000, 0x16a1: 0x4000, 0x16a2: 0x4000, 0x16a3: 0x4000,
- 0x16a4: 0x4000, 0x16a5: 0x4000, 0x16a6: 0x4000, 0x16a7: 0x4000, 0x16a8: 0x4000, 0x16a9: 0x4000,
- 0x16aa: 0x4000, 0x16ab: 0x4000, 0x16ac: 0x4000, 0x16ad: 0x4000, 0x16ae: 0x4000, 0x16af: 0x4000,
- 0x16b0: 0x4000, 0x16b1: 0x4000, 0x16b2: 0x4000, 0x16b3: 0x4000, 0x16b4: 0x4000, 0x16b5: 0x4000,
- 0x16b6: 0x4000, 0x16b7: 0x4000, 0x16b8: 0x4000, 0x16b9: 0x4000, 0x16ba: 0x4000, 0x16bb: 0x4000,
- 0x16bc: 0x4000, 0x16bd: 0x4000,
- // Block 0x5b, offset 0x16c0
- 0x16cb: 0x4000,
- 0x16cc: 0x4000, 0x16cd: 0x4000, 0x16ce: 0x4000, 0x16d0: 0x4000, 0x16d1: 0x4000,
- 0x16d2: 0x4000, 0x16d3: 0x4000, 0x16d4: 0x4000, 0x16d5: 0x4000, 0x16d6: 0x4000, 0x16d7: 0x4000,
- 0x16d8: 0x4000, 0x16d9: 0x4000, 0x16da: 0x4000, 0x16db: 0x4000, 0x16dc: 0x4000, 0x16dd: 0x4000,
- 0x16de: 0x4000, 0x16df: 0x4000, 0x16e0: 0x4000, 0x16e1: 0x4000, 0x16e2: 0x4000, 0x16e3: 0x4000,
- 0x16e4: 0x4000, 0x16e5: 0x4000, 0x16e6: 0x4000, 0x16e7: 0x4000,
- 0x16fa: 0x4000,
- // Block 0x5c, offset 0x1700
- 0x1715: 0x4000, 0x1716: 0x4000,
- 0x1724: 0x4000,
- // Block 0x5d, offset 0x1740
- 0x177b: 0x4000,
- 0x177c: 0x4000, 0x177d: 0x4000, 0x177e: 0x4000, 0x177f: 0x4000,
- // Block 0x5e, offset 0x1780
- 0x1780: 0x4000, 0x1781: 0x4000, 0x1782: 0x4000, 0x1783: 0x4000, 0x1784: 0x4000, 0x1785: 0x4000,
- 0x1786: 0x4000, 0x1787: 0x4000, 0x1788: 0x4000, 0x1789: 0x4000, 0x178a: 0x4000, 0x178b: 0x4000,
- 0x178c: 0x4000, 0x178d: 0x4000, 0x178e: 0x4000, 0x178f: 0x4000,
- // Block 0x5f, offset 0x17c0
- 0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000,
- 0x17cc: 0x4000, 0x17d0: 0x4000, 0x17d1: 0x4000,
- 0x17d2: 0x4000, 0x17d5: 0x4000,
- 0x17eb: 0x4000, 0x17ec: 0x4000,
- 0x17f4: 0x4000, 0x17f5: 0x4000,
- 0x17f6: 0x4000, 0x17f7: 0x4000, 0x17f8: 0x4000, 0x17f9: 0x4000, 0x17fa: 0x4000,
- // Block 0x60, offset 0x1800
- 0x1820: 0x4000, 0x1821: 0x4000, 0x1822: 0x4000, 0x1823: 0x4000,
- 0x1824: 0x4000, 0x1825: 0x4000, 0x1826: 0x4000, 0x1827: 0x4000, 0x1828: 0x4000, 0x1829: 0x4000,
- 0x182a: 0x4000, 0x182b: 0x4000,
- // Block 0x61, offset 0x1840
- 0x184d: 0x4000, 0x184e: 0x4000, 0x184f: 0x4000, 0x1850: 0x4000, 0x1851: 0x4000,
- 0x1852: 0x4000, 0x1853: 0x4000, 0x1854: 0x4000, 0x1855: 0x4000, 0x1856: 0x4000, 0x1857: 0x4000,
- 0x1858: 0x4000, 0x1859: 0x4000, 0x185a: 0x4000, 0x185b: 0x4000, 0x185c: 0x4000, 0x185d: 0x4000,
- 0x185e: 0x4000, 0x185f: 0x4000, 0x1860: 0x4000, 0x1861: 0x4000, 0x1862: 0x4000, 0x1863: 0x4000,
- 0x1864: 0x4000, 0x1865: 0x4000, 0x1866: 0x4000, 0x1867: 0x4000, 0x1868: 0x4000, 0x1869: 0x4000,
- 0x186a: 0x4000, 0x186b: 0x4000, 0x186c: 0x4000, 0x186d: 0x4000, 0x186e: 0x4000, 0x186f: 0x4000,
- 0x1870: 0x4000, 0x1871: 0x4000, 0x1872: 0x4000, 0x1873: 0x4000, 0x1874: 0x4000, 0x1875: 0x4000,
- 0x1876: 0x4000, 0x1877: 0x4000, 0x1878: 0x4000, 0x1879: 0x4000, 0x187a: 0x4000, 0x187b: 0x4000,
- 0x187c: 0x4000, 0x187d: 0x4000, 0x187e: 0x4000, 0x187f: 0x4000,
- // Block 0x62, offset 0x1880
- 0x1880: 0x4000, 0x1881: 0x4000, 0x1882: 0x4000, 0x1883: 0x4000, 0x1884: 0x4000, 0x1885: 0x4000,
- 0x1886: 0x4000, 0x1887: 0x4000, 0x1888: 0x4000, 0x1889: 0x4000, 0x188a: 0x4000, 0x188b: 0x4000,
- 0x188c: 0x4000, 0x188d: 0x4000, 0x188e: 0x4000, 0x188f: 0x4000, 0x1890: 0x4000, 0x1891: 0x4000,
- 0x1892: 0x4000, 0x1893: 0x4000, 0x1894: 0x4000, 0x1895: 0x4000, 0x1896: 0x4000, 0x1897: 0x4000,
- 0x1898: 0x4000, 0x1899: 0x4000, 0x189a: 0x4000, 0x189b: 0x4000, 0x189c: 0x4000, 0x189d: 0x4000,
- 0x189e: 0x4000, 0x189f: 0x4000, 0x18a0: 0x4000, 0x18a1: 0x4000, 0x18a2: 0x4000, 0x18a3: 0x4000,
- 0x18a4: 0x4000, 0x18a5: 0x4000, 0x18a6: 0x4000, 0x18a7: 0x4000, 0x18a8: 0x4000, 0x18a9: 0x4000,
- 0x18aa: 0x4000, 0x18ab: 0x4000, 0x18ac: 0x4000, 0x18ad: 0x4000, 0x18ae: 0x4000, 0x18af: 0x4000,
- 0x18b0: 0x4000, 0x18b1: 0x4000, 0x18b3: 0x4000, 0x18b4: 0x4000, 0x18b5: 0x4000,
- 0x18b6: 0x4000, 0x18ba: 0x4000, 0x18bb: 0x4000,
- 0x18bc: 0x4000, 0x18bd: 0x4000, 0x18be: 0x4000, 0x18bf: 0x4000,
- // Block 0x63, offset 0x18c0
- 0x18c0: 0x4000, 0x18c1: 0x4000, 0x18c2: 0x4000, 0x18c3: 0x4000, 0x18c4: 0x4000, 0x18c5: 0x4000,
- 0x18c6: 0x4000, 0x18c7: 0x4000, 0x18c8: 0x4000, 0x18c9: 0x4000, 0x18ca: 0x4000, 0x18cb: 0x4000,
- 0x18cc: 0x4000, 0x18cd: 0x4000, 0x18ce: 0x4000, 0x18cf: 0x4000, 0x18d0: 0x4000, 0x18d1: 0x4000,
- 0x18d2: 0x4000, 0x18d3: 0x4000, 0x18d4: 0x4000, 0x18d5: 0x4000, 0x18d6: 0x4000, 0x18d7: 0x4000,
- 0x18d8: 0x4000, 0x18d9: 0x4000, 0x18da: 0x4000, 0x18db: 0x4000, 0x18dc: 0x4000, 0x18dd: 0x4000,
- 0x18de: 0x4000, 0x18df: 0x4000, 0x18e0: 0x4000, 0x18e1: 0x4000, 0x18e2: 0x4000,
- 0x18e5: 0x4000, 0x18e6: 0x4000, 0x18e7: 0x4000, 0x18e8: 0x4000, 0x18e9: 0x4000,
- 0x18ea: 0x4000, 0x18ee: 0x4000, 0x18ef: 0x4000,
- 0x18f0: 0x4000, 0x18f1: 0x4000, 0x18f2: 0x4000, 0x18f3: 0x4000, 0x18f4: 0x4000, 0x18f5: 0x4000,
- 0x18f6: 0x4000, 0x18f7: 0x4000, 0x18f8: 0x4000, 0x18f9: 0x4000, 0x18fa: 0x4000, 0x18fb: 0x4000,
- 0x18fc: 0x4000, 0x18fd: 0x4000, 0x18fe: 0x4000, 0x18ff: 0x4000,
- // Block 0x64, offset 0x1900
- 0x1900: 0x4000, 0x1901: 0x4000, 0x1902: 0x4000, 0x1903: 0x4000, 0x1904: 0x4000, 0x1905: 0x4000,
- 0x1906: 0x4000, 0x1907: 0x4000, 0x1908: 0x4000, 0x1909: 0x4000, 0x190a: 0x4000,
- 0x190d: 0x4000, 0x190e: 0x4000, 0x190f: 0x4000, 0x1910: 0x4000, 0x1911: 0x4000,
- 0x1912: 0x4000, 0x1913: 0x4000, 0x1914: 0x4000, 0x1915: 0x4000, 0x1916: 0x4000, 0x1917: 0x4000,
- 0x1918: 0x4000, 0x1919: 0x4000, 0x191a: 0x4000, 0x191b: 0x4000, 0x191c: 0x4000, 0x191d: 0x4000,
- 0x191e: 0x4000, 0x191f: 0x4000, 0x1920: 0x4000, 0x1921: 0x4000, 0x1922: 0x4000, 0x1923: 0x4000,
- 0x1924: 0x4000, 0x1925: 0x4000, 0x1926: 0x4000, 0x1927: 0x4000, 0x1928: 0x4000, 0x1929: 0x4000,
- 0x192a: 0x4000, 0x192b: 0x4000, 0x192c: 0x4000, 0x192d: 0x4000, 0x192e: 0x4000, 0x192f: 0x4000,
- 0x1930: 0x4000, 0x1931: 0x4000, 0x1932: 0x4000, 0x1933: 0x4000, 0x1934: 0x4000, 0x1935: 0x4000,
- 0x1936: 0x4000, 0x1937: 0x4000, 0x1938: 0x4000, 0x1939: 0x4000, 0x193a: 0x4000, 0x193b: 0x4000,
- 0x193c: 0x4000, 0x193d: 0x4000, 0x193e: 0x4000, 0x193f: 0x4000,
- // Block 0x65, offset 0x1940
- 0x1970: 0x4000, 0x1971: 0x4000, 0x1972: 0x4000, 0x1973: 0x4000,
- 0x1978: 0x4000, 0x1979: 0x4000, 0x197a: 0x4000,
- // Block 0x66, offset 0x1980
- 0x1980: 0x4000, 0x1981: 0x4000, 0x1982: 0x4000,
- 0x1990: 0x4000, 0x1991: 0x4000,
- 0x1992: 0x4000, 0x1993: 0x4000, 0x1994: 0x4000, 0x1995: 0x4000,
- // Block 0x67, offset 0x19c0
- 0x19c0: 0x2000, 0x19c1: 0x2000, 0x19c2: 0x2000, 0x19c3: 0x2000, 0x19c4: 0x2000, 0x19c5: 0x2000,
- 0x19c6: 0x2000, 0x19c7: 0x2000, 0x19c8: 0x2000, 0x19c9: 0x2000, 0x19ca: 0x2000, 0x19cb: 0x2000,
- 0x19cc: 0x2000, 0x19cd: 0x2000, 0x19ce: 0x2000, 0x19cf: 0x2000, 0x19d0: 0x2000, 0x19d1: 0x2000,
- 0x19d2: 0x2000, 0x19d3: 0x2000, 0x19d4: 0x2000, 0x19d5: 0x2000, 0x19d6: 0x2000, 0x19d7: 0x2000,
- 0x19d8: 0x2000, 0x19d9: 0x2000, 0x19da: 0x2000, 0x19db: 0x2000, 0x19dc: 0x2000, 0x19dd: 0x2000,
- 0x19de: 0x2000, 0x19df: 0x2000, 0x19e0: 0x2000, 0x19e1: 0x2000, 0x19e2: 0x2000, 0x19e3: 0x2000,
- 0x19e4: 0x2000, 0x19e5: 0x2000, 0x19e6: 0x2000, 0x19e7: 0x2000, 0x19e8: 0x2000, 0x19e9: 0x2000,
- 0x19ea: 0x2000, 0x19eb: 0x2000, 0x19ec: 0x2000, 0x19ed: 0x2000, 0x19ee: 0x2000, 0x19ef: 0x2000,
- 0x19f0: 0x2000, 0x19f1: 0x2000, 0x19f2: 0x2000, 0x19f3: 0x2000, 0x19f4: 0x2000, 0x19f5: 0x2000,
- 0x19f6: 0x2000, 0x19f7: 0x2000, 0x19f8: 0x2000, 0x19f9: 0x2000, 0x19fa: 0x2000, 0x19fb: 0x2000,
- 0x19fc: 0x2000, 0x19fd: 0x2000,
-}
-
-// widthIndex: 22 blocks, 1408 entries, 1408 bytes
-// Block 0 is the zero block.
-var widthIndex = [1408]uint8{
- // Block 0x0, offset 0x0
- // Block 0x1, offset 0x40
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc7: 0x05,
- 0xc9: 0x06, 0xcb: 0x07, 0xcc: 0x08, 0xcd: 0x09, 0xce: 0x0a, 0xcf: 0x0b,
- 0xd0: 0x0c, 0xd1: 0x0d,
- 0xe1: 0x02, 0xe2: 0x03, 0xe3: 0x04, 0xe4: 0x05, 0xe5: 0x06, 0xe6: 0x06, 0xe7: 0x06,
- 0xe8: 0x06, 0xe9: 0x06, 0xea: 0x07, 0xeb: 0x06, 0xec: 0x06, 0xed: 0x08, 0xee: 0x09, 0xef: 0x0a,
- 0xf0: 0x0f, 0xf3: 0x12, 0xf4: 0x13,
- // Block 0x4, offset 0x100
- 0x104: 0x0e, 0x105: 0x0f,
- // Block 0x5, offset 0x140
- 0x140: 0x10, 0x141: 0x11, 0x142: 0x12, 0x144: 0x13, 0x145: 0x14, 0x146: 0x15, 0x147: 0x16,
- 0x148: 0x17, 0x149: 0x18, 0x14a: 0x19, 0x14c: 0x1a, 0x14f: 0x1b,
- 0x151: 0x1c, 0x152: 0x08, 0x153: 0x1d, 0x154: 0x1e, 0x155: 0x1f, 0x156: 0x20, 0x157: 0x21,
- 0x158: 0x22, 0x159: 0x23, 0x15a: 0x24, 0x15b: 0x25, 0x15c: 0x26, 0x15d: 0x27, 0x15e: 0x28, 0x15f: 0x29,
- 0x166: 0x2a,
- 0x16c: 0x2b, 0x16d: 0x2c,
- 0x17a: 0x2d, 0x17b: 0x2e, 0x17c: 0x0e, 0x17d: 0x0e, 0x17e: 0x0e, 0x17f: 0x2f,
- // Block 0x6, offset 0x180
- 0x180: 0x30, 0x181: 0x31, 0x182: 0x32, 0x183: 0x33, 0x184: 0x34, 0x185: 0x35, 0x186: 0x36, 0x187: 0x37,
- 0x188: 0x38, 0x189: 0x39, 0x18a: 0x0e, 0x18b: 0x3a, 0x18c: 0x0e, 0x18d: 0x0e, 0x18e: 0x0e, 0x18f: 0x0e,
- 0x190: 0x0e, 0x191: 0x0e, 0x192: 0x0e, 0x193: 0x0e, 0x194: 0x0e, 0x195: 0x0e, 0x196: 0x0e, 0x197: 0x0e,
- 0x198: 0x0e, 0x199: 0x0e, 0x19a: 0x0e, 0x19b: 0x0e, 0x19c: 0x0e, 0x19d: 0x0e, 0x19e: 0x0e, 0x19f: 0x0e,
- 0x1a0: 0x0e, 0x1a1: 0x0e, 0x1a2: 0x0e, 0x1a3: 0x0e, 0x1a4: 0x0e, 0x1a5: 0x0e, 0x1a6: 0x0e, 0x1a7: 0x0e,
- 0x1a8: 0x0e, 0x1a9: 0x0e, 0x1aa: 0x0e, 0x1ab: 0x0e, 0x1ac: 0x0e, 0x1ad: 0x0e, 0x1ae: 0x0e, 0x1af: 0x0e,
- 0x1b0: 0x0e, 0x1b1: 0x0e, 0x1b2: 0x0e, 0x1b3: 0x0e, 0x1b4: 0x0e, 0x1b5: 0x0e, 0x1b6: 0x0e, 0x1b7: 0x0e,
- 0x1b8: 0x0e, 0x1b9: 0x0e, 0x1ba: 0x0e, 0x1bb: 0x0e, 0x1bc: 0x0e, 0x1bd: 0x0e, 0x1be: 0x0e, 0x1bf: 0x0e,
- // Block 0x7, offset 0x1c0
- 0x1c0: 0x0e, 0x1c1: 0x0e, 0x1c2: 0x0e, 0x1c3: 0x0e, 0x1c4: 0x0e, 0x1c5: 0x0e, 0x1c6: 0x0e, 0x1c7: 0x0e,
- 0x1c8: 0x0e, 0x1c9: 0x0e, 0x1ca: 0x0e, 0x1cb: 0x0e, 0x1cc: 0x0e, 0x1cd: 0x0e, 0x1ce: 0x0e, 0x1cf: 0x0e,
- 0x1d0: 0x0e, 0x1d1: 0x0e, 0x1d2: 0x0e, 0x1d3: 0x0e, 0x1d4: 0x0e, 0x1d5: 0x0e, 0x1d6: 0x0e, 0x1d7: 0x0e,
- 0x1d8: 0x0e, 0x1d9: 0x0e, 0x1da: 0x0e, 0x1db: 0x0e, 0x1dc: 0x0e, 0x1dd: 0x0e, 0x1de: 0x0e, 0x1df: 0x0e,
- 0x1e0: 0x0e, 0x1e1: 0x0e, 0x1e2: 0x0e, 0x1e3: 0x0e, 0x1e4: 0x0e, 0x1e5: 0x0e, 0x1e6: 0x0e, 0x1e7: 0x0e,
- 0x1e8: 0x0e, 0x1e9: 0x0e, 0x1ea: 0x0e, 0x1eb: 0x0e, 0x1ec: 0x0e, 0x1ed: 0x0e, 0x1ee: 0x0e, 0x1ef: 0x0e,
- 0x1f0: 0x0e, 0x1f1: 0x0e, 0x1f2: 0x0e, 0x1f3: 0x0e, 0x1f4: 0x0e, 0x1f5: 0x0e, 0x1f6: 0x0e,
- 0x1f8: 0x0e, 0x1f9: 0x0e, 0x1fa: 0x0e, 0x1fb: 0x0e, 0x1fc: 0x0e, 0x1fd: 0x0e, 0x1fe: 0x0e, 0x1ff: 0x0e,
- // Block 0x8, offset 0x200
- 0x200: 0x0e, 0x201: 0x0e, 0x202: 0x0e, 0x203: 0x0e, 0x204: 0x0e, 0x205: 0x0e, 0x206: 0x0e, 0x207: 0x0e,
- 0x208: 0x0e, 0x209: 0x0e, 0x20a: 0x0e, 0x20b: 0x0e, 0x20c: 0x0e, 0x20d: 0x0e, 0x20e: 0x0e, 0x20f: 0x0e,
- 0x210: 0x0e, 0x211: 0x0e, 0x212: 0x0e, 0x213: 0x0e, 0x214: 0x0e, 0x215: 0x0e, 0x216: 0x0e, 0x217: 0x0e,
- 0x218: 0x0e, 0x219: 0x0e, 0x21a: 0x0e, 0x21b: 0x0e, 0x21c: 0x0e, 0x21d: 0x0e, 0x21e: 0x0e, 0x21f: 0x0e,
- 0x220: 0x0e, 0x221: 0x0e, 0x222: 0x0e, 0x223: 0x0e, 0x224: 0x0e, 0x225: 0x0e, 0x226: 0x0e, 0x227: 0x0e,
- 0x228: 0x0e, 0x229: 0x0e, 0x22a: 0x0e, 0x22b: 0x0e, 0x22c: 0x0e, 0x22d: 0x0e, 0x22e: 0x0e, 0x22f: 0x0e,
- 0x230: 0x0e, 0x231: 0x0e, 0x232: 0x0e, 0x233: 0x0e, 0x234: 0x0e, 0x235: 0x0e, 0x236: 0x0e, 0x237: 0x0e,
- 0x238: 0x0e, 0x239: 0x0e, 0x23a: 0x0e, 0x23b: 0x0e, 0x23c: 0x0e, 0x23d: 0x0e, 0x23e: 0x0e, 0x23f: 0x0e,
- // Block 0x9, offset 0x240
- 0x240: 0x0e, 0x241: 0x0e, 0x242: 0x0e, 0x243: 0x0e, 0x244: 0x0e, 0x245: 0x0e, 0x246: 0x0e, 0x247: 0x0e,
- 0x248: 0x0e, 0x249: 0x0e, 0x24a: 0x0e, 0x24b: 0x0e, 0x24c: 0x0e, 0x24d: 0x0e, 0x24e: 0x0e, 0x24f: 0x0e,
- 0x250: 0x0e, 0x251: 0x0e, 0x252: 0x3b, 0x253: 0x3c,
- 0x265: 0x3d,
- 0x270: 0x0e, 0x271: 0x0e, 0x272: 0x0e, 0x273: 0x0e, 0x274: 0x0e, 0x275: 0x0e, 0x276: 0x0e, 0x277: 0x0e,
- 0x278: 0x0e, 0x279: 0x0e, 0x27a: 0x0e, 0x27b: 0x0e, 0x27c: 0x0e, 0x27d: 0x0e, 0x27e: 0x0e, 0x27f: 0x0e,
- // Block 0xa, offset 0x280
- 0x280: 0x0e, 0x281: 0x0e, 0x282: 0x0e, 0x283: 0x0e, 0x284: 0x0e, 0x285: 0x0e, 0x286: 0x0e, 0x287: 0x0e,
- 0x288: 0x0e, 0x289: 0x0e, 0x28a: 0x0e, 0x28b: 0x0e, 0x28c: 0x0e, 0x28d: 0x0e, 0x28e: 0x0e, 0x28f: 0x0e,
- 0x290: 0x0e, 0x291: 0x0e, 0x292: 0x0e, 0x293: 0x0e, 0x294: 0x0e, 0x295: 0x0e, 0x296: 0x0e, 0x297: 0x0e,
- 0x298: 0x0e, 0x299: 0x0e, 0x29a: 0x0e, 0x29b: 0x0e, 0x29c: 0x0e, 0x29d: 0x0e, 0x29e: 0x3e,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x08, 0x2c1: 0x08, 0x2c2: 0x08, 0x2c3: 0x08, 0x2c4: 0x08, 0x2c5: 0x08, 0x2c6: 0x08, 0x2c7: 0x08,
- 0x2c8: 0x08, 0x2c9: 0x08, 0x2ca: 0x08, 0x2cb: 0x08, 0x2cc: 0x08, 0x2cd: 0x08, 0x2ce: 0x08, 0x2cf: 0x08,
- 0x2d0: 0x08, 0x2d1: 0x08, 0x2d2: 0x08, 0x2d3: 0x08, 0x2d4: 0x08, 0x2d5: 0x08, 0x2d6: 0x08, 0x2d7: 0x08,
- 0x2d8: 0x08, 0x2d9: 0x08, 0x2da: 0x08, 0x2db: 0x08, 0x2dc: 0x08, 0x2dd: 0x08, 0x2de: 0x08, 0x2df: 0x08,
- 0x2e0: 0x08, 0x2e1: 0x08, 0x2e2: 0x08, 0x2e3: 0x08, 0x2e4: 0x08, 0x2e5: 0x08, 0x2e6: 0x08, 0x2e7: 0x08,
- 0x2e8: 0x08, 0x2e9: 0x08, 0x2ea: 0x08, 0x2eb: 0x08, 0x2ec: 0x08, 0x2ed: 0x08, 0x2ee: 0x08, 0x2ef: 0x08,
- 0x2f0: 0x08, 0x2f1: 0x08, 0x2f2: 0x08, 0x2f3: 0x08, 0x2f4: 0x08, 0x2f5: 0x08, 0x2f6: 0x08, 0x2f7: 0x08,
- 0x2f8: 0x08, 0x2f9: 0x08, 0x2fa: 0x08, 0x2fb: 0x08, 0x2fc: 0x08, 0x2fd: 0x08, 0x2fe: 0x08, 0x2ff: 0x08,
- // Block 0xc, offset 0x300
- 0x300: 0x08, 0x301: 0x08, 0x302: 0x08, 0x303: 0x08, 0x304: 0x08, 0x305: 0x08, 0x306: 0x08, 0x307: 0x08,
- 0x308: 0x08, 0x309: 0x08, 0x30a: 0x08, 0x30b: 0x08, 0x30c: 0x08, 0x30d: 0x08, 0x30e: 0x08, 0x30f: 0x08,
- 0x310: 0x08, 0x311: 0x08, 0x312: 0x08, 0x313: 0x08, 0x314: 0x08, 0x315: 0x08, 0x316: 0x08, 0x317: 0x08,
- 0x318: 0x08, 0x319: 0x08, 0x31a: 0x08, 0x31b: 0x08, 0x31c: 0x08, 0x31d: 0x08, 0x31e: 0x08, 0x31f: 0x08,
- 0x320: 0x08, 0x321: 0x08, 0x322: 0x08, 0x323: 0x08, 0x324: 0x0e, 0x325: 0x0e, 0x326: 0x0e, 0x327: 0x0e,
- 0x328: 0x0e, 0x329: 0x0e, 0x32a: 0x0e, 0x32b: 0x0e,
- 0x338: 0x3f, 0x339: 0x40, 0x33c: 0x41, 0x33d: 0x42, 0x33e: 0x43, 0x33f: 0x44,
- // Block 0xd, offset 0x340
- 0x37f: 0x45,
- // Block 0xe, offset 0x380
- 0x380: 0x0e, 0x381: 0x0e, 0x382: 0x0e, 0x383: 0x0e, 0x384: 0x0e, 0x385: 0x0e, 0x386: 0x0e, 0x387: 0x0e,
- 0x388: 0x0e, 0x389: 0x0e, 0x38a: 0x0e, 0x38b: 0x0e, 0x38c: 0x0e, 0x38d: 0x0e, 0x38e: 0x0e, 0x38f: 0x0e,
- 0x390: 0x0e, 0x391: 0x0e, 0x392: 0x0e, 0x393: 0x0e, 0x394: 0x0e, 0x395: 0x0e, 0x396: 0x0e, 0x397: 0x0e,
- 0x398: 0x0e, 0x399: 0x0e, 0x39a: 0x0e, 0x39b: 0x0e, 0x39c: 0x0e, 0x39d: 0x0e, 0x39e: 0x0e, 0x39f: 0x46,
- 0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e,
- 0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x47,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x0e, 0x3c1: 0x0e, 0x3c2: 0x0e, 0x3c3: 0x0e, 0x3c4: 0x48, 0x3c5: 0x49, 0x3c6: 0x0e, 0x3c7: 0x0e,
- 0x3c8: 0x0e, 0x3c9: 0x0e, 0x3ca: 0x0e, 0x3cb: 0x4a,
- // Block 0x10, offset 0x400
- 0x400: 0x4b, 0x403: 0x4c, 0x404: 0x4d, 0x405: 0x4e, 0x406: 0x4f,
- 0x408: 0x50, 0x409: 0x51, 0x40c: 0x52, 0x40d: 0x53, 0x40e: 0x54, 0x40f: 0x55,
- 0x410: 0x3a, 0x411: 0x56, 0x412: 0x0e, 0x413: 0x57, 0x414: 0x58, 0x415: 0x59, 0x416: 0x5a, 0x417: 0x5b,
- 0x418: 0x0e, 0x419: 0x5c, 0x41a: 0x0e, 0x41b: 0x5d, 0x41f: 0x5e,
- 0x424: 0x5f, 0x425: 0x60, 0x426: 0x61, 0x427: 0x62,
- 0x429: 0x63, 0x42a: 0x64,
- // Block 0x11, offset 0x440
- 0x456: 0x0b, 0x457: 0x06,
- 0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e,
- 0x460: 0x06, 0x461: 0x06, 0x462: 0x06, 0x463: 0x06, 0x464: 0x06, 0x465: 0x06, 0x466: 0x06, 0x467: 0x06,
- 0x468: 0x06, 0x469: 0x06, 0x46a: 0x06, 0x46b: 0x06, 0x46c: 0x06, 0x46d: 0x06, 0x46e: 0x06, 0x46f: 0x06,
- 0x470: 0x06, 0x471: 0x06, 0x472: 0x06, 0x473: 0x06, 0x474: 0x06, 0x475: 0x06, 0x476: 0x06, 0x477: 0x06,
- 0x478: 0x06, 0x479: 0x06, 0x47a: 0x06, 0x47b: 0x06, 0x47c: 0x06, 0x47d: 0x06, 0x47e: 0x06, 0x47f: 0x06,
- // Block 0x12, offset 0x480
- 0x484: 0x08, 0x485: 0x08, 0x486: 0x08, 0x487: 0x09,
- // Block 0x13, offset 0x4c0
- 0x4c0: 0x08, 0x4c1: 0x08, 0x4c2: 0x08, 0x4c3: 0x08, 0x4c4: 0x08, 0x4c5: 0x08, 0x4c6: 0x08, 0x4c7: 0x08,
- 0x4c8: 0x08, 0x4c9: 0x08, 0x4ca: 0x08, 0x4cb: 0x08, 0x4cc: 0x08, 0x4cd: 0x08, 0x4ce: 0x08, 0x4cf: 0x08,
- 0x4d0: 0x08, 0x4d1: 0x08, 0x4d2: 0x08, 0x4d3: 0x08, 0x4d4: 0x08, 0x4d5: 0x08, 0x4d6: 0x08, 0x4d7: 0x08,
- 0x4d8: 0x08, 0x4d9: 0x08, 0x4da: 0x08, 0x4db: 0x08, 0x4dc: 0x08, 0x4dd: 0x08, 0x4de: 0x08, 0x4df: 0x08,
- 0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08,
- 0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08,
- 0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08,
- 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x65,
- // Block 0x14, offset 0x500
- 0x520: 0x10,
- 0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09,
- 0x538: 0x09, 0x539: 0x09, 0x53a: 0x09, 0x53b: 0x09, 0x53c: 0x09, 0x53d: 0x09, 0x53e: 0x09, 0x53f: 0x11,
- // Block 0x15, offset 0x540
- 0x540: 0x09, 0x541: 0x09, 0x542: 0x09, 0x543: 0x09, 0x544: 0x09, 0x545: 0x09, 0x546: 0x09, 0x547: 0x09,
- 0x548: 0x09, 0x549: 0x09, 0x54a: 0x09, 0x54b: 0x09, 0x54c: 0x09, 0x54d: 0x09, 0x54e: 0x09, 0x54f: 0x11,
-}
-
-// inverseData contains 4-byte entries of the following format:
-// <0 padding>
-// The last byte of the UTF-8-encoded rune is xor-ed with the last byte of the
-// UTF-8 encoding of the original rune. Mappings often have the following
-// pattern:
-// A -> A (U+FF21 -> U+0041)
-// B -> B (U+FF22 -> U+0042)
-// ...
-// By xor-ing the last byte the same entry can be shared by many mappings. This
-// reduces the total number of distinct entries by about two thirds.
-// The resulting entry for the aforementioned mappings is
-// { 0x01, 0xE0, 0x00, 0x00 }
-// Using this entry to map U+FF21 (UTF-8 [EF BC A1]), we get
-// E0 ^ A1 = 41.
-// Similarly, for U+FF22 (UTF-8 [EF BC A2]), we get
-// E0 ^ A2 = 42.
-// Note that because of the xor-ing, the byte sequence stored in the entry is
-// not valid UTF-8.
-var inverseData = [150][4]byte{
- {0x00, 0x00, 0x00, 0x00},
- {0x03, 0xe3, 0x80, 0xa0},
- {0x03, 0xef, 0xbc, 0xa0},
- {0x03, 0xef, 0xbc, 0xe0},
- {0x03, 0xef, 0xbd, 0xe0},
- {0x03, 0xef, 0xbf, 0x02},
- {0x03, 0xef, 0xbf, 0x00},
- {0x03, 0xef, 0xbf, 0x0e},
- {0x03, 0xef, 0xbf, 0x0c},
- {0x03, 0xef, 0xbf, 0x0f},
- {0x03, 0xef, 0xbf, 0x39},
- {0x03, 0xef, 0xbf, 0x3b},
- {0x03, 0xef, 0xbf, 0x3f},
- {0x03, 0xef, 0xbf, 0x2a},
- {0x03, 0xef, 0xbf, 0x0d},
- {0x03, 0xef, 0xbf, 0x25},
- {0x03, 0xef, 0xbd, 0x1a},
- {0x03, 0xef, 0xbd, 0x26},
- {0x01, 0xa0, 0x00, 0x00},
- {0x03, 0xef, 0xbd, 0x25},
- {0x03, 0xef, 0xbd, 0x23},
- {0x03, 0xef, 0xbd, 0x2e},
- {0x03, 0xef, 0xbe, 0x07},
- {0x03, 0xef, 0xbe, 0x05},
- {0x03, 0xef, 0xbd, 0x06},
- {0x03, 0xef, 0xbd, 0x13},
- {0x03, 0xef, 0xbd, 0x0b},
- {0x03, 0xef, 0xbd, 0x16},
- {0x03, 0xef, 0xbd, 0x0c},
- {0x03, 0xef, 0xbd, 0x15},
- {0x03, 0xef, 0xbd, 0x0d},
- {0x03, 0xef, 0xbd, 0x1c},
- {0x03, 0xef, 0xbd, 0x02},
- {0x03, 0xef, 0xbd, 0x1f},
- {0x03, 0xef, 0xbd, 0x1d},
- {0x03, 0xef, 0xbd, 0x17},
- {0x03, 0xef, 0xbd, 0x08},
- {0x03, 0xef, 0xbd, 0x09},
- {0x03, 0xef, 0xbd, 0x0e},
- {0x03, 0xef, 0xbd, 0x04},
- {0x03, 0xef, 0xbd, 0x05},
- {0x03, 0xef, 0xbe, 0x3f},
- {0x03, 0xef, 0xbe, 0x00},
- {0x03, 0xef, 0xbd, 0x2c},
- {0x03, 0xef, 0xbe, 0x06},
- {0x03, 0xef, 0xbe, 0x0c},
- {0x03, 0xef, 0xbe, 0x0f},
- {0x03, 0xef, 0xbe, 0x0d},
- {0x03, 0xef, 0xbe, 0x0b},
- {0x03, 0xef, 0xbe, 0x19},
- {0x03, 0xef, 0xbe, 0x15},
- {0x03, 0xef, 0xbe, 0x11},
- {0x03, 0xef, 0xbe, 0x31},
- {0x03, 0xef, 0xbe, 0x33},
- {0x03, 0xef, 0xbd, 0x0f},
- {0x03, 0xef, 0xbe, 0x30},
- {0x03, 0xef, 0xbe, 0x3e},
- {0x03, 0xef, 0xbe, 0x32},
- {0x03, 0xef, 0xbe, 0x36},
- {0x03, 0xef, 0xbd, 0x14},
- {0x03, 0xef, 0xbe, 0x2e},
- {0x03, 0xef, 0xbd, 0x1e},
- {0x03, 0xef, 0xbe, 0x10},
- {0x03, 0xef, 0xbf, 0x13},
- {0x03, 0xef, 0xbf, 0x15},
- {0x03, 0xef, 0xbf, 0x17},
- {0x03, 0xef, 0xbf, 0x1f},
- {0x03, 0xef, 0xbf, 0x1d},
- {0x03, 0xef, 0xbf, 0x1b},
- {0x03, 0xef, 0xbf, 0x09},
- {0x03, 0xef, 0xbf, 0x0b},
- {0x03, 0xef, 0xbf, 0x37},
- {0x03, 0xef, 0xbe, 0x04},
- {0x01, 0xe0, 0x00, 0x00},
- {0x03, 0xe2, 0xa6, 0x1a},
- {0x03, 0xe2, 0xa6, 0x26},
- {0x03, 0xe3, 0x80, 0x23},
- {0x03, 0xe3, 0x80, 0x2e},
- {0x03, 0xe3, 0x80, 0x25},
- {0x03, 0xe3, 0x83, 0x1e},
- {0x03, 0xe3, 0x83, 0x14},
- {0x03, 0xe3, 0x82, 0x06},
- {0x03, 0xe3, 0x82, 0x0b},
- {0x03, 0xe3, 0x82, 0x0c},
- {0x03, 0xe3, 0x82, 0x0d},
- {0x03, 0xe3, 0x82, 0x02},
- {0x03, 0xe3, 0x83, 0x0f},
- {0x03, 0xe3, 0x83, 0x08},
- {0x03, 0xe3, 0x83, 0x09},
- {0x03, 0xe3, 0x83, 0x2c},
- {0x03, 0xe3, 0x83, 0x0c},
- {0x03, 0xe3, 0x82, 0x13},
- {0x03, 0xe3, 0x82, 0x16},
- {0x03, 0xe3, 0x82, 0x15},
- {0x03, 0xe3, 0x82, 0x1c},
- {0x03, 0xe3, 0x82, 0x1f},
- {0x03, 0xe3, 0x82, 0x1d},
- {0x03, 0xe3, 0x82, 0x1a},
- {0x03, 0xe3, 0x82, 0x17},
- {0x03, 0xe3, 0x82, 0x08},
- {0x03, 0xe3, 0x82, 0x09},
- {0x03, 0xe3, 0x82, 0x0e},
- {0x03, 0xe3, 0x82, 0x04},
- {0x03, 0xe3, 0x82, 0x05},
- {0x03, 0xe3, 0x82, 0x3f},
- {0x03, 0xe3, 0x83, 0x00},
- {0x03, 0xe3, 0x83, 0x06},
- {0x03, 0xe3, 0x83, 0x05},
- {0x03, 0xe3, 0x83, 0x0d},
- {0x03, 0xe3, 0x83, 0x0b},
- {0x03, 0xe3, 0x83, 0x07},
- {0x03, 0xe3, 0x83, 0x19},
- {0x03, 0xe3, 0x83, 0x15},
- {0x03, 0xe3, 0x83, 0x11},
- {0x03, 0xe3, 0x83, 0x31},
- {0x03, 0xe3, 0x83, 0x33},
- {0x03, 0xe3, 0x83, 0x30},
- {0x03, 0xe3, 0x83, 0x3e},
- {0x03, 0xe3, 0x83, 0x32},
- {0x03, 0xe3, 0x83, 0x36},
- {0x03, 0xe3, 0x83, 0x2e},
- {0x03, 0xe3, 0x82, 0x07},
- {0x03, 0xe3, 0x85, 0x04},
- {0x03, 0xe3, 0x84, 0x10},
- {0x03, 0xe3, 0x85, 0x30},
- {0x03, 0xe3, 0x85, 0x0d},
- {0x03, 0xe3, 0x85, 0x13},
- {0x03, 0xe3, 0x85, 0x15},
- {0x03, 0xe3, 0x85, 0x17},
- {0x03, 0xe3, 0x85, 0x1f},
- {0x03, 0xe3, 0x85, 0x1d},
- {0x03, 0xe3, 0x85, 0x1b},
- {0x03, 0xe3, 0x85, 0x09},
- {0x03, 0xe3, 0x85, 0x0f},
- {0x03, 0xe3, 0x85, 0x0b},
- {0x03, 0xe3, 0x85, 0x37},
- {0x03, 0xe3, 0x85, 0x3b},
- {0x03, 0xe3, 0x85, 0x39},
- {0x03, 0xe3, 0x85, 0x3f},
- {0x02, 0xc2, 0x02, 0x00},
- {0x02, 0xc2, 0x0e, 0x00},
- {0x02, 0xc2, 0x0c, 0x00},
- {0x02, 0xc2, 0x00, 0x00},
- {0x03, 0xe2, 0x82, 0x0f},
- {0x03, 0xe2, 0x94, 0x2a},
- {0x03, 0xe2, 0x86, 0x39},
- {0x03, 0xe2, 0x86, 0x3b},
- {0x03, 0xe2, 0x86, 0x3f},
- {0x03, 0xe2, 0x96, 0x0d},
- {0x03, 0xe2, 0x97, 0x25},
-}
-
-// Total table size 15320 bytes (14KiB)
diff --git a/vendor/golang.org/x/text/width/tables13.0.0.go b/vendor/golang.org/x/text/width/tables13.0.0.go
deleted file mode 100644
index bac3f1ae..00000000
--- a/vendor/golang.org/x/text/width/tables13.0.0.go
+++ /dev/null
@@ -1,1352 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-//go:build go1.16
-// +build go1.16
-
-package width
-
-// UnicodeVersion is the Unicode version from which the tables in this package are derived.
-const UnicodeVersion = "13.0.0"
-
-// lookup returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookup(s []byte) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupUnsafe(s []byte) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// lookupString returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookupString(s string) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupStringUnsafe(s string) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// widthTrie. Total size: 14848 bytes (14.50 KiB). Checksum: 17e24343536472f6.
-type widthTrie struct{}
-
-func newWidthTrie(i int) *widthTrie {
- return &widthTrie{}
-}
-
-// lookupValue determines the type of block n and looks up the value for b.
-func (t *widthTrie) lookupValue(n uint32, b byte) uint16 {
- switch {
- default:
- return uint16(widthValues[n<<6+uint32(b)])
- }
-}
-
-// widthValues: 105 blocks, 6720 entries, 13440 bytes
-// The third block is the zero block.
-var widthValues = [6720]uint16{
- // Block 0x0, offset 0x0
- 0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002,
- 0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002,
- 0x2a: 0x6002, 0x2b: 0x6002, 0x2c: 0x6002, 0x2d: 0x6002, 0x2e: 0x6002, 0x2f: 0x6002,
- 0x30: 0x6002, 0x31: 0x6002, 0x32: 0x6002, 0x33: 0x6002, 0x34: 0x6002, 0x35: 0x6002,
- 0x36: 0x6002, 0x37: 0x6002, 0x38: 0x6002, 0x39: 0x6002, 0x3a: 0x6002, 0x3b: 0x6002,
- 0x3c: 0x6002, 0x3d: 0x6002, 0x3e: 0x6002, 0x3f: 0x6002,
- // Block 0x1, offset 0x40
- 0x40: 0x6003, 0x41: 0x6003, 0x42: 0x6003, 0x43: 0x6003, 0x44: 0x6003, 0x45: 0x6003,
- 0x46: 0x6003, 0x47: 0x6003, 0x48: 0x6003, 0x49: 0x6003, 0x4a: 0x6003, 0x4b: 0x6003,
- 0x4c: 0x6003, 0x4d: 0x6003, 0x4e: 0x6003, 0x4f: 0x6003, 0x50: 0x6003, 0x51: 0x6003,
- 0x52: 0x6003, 0x53: 0x6003, 0x54: 0x6003, 0x55: 0x6003, 0x56: 0x6003, 0x57: 0x6003,
- 0x58: 0x6003, 0x59: 0x6003, 0x5a: 0x6003, 0x5b: 0x6003, 0x5c: 0x6003, 0x5d: 0x6003,
- 0x5e: 0x6003, 0x5f: 0x6003, 0x60: 0x6004, 0x61: 0x6004, 0x62: 0x6004, 0x63: 0x6004,
- 0x64: 0x6004, 0x65: 0x6004, 0x66: 0x6004, 0x67: 0x6004, 0x68: 0x6004, 0x69: 0x6004,
- 0x6a: 0x6004, 0x6b: 0x6004, 0x6c: 0x6004, 0x6d: 0x6004, 0x6e: 0x6004, 0x6f: 0x6004,
- 0x70: 0x6004, 0x71: 0x6004, 0x72: 0x6004, 0x73: 0x6004, 0x74: 0x6004, 0x75: 0x6004,
- 0x76: 0x6004, 0x77: 0x6004, 0x78: 0x6004, 0x79: 0x6004, 0x7a: 0x6004, 0x7b: 0x6004,
- 0x7c: 0x6004, 0x7d: 0x6004, 0x7e: 0x6004,
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xe1: 0x2000, 0xe2: 0x6005, 0xe3: 0x6005,
- 0xe4: 0x2000, 0xe5: 0x6006, 0xe6: 0x6005, 0xe7: 0x2000, 0xe8: 0x2000,
- 0xea: 0x2000, 0xec: 0x6007, 0xed: 0x2000, 0xee: 0x2000, 0xef: 0x6008,
- 0xf0: 0x2000, 0xf1: 0x2000, 0xf2: 0x2000, 0xf3: 0x2000, 0xf4: 0x2000,
- 0xf6: 0x2000, 0xf7: 0x2000, 0xf8: 0x2000, 0xf9: 0x2000, 0xfa: 0x2000,
- 0xfc: 0x2000, 0xfd: 0x2000, 0xfe: 0x2000, 0xff: 0x2000,
- // Block 0x4, offset 0x100
- 0x106: 0x2000,
- 0x110: 0x2000,
- 0x117: 0x2000,
- 0x118: 0x2000,
- 0x11e: 0x2000, 0x11f: 0x2000, 0x120: 0x2000, 0x121: 0x2000,
- 0x126: 0x2000, 0x128: 0x2000, 0x129: 0x2000,
- 0x12a: 0x2000, 0x12c: 0x2000, 0x12d: 0x2000,
- 0x130: 0x2000, 0x132: 0x2000, 0x133: 0x2000,
- 0x137: 0x2000, 0x138: 0x2000, 0x139: 0x2000, 0x13a: 0x2000,
- 0x13c: 0x2000, 0x13e: 0x2000,
- // Block 0x5, offset 0x140
- 0x141: 0x2000,
- 0x151: 0x2000,
- 0x153: 0x2000,
- 0x15b: 0x2000,
- 0x166: 0x2000, 0x167: 0x2000,
- 0x16b: 0x2000,
- 0x171: 0x2000, 0x172: 0x2000, 0x173: 0x2000,
- 0x178: 0x2000,
- 0x17f: 0x2000,
- // Block 0x6, offset 0x180
- 0x180: 0x2000, 0x181: 0x2000, 0x182: 0x2000, 0x184: 0x2000,
- 0x188: 0x2000, 0x189: 0x2000, 0x18a: 0x2000, 0x18b: 0x2000,
- 0x18d: 0x2000,
- 0x192: 0x2000, 0x193: 0x2000,
- 0x1a6: 0x2000, 0x1a7: 0x2000,
- 0x1ab: 0x2000,
- // Block 0x7, offset 0x1c0
- 0x1ce: 0x2000, 0x1d0: 0x2000,
- 0x1d2: 0x2000, 0x1d4: 0x2000, 0x1d6: 0x2000,
- 0x1d8: 0x2000, 0x1da: 0x2000, 0x1dc: 0x2000,
- // Block 0x8, offset 0x200
- 0x211: 0x2000,
- 0x221: 0x2000,
- // Block 0x9, offset 0x240
- 0x244: 0x2000,
- 0x247: 0x2000, 0x249: 0x2000, 0x24a: 0x2000, 0x24b: 0x2000,
- 0x24d: 0x2000, 0x250: 0x2000,
- 0x258: 0x2000, 0x259: 0x2000, 0x25a: 0x2000, 0x25b: 0x2000, 0x25d: 0x2000,
- 0x25f: 0x2000,
- // Block 0xa, offset 0x280
- 0x280: 0x2000, 0x281: 0x2000, 0x282: 0x2000, 0x283: 0x2000, 0x284: 0x2000, 0x285: 0x2000,
- 0x286: 0x2000, 0x287: 0x2000, 0x288: 0x2000, 0x289: 0x2000, 0x28a: 0x2000, 0x28b: 0x2000,
- 0x28c: 0x2000, 0x28d: 0x2000, 0x28e: 0x2000, 0x28f: 0x2000, 0x290: 0x2000, 0x291: 0x2000,
- 0x292: 0x2000, 0x293: 0x2000, 0x294: 0x2000, 0x295: 0x2000, 0x296: 0x2000, 0x297: 0x2000,
- 0x298: 0x2000, 0x299: 0x2000, 0x29a: 0x2000, 0x29b: 0x2000, 0x29c: 0x2000, 0x29d: 0x2000,
- 0x29e: 0x2000, 0x29f: 0x2000, 0x2a0: 0x2000, 0x2a1: 0x2000, 0x2a2: 0x2000, 0x2a3: 0x2000,
- 0x2a4: 0x2000, 0x2a5: 0x2000, 0x2a6: 0x2000, 0x2a7: 0x2000, 0x2a8: 0x2000, 0x2a9: 0x2000,
- 0x2aa: 0x2000, 0x2ab: 0x2000, 0x2ac: 0x2000, 0x2ad: 0x2000, 0x2ae: 0x2000, 0x2af: 0x2000,
- 0x2b0: 0x2000, 0x2b1: 0x2000, 0x2b2: 0x2000, 0x2b3: 0x2000, 0x2b4: 0x2000, 0x2b5: 0x2000,
- 0x2b6: 0x2000, 0x2b7: 0x2000, 0x2b8: 0x2000, 0x2b9: 0x2000, 0x2ba: 0x2000, 0x2bb: 0x2000,
- 0x2bc: 0x2000, 0x2bd: 0x2000, 0x2be: 0x2000, 0x2bf: 0x2000,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x2000, 0x2c1: 0x2000, 0x2c2: 0x2000, 0x2c3: 0x2000, 0x2c4: 0x2000, 0x2c5: 0x2000,
- 0x2c6: 0x2000, 0x2c7: 0x2000, 0x2c8: 0x2000, 0x2c9: 0x2000, 0x2ca: 0x2000, 0x2cb: 0x2000,
- 0x2cc: 0x2000, 0x2cd: 0x2000, 0x2ce: 0x2000, 0x2cf: 0x2000, 0x2d0: 0x2000, 0x2d1: 0x2000,
- 0x2d2: 0x2000, 0x2d3: 0x2000, 0x2d4: 0x2000, 0x2d5: 0x2000, 0x2d6: 0x2000, 0x2d7: 0x2000,
- 0x2d8: 0x2000, 0x2d9: 0x2000, 0x2da: 0x2000, 0x2db: 0x2000, 0x2dc: 0x2000, 0x2dd: 0x2000,
- 0x2de: 0x2000, 0x2df: 0x2000, 0x2e0: 0x2000, 0x2e1: 0x2000, 0x2e2: 0x2000, 0x2e3: 0x2000,
- 0x2e4: 0x2000, 0x2e5: 0x2000, 0x2e6: 0x2000, 0x2e7: 0x2000, 0x2e8: 0x2000, 0x2e9: 0x2000,
- 0x2ea: 0x2000, 0x2eb: 0x2000, 0x2ec: 0x2000, 0x2ed: 0x2000, 0x2ee: 0x2000, 0x2ef: 0x2000,
- // Block 0xc, offset 0x300
- 0x311: 0x2000,
- 0x312: 0x2000, 0x313: 0x2000, 0x314: 0x2000, 0x315: 0x2000, 0x316: 0x2000, 0x317: 0x2000,
- 0x318: 0x2000, 0x319: 0x2000, 0x31a: 0x2000, 0x31b: 0x2000, 0x31c: 0x2000, 0x31d: 0x2000,
- 0x31e: 0x2000, 0x31f: 0x2000, 0x320: 0x2000, 0x321: 0x2000, 0x323: 0x2000,
- 0x324: 0x2000, 0x325: 0x2000, 0x326: 0x2000, 0x327: 0x2000, 0x328: 0x2000, 0x329: 0x2000,
- 0x331: 0x2000, 0x332: 0x2000, 0x333: 0x2000, 0x334: 0x2000, 0x335: 0x2000,
- 0x336: 0x2000, 0x337: 0x2000, 0x338: 0x2000, 0x339: 0x2000, 0x33a: 0x2000, 0x33b: 0x2000,
- 0x33c: 0x2000, 0x33d: 0x2000, 0x33e: 0x2000, 0x33f: 0x2000,
- // Block 0xd, offset 0x340
- 0x340: 0x2000, 0x341: 0x2000, 0x343: 0x2000, 0x344: 0x2000, 0x345: 0x2000,
- 0x346: 0x2000, 0x347: 0x2000, 0x348: 0x2000, 0x349: 0x2000,
- // Block 0xe, offset 0x380
- 0x381: 0x2000,
- 0x390: 0x2000, 0x391: 0x2000,
- 0x392: 0x2000, 0x393: 0x2000, 0x394: 0x2000, 0x395: 0x2000, 0x396: 0x2000, 0x397: 0x2000,
- 0x398: 0x2000, 0x399: 0x2000, 0x39a: 0x2000, 0x39b: 0x2000, 0x39c: 0x2000, 0x39d: 0x2000,
- 0x39e: 0x2000, 0x39f: 0x2000, 0x3a0: 0x2000, 0x3a1: 0x2000, 0x3a2: 0x2000, 0x3a3: 0x2000,
- 0x3a4: 0x2000, 0x3a5: 0x2000, 0x3a6: 0x2000, 0x3a7: 0x2000, 0x3a8: 0x2000, 0x3a9: 0x2000,
- 0x3aa: 0x2000, 0x3ab: 0x2000, 0x3ac: 0x2000, 0x3ad: 0x2000, 0x3ae: 0x2000, 0x3af: 0x2000,
- 0x3b0: 0x2000, 0x3b1: 0x2000, 0x3b2: 0x2000, 0x3b3: 0x2000, 0x3b4: 0x2000, 0x3b5: 0x2000,
- 0x3b6: 0x2000, 0x3b7: 0x2000, 0x3b8: 0x2000, 0x3b9: 0x2000, 0x3ba: 0x2000, 0x3bb: 0x2000,
- 0x3bc: 0x2000, 0x3bd: 0x2000, 0x3be: 0x2000, 0x3bf: 0x2000,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x2000, 0x3c1: 0x2000, 0x3c2: 0x2000, 0x3c3: 0x2000, 0x3c4: 0x2000, 0x3c5: 0x2000,
- 0x3c6: 0x2000, 0x3c7: 0x2000, 0x3c8: 0x2000, 0x3c9: 0x2000, 0x3ca: 0x2000, 0x3cb: 0x2000,
- 0x3cc: 0x2000, 0x3cd: 0x2000, 0x3ce: 0x2000, 0x3cf: 0x2000, 0x3d1: 0x2000,
- // Block 0x10, offset 0x400
- 0x400: 0x4000, 0x401: 0x4000, 0x402: 0x4000, 0x403: 0x4000, 0x404: 0x4000, 0x405: 0x4000,
- 0x406: 0x4000, 0x407: 0x4000, 0x408: 0x4000, 0x409: 0x4000, 0x40a: 0x4000, 0x40b: 0x4000,
- 0x40c: 0x4000, 0x40d: 0x4000, 0x40e: 0x4000, 0x40f: 0x4000, 0x410: 0x4000, 0x411: 0x4000,
- 0x412: 0x4000, 0x413: 0x4000, 0x414: 0x4000, 0x415: 0x4000, 0x416: 0x4000, 0x417: 0x4000,
- 0x418: 0x4000, 0x419: 0x4000, 0x41a: 0x4000, 0x41b: 0x4000, 0x41c: 0x4000, 0x41d: 0x4000,
- 0x41e: 0x4000, 0x41f: 0x4000, 0x420: 0x4000, 0x421: 0x4000, 0x422: 0x4000, 0x423: 0x4000,
- 0x424: 0x4000, 0x425: 0x4000, 0x426: 0x4000, 0x427: 0x4000, 0x428: 0x4000, 0x429: 0x4000,
- 0x42a: 0x4000, 0x42b: 0x4000, 0x42c: 0x4000, 0x42d: 0x4000, 0x42e: 0x4000, 0x42f: 0x4000,
- 0x430: 0x4000, 0x431: 0x4000, 0x432: 0x4000, 0x433: 0x4000, 0x434: 0x4000, 0x435: 0x4000,
- 0x436: 0x4000, 0x437: 0x4000, 0x438: 0x4000, 0x439: 0x4000, 0x43a: 0x4000, 0x43b: 0x4000,
- 0x43c: 0x4000, 0x43d: 0x4000, 0x43e: 0x4000, 0x43f: 0x4000,
- // Block 0x11, offset 0x440
- 0x440: 0x4000, 0x441: 0x4000, 0x442: 0x4000, 0x443: 0x4000, 0x444: 0x4000, 0x445: 0x4000,
- 0x446: 0x4000, 0x447: 0x4000, 0x448: 0x4000, 0x449: 0x4000, 0x44a: 0x4000, 0x44b: 0x4000,
- 0x44c: 0x4000, 0x44d: 0x4000, 0x44e: 0x4000, 0x44f: 0x4000, 0x450: 0x4000, 0x451: 0x4000,
- 0x452: 0x4000, 0x453: 0x4000, 0x454: 0x4000, 0x455: 0x4000, 0x456: 0x4000, 0x457: 0x4000,
- 0x458: 0x4000, 0x459: 0x4000, 0x45a: 0x4000, 0x45b: 0x4000, 0x45c: 0x4000, 0x45d: 0x4000,
- 0x45e: 0x4000, 0x45f: 0x4000,
- // Block 0x12, offset 0x480
- 0x490: 0x2000,
- 0x493: 0x2000, 0x494: 0x2000, 0x495: 0x2000, 0x496: 0x2000,
- 0x498: 0x2000, 0x499: 0x2000, 0x49c: 0x2000, 0x49d: 0x2000,
- 0x4a0: 0x2000, 0x4a1: 0x2000, 0x4a2: 0x2000,
- 0x4a4: 0x2000, 0x4a5: 0x2000, 0x4a6: 0x2000, 0x4a7: 0x2000,
- 0x4b0: 0x2000, 0x4b2: 0x2000, 0x4b3: 0x2000, 0x4b5: 0x2000,
- 0x4bb: 0x2000,
- 0x4be: 0x2000,
- // Block 0x13, offset 0x4c0
- 0x4f4: 0x2000,
- 0x4ff: 0x2000,
- // Block 0x14, offset 0x500
- 0x501: 0x2000, 0x502: 0x2000, 0x503: 0x2000, 0x504: 0x2000,
- 0x529: 0xa009,
- 0x52c: 0x2000,
- // Block 0x15, offset 0x540
- 0x543: 0x2000, 0x545: 0x2000,
- 0x549: 0x2000,
- 0x553: 0x2000, 0x556: 0x2000,
- 0x561: 0x2000, 0x562: 0x2000,
- 0x566: 0x2000,
- 0x56b: 0x2000,
- // Block 0x16, offset 0x580
- 0x593: 0x2000, 0x594: 0x2000,
- 0x59b: 0x2000, 0x59c: 0x2000, 0x59d: 0x2000,
- 0x59e: 0x2000, 0x5a0: 0x2000, 0x5a1: 0x2000, 0x5a2: 0x2000, 0x5a3: 0x2000,
- 0x5a4: 0x2000, 0x5a5: 0x2000, 0x5a6: 0x2000, 0x5a7: 0x2000, 0x5a8: 0x2000, 0x5a9: 0x2000,
- 0x5aa: 0x2000, 0x5ab: 0x2000,
- 0x5b0: 0x2000, 0x5b1: 0x2000, 0x5b2: 0x2000, 0x5b3: 0x2000, 0x5b4: 0x2000, 0x5b5: 0x2000,
- 0x5b6: 0x2000, 0x5b7: 0x2000, 0x5b8: 0x2000, 0x5b9: 0x2000,
- // Block 0x17, offset 0x5c0
- 0x5c9: 0x2000,
- 0x5d0: 0x200a, 0x5d1: 0x200b,
- 0x5d2: 0x200a, 0x5d3: 0x200c, 0x5d4: 0x2000, 0x5d5: 0x2000, 0x5d6: 0x2000, 0x5d7: 0x2000,
- 0x5d8: 0x2000, 0x5d9: 0x2000,
- 0x5f8: 0x2000, 0x5f9: 0x2000,
- // Block 0x18, offset 0x600
- 0x612: 0x2000, 0x614: 0x2000,
- 0x627: 0x2000,
- // Block 0x19, offset 0x640
- 0x640: 0x2000, 0x642: 0x2000, 0x643: 0x2000,
- 0x647: 0x2000, 0x648: 0x2000, 0x64b: 0x2000,
- 0x64f: 0x2000, 0x651: 0x2000,
- 0x655: 0x2000,
- 0x65a: 0x2000, 0x65d: 0x2000,
- 0x65e: 0x2000, 0x65f: 0x2000, 0x660: 0x2000, 0x663: 0x2000,
- 0x665: 0x2000, 0x667: 0x2000, 0x668: 0x2000, 0x669: 0x2000,
- 0x66a: 0x2000, 0x66b: 0x2000, 0x66c: 0x2000, 0x66e: 0x2000,
- 0x674: 0x2000, 0x675: 0x2000,
- 0x676: 0x2000, 0x677: 0x2000,
- 0x67c: 0x2000, 0x67d: 0x2000,
- // Block 0x1a, offset 0x680
- 0x688: 0x2000,
- 0x68c: 0x2000,
- 0x692: 0x2000,
- 0x6a0: 0x2000, 0x6a1: 0x2000,
- 0x6a4: 0x2000, 0x6a5: 0x2000, 0x6a6: 0x2000, 0x6a7: 0x2000,
- 0x6aa: 0x2000, 0x6ab: 0x2000, 0x6ae: 0x2000, 0x6af: 0x2000,
- // Block 0x1b, offset 0x6c0
- 0x6c2: 0x2000, 0x6c3: 0x2000,
- 0x6c6: 0x2000, 0x6c7: 0x2000,
- 0x6d5: 0x2000,
- 0x6d9: 0x2000,
- 0x6e5: 0x2000,
- 0x6ff: 0x2000,
- // Block 0x1c, offset 0x700
- 0x712: 0x2000,
- 0x71a: 0x4000, 0x71b: 0x4000,
- 0x729: 0x4000,
- 0x72a: 0x4000,
- // Block 0x1d, offset 0x740
- 0x769: 0x4000,
- 0x76a: 0x4000, 0x76b: 0x4000, 0x76c: 0x4000,
- 0x770: 0x4000, 0x773: 0x4000,
- // Block 0x1e, offset 0x780
- 0x7a0: 0x2000, 0x7a1: 0x2000, 0x7a2: 0x2000, 0x7a3: 0x2000,
- 0x7a4: 0x2000, 0x7a5: 0x2000, 0x7a6: 0x2000, 0x7a7: 0x2000, 0x7a8: 0x2000, 0x7a9: 0x2000,
- 0x7aa: 0x2000, 0x7ab: 0x2000, 0x7ac: 0x2000, 0x7ad: 0x2000, 0x7ae: 0x2000, 0x7af: 0x2000,
- 0x7b0: 0x2000, 0x7b1: 0x2000, 0x7b2: 0x2000, 0x7b3: 0x2000, 0x7b4: 0x2000, 0x7b5: 0x2000,
- 0x7b6: 0x2000, 0x7b7: 0x2000, 0x7b8: 0x2000, 0x7b9: 0x2000, 0x7ba: 0x2000, 0x7bb: 0x2000,
- 0x7bc: 0x2000, 0x7bd: 0x2000, 0x7be: 0x2000, 0x7bf: 0x2000,
- // Block 0x1f, offset 0x7c0
- 0x7c0: 0x2000, 0x7c1: 0x2000, 0x7c2: 0x2000, 0x7c3: 0x2000, 0x7c4: 0x2000, 0x7c5: 0x2000,
- 0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7c9: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000,
- 0x7cc: 0x2000, 0x7cd: 0x2000, 0x7ce: 0x2000, 0x7cf: 0x2000, 0x7d0: 0x2000, 0x7d1: 0x2000,
- 0x7d2: 0x2000, 0x7d3: 0x2000, 0x7d4: 0x2000, 0x7d5: 0x2000, 0x7d6: 0x2000, 0x7d7: 0x2000,
- 0x7d8: 0x2000, 0x7d9: 0x2000, 0x7da: 0x2000, 0x7db: 0x2000, 0x7dc: 0x2000, 0x7dd: 0x2000,
- 0x7de: 0x2000, 0x7df: 0x2000, 0x7e0: 0x2000, 0x7e1: 0x2000, 0x7e2: 0x2000, 0x7e3: 0x2000,
- 0x7e4: 0x2000, 0x7e5: 0x2000, 0x7e6: 0x2000, 0x7e7: 0x2000, 0x7e8: 0x2000, 0x7e9: 0x2000,
- 0x7eb: 0x2000, 0x7ec: 0x2000, 0x7ed: 0x2000, 0x7ee: 0x2000, 0x7ef: 0x2000,
- 0x7f0: 0x2000, 0x7f1: 0x2000, 0x7f2: 0x2000, 0x7f3: 0x2000, 0x7f4: 0x2000, 0x7f5: 0x2000,
- 0x7f6: 0x2000, 0x7f7: 0x2000, 0x7f8: 0x2000, 0x7f9: 0x2000, 0x7fa: 0x2000, 0x7fb: 0x2000,
- 0x7fc: 0x2000, 0x7fd: 0x2000, 0x7fe: 0x2000, 0x7ff: 0x2000,
- // Block 0x20, offset 0x800
- 0x800: 0x2000, 0x801: 0x2000, 0x802: 0x200d, 0x803: 0x2000, 0x804: 0x2000, 0x805: 0x2000,
- 0x806: 0x2000, 0x807: 0x2000, 0x808: 0x2000, 0x809: 0x2000, 0x80a: 0x2000, 0x80b: 0x2000,
- 0x80c: 0x2000, 0x80d: 0x2000, 0x80e: 0x2000, 0x80f: 0x2000, 0x810: 0x2000, 0x811: 0x2000,
- 0x812: 0x2000, 0x813: 0x2000, 0x814: 0x2000, 0x815: 0x2000, 0x816: 0x2000, 0x817: 0x2000,
- 0x818: 0x2000, 0x819: 0x2000, 0x81a: 0x2000, 0x81b: 0x2000, 0x81c: 0x2000, 0x81d: 0x2000,
- 0x81e: 0x2000, 0x81f: 0x2000, 0x820: 0x2000, 0x821: 0x2000, 0x822: 0x2000, 0x823: 0x2000,
- 0x824: 0x2000, 0x825: 0x2000, 0x826: 0x2000, 0x827: 0x2000, 0x828: 0x2000, 0x829: 0x2000,
- 0x82a: 0x2000, 0x82b: 0x2000, 0x82c: 0x2000, 0x82d: 0x2000, 0x82e: 0x2000, 0x82f: 0x2000,
- 0x830: 0x2000, 0x831: 0x2000, 0x832: 0x2000, 0x833: 0x2000, 0x834: 0x2000, 0x835: 0x2000,
- 0x836: 0x2000, 0x837: 0x2000, 0x838: 0x2000, 0x839: 0x2000, 0x83a: 0x2000, 0x83b: 0x2000,
- 0x83c: 0x2000, 0x83d: 0x2000, 0x83e: 0x2000, 0x83f: 0x2000,
- // Block 0x21, offset 0x840
- 0x840: 0x2000, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000, 0x845: 0x2000,
- 0x846: 0x2000, 0x847: 0x2000, 0x848: 0x2000, 0x849: 0x2000, 0x84a: 0x2000, 0x84b: 0x2000,
- 0x850: 0x2000, 0x851: 0x2000,
- 0x852: 0x2000, 0x853: 0x2000, 0x854: 0x2000, 0x855: 0x2000, 0x856: 0x2000, 0x857: 0x2000,
- 0x858: 0x2000, 0x859: 0x2000, 0x85a: 0x2000, 0x85b: 0x2000, 0x85c: 0x2000, 0x85d: 0x2000,
- 0x85e: 0x2000, 0x85f: 0x2000, 0x860: 0x2000, 0x861: 0x2000, 0x862: 0x2000, 0x863: 0x2000,
- 0x864: 0x2000, 0x865: 0x2000, 0x866: 0x2000, 0x867: 0x2000, 0x868: 0x2000, 0x869: 0x2000,
- 0x86a: 0x2000, 0x86b: 0x2000, 0x86c: 0x2000, 0x86d: 0x2000, 0x86e: 0x2000, 0x86f: 0x2000,
- 0x870: 0x2000, 0x871: 0x2000, 0x872: 0x2000, 0x873: 0x2000,
- // Block 0x22, offset 0x880
- 0x880: 0x2000, 0x881: 0x2000, 0x882: 0x2000, 0x883: 0x2000, 0x884: 0x2000, 0x885: 0x2000,
- 0x886: 0x2000, 0x887: 0x2000, 0x888: 0x2000, 0x889: 0x2000, 0x88a: 0x2000, 0x88b: 0x2000,
- 0x88c: 0x2000, 0x88d: 0x2000, 0x88e: 0x2000, 0x88f: 0x2000,
- 0x892: 0x2000, 0x893: 0x2000, 0x894: 0x2000, 0x895: 0x2000,
- 0x8a0: 0x200e, 0x8a1: 0x2000, 0x8a3: 0x2000,
- 0x8a4: 0x2000, 0x8a5: 0x2000, 0x8a6: 0x2000, 0x8a7: 0x2000, 0x8a8: 0x2000, 0x8a9: 0x2000,
- 0x8b2: 0x2000, 0x8b3: 0x2000,
- 0x8b6: 0x2000, 0x8b7: 0x2000,
- 0x8bc: 0x2000, 0x8bd: 0x2000,
- // Block 0x23, offset 0x8c0
- 0x8c0: 0x2000, 0x8c1: 0x2000,
- 0x8c6: 0x2000, 0x8c7: 0x2000, 0x8c8: 0x2000, 0x8cb: 0x200f,
- 0x8ce: 0x2000, 0x8cf: 0x2000, 0x8d0: 0x2000, 0x8d1: 0x2000,
- 0x8e2: 0x2000, 0x8e3: 0x2000,
- 0x8e4: 0x2000, 0x8e5: 0x2000,
- 0x8ef: 0x2000,
- 0x8fd: 0x4000, 0x8fe: 0x4000,
- // Block 0x24, offset 0x900
- 0x905: 0x2000,
- 0x906: 0x2000, 0x909: 0x2000,
- 0x90e: 0x2000, 0x90f: 0x2000,
- 0x914: 0x4000, 0x915: 0x4000,
- 0x91c: 0x2000,
- 0x91e: 0x2000,
- // Block 0x25, offset 0x940
- 0x940: 0x2000, 0x942: 0x2000,
- 0x948: 0x4000, 0x949: 0x4000, 0x94a: 0x4000, 0x94b: 0x4000,
- 0x94c: 0x4000, 0x94d: 0x4000, 0x94e: 0x4000, 0x94f: 0x4000, 0x950: 0x4000, 0x951: 0x4000,
- 0x952: 0x4000, 0x953: 0x4000,
- 0x960: 0x2000, 0x961: 0x2000, 0x963: 0x2000,
- 0x964: 0x2000, 0x965: 0x2000, 0x967: 0x2000, 0x968: 0x2000, 0x969: 0x2000,
- 0x96a: 0x2000, 0x96c: 0x2000, 0x96d: 0x2000, 0x96f: 0x2000,
- 0x97f: 0x4000,
- // Block 0x26, offset 0x980
- 0x993: 0x4000,
- 0x99e: 0x2000, 0x99f: 0x2000, 0x9a1: 0x4000,
- 0x9aa: 0x4000, 0x9ab: 0x4000,
- 0x9bd: 0x4000, 0x9be: 0x4000, 0x9bf: 0x2000,
- // Block 0x27, offset 0x9c0
- 0x9c4: 0x4000, 0x9c5: 0x4000,
- 0x9c6: 0x2000, 0x9c7: 0x2000, 0x9c8: 0x2000, 0x9c9: 0x2000, 0x9ca: 0x2000, 0x9cb: 0x2000,
- 0x9cc: 0x2000, 0x9cd: 0x2000, 0x9ce: 0x4000, 0x9cf: 0x2000, 0x9d0: 0x2000, 0x9d1: 0x2000,
- 0x9d2: 0x2000, 0x9d3: 0x2000, 0x9d4: 0x4000, 0x9d5: 0x2000, 0x9d6: 0x2000, 0x9d7: 0x2000,
- 0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000,
- 0x9de: 0x2000, 0x9df: 0x2000, 0x9e0: 0x2000, 0x9e1: 0x2000, 0x9e3: 0x2000,
- 0x9e8: 0x2000, 0x9e9: 0x2000,
- 0x9ea: 0x4000, 0x9eb: 0x2000, 0x9ec: 0x2000, 0x9ed: 0x2000, 0x9ee: 0x2000, 0x9ef: 0x2000,
- 0x9f0: 0x2000, 0x9f1: 0x2000, 0x9f2: 0x4000, 0x9f3: 0x4000, 0x9f4: 0x2000, 0x9f5: 0x4000,
- 0x9f6: 0x2000, 0x9f7: 0x2000, 0x9f8: 0x2000, 0x9f9: 0x2000, 0x9fa: 0x4000, 0x9fb: 0x2000,
- 0x9fc: 0x2000, 0x9fd: 0x4000, 0x9fe: 0x2000, 0x9ff: 0x2000,
- // Block 0x28, offset 0xa00
- 0xa05: 0x4000,
- 0xa0a: 0x4000, 0xa0b: 0x4000,
- 0xa28: 0x4000,
- 0xa3d: 0x2000,
- // Block 0x29, offset 0xa40
- 0xa4c: 0x4000, 0xa4e: 0x4000,
- 0xa53: 0x4000, 0xa54: 0x4000, 0xa55: 0x4000, 0xa57: 0x4000,
- 0xa76: 0x2000, 0xa77: 0x2000, 0xa78: 0x2000, 0xa79: 0x2000, 0xa7a: 0x2000, 0xa7b: 0x2000,
- 0xa7c: 0x2000, 0xa7d: 0x2000, 0xa7e: 0x2000, 0xa7f: 0x2000,
- // Block 0x2a, offset 0xa80
- 0xa95: 0x4000, 0xa96: 0x4000, 0xa97: 0x4000,
- 0xab0: 0x4000,
- 0xabf: 0x4000,
- // Block 0x2b, offset 0xac0
- 0xae6: 0x6000, 0xae7: 0x6000, 0xae8: 0x6000, 0xae9: 0x6000,
- 0xaea: 0x6000, 0xaeb: 0x6000, 0xaec: 0x6000, 0xaed: 0x6000,
- // Block 0x2c, offset 0xb00
- 0xb05: 0x6010,
- 0xb06: 0x6011,
- // Block 0x2d, offset 0xb40
- 0xb5b: 0x4000, 0xb5c: 0x4000,
- // Block 0x2e, offset 0xb80
- 0xb90: 0x4000,
- 0xb95: 0x4000, 0xb96: 0x2000, 0xb97: 0x2000,
- 0xb98: 0x2000, 0xb99: 0x2000,
- // Block 0x2f, offset 0xbc0
- 0xbc0: 0x4000, 0xbc1: 0x4000, 0xbc2: 0x4000, 0xbc3: 0x4000, 0xbc4: 0x4000, 0xbc5: 0x4000,
- 0xbc6: 0x4000, 0xbc7: 0x4000, 0xbc8: 0x4000, 0xbc9: 0x4000, 0xbca: 0x4000, 0xbcb: 0x4000,
- 0xbcc: 0x4000, 0xbcd: 0x4000, 0xbce: 0x4000, 0xbcf: 0x4000, 0xbd0: 0x4000, 0xbd1: 0x4000,
- 0xbd2: 0x4000, 0xbd3: 0x4000, 0xbd4: 0x4000, 0xbd5: 0x4000, 0xbd6: 0x4000, 0xbd7: 0x4000,
- 0xbd8: 0x4000, 0xbd9: 0x4000, 0xbdb: 0x4000, 0xbdc: 0x4000, 0xbdd: 0x4000,
- 0xbde: 0x4000, 0xbdf: 0x4000, 0xbe0: 0x4000, 0xbe1: 0x4000, 0xbe2: 0x4000, 0xbe3: 0x4000,
- 0xbe4: 0x4000, 0xbe5: 0x4000, 0xbe6: 0x4000, 0xbe7: 0x4000, 0xbe8: 0x4000, 0xbe9: 0x4000,
- 0xbea: 0x4000, 0xbeb: 0x4000, 0xbec: 0x4000, 0xbed: 0x4000, 0xbee: 0x4000, 0xbef: 0x4000,
- 0xbf0: 0x4000, 0xbf1: 0x4000, 0xbf2: 0x4000, 0xbf3: 0x4000, 0xbf4: 0x4000, 0xbf5: 0x4000,
- 0xbf6: 0x4000, 0xbf7: 0x4000, 0xbf8: 0x4000, 0xbf9: 0x4000, 0xbfa: 0x4000, 0xbfb: 0x4000,
- 0xbfc: 0x4000, 0xbfd: 0x4000, 0xbfe: 0x4000, 0xbff: 0x4000,
- // Block 0x30, offset 0xc00
- 0xc00: 0x4000, 0xc01: 0x4000, 0xc02: 0x4000, 0xc03: 0x4000, 0xc04: 0x4000, 0xc05: 0x4000,
- 0xc06: 0x4000, 0xc07: 0x4000, 0xc08: 0x4000, 0xc09: 0x4000, 0xc0a: 0x4000, 0xc0b: 0x4000,
- 0xc0c: 0x4000, 0xc0d: 0x4000, 0xc0e: 0x4000, 0xc0f: 0x4000, 0xc10: 0x4000, 0xc11: 0x4000,
- 0xc12: 0x4000, 0xc13: 0x4000, 0xc14: 0x4000, 0xc15: 0x4000, 0xc16: 0x4000, 0xc17: 0x4000,
- 0xc18: 0x4000, 0xc19: 0x4000, 0xc1a: 0x4000, 0xc1b: 0x4000, 0xc1c: 0x4000, 0xc1d: 0x4000,
- 0xc1e: 0x4000, 0xc1f: 0x4000, 0xc20: 0x4000, 0xc21: 0x4000, 0xc22: 0x4000, 0xc23: 0x4000,
- 0xc24: 0x4000, 0xc25: 0x4000, 0xc26: 0x4000, 0xc27: 0x4000, 0xc28: 0x4000, 0xc29: 0x4000,
- 0xc2a: 0x4000, 0xc2b: 0x4000, 0xc2c: 0x4000, 0xc2d: 0x4000, 0xc2e: 0x4000, 0xc2f: 0x4000,
- 0xc30: 0x4000, 0xc31: 0x4000, 0xc32: 0x4000, 0xc33: 0x4000,
- // Block 0x31, offset 0xc40
- 0xc40: 0x4000, 0xc41: 0x4000, 0xc42: 0x4000, 0xc43: 0x4000, 0xc44: 0x4000, 0xc45: 0x4000,
- 0xc46: 0x4000, 0xc47: 0x4000, 0xc48: 0x4000, 0xc49: 0x4000, 0xc4a: 0x4000, 0xc4b: 0x4000,
- 0xc4c: 0x4000, 0xc4d: 0x4000, 0xc4e: 0x4000, 0xc4f: 0x4000, 0xc50: 0x4000, 0xc51: 0x4000,
- 0xc52: 0x4000, 0xc53: 0x4000, 0xc54: 0x4000, 0xc55: 0x4000,
- 0xc70: 0x4000, 0xc71: 0x4000, 0xc72: 0x4000, 0xc73: 0x4000, 0xc74: 0x4000, 0xc75: 0x4000,
- 0xc76: 0x4000, 0xc77: 0x4000, 0xc78: 0x4000, 0xc79: 0x4000, 0xc7a: 0x4000, 0xc7b: 0x4000,
- // Block 0x32, offset 0xc80
- 0xc80: 0x9012, 0xc81: 0x4013, 0xc82: 0x4014, 0xc83: 0x4000, 0xc84: 0x4000, 0xc85: 0x4000,
- 0xc86: 0x4000, 0xc87: 0x4000, 0xc88: 0x4000, 0xc89: 0x4000, 0xc8a: 0x4000, 0xc8b: 0x4000,
- 0xc8c: 0x4015, 0xc8d: 0x4015, 0xc8e: 0x4000, 0xc8f: 0x4000, 0xc90: 0x4000, 0xc91: 0x4000,
- 0xc92: 0x4000, 0xc93: 0x4000, 0xc94: 0x4000, 0xc95: 0x4000, 0xc96: 0x4000, 0xc97: 0x4000,
- 0xc98: 0x4000, 0xc99: 0x4000, 0xc9a: 0x4000, 0xc9b: 0x4000, 0xc9c: 0x4000, 0xc9d: 0x4000,
- 0xc9e: 0x4000, 0xc9f: 0x4000, 0xca0: 0x4000, 0xca1: 0x4000, 0xca2: 0x4000, 0xca3: 0x4000,
- 0xca4: 0x4000, 0xca5: 0x4000, 0xca6: 0x4000, 0xca7: 0x4000, 0xca8: 0x4000, 0xca9: 0x4000,
- 0xcaa: 0x4000, 0xcab: 0x4000, 0xcac: 0x4000, 0xcad: 0x4000, 0xcae: 0x4000, 0xcaf: 0x4000,
- 0xcb0: 0x4000, 0xcb1: 0x4000, 0xcb2: 0x4000, 0xcb3: 0x4000, 0xcb4: 0x4000, 0xcb5: 0x4000,
- 0xcb6: 0x4000, 0xcb7: 0x4000, 0xcb8: 0x4000, 0xcb9: 0x4000, 0xcba: 0x4000, 0xcbb: 0x4000,
- 0xcbc: 0x4000, 0xcbd: 0x4000, 0xcbe: 0x4000,
- // Block 0x33, offset 0xcc0
- 0xcc1: 0x4000, 0xcc2: 0x4000, 0xcc3: 0x4000, 0xcc4: 0x4000, 0xcc5: 0x4000,
- 0xcc6: 0x4000, 0xcc7: 0x4000, 0xcc8: 0x4000, 0xcc9: 0x4000, 0xcca: 0x4000, 0xccb: 0x4000,
- 0xccc: 0x4000, 0xccd: 0x4000, 0xcce: 0x4000, 0xccf: 0x4000, 0xcd0: 0x4000, 0xcd1: 0x4000,
- 0xcd2: 0x4000, 0xcd3: 0x4000, 0xcd4: 0x4000, 0xcd5: 0x4000, 0xcd6: 0x4000, 0xcd7: 0x4000,
- 0xcd8: 0x4000, 0xcd9: 0x4000, 0xcda: 0x4000, 0xcdb: 0x4000, 0xcdc: 0x4000, 0xcdd: 0x4000,
- 0xcde: 0x4000, 0xcdf: 0x4000, 0xce0: 0x4000, 0xce1: 0x4000, 0xce2: 0x4000, 0xce3: 0x4000,
- 0xce4: 0x4000, 0xce5: 0x4000, 0xce6: 0x4000, 0xce7: 0x4000, 0xce8: 0x4000, 0xce9: 0x4000,
- 0xcea: 0x4000, 0xceb: 0x4000, 0xcec: 0x4000, 0xced: 0x4000, 0xcee: 0x4000, 0xcef: 0x4000,
- 0xcf0: 0x4000, 0xcf1: 0x4000, 0xcf2: 0x4000, 0xcf3: 0x4000, 0xcf4: 0x4000, 0xcf5: 0x4000,
- 0xcf6: 0x4000, 0xcf7: 0x4000, 0xcf8: 0x4000, 0xcf9: 0x4000, 0xcfa: 0x4000, 0xcfb: 0x4000,
- 0xcfc: 0x4000, 0xcfd: 0x4000, 0xcfe: 0x4000, 0xcff: 0x4000,
- // Block 0x34, offset 0xd00
- 0xd00: 0x4000, 0xd01: 0x4000, 0xd02: 0x4000, 0xd03: 0x4000, 0xd04: 0x4000, 0xd05: 0x4000,
- 0xd06: 0x4000, 0xd07: 0x4000, 0xd08: 0x4000, 0xd09: 0x4000, 0xd0a: 0x4000, 0xd0b: 0x4000,
- 0xd0c: 0x4000, 0xd0d: 0x4000, 0xd0e: 0x4000, 0xd0f: 0x4000, 0xd10: 0x4000, 0xd11: 0x4000,
- 0xd12: 0x4000, 0xd13: 0x4000, 0xd14: 0x4000, 0xd15: 0x4000, 0xd16: 0x4000,
- 0xd19: 0x4016, 0xd1a: 0x4017, 0xd1b: 0x4000, 0xd1c: 0x4000, 0xd1d: 0x4000,
- 0xd1e: 0x4000, 0xd1f: 0x4000, 0xd20: 0x4000, 0xd21: 0x4018, 0xd22: 0x4019, 0xd23: 0x401a,
- 0xd24: 0x401b, 0xd25: 0x401c, 0xd26: 0x401d, 0xd27: 0x401e, 0xd28: 0x401f, 0xd29: 0x4020,
- 0xd2a: 0x4021, 0xd2b: 0x4022, 0xd2c: 0x4000, 0xd2d: 0x4010, 0xd2e: 0x4000, 0xd2f: 0x4023,
- 0xd30: 0x4000, 0xd31: 0x4024, 0xd32: 0x4000, 0xd33: 0x4025, 0xd34: 0x4000, 0xd35: 0x4026,
- 0xd36: 0x4000, 0xd37: 0x401a, 0xd38: 0x4000, 0xd39: 0x4027, 0xd3a: 0x4000, 0xd3b: 0x4028,
- 0xd3c: 0x4000, 0xd3d: 0x4020, 0xd3e: 0x4000, 0xd3f: 0x4029,
- // Block 0x35, offset 0xd40
- 0xd40: 0x4000, 0xd41: 0x402a, 0xd42: 0x4000, 0xd43: 0x402b, 0xd44: 0x402c, 0xd45: 0x4000,
- 0xd46: 0x4017, 0xd47: 0x4000, 0xd48: 0x402d, 0xd49: 0x4000, 0xd4a: 0x402e, 0xd4b: 0x402f,
- 0xd4c: 0x4030, 0xd4d: 0x4017, 0xd4e: 0x4016, 0xd4f: 0x4017, 0xd50: 0x4000, 0xd51: 0x4000,
- 0xd52: 0x4031, 0xd53: 0x4000, 0xd54: 0x4000, 0xd55: 0x4031, 0xd56: 0x4000, 0xd57: 0x4000,
- 0xd58: 0x4032, 0xd59: 0x4000, 0xd5a: 0x4000, 0xd5b: 0x4032, 0xd5c: 0x4000, 0xd5d: 0x4000,
- 0xd5e: 0x4033, 0xd5f: 0x402e, 0xd60: 0x4034, 0xd61: 0x4035, 0xd62: 0x4034, 0xd63: 0x4036,
- 0xd64: 0x4037, 0xd65: 0x4024, 0xd66: 0x4035, 0xd67: 0x4025, 0xd68: 0x4038, 0xd69: 0x4038,
- 0xd6a: 0x4039, 0xd6b: 0x4039, 0xd6c: 0x403a, 0xd6d: 0x403a, 0xd6e: 0x4000, 0xd6f: 0x4035,
- 0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x403b, 0xd73: 0x403c, 0xd74: 0x4000, 0xd75: 0x4000,
- 0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x403d,
- 0xd7c: 0x401c, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000,
- // Block 0x36, offset 0xd80
- 0xd85: 0x4000,
- 0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000,
- 0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000,
- 0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000,
- 0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000,
- 0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000,
- 0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000,
- 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000, 0xdae: 0x4000, 0xdaf: 0x4000,
- 0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e,
- 0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e,
- 0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e,
- // Block 0x37, offset 0xdc0
- 0xdc0: 0x4037, 0xdc1: 0x4037, 0xdc2: 0x4037, 0xdc3: 0x4037, 0xdc4: 0x4037, 0xdc5: 0x4037,
- 0xdc6: 0x4037, 0xdc7: 0x4037, 0xdc8: 0x4037, 0xdc9: 0x4037, 0xdca: 0x4037, 0xdcb: 0x4037,
- 0xdcc: 0x4037, 0xdcd: 0x4037, 0xdce: 0x4037, 0xdcf: 0x400e, 0xdd0: 0x403f, 0xdd1: 0x4040,
- 0xdd2: 0x4041, 0xdd3: 0x4040, 0xdd4: 0x403f, 0xdd5: 0x4042, 0xdd6: 0x4043, 0xdd7: 0x4044,
- 0xdd8: 0x4040, 0xdd9: 0x4041, 0xdda: 0x4040, 0xddb: 0x4045, 0xddc: 0x4009, 0xddd: 0x4045,
- 0xdde: 0x4046, 0xddf: 0x4045, 0xde0: 0x4047, 0xde1: 0x400b, 0xde2: 0x400a, 0xde3: 0x400c,
- 0xde4: 0x4048, 0xde5: 0x4000, 0xde6: 0x4000, 0xde7: 0x4000, 0xde8: 0x4000, 0xde9: 0x4000,
- 0xdea: 0x4000, 0xdeb: 0x4000, 0xdec: 0x4000, 0xded: 0x4000, 0xdee: 0x4000, 0xdef: 0x4000,
- 0xdf0: 0x4000, 0xdf1: 0x4000, 0xdf2: 0x4000, 0xdf3: 0x4000, 0xdf4: 0x4000, 0xdf5: 0x4000,
- 0xdf6: 0x4000, 0xdf7: 0x4000, 0xdf8: 0x4000, 0xdf9: 0x4000, 0xdfa: 0x4000, 0xdfb: 0x4000,
- 0xdfc: 0x4000, 0xdfd: 0x4000, 0xdfe: 0x4000, 0xdff: 0x4000,
- // Block 0x38, offset 0xe00
- 0xe00: 0x4000, 0xe01: 0x4000, 0xe02: 0x4000, 0xe03: 0x4000, 0xe04: 0x4000, 0xe05: 0x4000,
- 0xe06: 0x4000, 0xe07: 0x4000, 0xe08: 0x4000, 0xe09: 0x4000, 0xe0a: 0x4000, 0xe0b: 0x4000,
- 0xe0c: 0x4000, 0xe0d: 0x4000, 0xe0e: 0x4000, 0xe10: 0x4000, 0xe11: 0x4000,
- 0xe12: 0x4000, 0xe13: 0x4000, 0xe14: 0x4000, 0xe15: 0x4000, 0xe16: 0x4000, 0xe17: 0x4000,
- 0xe18: 0x4000, 0xe19: 0x4000, 0xe1a: 0x4000, 0xe1b: 0x4000, 0xe1c: 0x4000, 0xe1d: 0x4000,
- 0xe1e: 0x4000, 0xe1f: 0x4000, 0xe20: 0x4000, 0xe21: 0x4000, 0xe22: 0x4000, 0xe23: 0x4000,
- 0xe24: 0x4000, 0xe25: 0x4000, 0xe26: 0x4000, 0xe27: 0x4000, 0xe28: 0x4000, 0xe29: 0x4000,
- 0xe2a: 0x4000, 0xe2b: 0x4000, 0xe2c: 0x4000, 0xe2d: 0x4000, 0xe2e: 0x4000, 0xe2f: 0x4000,
- 0xe30: 0x4000, 0xe31: 0x4000, 0xe32: 0x4000, 0xe33: 0x4000, 0xe34: 0x4000, 0xe35: 0x4000,
- 0xe36: 0x4000, 0xe37: 0x4000, 0xe38: 0x4000, 0xe39: 0x4000, 0xe3a: 0x4000, 0xe3b: 0x4000,
- 0xe3c: 0x4000, 0xe3d: 0x4000, 0xe3e: 0x4000, 0xe3f: 0x4000,
- // Block 0x39, offset 0xe40
- 0xe40: 0x4000, 0xe41: 0x4000, 0xe42: 0x4000, 0xe43: 0x4000, 0xe44: 0x4000, 0xe45: 0x4000,
- 0xe46: 0x4000, 0xe47: 0x4000, 0xe48: 0x4000, 0xe49: 0x4000, 0xe4a: 0x4000, 0xe4b: 0x4000,
- 0xe4c: 0x4000, 0xe4d: 0x4000, 0xe4e: 0x4000, 0xe4f: 0x4000, 0xe50: 0x4000, 0xe51: 0x4000,
- 0xe52: 0x4000, 0xe53: 0x4000, 0xe54: 0x4000, 0xe55: 0x4000, 0xe56: 0x4000, 0xe57: 0x4000,
- 0xe58: 0x4000, 0xe59: 0x4000, 0xe5a: 0x4000, 0xe5b: 0x4000, 0xe5c: 0x4000, 0xe5d: 0x4000,
- 0xe5e: 0x4000, 0xe5f: 0x4000, 0xe60: 0x4000, 0xe61: 0x4000, 0xe62: 0x4000, 0xe63: 0x4000,
- 0xe70: 0x4000, 0xe71: 0x4000, 0xe72: 0x4000, 0xe73: 0x4000, 0xe74: 0x4000, 0xe75: 0x4000,
- 0xe76: 0x4000, 0xe77: 0x4000, 0xe78: 0x4000, 0xe79: 0x4000, 0xe7a: 0x4000, 0xe7b: 0x4000,
- 0xe7c: 0x4000, 0xe7d: 0x4000, 0xe7e: 0x4000, 0xe7f: 0x4000,
- // Block 0x3a, offset 0xe80
- 0xe80: 0x4000, 0xe81: 0x4000, 0xe82: 0x4000, 0xe83: 0x4000, 0xe84: 0x4000, 0xe85: 0x4000,
- 0xe86: 0x4000, 0xe87: 0x4000, 0xe88: 0x4000, 0xe89: 0x4000, 0xe8a: 0x4000, 0xe8b: 0x4000,
- 0xe8c: 0x4000, 0xe8d: 0x4000, 0xe8e: 0x4000, 0xe8f: 0x4000, 0xe90: 0x4000, 0xe91: 0x4000,
- 0xe92: 0x4000, 0xe93: 0x4000, 0xe94: 0x4000, 0xe95: 0x4000, 0xe96: 0x4000, 0xe97: 0x4000,
- 0xe98: 0x4000, 0xe99: 0x4000, 0xe9a: 0x4000, 0xe9b: 0x4000, 0xe9c: 0x4000, 0xe9d: 0x4000,
- 0xe9e: 0x4000, 0xea0: 0x4000, 0xea1: 0x4000, 0xea2: 0x4000, 0xea3: 0x4000,
- 0xea4: 0x4000, 0xea5: 0x4000, 0xea6: 0x4000, 0xea7: 0x4000, 0xea8: 0x4000, 0xea9: 0x4000,
- 0xeaa: 0x4000, 0xeab: 0x4000, 0xeac: 0x4000, 0xead: 0x4000, 0xeae: 0x4000, 0xeaf: 0x4000,
- 0xeb0: 0x4000, 0xeb1: 0x4000, 0xeb2: 0x4000, 0xeb3: 0x4000, 0xeb4: 0x4000, 0xeb5: 0x4000,
- 0xeb6: 0x4000, 0xeb7: 0x4000, 0xeb8: 0x4000, 0xeb9: 0x4000, 0xeba: 0x4000, 0xebb: 0x4000,
- 0xebc: 0x4000, 0xebd: 0x4000, 0xebe: 0x4000, 0xebf: 0x4000,
- // Block 0x3b, offset 0xec0
- 0xec0: 0x4000, 0xec1: 0x4000, 0xec2: 0x4000, 0xec3: 0x4000, 0xec4: 0x4000, 0xec5: 0x4000,
- 0xec6: 0x4000, 0xec7: 0x4000, 0xec8: 0x2000, 0xec9: 0x2000, 0xeca: 0x2000, 0xecb: 0x2000,
- 0xecc: 0x2000, 0xecd: 0x2000, 0xece: 0x2000, 0xecf: 0x2000, 0xed0: 0x4000, 0xed1: 0x4000,
- 0xed2: 0x4000, 0xed3: 0x4000, 0xed4: 0x4000, 0xed5: 0x4000, 0xed6: 0x4000, 0xed7: 0x4000,
- 0xed8: 0x4000, 0xed9: 0x4000, 0xeda: 0x4000, 0xedb: 0x4000, 0xedc: 0x4000, 0xedd: 0x4000,
- 0xede: 0x4000, 0xedf: 0x4000, 0xee0: 0x4000, 0xee1: 0x4000, 0xee2: 0x4000, 0xee3: 0x4000,
- 0xee4: 0x4000, 0xee5: 0x4000, 0xee6: 0x4000, 0xee7: 0x4000, 0xee8: 0x4000, 0xee9: 0x4000,
- 0xeea: 0x4000, 0xeeb: 0x4000, 0xeec: 0x4000, 0xeed: 0x4000, 0xeee: 0x4000, 0xeef: 0x4000,
- 0xef0: 0x4000, 0xef1: 0x4000, 0xef2: 0x4000, 0xef3: 0x4000, 0xef4: 0x4000, 0xef5: 0x4000,
- 0xef6: 0x4000, 0xef7: 0x4000, 0xef8: 0x4000, 0xef9: 0x4000, 0xefa: 0x4000, 0xefb: 0x4000,
- 0xefc: 0x4000, 0xefd: 0x4000, 0xefe: 0x4000, 0xeff: 0x4000,
- // Block 0x3c, offset 0xf00
- 0xf00: 0x4000, 0xf01: 0x4000, 0xf02: 0x4000, 0xf03: 0x4000, 0xf04: 0x4000, 0xf05: 0x4000,
- 0xf06: 0x4000, 0xf07: 0x4000, 0xf08: 0x4000, 0xf09: 0x4000, 0xf0a: 0x4000, 0xf0b: 0x4000,
- 0xf0c: 0x4000, 0xf10: 0x4000, 0xf11: 0x4000,
- 0xf12: 0x4000, 0xf13: 0x4000, 0xf14: 0x4000, 0xf15: 0x4000, 0xf16: 0x4000, 0xf17: 0x4000,
- 0xf18: 0x4000, 0xf19: 0x4000, 0xf1a: 0x4000, 0xf1b: 0x4000, 0xf1c: 0x4000, 0xf1d: 0x4000,
- 0xf1e: 0x4000, 0xf1f: 0x4000, 0xf20: 0x4000, 0xf21: 0x4000, 0xf22: 0x4000, 0xf23: 0x4000,
- 0xf24: 0x4000, 0xf25: 0x4000, 0xf26: 0x4000, 0xf27: 0x4000, 0xf28: 0x4000, 0xf29: 0x4000,
- 0xf2a: 0x4000, 0xf2b: 0x4000, 0xf2c: 0x4000, 0xf2d: 0x4000, 0xf2e: 0x4000, 0xf2f: 0x4000,
- 0xf30: 0x4000, 0xf31: 0x4000, 0xf32: 0x4000, 0xf33: 0x4000, 0xf34: 0x4000, 0xf35: 0x4000,
- 0xf36: 0x4000, 0xf37: 0x4000, 0xf38: 0x4000, 0xf39: 0x4000, 0xf3a: 0x4000, 0xf3b: 0x4000,
- 0xf3c: 0x4000, 0xf3d: 0x4000, 0xf3e: 0x4000, 0xf3f: 0x4000,
- // Block 0x3d, offset 0xf40
- 0xf40: 0x4000, 0xf41: 0x4000, 0xf42: 0x4000, 0xf43: 0x4000, 0xf44: 0x4000, 0xf45: 0x4000,
- 0xf46: 0x4000,
- // Block 0x3e, offset 0xf80
- 0xfa0: 0x4000, 0xfa1: 0x4000, 0xfa2: 0x4000, 0xfa3: 0x4000,
- 0xfa4: 0x4000, 0xfa5: 0x4000, 0xfa6: 0x4000, 0xfa7: 0x4000, 0xfa8: 0x4000, 0xfa9: 0x4000,
- 0xfaa: 0x4000, 0xfab: 0x4000, 0xfac: 0x4000, 0xfad: 0x4000, 0xfae: 0x4000, 0xfaf: 0x4000,
- 0xfb0: 0x4000, 0xfb1: 0x4000, 0xfb2: 0x4000, 0xfb3: 0x4000, 0xfb4: 0x4000, 0xfb5: 0x4000,
- 0xfb6: 0x4000, 0xfb7: 0x4000, 0xfb8: 0x4000, 0xfb9: 0x4000, 0xfba: 0x4000, 0xfbb: 0x4000,
- 0xfbc: 0x4000,
- // Block 0x3f, offset 0xfc0
- 0xfc0: 0x4000, 0xfc1: 0x4000, 0xfc2: 0x4000, 0xfc3: 0x4000, 0xfc4: 0x4000, 0xfc5: 0x4000,
- 0xfc6: 0x4000, 0xfc7: 0x4000, 0xfc8: 0x4000, 0xfc9: 0x4000, 0xfca: 0x4000, 0xfcb: 0x4000,
- 0xfcc: 0x4000, 0xfcd: 0x4000, 0xfce: 0x4000, 0xfcf: 0x4000, 0xfd0: 0x4000, 0xfd1: 0x4000,
- 0xfd2: 0x4000, 0xfd3: 0x4000, 0xfd4: 0x4000, 0xfd5: 0x4000, 0xfd6: 0x4000, 0xfd7: 0x4000,
- 0xfd8: 0x4000, 0xfd9: 0x4000, 0xfda: 0x4000, 0xfdb: 0x4000, 0xfdc: 0x4000, 0xfdd: 0x4000,
- 0xfde: 0x4000, 0xfdf: 0x4000, 0xfe0: 0x4000, 0xfe1: 0x4000, 0xfe2: 0x4000, 0xfe3: 0x4000,
- // Block 0x40, offset 0x1000
- 0x1000: 0x2000, 0x1001: 0x2000, 0x1002: 0x2000, 0x1003: 0x2000, 0x1004: 0x2000, 0x1005: 0x2000,
- 0x1006: 0x2000, 0x1007: 0x2000, 0x1008: 0x2000, 0x1009: 0x2000, 0x100a: 0x2000, 0x100b: 0x2000,
- 0x100c: 0x2000, 0x100d: 0x2000, 0x100e: 0x2000, 0x100f: 0x2000, 0x1010: 0x4000, 0x1011: 0x4000,
- 0x1012: 0x4000, 0x1013: 0x4000, 0x1014: 0x4000, 0x1015: 0x4000, 0x1016: 0x4000, 0x1017: 0x4000,
- 0x1018: 0x4000, 0x1019: 0x4000,
- 0x1030: 0x4000, 0x1031: 0x4000, 0x1032: 0x4000, 0x1033: 0x4000, 0x1034: 0x4000, 0x1035: 0x4000,
- 0x1036: 0x4000, 0x1037: 0x4000, 0x1038: 0x4000, 0x1039: 0x4000, 0x103a: 0x4000, 0x103b: 0x4000,
- 0x103c: 0x4000, 0x103d: 0x4000, 0x103e: 0x4000, 0x103f: 0x4000,
- // Block 0x41, offset 0x1040
- 0x1040: 0x4000, 0x1041: 0x4000, 0x1042: 0x4000, 0x1043: 0x4000, 0x1044: 0x4000, 0x1045: 0x4000,
- 0x1046: 0x4000, 0x1047: 0x4000, 0x1048: 0x4000, 0x1049: 0x4000, 0x104a: 0x4000, 0x104b: 0x4000,
- 0x104c: 0x4000, 0x104d: 0x4000, 0x104e: 0x4000, 0x104f: 0x4000, 0x1050: 0x4000, 0x1051: 0x4000,
- 0x1052: 0x4000, 0x1054: 0x4000, 0x1055: 0x4000, 0x1056: 0x4000, 0x1057: 0x4000,
- 0x1058: 0x4000, 0x1059: 0x4000, 0x105a: 0x4000, 0x105b: 0x4000, 0x105c: 0x4000, 0x105d: 0x4000,
- 0x105e: 0x4000, 0x105f: 0x4000, 0x1060: 0x4000, 0x1061: 0x4000, 0x1062: 0x4000, 0x1063: 0x4000,
- 0x1064: 0x4000, 0x1065: 0x4000, 0x1066: 0x4000, 0x1068: 0x4000, 0x1069: 0x4000,
- 0x106a: 0x4000, 0x106b: 0x4000,
- // Block 0x42, offset 0x1080
- 0x1081: 0x9012, 0x1082: 0x9012, 0x1083: 0x9012, 0x1084: 0x9012, 0x1085: 0x9012,
- 0x1086: 0x9012, 0x1087: 0x9012, 0x1088: 0x9012, 0x1089: 0x9012, 0x108a: 0x9012, 0x108b: 0x9012,
- 0x108c: 0x9012, 0x108d: 0x9012, 0x108e: 0x9012, 0x108f: 0x9012, 0x1090: 0x9012, 0x1091: 0x9012,
- 0x1092: 0x9012, 0x1093: 0x9012, 0x1094: 0x9012, 0x1095: 0x9012, 0x1096: 0x9012, 0x1097: 0x9012,
- 0x1098: 0x9012, 0x1099: 0x9012, 0x109a: 0x9012, 0x109b: 0x9012, 0x109c: 0x9012, 0x109d: 0x9012,
- 0x109e: 0x9012, 0x109f: 0x9012, 0x10a0: 0x9049, 0x10a1: 0x9049, 0x10a2: 0x9049, 0x10a3: 0x9049,
- 0x10a4: 0x9049, 0x10a5: 0x9049, 0x10a6: 0x9049, 0x10a7: 0x9049, 0x10a8: 0x9049, 0x10a9: 0x9049,
- 0x10aa: 0x9049, 0x10ab: 0x9049, 0x10ac: 0x9049, 0x10ad: 0x9049, 0x10ae: 0x9049, 0x10af: 0x9049,
- 0x10b0: 0x9049, 0x10b1: 0x9049, 0x10b2: 0x9049, 0x10b3: 0x9049, 0x10b4: 0x9049, 0x10b5: 0x9049,
- 0x10b6: 0x9049, 0x10b7: 0x9049, 0x10b8: 0x9049, 0x10b9: 0x9049, 0x10ba: 0x9049, 0x10bb: 0x9049,
- 0x10bc: 0x9049, 0x10bd: 0x9049, 0x10be: 0x9049, 0x10bf: 0x9049,
- // Block 0x43, offset 0x10c0
- 0x10c0: 0x9049, 0x10c1: 0x9049, 0x10c2: 0x9049, 0x10c3: 0x9049, 0x10c4: 0x9049, 0x10c5: 0x9049,
- 0x10c6: 0x9049, 0x10c7: 0x9049, 0x10c8: 0x9049, 0x10c9: 0x9049, 0x10ca: 0x9049, 0x10cb: 0x9049,
- 0x10cc: 0x9049, 0x10cd: 0x9049, 0x10ce: 0x9049, 0x10cf: 0x9049, 0x10d0: 0x9049, 0x10d1: 0x9049,
- 0x10d2: 0x9049, 0x10d3: 0x9049, 0x10d4: 0x9049, 0x10d5: 0x9049, 0x10d6: 0x9049, 0x10d7: 0x9049,
- 0x10d8: 0x9049, 0x10d9: 0x9049, 0x10da: 0x9049, 0x10db: 0x9049, 0x10dc: 0x9049, 0x10dd: 0x9049,
- 0x10de: 0x9049, 0x10df: 0x904a, 0x10e0: 0x904b, 0x10e1: 0xb04c, 0x10e2: 0xb04d, 0x10e3: 0xb04d,
- 0x10e4: 0xb04e, 0x10e5: 0xb04f, 0x10e6: 0xb050, 0x10e7: 0xb051, 0x10e8: 0xb052, 0x10e9: 0xb053,
- 0x10ea: 0xb054, 0x10eb: 0xb055, 0x10ec: 0xb056, 0x10ed: 0xb057, 0x10ee: 0xb058, 0x10ef: 0xb059,
- 0x10f0: 0xb05a, 0x10f1: 0xb05b, 0x10f2: 0xb05c, 0x10f3: 0xb05d, 0x10f4: 0xb05e, 0x10f5: 0xb05f,
- 0x10f6: 0xb060, 0x10f7: 0xb061, 0x10f8: 0xb062, 0x10f9: 0xb063, 0x10fa: 0xb064, 0x10fb: 0xb065,
- 0x10fc: 0xb052, 0x10fd: 0xb066, 0x10fe: 0xb067, 0x10ff: 0xb055,
- // Block 0x44, offset 0x1100
- 0x1100: 0xb068, 0x1101: 0xb069, 0x1102: 0xb06a, 0x1103: 0xb06b, 0x1104: 0xb05a, 0x1105: 0xb056,
- 0x1106: 0xb06c, 0x1107: 0xb06d, 0x1108: 0xb06b, 0x1109: 0xb06e, 0x110a: 0xb06b, 0x110b: 0xb06f,
- 0x110c: 0xb06f, 0x110d: 0xb070, 0x110e: 0xb070, 0x110f: 0xb071, 0x1110: 0xb056, 0x1111: 0xb072,
- 0x1112: 0xb073, 0x1113: 0xb072, 0x1114: 0xb074, 0x1115: 0xb073, 0x1116: 0xb075, 0x1117: 0xb075,
- 0x1118: 0xb076, 0x1119: 0xb076, 0x111a: 0xb077, 0x111b: 0xb077, 0x111c: 0xb073, 0x111d: 0xb078,
- 0x111e: 0xb079, 0x111f: 0xb067, 0x1120: 0xb07a, 0x1121: 0xb07b, 0x1122: 0xb07b, 0x1123: 0xb07b,
- 0x1124: 0xb07b, 0x1125: 0xb07b, 0x1126: 0xb07b, 0x1127: 0xb07b, 0x1128: 0xb07b, 0x1129: 0xb07b,
- 0x112a: 0xb07b, 0x112b: 0xb07b, 0x112c: 0xb07b, 0x112d: 0xb07b, 0x112e: 0xb07b, 0x112f: 0xb07b,
- 0x1130: 0xb07c, 0x1131: 0xb07c, 0x1132: 0xb07c, 0x1133: 0xb07c, 0x1134: 0xb07c, 0x1135: 0xb07c,
- 0x1136: 0xb07c, 0x1137: 0xb07c, 0x1138: 0xb07c, 0x1139: 0xb07c, 0x113a: 0xb07c, 0x113b: 0xb07c,
- 0x113c: 0xb07c, 0x113d: 0xb07c, 0x113e: 0xb07c,
- // Block 0x45, offset 0x1140
- 0x1142: 0xb07d, 0x1143: 0xb07e, 0x1144: 0xb07f, 0x1145: 0xb080,
- 0x1146: 0xb07f, 0x1147: 0xb07e, 0x114a: 0xb081, 0x114b: 0xb082,
- 0x114c: 0xb083, 0x114d: 0xb07f, 0x114e: 0xb080, 0x114f: 0xb07f,
- 0x1152: 0xb084, 0x1153: 0xb085, 0x1154: 0xb084, 0x1155: 0xb086, 0x1156: 0xb084, 0x1157: 0xb087,
- 0x115a: 0xb088, 0x115b: 0xb089, 0x115c: 0xb08a,
- 0x1160: 0x908b, 0x1161: 0x908b, 0x1162: 0x908c, 0x1163: 0x908d,
- 0x1164: 0x908b, 0x1165: 0x908e, 0x1166: 0x908f, 0x1168: 0xb090, 0x1169: 0xb091,
- 0x116a: 0xb092, 0x116b: 0xb091, 0x116c: 0xb093, 0x116d: 0xb094, 0x116e: 0xb095,
- 0x117d: 0x2000,
- // Block 0x46, offset 0x1180
- 0x11a0: 0x4000, 0x11a1: 0x4000, 0x11a2: 0x4000, 0x11a3: 0x4000,
- 0x11a4: 0x4000,
- 0x11b0: 0x4000, 0x11b1: 0x4000,
- // Block 0x47, offset 0x11c0
- 0x11c0: 0x4000, 0x11c1: 0x4000, 0x11c2: 0x4000, 0x11c3: 0x4000, 0x11c4: 0x4000, 0x11c5: 0x4000,
- 0x11c6: 0x4000, 0x11c7: 0x4000, 0x11c8: 0x4000, 0x11c9: 0x4000, 0x11ca: 0x4000, 0x11cb: 0x4000,
- 0x11cc: 0x4000, 0x11cd: 0x4000, 0x11ce: 0x4000, 0x11cf: 0x4000, 0x11d0: 0x4000, 0x11d1: 0x4000,
- 0x11d2: 0x4000, 0x11d3: 0x4000, 0x11d4: 0x4000, 0x11d5: 0x4000, 0x11d6: 0x4000, 0x11d7: 0x4000,
- 0x11d8: 0x4000, 0x11d9: 0x4000, 0x11da: 0x4000, 0x11db: 0x4000, 0x11dc: 0x4000, 0x11dd: 0x4000,
- 0x11de: 0x4000, 0x11df: 0x4000, 0x11e0: 0x4000, 0x11e1: 0x4000, 0x11e2: 0x4000, 0x11e3: 0x4000,
- 0x11e4: 0x4000, 0x11e5: 0x4000, 0x11e6: 0x4000, 0x11e7: 0x4000, 0x11e8: 0x4000, 0x11e9: 0x4000,
- 0x11ea: 0x4000, 0x11eb: 0x4000, 0x11ec: 0x4000, 0x11ed: 0x4000, 0x11ee: 0x4000, 0x11ef: 0x4000,
- 0x11f0: 0x4000, 0x11f1: 0x4000, 0x11f2: 0x4000, 0x11f3: 0x4000, 0x11f4: 0x4000, 0x11f5: 0x4000,
- 0x11f6: 0x4000, 0x11f7: 0x4000,
- // Block 0x48, offset 0x1200
- 0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000,
- 0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000,
- 0x120c: 0x4000, 0x120d: 0x4000, 0x120e: 0x4000, 0x120f: 0x4000, 0x1210: 0x4000, 0x1211: 0x4000,
- 0x1212: 0x4000, 0x1213: 0x4000, 0x1214: 0x4000, 0x1215: 0x4000,
- // Block 0x49, offset 0x1240
- 0x1240: 0x4000, 0x1241: 0x4000, 0x1242: 0x4000, 0x1243: 0x4000, 0x1244: 0x4000, 0x1245: 0x4000,
- 0x1246: 0x4000, 0x1247: 0x4000, 0x1248: 0x4000,
- // Block 0x4a, offset 0x1280
- 0x1280: 0x4000, 0x1281: 0x4000, 0x1282: 0x4000, 0x1283: 0x4000, 0x1284: 0x4000, 0x1285: 0x4000,
- 0x1286: 0x4000, 0x1287: 0x4000, 0x1288: 0x4000, 0x1289: 0x4000, 0x128a: 0x4000, 0x128b: 0x4000,
- 0x128c: 0x4000, 0x128d: 0x4000, 0x128e: 0x4000, 0x128f: 0x4000, 0x1290: 0x4000, 0x1291: 0x4000,
- 0x1292: 0x4000, 0x1293: 0x4000, 0x1294: 0x4000, 0x1295: 0x4000, 0x1296: 0x4000, 0x1297: 0x4000,
- 0x1298: 0x4000, 0x1299: 0x4000, 0x129a: 0x4000, 0x129b: 0x4000, 0x129c: 0x4000, 0x129d: 0x4000,
- 0x129e: 0x4000,
- // Block 0x4b, offset 0x12c0
- 0x12d0: 0x4000, 0x12d1: 0x4000,
- 0x12d2: 0x4000,
- 0x12e4: 0x4000, 0x12e5: 0x4000, 0x12e6: 0x4000, 0x12e7: 0x4000,
- 0x12f0: 0x4000, 0x12f1: 0x4000, 0x12f2: 0x4000, 0x12f3: 0x4000, 0x12f4: 0x4000, 0x12f5: 0x4000,
- 0x12f6: 0x4000, 0x12f7: 0x4000, 0x12f8: 0x4000, 0x12f9: 0x4000, 0x12fa: 0x4000, 0x12fb: 0x4000,
- 0x12fc: 0x4000, 0x12fd: 0x4000, 0x12fe: 0x4000, 0x12ff: 0x4000,
- // Block 0x4c, offset 0x1300
- 0x1300: 0x4000, 0x1301: 0x4000, 0x1302: 0x4000, 0x1303: 0x4000, 0x1304: 0x4000, 0x1305: 0x4000,
- 0x1306: 0x4000, 0x1307: 0x4000, 0x1308: 0x4000, 0x1309: 0x4000, 0x130a: 0x4000, 0x130b: 0x4000,
- 0x130c: 0x4000, 0x130d: 0x4000, 0x130e: 0x4000, 0x130f: 0x4000, 0x1310: 0x4000, 0x1311: 0x4000,
- 0x1312: 0x4000, 0x1313: 0x4000, 0x1314: 0x4000, 0x1315: 0x4000, 0x1316: 0x4000, 0x1317: 0x4000,
- 0x1318: 0x4000, 0x1319: 0x4000, 0x131a: 0x4000, 0x131b: 0x4000, 0x131c: 0x4000, 0x131d: 0x4000,
- 0x131e: 0x4000, 0x131f: 0x4000, 0x1320: 0x4000, 0x1321: 0x4000, 0x1322: 0x4000, 0x1323: 0x4000,
- 0x1324: 0x4000, 0x1325: 0x4000, 0x1326: 0x4000, 0x1327: 0x4000, 0x1328: 0x4000, 0x1329: 0x4000,
- 0x132a: 0x4000, 0x132b: 0x4000, 0x132c: 0x4000, 0x132d: 0x4000, 0x132e: 0x4000, 0x132f: 0x4000,
- 0x1330: 0x4000, 0x1331: 0x4000, 0x1332: 0x4000, 0x1333: 0x4000, 0x1334: 0x4000, 0x1335: 0x4000,
- 0x1336: 0x4000, 0x1337: 0x4000, 0x1338: 0x4000, 0x1339: 0x4000, 0x133a: 0x4000, 0x133b: 0x4000,
- // Block 0x4d, offset 0x1340
- 0x1344: 0x4000,
- // Block 0x4e, offset 0x1380
- 0x138f: 0x4000,
- // Block 0x4f, offset 0x13c0
- 0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000,
- 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000,
- 0x13d0: 0x2000, 0x13d1: 0x2000,
- 0x13d2: 0x2000, 0x13d3: 0x2000, 0x13d4: 0x2000, 0x13d5: 0x2000, 0x13d6: 0x2000, 0x13d7: 0x2000,
- 0x13d8: 0x2000, 0x13d9: 0x2000, 0x13da: 0x2000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000,
- 0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000,
- 0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000,
- 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000, 0x13ed: 0x2000,
- 0x13f0: 0x2000, 0x13f1: 0x2000, 0x13f2: 0x2000, 0x13f3: 0x2000, 0x13f4: 0x2000, 0x13f5: 0x2000,
- 0x13f6: 0x2000, 0x13f7: 0x2000, 0x13f8: 0x2000, 0x13f9: 0x2000, 0x13fa: 0x2000, 0x13fb: 0x2000,
- 0x13fc: 0x2000, 0x13fd: 0x2000, 0x13fe: 0x2000, 0x13ff: 0x2000,
- // Block 0x50, offset 0x1400
- 0x1400: 0x2000, 0x1401: 0x2000, 0x1402: 0x2000, 0x1403: 0x2000, 0x1404: 0x2000, 0x1405: 0x2000,
- 0x1406: 0x2000, 0x1407: 0x2000, 0x1408: 0x2000, 0x1409: 0x2000, 0x140a: 0x2000, 0x140b: 0x2000,
- 0x140c: 0x2000, 0x140d: 0x2000, 0x140e: 0x2000, 0x140f: 0x2000, 0x1410: 0x2000, 0x1411: 0x2000,
- 0x1412: 0x2000, 0x1413: 0x2000, 0x1414: 0x2000, 0x1415: 0x2000, 0x1416: 0x2000, 0x1417: 0x2000,
- 0x1418: 0x2000, 0x1419: 0x2000, 0x141a: 0x2000, 0x141b: 0x2000, 0x141c: 0x2000, 0x141d: 0x2000,
- 0x141e: 0x2000, 0x141f: 0x2000, 0x1420: 0x2000, 0x1421: 0x2000, 0x1422: 0x2000, 0x1423: 0x2000,
- 0x1424: 0x2000, 0x1425: 0x2000, 0x1426: 0x2000, 0x1427: 0x2000, 0x1428: 0x2000, 0x1429: 0x2000,
- 0x1430: 0x2000, 0x1431: 0x2000, 0x1432: 0x2000, 0x1433: 0x2000, 0x1434: 0x2000, 0x1435: 0x2000,
- 0x1436: 0x2000, 0x1437: 0x2000, 0x1438: 0x2000, 0x1439: 0x2000, 0x143a: 0x2000, 0x143b: 0x2000,
- 0x143c: 0x2000, 0x143d: 0x2000, 0x143e: 0x2000, 0x143f: 0x2000,
- // Block 0x51, offset 0x1440
- 0x1440: 0x2000, 0x1441: 0x2000, 0x1442: 0x2000, 0x1443: 0x2000, 0x1444: 0x2000, 0x1445: 0x2000,
- 0x1446: 0x2000, 0x1447: 0x2000, 0x1448: 0x2000, 0x1449: 0x2000, 0x144a: 0x2000, 0x144b: 0x2000,
- 0x144c: 0x2000, 0x144d: 0x2000, 0x144e: 0x4000, 0x144f: 0x2000, 0x1450: 0x2000, 0x1451: 0x4000,
- 0x1452: 0x4000, 0x1453: 0x4000, 0x1454: 0x4000, 0x1455: 0x4000, 0x1456: 0x4000, 0x1457: 0x4000,
- 0x1458: 0x4000, 0x1459: 0x4000, 0x145a: 0x4000, 0x145b: 0x2000, 0x145c: 0x2000, 0x145d: 0x2000,
- 0x145e: 0x2000, 0x145f: 0x2000, 0x1460: 0x2000, 0x1461: 0x2000, 0x1462: 0x2000, 0x1463: 0x2000,
- 0x1464: 0x2000, 0x1465: 0x2000, 0x1466: 0x2000, 0x1467: 0x2000, 0x1468: 0x2000, 0x1469: 0x2000,
- 0x146a: 0x2000, 0x146b: 0x2000, 0x146c: 0x2000,
- // Block 0x52, offset 0x1480
- 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000,
- 0x1490: 0x4000, 0x1491: 0x4000,
- 0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000,
- 0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000,
- 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000, 0x14a1: 0x4000, 0x14a2: 0x4000, 0x14a3: 0x4000,
- 0x14a4: 0x4000, 0x14a5: 0x4000, 0x14a6: 0x4000, 0x14a7: 0x4000, 0x14a8: 0x4000, 0x14a9: 0x4000,
- 0x14aa: 0x4000, 0x14ab: 0x4000, 0x14ac: 0x4000, 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000,
- 0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000,
- 0x14b6: 0x4000, 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000,
- // Block 0x53, offset 0x14c0
- 0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000,
- 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000,
- 0x14d0: 0x4000, 0x14d1: 0x4000,
- 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000,
- 0x14e4: 0x4000, 0x14e5: 0x4000,
- // Block 0x54, offset 0x1500
- 0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000,
- 0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000,
- 0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000,
- 0x1512: 0x4000, 0x1513: 0x4000, 0x1514: 0x4000, 0x1515: 0x4000, 0x1516: 0x4000, 0x1517: 0x4000,
- 0x1518: 0x4000, 0x1519: 0x4000, 0x151a: 0x4000, 0x151b: 0x4000, 0x151c: 0x4000, 0x151d: 0x4000,
- 0x151e: 0x4000, 0x151f: 0x4000, 0x1520: 0x4000,
- 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000,
- 0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000,
- 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000,
- 0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000,
- // Block 0x55, offset 0x1540
- 0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000,
- 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000, 0x154b: 0x4000,
- 0x154c: 0x4000, 0x154d: 0x4000, 0x154e: 0x4000, 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000,
- 0x1552: 0x4000, 0x1553: 0x4000, 0x1554: 0x4000, 0x1555: 0x4000, 0x1556: 0x4000, 0x1557: 0x4000,
- 0x1558: 0x4000, 0x1559: 0x4000, 0x155a: 0x4000, 0x155b: 0x4000, 0x155c: 0x4000, 0x155d: 0x4000,
- 0x155e: 0x4000, 0x155f: 0x4000, 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000,
- 0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000,
- 0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000,
- 0x1570: 0x4000, 0x1571: 0x4000, 0x1572: 0x4000, 0x1573: 0x4000, 0x1574: 0x4000, 0x1575: 0x4000,
- 0x1576: 0x4000, 0x1577: 0x4000, 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000,
- 0x157c: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000,
- // Block 0x56, offset 0x1580
- 0x1580: 0x4000, 0x1581: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000,
- 0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000,
- 0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000,
- 0x1592: 0x4000, 0x1593: 0x4000,
- 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000,
- 0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000,
- 0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000,
- 0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000,
- 0x15b6: 0x4000, 0x15b7: 0x4000, 0x15b8: 0x4000, 0x15b9: 0x4000, 0x15ba: 0x4000, 0x15bb: 0x4000,
- 0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000,
- // Block 0x57, offset 0x15c0
- 0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000,
- 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000,
- 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000,
- 0x15d2: 0x4000, 0x15d3: 0x4000,
- 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000,
- 0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000,
- 0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000,
- 0x15f0: 0x4000, 0x15f4: 0x4000,
- 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000,
- 0x15fc: 0x4000, 0x15fd: 0x4000, 0x15fe: 0x4000, 0x15ff: 0x4000,
- // Block 0x58, offset 0x1600
- 0x1600: 0x4000, 0x1601: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000,
- 0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000,
- 0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000,
- 0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000,
- 0x1618: 0x4000, 0x1619: 0x4000, 0x161a: 0x4000, 0x161b: 0x4000, 0x161c: 0x4000, 0x161d: 0x4000,
- 0x161e: 0x4000, 0x161f: 0x4000, 0x1620: 0x4000, 0x1621: 0x4000, 0x1622: 0x4000, 0x1623: 0x4000,
- 0x1624: 0x4000, 0x1625: 0x4000, 0x1626: 0x4000, 0x1627: 0x4000, 0x1628: 0x4000, 0x1629: 0x4000,
- 0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000,
- 0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000,
- 0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000,
- 0x163c: 0x4000, 0x163d: 0x4000, 0x163e: 0x4000,
- // Block 0x59, offset 0x1640
- 0x1640: 0x4000, 0x1642: 0x4000, 0x1643: 0x4000, 0x1644: 0x4000, 0x1645: 0x4000,
- 0x1646: 0x4000, 0x1647: 0x4000, 0x1648: 0x4000, 0x1649: 0x4000, 0x164a: 0x4000, 0x164b: 0x4000,
- 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x164f: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000,
- 0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000,
- 0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000,
- 0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000,
- 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000, 0x1668: 0x4000, 0x1669: 0x4000,
- 0x166a: 0x4000, 0x166b: 0x4000, 0x166c: 0x4000, 0x166d: 0x4000, 0x166e: 0x4000, 0x166f: 0x4000,
- 0x1670: 0x4000, 0x1671: 0x4000, 0x1672: 0x4000, 0x1673: 0x4000, 0x1674: 0x4000, 0x1675: 0x4000,
- 0x1676: 0x4000, 0x1677: 0x4000, 0x1678: 0x4000, 0x1679: 0x4000, 0x167a: 0x4000, 0x167b: 0x4000,
- 0x167c: 0x4000, 0x167d: 0x4000, 0x167e: 0x4000, 0x167f: 0x4000,
- // Block 0x5a, offset 0x1680
- 0x1680: 0x4000, 0x1681: 0x4000, 0x1682: 0x4000, 0x1683: 0x4000, 0x1684: 0x4000, 0x1685: 0x4000,
- 0x1686: 0x4000, 0x1687: 0x4000, 0x1688: 0x4000, 0x1689: 0x4000, 0x168a: 0x4000, 0x168b: 0x4000,
- 0x168c: 0x4000, 0x168d: 0x4000, 0x168e: 0x4000, 0x168f: 0x4000, 0x1690: 0x4000, 0x1691: 0x4000,
- 0x1692: 0x4000, 0x1693: 0x4000, 0x1694: 0x4000, 0x1695: 0x4000, 0x1696: 0x4000, 0x1697: 0x4000,
- 0x1698: 0x4000, 0x1699: 0x4000, 0x169a: 0x4000, 0x169b: 0x4000, 0x169c: 0x4000, 0x169d: 0x4000,
- 0x169e: 0x4000, 0x169f: 0x4000, 0x16a0: 0x4000, 0x16a1: 0x4000, 0x16a2: 0x4000, 0x16a3: 0x4000,
- 0x16a4: 0x4000, 0x16a5: 0x4000, 0x16a6: 0x4000, 0x16a7: 0x4000, 0x16a8: 0x4000, 0x16a9: 0x4000,
- 0x16aa: 0x4000, 0x16ab: 0x4000, 0x16ac: 0x4000, 0x16ad: 0x4000, 0x16ae: 0x4000, 0x16af: 0x4000,
- 0x16b0: 0x4000, 0x16b1: 0x4000, 0x16b2: 0x4000, 0x16b3: 0x4000, 0x16b4: 0x4000, 0x16b5: 0x4000,
- 0x16b6: 0x4000, 0x16b7: 0x4000, 0x16b8: 0x4000, 0x16b9: 0x4000, 0x16ba: 0x4000, 0x16bb: 0x4000,
- 0x16bc: 0x4000, 0x16bf: 0x4000,
- // Block 0x5b, offset 0x16c0
- 0x16c0: 0x4000, 0x16c1: 0x4000, 0x16c2: 0x4000, 0x16c3: 0x4000, 0x16c4: 0x4000, 0x16c5: 0x4000,
- 0x16c6: 0x4000, 0x16c7: 0x4000, 0x16c8: 0x4000, 0x16c9: 0x4000, 0x16ca: 0x4000, 0x16cb: 0x4000,
- 0x16cc: 0x4000, 0x16cd: 0x4000, 0x16ce: 0x4000, 0x16cf: 0x4000, 0x16d0: 0x4000, 0x16d1: 0x4000,
- 0x16d2: 0x4000, 0x16d3: 0x4000, 0x16d4: 0x4000, 0x16d5: 0x4000, 0x16d6: 0x4000, 0x16d7: 0x4000,
- 0x16d8: 0x4000, 0x16d9: 0x4000, 0x16da: 0x4000, 0x16db: 0x4000, 0x16dc: 0x4000, 0x16dd: 0x4000,
- 0x16de: 0x4000, 0x16df: 0x4000, 0x16e0: 0x4000, 0x16e1: 0x4000, 0x16e2: 0x4000, 0x16e3: 0x4000,
- 0x16e4: 0x4000, 0x16e5: 0x4000, 0x16e6: 0x4000, 0x16e7: 0x4000, 0x16e8: 0x4000, 0x16e9: 0x4000,
- 0x16ea: 0x4000, 0x16eb: 0x4000, 0x16ec: 0x4000, 0x16ed: 0x4000, 0x16ee: 0x4000, 0x16ef: 0x4000,
- 0x16f0: 0x4000, 0x16f1: 0x4000, 0x16f2: 0x4000, 0x16f3: 0x4000, 0x16f4: 0x4000, 0x16f5: 0x4000,
- 0x16f6: 0x4000, 0x16f7: 0x4000, 0x16f8: 0x4000, 0x16f9: 0x4000, 0x16fa: 0x4000, 0x16fb: 0x4000,
- 0x16fc: 0x4000, 0x16fd: 0x4000,
- // Block 0x5c, offset 0x1700
- 0x170b: 0x4000,
- 0x170c: 0x4000, 0x170d: 0x4000, 0x170e: 0x4000, 0x1710: 0x4000, 0x1711: 0x4000,
- 0x1712: 0x4000, 0x1713: 0x4000, 0x1714: 0x4000, 0x1715: 0x4000, 0x1716: 0x4000, 0x1717: 0x4000,
- 0x1718: 0x4000, 0x1719: 0x4000, 0x171a: 0x4000, 0x171b: 0x4000, 0x171c: 0x4000, 0x171d: 0x4000,
- 0x171e: 0x4000, 0x171f: 0x4000, 0x1720: 0x4000, 0x1721: 0x4000, 0x1722: 0x4000, 0x1723: 0x4000,
- 0x1724: 0x4000, 0x1725: 0x4000, 0x1726: 0x4000, 0x1727: 0x4000,
- 0x173a: 0x4000,
- // Block 0x5d, offset 0x1740
- 0x1755: 0x4000, 0x1756: 0x4000,
- 0x1764: 0x4000,
- // Block 0x5e, offset 0x1780
- 0x17bb: 0x4000,
- 0x17bc: 0x4000, 0x17bd: 0x4000, 0x17be: 0x4000, 0x17bf: 0x4000,
- // Block 0x5f, offset 0x17c0
- 0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000,
- 0x17c6: 0x4000, 0x17c7: 0x4000, 0x17c8: 0x4000, 0x17c9: 0x4000, 0x17ca: 0x4000, 0x17cb: 0x4000,
- 0x17cc: 0x4000, 0x17cd: 0x4000, 0x17ce: 0x4000, 0x17cf: 0x4000,
- // Block 0x60, offset 0x1800
- 0x1800: 0x4000, 0x1801: 0x4000, 0x1802: 0x4000, 0x1803: 0x4000, 0x1804: 0x4000, 0x1805: 0x4000,
- 0x180c: 0x4000, 0x1810: 0x4000, 0x1811: 0x4000,
- 0x1812: 0x4000, 0x1815: 0x4000, 0x1816: 0x4000, 0x1817: 0x4000,
- 0x182b: 0x4000, 0x182c: 0x4000,
- 0x1834: 0x4000, 0x1835: 0x4000,
- 0x1836: 0x4000, 0x1837: 0x4000, 0x1838: 0x4000, 0x1839: 0x4000, 0x183a: 0x4000, 0x183b: 0x4000,
- 0x183c: 0x4000,
- // Block 0x61, offset 0x1840
- 0x1860: 0x4000, 0x1861: 0x4000, 0x1862: 0x4000, 0x1863: 0x4000,
- 0x1864: 0x4000, 0x1865: 0x4000, 0x1866: 0x4000, 0x1867: 0x4000, 0x1868: 0x4000, 0x1869: 0x4000,
- 0x186a: 0x4000, 0x186b: 0x4000,
- // Block 0x62, offset 0x1880
- 0x188c: 0x4000, 0x188d: 0x4000, 0x188e: 0x4000, 0x188f: 0x4000, 0x1890: 0x4000, 0x1891: 0x4000,
- 0x1892: 0x4000, 0x1893: 0x4000, 0x1894: 0x4000, 0x1895: 0x4000, 0x1896: 0x4000, 0x1897: 0x4000,
- 0x1898: 0x4000, 0x1899: 0x4000, 0x189a: 0x4000, 0x189b: 0x4000, 0x189c: 0x4000, 0x189d: 0x4000,
- 0x189e: 0x4000, 0x189f: 0x4000, 0x18a0: 0x4000, 0x18a1: 0x4000, 0x18a2: 0x4000, 0x18a3: 0x4000,
- 0x18a4: 0x4000, 0x18a5: 0x4000, 0x18a6: 0x4000, 0x18a7: 0x4000, 0x18a8: 0x4000, 0x18a9: 0x4000,
- 0x18aa: 0x4000, 0x18ab: 0x4000, 0x18ac: 0x4000, 0x18ad: 0x4000, 0x18ae: 0x4000, 0x18af: 0x4000,
- 0x18b0: 0x4000, 0x18b1: 0x4000, 0x18b2: 0x4000, 0x18b3: 0x4000, 0x18b4: 0x4000, 0x18b5: 0x4000,
- 0x18b6: 0x4000, 0x18b7: 0x4000, 0x18b8: 0x4000, 0x18b9: 0x4000, 0x18ba: 0x4000,
- 0x18bc: 0x4000, 0x18bd: 0x4000, 0x18be: 0x4000, 0x18bf: 0x4000,
- // Block 0x63, offset 0x18c0
- 0x18c0: 0x4000, 0x18c1: 0x4000, 0x18c2: 0x4000, 0x18c3: 0x4000, 0x18c4: 0x4000, 0x18c5: 0x4000,
- 0x18c7: 0x4000, 0x18c8: 0x4000, 0x18c9: 0x4000, 0x18ca: 0x4000, 0x18cb: 0x4000,
- 0x18cc: 0x4000, 0x18cd: 0x4000, 0x18ce: 0x4000, 0x18cf: 0x4000, 0x18d0: 0x4000, 0x18d1: 0x4000,
- 0x18d2: 0x4000, 0x18d3: 0x4000, 0x18d4: 0x4000, 0x18d5: 0x4000, 0x18d6: 0x4000, 0x18d7: 0x4000,
- 0x18d8: 0x4000, 0x18d9: 0x4000, 0x18da: 0x4000, 0x18db: 0x4000, 0x18dc: 0x4000, 0x18dd: 0x4000,
- 0x18de: 0x4000, 0x18df: 0x4000, 0x18e0: 0x4000, 0x18e1: 0x4000, 0x18e2: 0x4000, 0x18e3: 0x4000,
- 0x18e4: 0x4000, 0x18e5: 0x4000, 0x18e6: 0x4000, 0x18e7: 0x4000, 0x18e8: 0x4000, 0x18e9: 0x4000,
- 0x18ea: 0x4000, 0x18eb: 0x4000, 0x18ec: 0x4000, 0x18ed: 0x4000, 0x18ee: 0x4000, 0x18ef: 0x4000,
- 0x18f0: 0x4000, 0x18f1: 0x4000, 0x18f2: 0x4000, 0x18f3: 0x4000, 0x18f4: 0x4000, 0x18f5: 0x4000,
- 0x18f6: 0x4000, 0x18f7: 0x4000, 0x18f8: 0x4000, 0x18fa: 0x4000, 0x18fb: 0x4000,
- 0x18fc: 0x4000, 0x18fd: 0x4000, 0x18fe: 0x4000, 0x18ff: 0x4000,
- // Block 0x64, offset 0x1900
- 0x1900: 0x4000, 0x1901: 0x4000, 0x1902: 0x4000, 0x1903: 0x4000, 0x1904: 0x4000, 0x1905: 0x4000,
- 0x1906: 0x4000, 0x1907: 0x4000, 0x1908: 0x4000, 0x1909: 0x4000, 0x190a: 0x4000, 0x190b: 0x4000,
- 0x190d: 0x4000, 0x190e: 0x4000, 0x190f: 0x4000, 0x1910: 0x4000, 0x1911: 0x4000,
- 0x1912: 0x4000, 0x1913: 0x4000, 0x1914: 0x4000, 0x1915: 0x4000, 0x1916: 0x4000, 0x1917: 0x4000,
- 0x1918: 0x4000, 0x1919: 0x4000, 0x191a: 0x4000, 0x191b: 0x4000, 0x191c: 0x4000, 0x191d: 0x4000,
- 0x191e: 0x4000, 0x191f: 0x4000, 0x1920: 0x4000, 0x1921: 0x4000, 0x1922: 0x4000, 0x1923: 0x4000,
- 0x1924: 0x4000, 0x1925: 0x4000, 0x1926: 0x4000, 0x1927: 0x4000, 0x1928: 0x4000, 0x1929: 0x4000,
- 0x192a: 0x4000, 0x192b: 0x4000, 0x192c: 0x4000, 0x192d: 0x4000, 0x192e: 0x4000, 0x192f: 0x4000,
- 0x1930: 0x4000, 0x1931: 0x4000, 0x1932: 0x4000, 0x1933: 0x4000, 0x1934: 0x4000, 0x1935: 0x4000,
- 0x1936: 0x4000, 0x1937: 0x4000, 0x1938: 0x4000, 0x1939: 0x4000, 0x193a: 0x4000, 0x193b: 0x4000,
- 0x193c: 0x4000, 0x193d: 0x4000, 0x193e: 0x4000, 0x193f: 0x4000,
- // Block 0x65, offset 0x1940
- 0x1970: 0x4000, 0x1971: 0x4000, 0x1972: 0x4000, 0x1973: 0x4000, 0x1974: 0x4000,
- 0x1978: 0x4000, 0x1979: 0x4000, 0x197a: 0x4000,
- // Block 0x66, offset 0x1980
- 0x1980: 0x4000, 0x1981: 0x4000, 0x1982: 0x4000, 0x1983: 0x4000, 0x1984: 0x4000, 0x1985: 0x4000,
- 0x1986: 0x4000,
- 0x1990: 0x4000, 0x1991: 0x4000,
- 0x1992: 0x4000, 0x1993: 0x4000, 0x1994: 0x4000, 0x1995: 0x4000, 0x1996: 0x4000, 0x1997: 0x4000,
- 0x1998: 0x4000, 0x1999: 0x4000, 0x199a: 0x4000, 0x199b: 0x4000, 0x199c: 0x4000, 0x199d: 0x4000,
- 0x199e: 0x4000, 0x199f: 0x4000, 0x19a0: 0x4000, 0x19a1: 0x4000, 0x19a2: 0x4000, 0x19a3: 0x4000,
- 0x19a4: 0x4000, 0x19a5: 0x4000, 0x19a6: 0x4000, 0x19a7: 0x4000, 0x19a8: 0x4000,
- 0x19b0: 0x4000, 0x19b1: 0x4000, 0x19b2: 0x4000, 0x19b3: 0x4000, 0x19b4: 0x4000, 0x19b5: 0x4000,
- 0x19b6: 0x4000,
- // Block 0x67, offset 0x19c0
- 0x19c0: 0x4000, 0x19c1: 0x4000, 0x19c2: 0x4000,
- 0x19d0: 0x4000, 0x19d1: 0x4000,
- 0x19d2: 0x4000, 0x19d3: 0x4000, 0x19d4: 0x4000, 0x19d5: 0x4000, 0x19d6: 0x4000,
- // Block 0x68, offset 0x1a00
- 0x1a00: 0x2000, 0x1a01: 0x2000, 0x1a02: 0x2000, 0x1a03: 0x2000, 0x1a04: 0x2000, 0x1a05: 0x2000,
- 0x1a06: 0x2000, 0x1a07: 0x2000, 0x1a08: 0x2000, 0x1a09: 0x2000, 0x1a0a: 0x2000, 0x1a0b: 0x2000,
- 0x1a0c: 0x2000, 0x1a0d: 0x2000, 0x1a0e: 0x2000, 0x1a0f: 0x2000, 0x1a10: 0x2000, 0x1a11: 0x2000,
- 0x1a12: 0x2000, 0x1a13: 0x2000, 0x1a14: 0x2000, 0x1a15: 0x2000, 0x1a16: 0x2000, 0x1a17: 0x2000,
- 0x1a18: 0x2000, 0x1a19: 0x2000, 0x1a1a: 0x2000, 0x1a1b: 0x2000, 0x1a1c: 0x2000, 0x1a1d: 0x2000,
- 0x1a1e: 0x2000, 0x1a1f: 0x2000, 0x1a20: 0x2000, 0x1a21: 0x2000, 0x1a22: 0x2000, 0x1a23: 0x2000,
- 0x1a24: 0x2000, 0x1a25: 0x2000, 0x1a26: 0x2000, 0x1a27: 0x2000, 0x1a28: 0x2000, 0x1a29: 0x2000,
- 0x1a2a: 0x2000, 0x1a2b: 0x2000, 0x1a2c: 0x2000, 0x1a2d: 0x2000, 0x1a2e: 0x2000, 0x1a2f: 0x2000,
- 0x1a30: 0x2000, 0x1a31: 0x2000, 0x1a32: 0x2000, 0x1a33: 0x2000, 0x1a34: 0x2000, 0x1a35: 0x2000,
- 0x1a36: 0x2000, 0x1a37: 0x2000, 0x1a38: 0x2000, 0x1a39: 0x2000, 0x1a3a: 0x2000, 0x1a3b: 0x2000,
- 0x1a3c: 0x2000, 0x1a3d: 0x2000,
-}
-
-// widthIndex: 22 blocks, 1408 entries, 1408 bytes
-// Block 0 is the zero block.
-var widthIndex = [1408]uint8{
- // Block 0x0, offset 0x0
- // Block 0x1, offset 0x40
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc7: 0x05,
- 0xc9: 0x06, 0xcb: 0x07, 0xcc: 0x08, 0xcd: 0x09, 0xce: 0x0a, 0xcf: 0x0b,
- 0xd0: 0x0c, 0xd1: 0x0d,
- 0xe1: 0x02, 0xe2: 0x03, 0xe3: 0x04, 0xe4: 0x05, 0xe5: 0x06, 0xe6: 0x06, 0xe7: 0x06,
- 0xe8: 0x06, 0xe9: 0x06, 0xea: 0x07, 0xeb: 0x06, 0xec: 0x06, 0xed: 0x08, 0xee: 0x09, 0xef: 0x0a,
- 0xf0: 0x0f, 0xf3: 0x12, 0xf4: 0x13,
- // Block 0x4, offset 0x100
- 0x104: 0x0e, 0x105: 0x0f,
- // Block 0x5, offset 0x140
- 0x140: 0x10, 0x141: 0x11, 0x142: 0x12, 0x144: 0x13, 0x145: 0x14, 0x146: 0x15, 0x147: 0x16,
- 0x148: 0x17, 0x149: 0x18, 0x14a: 0x19, 0x14c: 0x1a, 0x14f: 0x1b,
- 0x151: 0x1c, 0x152: 0x08, 0x153: 0x1d, 0x154: 0x1e, 0x155: 0x1f, 0x156: 0x20, 0x157: 0x21,
- 0x158: 0x22, 0x159: 0x23, 0x15a: 0x24, 0x15b: 0x25, 0x15c: 0x26, 0x15d: 0x27, 0x15e: 0x28, 0x15f: 0x29,
- 0x166: 0x2a,
- 0x16c: 0x2b, 0x16d: 0x2c,
- 0x17a: 0x2d, 0x17b: 0x2e, 0x17c: 0x0e, 0x17d: 0x0e, 0x17e: 0x0e, 0x17f: 0x2f,
- // Block 0x6, offset 0x180
- 0x180: 0x30, 0x181: 0x31, 0x182: 0x32, 0x183: 0x33, 0x184: 0x34, 0x185: 0x35, 0x186: 0x36, 0x187: 0x37,
- 0x188: 0x38, 0x189: 0x39, 0x18a: 0x0e, 0x18b: 0x0e, 0x18c: 0x0e, 0x18d: 0x0e, 0x18e: 0x0e, 0x18f: 0x0e,
- 0x190: 0x0e, 0x191: 0x0e, 0x192: 0x0e, 0x193: 0x0e, 0x194: 0x0e, 0x195: 0x0e, 0x196: 0x0e, 0x197: 0x0e,
- 0x198: 0x0e, 0x199: 0x0e, 0x19a: 0x0e, 0x19b: 0x0e, 0x19c: 0x0e, 0x19d: 0x0e, 0x19e: 0x0e, 0x19f: 0x0e,
- 0x1a0: 0x0e, 0x1a1: 0x0e, 0x1a2: 0x0e, 0x1a3: 0x0e, 0x1a4: 0x0e, 0x1a5: 0x0e, 0x1a6: 0x0e, 0x1a7: 0x0e,
- 0x1a8: 0x0e, 0x1a9: 0x0e, 0x1aa: 0x0e, 0x1ab: 0x0e, 0x1ac: 0x0e, 0x1ad: 0x0e, 0x1ae: 0x0e, 0x1af: 0x0e,
- 0x1b0: 0x0e, 0x1b1: 0x0e, 0x1b2: 0x0e, 0x1b3: 0x0e, 0x1b4: 0x0e, 0x1b5: 0x0e, 0x1b6: 0x0e, 0x1b7: 0x0e,
- 0x1b8: 0x0e, 0x1b9: 0x0e, 0x1ba: 0x0e, 0x1bb: 0x0e, 0x1bc: 0x0e, 0x1bd: 0x0e, 0x1be: 0x0e, 0x1bf: 0x0e,
- // Block 0x7, offset 0x1c0
- 0x1c0: 0x0e, 0x1c1: 0x0e, 0x1c2: 0x0e, 0x1c3: 0x0e, 0x1c4: 0x0e, 0x1c5: 0x0e, 0x1c6: 0x0e, 0x1c7: 0x0e,
- 0x1c8: 0x0e, 0x1c9: 0x0e, 0x1ca: 0x0e, 0x1cb: 0x0e, 0x1cc: 0x0e, 0x1cd: 0x0e, 0x1ce: 0x0e, 0x1cf: 0x0e,
- 0x1d0: 0x0e, 0x1d1: 0x0e, 0x1d2: 0x0e, 0x1d3: 0x0e, 0x1d4: 0x0e, 0x1d5: 0x0e, 0x1d6: 0x0e, 0x1d7: 0x0e,
- 0x1d8: 0x0e, 0x1d9: 0x0e, 0x1da: 0x0e, 0x1db: 0x0e, 0x1dc: 0x0e, 0x1dd: 0x0e, 0x1de: 0x0e, 0x1df: 0x0e,
- 0x1e0: 0x0e, 0x1e1: 0x0e, 0x1e2: 0x0e, 0x1e3: 0x0e, 0x1e4: 0x0e, 0x1e5: 0x0e, 0x1e6: 0x0e, 0x1e7: 0x0e,
- 0x1e8: 0x0e, 0x1e9: 0x0e, 0x1ea: 0x0e, 0x1eb: 0x0e, 0x1ec: 0x0e, 0x1ed: 0x0e, 0x1ee: 0x0e, 0x1ef: 0x0e,
- 0x1f0: 0x0e, 0x1f1: 0x0e, 0x1f2: 0x0e, 0x1f3: 0x0e, 0x1f4: 0x0e, 0x1f5: 0x0e, 0x1f6: 0x0e,
- 0x1f8: 0x0e, 0x1f9: 0x0e, 0x1fa: 0x0e, 0x1fb: 0x0e, 0x1fc: 0x0e, 0x1fd: 0x0e, 0x1fe: 0x0e, 0x1ff: 0x0e,
- // Block 0x8, offset 0x200
- 0x200: 0x0e, 0x201: 0x0e, 0x202: 0x0e, 0x203: 0x0e, 0x204: 0x0e, 0x205: 0x0e, 0x206: 0x0e, 0x207: 0x0e,
- 0x208: 0x0e, 0x209: 0x0e, 0x20a: 0x0e, 0x20b: 0x0e, 0x20c: 0x0e, 0x20d: 0x0e, 0x20e: 0x0e, 0x20f: 0x0e,
- 0x210: 0x0e, 0x211: 0x0e, 0x212: 0x0e, 0x213: 0x0e, 0x214: 0x0e, 0x215: 0x0e, 0x216: 0x0e, 0x217: 0x0e,
- 0x218: 0x0e, 0x219: 0x0e, 0x21a: 0x0e, 0x21b: 0x0e, 0x21c: 0x0e, 0x21d: 0x0e, 0x21e: 0x0e, 0x21f: 0x0e,
- 0x220: 0x0e, 0x221: 0x0e, 0x222: 0x0e, 0x223: 0x0e, 0x224: 0x0e, 0x225: 0x0e, 0x226: 0x0e, 0x227: 0x0e,
- 0x228: 0x0e, 0x229: 0x0e, 0x22a: 0x0e, 0x22b: 0x0e, 0x22c: 0x0e, 0x22d: 0x0e, 0x22e: 0x0e, 0x22f: 0x0e,
- 0x230: 0x0e, 0x231: 0x0e, 0x232: 0x0e, 0x233: 0x0e, 0x234: 0x0e, 0x235: 0x0e, 0x236: 0x0e, 0x237: 0x0e,
- 0x238: 0x0e, 0x239: 0x0e, 0x23a: 0x0e, 0x23b: 0x0e, 0x23c: 0x0e, 0x23d: 0x0e, 0x23e: 0x0e, 0x23f: 0x0e,
- // Block 0x9, offset 0x240
- 0x240: 0x0e, 0x241: 0x0e, 0x242: 0x0e, 0x243: 0x0e, 0x244: 0x0e, 0x245: 0x0e, 0x246: 0x0e, 0x247: 0x0e,
- 0x248: 0x0e, 0x249: 0x0e, 0x24a: 0x0e, 0x24b: 0x0e, 0x24c: 0x0e, 0x24d: 0x0e, 0x24e: 0x0e, 0x24f: 0x0e,
- 0x250: 0x0e, 0x251: 0x0e, 0x252: 0x3a, 0x253: 0x3b,
- 0x265: 0x3c,
- 0x270: 0x0e, 0x271: 0x0e, 0x272: 0x0e, 0x273: 0x0e, 0x274: 0x0e, 0x275: 0x0e, 0x276: 0x0e, 0x277: 0x0e,
- 0x278: 0x0e, 0x279: 0x0e, 0x27a: 0x0e, 0x27b: 0x0e, 0x27c: 0x0e, 0x27d: 0x0e, 0x27e: 0x0e, 0x27f: 0x0e,
- // Block 0xa, offset 0x280
- 0x280: 0x0e, 0x281: 0x0e, 0x282: 0x0e, 0x283: 0x0e, 0x284: 0x0e, 0x285: 0x0e, 0x286: 0x0e, 0x287: 0x0e,
- 0x288: 0x0e, 0x289: 0x0e, 0x28a: 0x0e, 0x28b: 0x0e, 0x28c: 0x0e, 0x28d: 0x0e, 0x28e: 0x0e, 0x28f: 0x0e,
- 0x290: 0x0e, 0x291: 0x0e, 0x292: 0x0e, 0x293: 0x0e, 0x294: 0x0e, 0x295: 0x0e, 0x296: 0x0e, 0x297: 0x0e,
- 0x298: 0x0e, 0x299: 0x0e, 0x29a: 0x0e, 0x29b: 0x0e, 0x29c: 0x0e, 0x29d: 0x0e, 0x29e: 0x3d,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x08, 0x2c1: 0x08, 0x2c2: 0x08, 0x2c3: 0x08, 0x2c4: 0x08, 0x2c5: 0x08, 0x2c6: 0x08, 0x2c7: 0x08,
- 0x2c8: 0x08, 0x2c9: 0x08, 0x2ca: 0x08, 0x2cb: 0x08, 0x2cc: 0x08, 0x2cd: 0x08, 0x2ce: 0x08, 0x2cf: 0x08,
- 0x2d0: 0x08, 0x2d1: 0x08, 0x2d2: 0x08, 0x2d3: 0x08, 0x2d4: 0x08, 0x2d5: 0x08, 0x2d6: 0x08, 0x2d7: 0x08,
- 0x2d8: 0x08, 0x2d9: 0x08, 0x2da: 0x08, 0x2db: 0x08, 0x2dc: 0x08, 0x2dd: 0x08, 0x2de: 0x08, 0x2df: 0x08,
- 0x2e0: 0x08, 0x2e1: 0x08, 0x2e2: 0x08, 0x2e3: 0x08, 0x2e4: 0x08, 0x2e5: 0x08, 0x2e6: 0x08, 0x2e7: 0x08,
- 0x2e8: 0x08, 0x2e9: 0x08, 0x2ea: 0x08, 0x2eb: 0x08, 0x2ec: 0x08, 0x2ed: 0x08, 0x2ee: 0x08, 0x2ef: 0x08,
- 0x2f0: 0x08, 0x2f1: 0x08, 0x2f2: 0x08, 0x2f3: 0x08, 0x2f4: 0x08, 0x2f5: 0x08, 0x2f6: 0x08, 0x2f7: 0x08,
- 0x2f8: 0x08, 0x2f9: 0x08, 0x2fa: 0x08, 0x2fb: 0x08, 0x2fc: 0x08, 0x2fd: 0x08, 0x2fe: 0x08, 0x2ff: 0x08,
- // Block 0xc, offset 0x300
- 0x300: 0x08, 0x301: 0x08, 0x302: 0x08, 0x303: 0x08, 0x304: 0x08, 0x305: 0x08, 0x306: 0x08, 0x307: 0x08,
- 0x308: 0x08, 0x309: 0x08, 0x30a: 0x08, 0x30b: 0x08, 0x30c: 0x08, 0x30d: 0x08, 0x30e: 0x08, 0x30f: 0x08,
- 0x310: 0x08, 0x311: 0x08, 0x312: 0x08, 0x313: 0x08, 0x314: 0x08, 0x315: 0x08, 0x316: 0x08, 0x317: 0x08,
- 0x318: 0x08, 0x319: 0x08, 0x31a: 0x08, 0x31b: 0x08, 0x31c: 0x08, 0x31d: 0x08, 0x31e: 0x08, 0x31f: 0x08,
- 0x320: 0x08, 0x321: 0x08, 0x322: 0x08, 0x323: 0x08, 0x324: 0x0e, 0x325: 0x0e, 0x326: 0x0e, 0x327: 0x0e,
- 0x328: 0x0e, 0x329: 0x0e, 0x32a: 0x0e, 0x32b: 0x0e,
- 0x338: 0x3e, 0x339: 0x3f, 0x33c: 0x40, 0x33d: 0x41, 0x33e: 0x42, 0x33f: 0x43,
- // Block 0xd, offset 0x340
- 0x37f: 0x44,
- // Block 0xe, offset 0x380
- 0x380: 0x0e, 0x381: 0x0e, 0x382: 0x0e, 0x383: 0x0e, 0x384: 0x0e, 0x385: 0x0e, 0x386: 0x0e, 0x387: 0x0e,
- 0x388: 0x0e, 0x389: 0x0e, 0x38a: 0x0e, 0x38b: 0x0e, 0x38c: 0x0e, 0x38d: 0x0e, 0x38e: 0x0e, 0x38f: 0x0e,
- 0x390: 0x0e, 0x391: 0x0e, 0x392: 0x0e, 0x393: 0x0e, 0x394: 0x0e, 0x395: 0x0e, 0x396: 0x0e, 0x397: 0x0e,
- 0x398: 0x0e, 0x399: 0x0e, 0x39a: 0x0e, 0x39b: 0x0e, 0x39c: 0x0e, 0x39d: 0x0e, 0x39e: 0x0e, 0x39f: 0x45,
- 0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e,
- 0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x0e, 0x3ac: 0x0e, 0x3ad: 0x0e, 0x3ae: 0x0e, 0x3af: 0x0e,
- 0x3b0: 0x0e, 0x3b1: 0x0e, 0x3b2: 0x0e, 0x3b3: 0x46, 0x3b4: 0x47,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x0e, 0x3c1: 0x0e, 0x3c2: 0x0e, 0x3c3: 0x0e, 0x3c4: 0x48, 0x3c5: 0x49, 0x3c6: 0x0e, 0x3c7: 0x0e,
- 0x3c8: 0x0e, 0x3c9: 0x0e, 0x3ca: 0x0e, 0x3cb: 0x4a,
- // Block 0x10, offset 0x400
- 0x400: 0x4b, 0x403: 0x4c, 0x404: 0x4d, 0x405: 0x4e, 0x406: 0x4f,
- 0x408: 0x50, 0x409: 0x51, 0x40c: 0x52, 0x40d: 0x53, 0x40e: 0x54, 0x40f: 0x55,
- 0x410: 0x56, 0x411: 0x57, 0x412: 0x0e, 0x413: 0x58, 0x414: 0x59, 0x415: 0x5a, 0x416: 0x5b, 0x417: 0x5c,
- 0x418: 0x0e, 0x419: 0x5d, 0x41a: 0x0e, 0x41b: 0x5e, 0x41f: 0x5f,
- 0x424: 0x60, 0x425: 0x61, 0x426: 0x0e, 0x427: 0x62,
- 0x429: 0x63, 0x42a: 0x64, 0x42b: 0x65,
- // Block 0x11, offset 0x440
- 0x456: 0x0b, 0x457: 0x06,
- 0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e,
- 0x460: 0x06, 0x461: 0x06, 0x462: 0x06, 0x463: 0x06, 0x464: 0x06, 0x465: 0x06, 0x466: 0x06, 0x467: 0x06,
- 0x468: 0x06, 0x469: 0x06, 0x46a: 0x06, 0x46b: 0x06, 0x46c: 0x06, 0x46d: 0x06, 0x46e: 0x06, 0x46f: 0x06,
- 0x470: 0x06, 0x471: 0x06, 0x472: 0x06, 0x473: 0x06, 0x474: 0x06, 0x475: 0x06, 0x476: 0x06, 0x477: 0x06,
- 0x478: 0x06, 0x479: 0x06, 0x47a: 0x06, 0x47b: 0x06, 0x47c: 0x06, 0x47d: 0x06, 0x47e: 0x06, 0x47f: 0x06,
- // Block 0x12, offset 0x480
- 0x484: 0x08, 0x485: 0x08, 0x486: 0x08, 0x487: 0x09,
- // Block 0x13, offset 0x4c0
- 0x4c0: 0x08, 0x4c1: 0x08, 0x4c2: 0x08, 0x4c3: 0x08, 0x4c4: 0x08, 0x4c5: 0x08, 0x4c6: 0x08, 0x4c7: 0x08,
- 0x4c8: 0x08, 0x4c9: 0x08, 0x4ca: 0x08, 0x4cb: 0x08, 0x4cc: 0x08, 0x4cd: 0x08, 0x4ce: 0x08, 0x4cf: 0x08,
- 0x4d0: 0x08, 0x4d1: 0x08, 0x4d2: 0x08, 0x4d3: 0x08, 0x4d4: 0x08, 0x4d5: 0x08, 0x4d6: 0x08, 0x4d7: 0x08,
- 0x4d8: 0x08, 0x4d9: 0x08, 0x4da: 0x08, 0x4db: 0x08, 0x4dc: 0x08, 0x4dd: 0x08, 0x4de: 0x08, 0x4df: 0x08,
- 0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08,
- 0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08,
- 0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08,
- 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x66,
- // Block 0x14, offset 0x500
- 0x520: 0x10,
- 0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09,
- 0x538: 0x09, 0x539: 0x09, 0x53a: 0x09, 0x53b: 0x09, 0x53c: 0x09, 0x53d: 0x09, 0x53e: 0x09, 0x53f: 0x11,
- // Block 0x15, offset 0x540
- 0x540: 0x09, 0x541: 0x09, 0x542: 0x09, 0x543: 0x09, 0x544: 0x09, 0x545: 0x09, 0x546: 0x09, 0x547: 0x09,
- 0x548: 0x09, 0x549: 0x09, 0x54a: 0x09, 0x54b: 0x09, 0x54c: 0x09, 0x54d: 0x09, 0x54e: 0x09, 0x54f: 0x11,
-}
-
-// inverseData contains 4-byte entries of the following format:
-// <0 padding>
-// The last byte of the UTF-8-encoded rune is xor-ed with the last byte of the
-// UTF-8 encoding of the original rune. Mappings often have the following
-// pattern:
-// A -> A (U+FF21 -> U+0041)
-// B -> B (U+FF22 -> U+0042)
-// ...
-// By xor-ing the last byte the same entry can be shared by many mappings. This
-// reduces the total number of distinct entries by about two thirds.
-// The resulting entry for the aforementioned mappings is
-// { 0x01, 0xE0, 0x00, 0x00 }
-// Using this entry to map U+FF21 (UTF-8 [EF BC A1]), we get
-// E0 ^ A1 = 41.
-// Similarly, for U+FF22 (UTF-8 [EF BC A2]), we get
-// E0 ^ A2 = 42.
-// Note that because of the xor-ing, the byte sequence stored in the entry is
-// not valid UTF-8.
-var inverseData = [150][4]byte{
- {0x00, 0x00, 0x00, 0x00},
- {0x03, 0xe3, 0x80, 0xa0},
- {0x03, 0xef, 0xbc, 0xa0},
- {0x03, 0xef, 0xbc, 0xe0},
- {0x03, 0xef, 0xbd, 0xe0},
- {0x03, 0xef, 0xbf, 0x02},
- {0x03, 0xef, 0xbf, 0x00},
- {0x03, 0xef, 0xbf, 0x0e},
- {0x03, 0xef, 0xbf, 0x0c},
- {0x03, 0xef, 0xbf, 0x0f},
- {0x03, 0xef, 0xbf, 0x39},
- {0x03, 0xef, 0xbf, 0x3b},
- {0x03, 0xef, 0xbf, 0x3f},
- {0x03, 0xef, 0xbf, 0x2a},
- {0x03, 0xef, 0xbf, 0x0d},
- {0x03, 0xef, 0xbf, 0x25},
- {0x03, 0xef, 0xbd, 0x1a},
- {0x03, 0xef, 0xbd, 0x26},
- {0x01, 0xa0, 0x00, 0x00},
- {0x03, 0xef, 0xbd, 0x25},
- {0x03, 0xef, 0xbd, 0x23},
- {0x03, 0xef, 0xbd, 0x2e},
- {0x03, 0xef, 0xbe, 0x07},
- {0x03, 0xef, 0xbe, 0x05},
- {0x03, 0xef, 0xbd, 0x06},
- {0x03, 0xef, 0xbd, 0x13},
- {0x03, 0xef, 0xbd, 0x0b},
- {0x03, 0xef, 0xbd, 0x16},
- {0x03, 0xef, 0xbd, 0x0c},
- {0x03, 0xef, 0xbd, 0x15},
- {0x03, 0xef, 0xbd, 0x0d},
- {0x03, 0xef, 0xbd, 0x1c},
- {0x03, 0xef, 0xbd, 0x02},
- {0x03, 0xef, 0xbd, 0x1f},
- {0x03, 0xef, 0xbd, 0x1d},
- {0x03, 0xef, 0xbd, 0x17},
- {0x03, 0xef, 0xbd, 0x08},
- {0x03, 0xef, 0xbd, 0x09},
- {0x03, 0xef, 0xbd, 0x0e},
- {0x03, 0xef, 0xbd, 0x04},
- {0x03, 0xef, 0xbd, 0x05},
- {0x03, 0xef, 0xbe, 0x3f},
- {0x03, 0xef, 0xbe, 0x00},
- {0x03, 0xef, 0xbd, 0x2c},
- {0x03, 0xef, 0xbe, 0x06},
- {0x03, 0xef, 0xbe, 0x0c},
- {0x03, 0xef, 0xbe, 0x0f},
- {0x03, 0xef, 0xbe, 0x0d},
- {0x03, 0xef, 0xbe, 0x0b},
- {0x03, 0xef, 0xbe, 0x19},
- {0x03, 0xef, 0xbe, 0x15},
- {0x03, 0xef, 0xbe, 0x11},
- {0x03, 0xef, 0xbe, 0x31},
- {0x03, 0xef, 0xbe, 0x33},
- {0x03, 0xef, 0xbd, 0x0f},
- {0x03, 0xef, 0xbe, 0x30},
- {0x03, 0xef, 0xbe, 0x3e},
- {0x03, 0xef, 0xbe, 0x32},
- {0x03, 0xef, 0xbe, 0x36},
- {0x03, 0xef, 0xbd, 0x14},
- {0x03, 0xef, 0xbe, 0x2e},
- {0x03, 0xef, 0xbd, 0x1e},
- {0x03, 0xef, 0xbe, 0x10},
- {0x03, 0xef, 0xbf, 0x13},
- {0x03, 0xef, 0xbf, 0x15},
- {0x03, 0xef, 0xbf, 0x17},
- {0x03, 0xef, 0xbf, 0x1f},
- {0x03, 0xef, 0xbf, 0x1d},
- {0x03, 0xef, 0xbf, 0x1b},
- {0x03, 0xef, 0xbf, 0x09},
- {0x03, 0xef, 0xbf, 0x0b},
- {0x03, 0xef, 0xbf, 0x37},
- {0x03, 0xef, 0xbe, 0x04},
- {0x01, 0xe0, 0x00, 0x00},
- {0x03, 0xe2, 0xa6, 0x1a},
- {0x03, 0xe2, 0xa6, 0x26},
- {0x03, 0xe3, 0x80, 0x23},
- {0x03, 0xe3, 0x80, 0x2e},
- {0x03, 0xe3, 0x80, 0x25},
- {0x03, 0xe3, 0x83, 0x1e},
- {0x03, 0xe3, 0x83, 0x14},
- {0x03, 0xe3, 0x82, 0x06},
- {0x03, 0xe3, 0x82, 0x0b},
- {0x03, 0xe3, 0x82, 0x0c},
- {0x03, 0xe3, 0x82, 0x0d},
- {0x03, 0xe3, 0x82, 0x02},
- {0x03, 0xe3, 0x83, 0x0f},
- {0x03, 0xe3, 0x83, 0x08},
- {0x03, 0xe3, 0x83, 0x09},
- {0x03, 0xe3, 0x83, 0x2c},
- {0x03, 0xe3, 0x83, 0x0c},
- {0x03, 0xe3, 0x82, 0x13},
- {0x03, 0xe3, 0x82, 0x16},
- {0x03, 0xe3, 0x82, 0x15},
- {0x03, 0xe3, 0x82, 0x1c},
- {0x03, 0xe3, 0x82, 0x1f},
- {0x03, 0xe3, 0x82, 0x1d},
- {0x03, 0xe3, 0x82, 0x1a},
- {0x03, 0xe3, 0x82, 0x17},
- {0x03, 0xe3, 0x82, 0x08},
- {0x03, 0xe3, 0x82, 0x09},
- {0x03, 0xe3, 0x82, 0x0e},
- {0x03, 0xe3, 0x82, 0x04},
- {0x03, 0xe3, 0x82, 0x05},
- {0x03, 0xe3, 0x82, 0x3f},
- {0x03, 0xe3, 0x83, 0x00},
- {0x03, 0xe3, 0x83, 0x06},
- {0x03, 0xe3, 0x83, 0x05},
- {0x03, 0xe3, 0x83, 0x0d},
- {0x03, 0xe3, 0x83, 0x0b},
- {0x03, 0xe3, 0x83, 0x07},
- {0x03, 0xe3, 0x83, 0x19},
- {0x03, 0xe3, 0x83, 0x15},
- {0x03, 0xe3, 0x83, 0x11},
- {0x03, 0xe3, 0x83, 0x31},
- {0x03, 0xe3, 0x83, 0x33},
- {0x03, 0xe3, 0x83, 0x30},
- {0x03, 0xe3, 0x83, 0x3e},
- {0x03, 0xe3, 0x83, 0x32},
- {0x03, 0xe3, 0x83, 0x36},
- {0x03, 0xe3, 0x83, 0x2e},
- {0x03, 0xe3, 0x82, 0x07},
- {0x03, 0xe3, 0x85, 0x04},
- {0x03, 0xe3, 0x84, 0x10},
- {0x03, 0xe3, 0x85, 0x30},
- {0x03, 0xe3, 0x85, 0x0d},
- {0x03, 0xe3, 0x85, 0x13},
- {0x03, 0xe3, 0x85, 0x15},
- {0x03, 0xe3, 0x85, 0x17},
- {0x03, 0xe3, 0x85, 0x1f},
- {0x03, 0xe3, 0x85, 0x1d},
- {0x03, 0xe3, 0x85, 0x1b},
- {0x03, 0xe3, 0x85, 0x09},
- {0x03, 0xe3, 0x85, 0x0f},
- {0x03, 0xe3, 0x85, 0x0b},
- {0x03, 0xe3, 0x85, 0x37},
- {0x03, 0xe3, 0x85, 0x3b},
- {0x03, 0xe3, 0x85, 0x39},
- {0x03, 0xe3, 0x85, 0x3f},
- {0x02, 0xc2, 0x02, 0x00},
- {0x02, 0xc2, 0x0e, 0x00},
- {0x02, 0xc2, 0x0c, 0x00},
- {0x02, 0xc2, 0x00, 0x00},
- {0x03, 0xe2, 0x82, 0x0f},
- {0x03, 0xe2, 0x94, 0x2a},
- {0x03, 0xe2, 0x86, 0x39},
- {0x03, 0xe2, 0x86, 0x3b},
- {0x03, 0xe2, 0x86, 0x3f},
- {0x03, 0xe2, 0x96, 0x0d},
- {0x03, 0xe2, 0x97, 0x25},
-}
-
-// Total table size 15448 bytes (15KiB)
diff --git a/vendor/golang.org/x/text/width/tables9.0.0.go b/vendor/golang.org/x/text/width/tables9.0.0.go
deleted file mode 100644
index b3db84f6..00000000
--- a/vendor/golang.org/x/text/width/tables9.0.0.go
+++ /dev/null
@@ -1,1287 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-//go:build !go1.10
-// +build !go1.10
-
-package width
-
-// UnicodeVersion is the Unicode version from which the tables in this package are derived.
-const UnicodeVersion = "9.0.0"
-
-// lookup returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookup(s []byte) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupUnsafe(s []byte) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// lookupString returns the trie value for the first UTF-8 encoding in s and
-// the width in bytes of this encoding. The size will be 0 if s does not
-// hold enough bytes to complete the encoding. len(s) must be greater than 0.
-func (t *widthTrie) lookupString(s string) (v uint16, sz int) {
- c0 := s[0]
- switch {
- case c0 < 0x80: // is ASCII
- return widthValues[c0], 1
- case c0 < 0xC2:
- return 0, 1 // Illegal UTF-8: not a starter, not ASCII.
- case c0 < 0xE0: // 2-byte UTF-8
- if len(s) < 2 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c1), 2
- case c0 < 0xF0: // 3-byte UTF-8
- if len(s) < 3 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c2), 3
- case c0 < 0xF8: // 4-byte UTF-8
- if len(s) < 4 {
- return 0, 0
- }
- i := widthIndex[c0]
- c1 := s[1]
- if c1 < 0x80 || 0xC0 <= c1 {
- return 0, 1 // Illegal UTF-8: not a continuation byte.
- }
- o := uint32(i)<<6 + uint32(c1)
- i = widthIndex[o]
- c2 := s[2]
- if c2 < 0x80 || 0xC0 <= c2 {
- return 0, 2 // Illegal UTF-8: not a continuation byte.
- }
- o = uint32(i)<<6 + uint32(c2)
- i = widthIndex[o]
- c3 := s[3]
- if c3 < 0x80 || 0xC0 <= c3 {
- return 0, 3 // Illegal UTF-8: not a continuation byte.
- }
- return t.lookupValue(uint32(i), c3), 4
- }
- // Illegal rune
- return 0, 1
-}
-
-// lookupStringUnsafe returns the trie value for the first UTF-8 encoding in s.
-// s must start with a full and valid UTF-8 encoded rune.
-func (t *widthTrie) lookupStringUnsafe(s string) uint16 {
- c0 := s[0]
- if c0 < 0x80 { // is ASCII
- return widthValues[c0]
- }
- i := widthIndex[c0]
- if c0 < 0xE0 { // 2-byte UTF-8
- return t.lookupValue(uint32(i), s[1])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[1])]
- if c0 < 0xF0 { // 3-byte UTF-8
- return t.lookupValue(uint32(i), s[2])
- }
- i = widthIndex[uint32(i)<<6+uint32(s[2])]
- if c0 < 0xF8 { // 4-byte UTF-8
- return t.lookupValue(uint32(i), s[3])
- }
- return 0
-}
-
-// widthTrie. Total size: 14080 bytes (13.75 KiB). Checksum: 3b8aeb3dc03667a3.
-type widthTrie struct{}
-
-func newWidthTrie(i int) *widthTrie {
- return &widthTrie{}
-}
-
-// lookupValue determines the type of block n and looks up the value for b.
-func (t *widthTrie) lookupValue(n uint32, b byte) uint16 {
- switch {
- default:
- return uint16(widthValues[n<<6+uint32(b)])
- }
-}
-
-// widthValues: 99 blocks, 6336 entries, 12672 bytes
-// The third block is the zero block.
-var widthValues = [6336]uint16{
- // Block 0x0, offset 0x0
- 0x20: 0x6001, 0x21: 0x6002, 0x22: 0x6002, 0x23: 0x6002,
- 0x24: 0x6002, 0x25: 0x6002, 0x26: 0x6002, 0x27: 0x6002, 0x28: 0x6002, 0x29: 0x6002,
- 0x2a: 0x6002, 0x2b: 0x6002, 0x2c: 0x6002, 0x2d: 0x6002, 0x2e: 0x6002, 0x2f: 0x6002,
- 0x30: 0x6002, 0x31: 0x6002, 0x32: 0x6002, 0x33: 0x6002, 0x34: 0x6002, 0x35: 0x6002,
- 0x36: 0x6002, 0x37: 0x6002, 0x38: 0x6002, 0x39: 0x6002, 0x3a: 0x6002, 0x3b: 0x6002,
- 0x3c: 0x6002, 0x3d: 0x6002, 0x3e: 0x6002, 0x3f: 0x6002,
- // Block 0x1, offset 0x40
- 0x40: 0x6003, 0x41: 0x6003, 0x42: 0x6003, 0x43: 0x6003, 0x44: 0x6003, 0x45: 0x6003,
- 0x46: 0x6003, 0x47: 0x6003, 0x48: 0x6003, 0x49: 0x6003, 0x4a: 0x6003, 0x4b: 0x6003,
- 0x4c: 0x6003, 0x4d: 0x6003, 0x4e: 0x6003, 0x4f: 0x6003, 0x50: 0x6003, 0x51: 0x6003,
- 0x52: 0x6003, 0x53: 0x6003, 0x54: 0x6003, 0x55: 0x6003, 0x56: 0x6003, 0x57: 0x6003,
- 0x58: 0x6003, 0x59: 0x6003, 0x5a: 0x6003, 0x5b: 0x6003, 0x5c: 0x6003, 0x5d: 0x6003,
- 0x5e: 0x6003, 0x5f: 0x6003, 0x60: 0x6004, 0x61: 0x6004, 0x62: 0x6004, 0x63: 0x6004,
- 0x64: 0x6004, 0x65: 0x6004, 0x66: 0x6004, 0x67: 0x6004, 0x68: 0x6004, 0x69: 0x6004,
- 0x6a: 0x6004, 0x6b: 0x6004, 0x6c: 0x6004, 0x6d: 0x6004, 0x6e: 0x6004, 0x6f: 0x6004,
- 0x70: 0x6004, 0x71: 0x6004, 0x72: 0x6004, 0x73: 0x6004, 0x74: 0x6004, 0x75: 0x6004,
- 0x76: 0x6004, 0x77: 0x6004, 0x78: 0x6004, 0x79: 0x6004, 0x7a: 0x6004, 0x7b: 0x6004,
- 0x7c: 0x6004, 0x7d: 0x6004, 0x7e: 0x6004,
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xe1: 0x2000, 0xe2: 0x6005, 0xe3: 0x6005,
- 0xe4: 0x2000, 0xe5: 0x6006, 0xe6: 0x6005, 0xe7: 0x2000, 0xe8: 0x2000,
- 0xea: 0x2000, 0xec: 0x6007, 0xed: 0x2000, 0xee: 0x2000, 0xef: 0x6008,
- 0xf0: 0x2000, 0xf1: 0x2000, 0xf2: 0x2000, 0xf3: 0x2000, 0xf4: 0x2000,
- 0xf6: 0x2000, 0xf7: 0x2000, 0xf8: 0x2000, 0xf9: 0x2000, 0xfa: 0x2000,
- 0xfc: 0x2000, 0xfd: 0x2000, 0xfe: 0x2000, 0xff: 0x2000,
- // Block 0x4, offset 0x100
- 0x106: 0x2000,
- 0x110: 0x2000,
- 0x117: 0x2000,
- 0x118: 0x2000,
- 0x11e: 0x2000, 0x11f: 0x2000, 0x120: 0x2000, 0x121: 0x2000,
- 0x126: 0x2000, 0x128: 0x2000, 0x129: 0x2000,
- 0x12a: 0x2000, 0x12c: 0x2000, 0x12d: 0x2000,
- 0x130: 0x2000, 0x132: 0x2000, 0x133: 0x2000,
- 0x137: 0x2000, 0x138: 0x2000, 0x139: 0x2000, 0x13a: 0x2000,
- 0x13c: 0x2000, 0x13e: 0x2000,
- // Block 0x5, offset 0x140
- 0x141: 0x2000,
- 0x151: 0x2000,
- 0x153: 0x2000,
- 0x15b: 0x2000,
- 0x166: 0x2000, 0x167: 0x2000,
- 0x16b: 0x2000,
- 0x171: 0x2000, 0x172: 0x2000, 0x173: 0x2000,
- 0x178: 0x2000,
- 0x17f: 0x2000,
- // Block 0x6, offset 0x180
- 0x180: 0x2000, 0x181: 0x2000, 0x182: 0x2000, 0x184: 0x2000,
- 0x188: 0x2000, 0x189: 0x2000, 0x18a: 0x2000, 0x18b: 0x2000,
- 0x18d: 0x2000,
- 0x192: 0x2000, 0x193: 0x2000,
- 0x1a6: 0x2000, 0x1a7: 0x2000,
- 0x1ab: 0x2000,
- // Block 0x7, offset 0x1c0
- 0x1ce: 0x2000, 0x1d0: 0x2000,
- 0x1d2: 0x2000, 0x1d4: 0x2000, 0x1d6: 0x2000,
- 0x1d8: 0x2000, 0x1da: 0x2000, 0x1dc: 0x2000,
- // Block 0x8, offset 0x200
- 0x211: 0x2000,
- 0x221: 0x2000,
- // Block 0x9, offset 0x240
- 0x244: 0x2000,
- 0x247: 0x2000, 0x249: 0x2000, 0x24a: 0x2000, 0x24b: 0x2000,
- 0x24d: 0x2000, 0x250: 0x2000,
- 0x258: 0x2000, 0x259: 0x2000, 0x25a: 0x2000, 0x25b: 0x2000, 0x25d: 0x2000,
- 0x25f: 0x2000,
- // Block 0xa, offset 0x280
- 0x280: 0x2000, 0x281: 0x2000, 0x282: 0x2000, 0x283: 0x2000, 0x284: 0x2000, 0x285: 0x2000,
- 0x286: 0x2000, 0x287: 0x2000, 0x288: 0x2000, 0x289: 0x2000, 0x28a: 0x2000, 0x28b: 0x2000,
- 0x28c: 0x2000, 0x28d: 0x2000, 0x28e: 0x2000, 0x28f: 0x2000, 0x290: 0x2000, 0x291: 0x2000,
- 0x292: 0x2000, 0x293: 0x2000, 0x294: 0x2000, 0x295: 0x2000, 0x296: 0x2000, 0x297: 0x2000,
- 0x298: 0x2000, 0x299: 0x2000, 0x29a: 0x2000, 0x29b: 0x2000, 0x29c: 0x2000, 0x29d: 0x2000,
- 0x29e: 0x2000, 0x29f: 0x2000, 0x2a0: 0x2000, 0x2a1: 0x2000, 0x2a2: 0x2000, 0x2a3: 0x2000,
- 0x2a4: 0x2000, 0x2a5: 0x2000, 0x2a6: 0x2000, 0x2a7: 0x2000, 0x2a8: 0x2000, 0x2a9: 0x2000,
- 0x2aa: 0x2000, 0x2ab: 0x2000, 0x2ac: 0x2000, 0x2ad: 0x2000, 0x2ae: 0x2000, 0x2af: 0x2000,
- 0x2b0: 0x2000, 0x2b1: 0x2000, 0x2b2: 0x2000, 0x2b3: 0x2000, 0x2b4: 0x2000, 0x2b5: 0x2000,
- 0x2b6: 0x2000, 0x2b7: 0x2000, 0x2b8: 0x2000, 0x2b9: 0x2000, 0x2ba: 0x2000, 0x2bb: 0x2000,
- 0x2bc: 0x2000, 0x2bd: 0x2000, 0x2be: 0x2000, 0x2bf: 0x2000,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x2000, 0x2c1: 0x2000, 0x2c2: 0x2000, 0x2c3: 0x2000, 0x2c4: 0x2000, 0x2c5: 0x2000,
- 0x2c6: 0x2000, 0x2c7: 0x2000, 0x2c8: 0x2000, 0x2c9: 0x2000, 0x2ca: 0x2000, 0x2cb: 0x2000,
- 0x2cc: 0x2000, 0x2cd: 0x2000, 0x2ce: 0x2000, 0x2cf: 0x2000, 0x2d0: 0x2000, 0x2d1: 0x2000,
- 0x2d2: 0x2000, 0x2d3: 0x2000, 0x2d4: 0x2000, 0x2d5: 0x2000, 0x2d6: 0x2000, 0x2d7: 0x2000,
- 0x2d8: 0x2000, 0x2d9: 0x2000, 0x2da: 0x2000, 0x2db: 0x2000, 0x2dc: 0x2000, 0x2dd: 0x2000,
- 0x2de: 0x2000, 0x2df: 0x2000, 0x2e0: 0x2000, 0x2e1: 0x2000, 0x2e2: 0x2000, 0x2e3: 0x2000,
- 0x2e4: 0x2000, 0x2e5: 0x2000, 0x2e6: 0x2000, 0x2e7: 0x2000, 0x2e8: 0x2000, 0x2e9: 0x2000,
- 0x2ea: 0x2000, 0x2eb: 0x2000, 0x2ec: 0x2000, 0x2ed: 0x2000, 0x2ee: 0x2000, 0x2ef: 0x2000,
- // Block 0xc, offset 0x300
- 0x311: 0x2000,
- 0x312: 0x2000, 0x313: 0x2000, 0x314: 0x2000, 0x315: 0x2000, 0x316: 0x2000, 0x317: 0x2000,
- 0x318: 0x2000, 0x319: 0x2000, 0x31a: 0x2000, 0x31b: 0x2000, 0x31c: 0x2000, 0x31d: 0x2000,
- 0x31e: 0x2000, 0x31f: 0x2000, 0x320: 0x2000, 0x321: 0x2000, 0x323: 0x2000,
- 0x324: 0x2000, 0x325: 0x2000, 0x326: 0x2000, 0x327: 0x2000, 0x328: 0x2000, 0x329: 0x2000,
- 0x331: 0x2000, 0x332: 0x2000, 0x333: 0x2000, 0x334: 0x2000, 0x335: 0x2000,
- 0x336: 0x2000, 0x337: 0x2000, 0x338: 0x2000, 0x339: 0x2000, 0x33a: 0x2000, 0x33b: 0x2000,
- 0x33c: 0x2000, 0x33d: 0x2000, 0x33e: 0x2000, 0x33f: 0x2000,
- // Block 0xd, offset 0x340
- 0x340: 0x2000, 0x341: 0x2000, 0x343: 0x2000, 0x344: 0x2000, 0x345: 0x2000,
- 0x346: 0x2000, 0x347: 0x2000, 0x348: 0x2000, 0x349: 0x2000,
- // Block 0xe, offset 0x380
- 0x381: 0x2000,
- 0x390: 0x2000, 0x391: 0x2000,
- 0x392: 0x2000, 0x393: 0x2000, 0x394: 0x2000, 0x395: 0x2000, 0x396: 0x2000, 0x397: 0x2000,
- 0x398: 0x2000, 0x399: 0x2000, 0x39a: 0x2000, 0x39b: 0x2000, 0x39c: 0x2000, 0x39d: 0x2000,
- 0x39e: 0x2000, 0x39f: 0x2000, 0x3a0: 0x2000, 0x3a1: 0x2000, 0x3a2: 0x2000, 0x3a3: 0x2000,
- 0x3a4: 0x2000, 0x3a5: 0x2000, 0x3a6: 0x2000, 0x3a7: 0x2000, 0x3a8: 0x2000, 0x3a9: 0x2000,
- 0x3aa: 0x2000, 0x3ab: 0x2000, 0x3ac: 0x2000, 0x3ad: 0x2000, 0x3ae: 0x2000, 0x3af: 0x2000,
- 0x3b0: 0x2000, 0x3b1: 0x2000, 0x3b2: 0x2000, 0x3b3: 0x2000, 0x3b4: 0x2000, 0x3b5: 0x2000,
- 0x3b6: 0x2000, 0x3b7: 0x2000, 0x3b8: 0x2000, 0x3b9: 0x2000, 0x3ba: 0x2000, 0x3bb: 0x2000,
- 0x3bc: 0x2000, 0x3bd: 0x2000, 0x3be: 0x2000, 0x3bf: 0x2000,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x2000, 0x3c1: 0x2000, 0x3c2: 0x2000, 0x3c3: 0x2000, 0x3c4: 0x2000, 0x3c5: 0x2000,
- 0x3c6: 0x2000, 0x3c7: 0x2000, 0x3c8: 0x2000, 0x3c9: 0x2000, 0x3ca: 0x2000, 0x3cb: 0x2000,
- 0x3cc: 0x2000, 0x3cd: 0x2000, 0x3ce: 0x2000, 0x3cf: 0x2000, 0x3d1: 0x2000,
- // Block 0x10, offset 0x400
- 0x400: 0x4000, 0x401: 0x4000, 0x402: 0x4000, 0x403: 0x4000, 0x404: 0x4000, 0x405: 0x4000,
- 0x406: 0x4000, 0x407: 0x4000, 0x408: 0x4000, 0x409: 0x4000, 0x40a: 0x4000, 0x40b: 0x4000,
- 0x40c: 0x4000, 0x40d: 0x4000, 0x40e: 0x4000, 0x40f: 0x4000, 0x410: 0x4000, 0x411: 0x4000,
- 0x412: 0x4000, 0x413: 0x4000, 0x414: 0x4000, 0x415: 0x4000, 0x416: 0x4000, 0x417: 0x4000,
- 0x418: 0x4000, 0x419: 0x4000, 0x41a: 0x4000, 0x41b: 0x4000, 0x41c: 0x4000, 0x41d: 0x4000,
- 0x41e: 0x4000, 0x41f: 0x4000, 0x420: 0x4000, 0x421: 0x4000, 0x422: 0x4000, 0x423: 0x4000,
- 0x424: 0x4000, 0x425: 0x4000, 0x426: 0x4000, 0x427: 0x4000, 0x428: 0x4000, 0x429: 0x4000,
- 0x42a: 0x4000, 0x42b: 0x4000, 0x42c: 0x4000, 0x42d: 0x4000, 0x42e: 0x4000, 0x42f: 0x4000,
- 0x430: 0x4000, 0x431: 0x4000, 0x432: 0x4000, 0x433: 0x4000, 0x434: 0x4000, 0x435: 0x4000,
- 0x436: 0x4000, 0x437: 0x4000, 0x438: 0x4000, 0x439: 0x4000, 0x43a: 0x4000, 0x43b: 0x4000,
- 0x43c: 0x4000, 0x43d: 0x4000, 0x43e: 0x4000, 0x43f: 0x4000,
- // Block 0x11, offset 0x440
- 0x440: 0x4000, 0x441: 0x4000, 0x442: 0x4000, 0x443: 0x4000, 0x444: 0x4000, 0x445: 0x4000,
- 0x446: 0x4000, 0x447: 0x4000, 0x448: 0x4000, 0x449: 0x4000, 0x44a: 0x4000, 0x44b: 0x4000,
- 0x44c: 0x4000, 0x44d: 0x4000, 0x44e: 0x4000, 0x44f: 0x4000, 0x450: 0x4000, 0x451: 0x4000,
- 0x452: 0x4000, 0x453: 0x4000, 0x454: 0x4000, 0x455: 0x4000, 0x456: 0x4000, 0x457: 0x4000,
- 0x458: 0x4000, 0x459: 0x4000, 0x45a: 0x4000, 0x45b: 0x4000, 0x45c: 0x4000, 0x45d: 0x4000,
- 0x45e: 0x4000, 0x45f: 0x4000,
- // Block 0x12, offset 0x480
- 0x490: 0x2000,
- 0x493: 0x2000, 0x494: 0x2000, 0x495: 0x2000, 0x496: 0x2000,
- 0x498: 0x2000, 0x499: 0x2000, 0x49c: 0x2000, 0x49d: 0x2000,
- 0x4a0: 0x2000, 0x4a1: 0x2000, 0x4a2: 0x2000,
- 0x4a4: 0x2000, 0x4a5: 0x2000, 0x4a6: 0x2000, 0x4a7: 0x2000,
- 0x4b0: 0x2000, 0x4b2: 0x2000, 0x4b3: 0x2000, 0x4b5: 0x2000,
- 0x4bb: 0x2000,
- 0x4be: 0x2000,
- // Block 0x13, offset 0x4c0
- 0x4f4: 0x2000,
- 0x4ff: 0x2000,
- // Block 0x14, offset 0x500
- 0x501: 0x2000, 0x502: 0x2000, 0x503: 0x2000, 0x504: 0x2000,
- 0x529: 0xa009,
- 0x52c: 0x2000,
- // Block 0x15, offset 0x540
- 0x543: 0x2000, 0x545: 0x2000,
- 0x549: 0x2000,
- 0x553: 0x2000, 0x556: 0x2000,
- 0x561: 0x2000, 0x562: 0x2000,
- 0x566: 0x2000,
- 0x56b: 0x2000,
- // Block 0x16, offset 0x580
- 0x593: 0x2000, 0x594: 0x2000,
- 0x59b: 0x2000, 0x59c: 0x2000, 0x59d: 0x2000,
- 0x59e: 0x2000, 0x5a0: 0x2000, 0x5a1: 0x2000, 0x5a2: 0x2000, 0x5a3: 0x2000,
- 0x5a4: 0x2000, 0x5a5: 0x2000, 0x5a6: 0x2000, 0x5a7: 0x2000, 0x5a8: 0x2000, 0x5a9: 0x2000,
- 0x5aa: 0x2000, 0x5ab: 0x2000,
- 0x5b0: 0x2000, 0x5b1: 0x2000, 0x5b2: 0x2000, 0x5b3: 0x2000, 0x5b4: 0x2000, 0x5b5: 0x2000,
- 0x5b6: 0x2000, 0x5b7: 0x2000, 0x5b8: 0x2000, 0x5b9: 0x2000,
- // Block 0x17, offset 0x5c0
- 0x5c9: 0x2000,
- 0x5d0: 0x200a, 0x5d1: 0x200b,
- 0x5d2: 0x200a, 0x5d3: 0x200c, 0x5d4: 0x2000, 0x5d5: 0x2000, 0x5d6: 0x2000, 0x5d7: 0x2000,
- 0x5d8: 0x2000, 0x5d9: 0x2000,
- 0x5f8: 0x2000, 0x5f9: 0x2000,
- // Block 0x18, offset 0x600
- 0x612: 0x2000, 0x614: 0x2000,
- 0x627: 0x2000,
- // Block 0x19, offset 0x640
- 0x640: 0x2000, 0x642: 0x2000, 0x643: 0x2000,
- 0x647: 0x2000, 0x648: 0x2000, 0x64b: 0x2000,
- 0x64f: 0x2000, 0x651: 0x2000,
- 0x655: 0x2000,
- 0x65a: 0x2000, 0x65d: 0x2000,
- 0x65e: 0x2000, 0x65f: 0x2000, 0x660: 0x2000, 0x663: 0x2000,
- 0x665: 0x2000, 0x667: 0x2000, 0x668: 0x2000, 0x669: 0x2000,
- 0x66a: 0x2000, 0x66b: 0x2000, 0x66c: 0x2000, 0x66e: 0x2000,
- 0x674: 0x2000, 0x675: 0x2000,
- 0x676: 0x2000, 0x677: 0x2000,
- 0x67c: 0x2000, 0x67d: 0x2000,
- // Block 0x1a, offset 0x680
- 0x688: 0x2000,
- 0x68c: 0x2000,
- 0x692: 0x2000,
- 0x6a0: 0x2000, 0x6a1: 0x2000,
- 0x6a4: 0x2000, 0x6a5: 0x2000, 0x6a6: 0x2000, 0x6a7: 0x2000,
- 0x6aa: 0x2000, 0x6ab: 0x2000, 0x6ae: 0x2000, 0x6af: 0x2000,
- // Block 0x1b, offset 0x6c0
- 0x6c2: 0x2000, 0x6c3: 0x2000,
- 0x6c6: 0x2000, 0x6c7: 0x2000,
- 0x6d5: 0x2000,
- 0x6d9: 0x2000,
- 0x6e5: 0x2000,
- 0x6ff: 0x2000,
- // Block 0x1c, offset 0x700
- 0x712: 0x2000,
- 0x71a: 0x4000, 0x71b: 0x4000,
- 0x729: 0x4000,
- 0x72a: 0x4000,
- // Block 0x1d, offset 0x740
- 0x769: 0x4000,
- 0x76a: 0x4000, 0x76b: 0x4000, 0x76c: 0x4000,
- 0x770: 0x4000, 0x773: 0x4000,
- // Block 0x1e, offset 0x780
- 0x7a0: 0x2000, 0x7a1: 0x2000, 0x7a2: 0x2000, 0x7a3: 0x2000,
- 0x7a4: 0x2000, 0x7a5: 0x2000, 0x7a6: 0x2000, 0x7a7: 0x2000, 0x7a8: 0x2000, 0x7a9: 0x2000,
- 0x7aa: 0x2000, 0x7ab: 0x2000, 0x7ac: 0x2000, 0x7ad: 0x2000, 0x7ae: 0x2000, 0x7af: 0x2000,
- 0x7b0: 0x2000, 0x7b1: 0x2000, 0x7b2: 0x2000, 0x7b3: 0x2000, 0x7b4: 0x2000, 0x7b5: 0x2000,
- 0x7b6: 0x2000, 0x7b7: 0x2000, 0x7b8: 0x2000, 0x7b9: 0x2000, 0x7ba: 0x2000, 0x7bb: 0x2000,
- 0x7bc: 0x2000, 0x7bd: 0x2000, 0x7be: 0x2000, 0x7bf: 0x2000,
- // Block 0x1f, offset 0x7c0
- 0x7c0: 0x2000, 0x7c1: 0x2000, 0x7c2: 0x2000, 0x7c3: 0x2000, 0x7c4: 0x2000, 0x7c5: 0x2000,
- 0x7c6: 0x2000, 0x7c7: 0x2000, 0x7c8: 0x2000, 0x7c9: 0x2000, 0x7ca: 0x2000, 0x7cb: 0x2000,
- 0x7cc: 0x2000, 0x7cd: 0x2000, 0x7ce: 0x2000, 0x7cf: 0x2000, 0x7d0: 0x2000, 0x7d1: 0x2000,
- 0x7d2: 0x2000, 0x7d3: 0x2000, 0x7d4: 0x2000, 0x7d5: 0x2000, 0x7d6: 0x2000, 0x7d7: 0x2000,
- 0x7d8: 0x2000, 0x7d9: 0x2000, 0x7da: 0x2000, 0x7db: 0x2000, 0x7dc: 0x2000, 0x7dd: 0x2000,
- 0x7de: 0x2000, 0x7df: 0x2000, 0x7e0: 0x2000, 0x7e1: 0x2000, 0x7e2: 0x2000, 0x7e3: 0x2000,
- 0x7e4: 0x2000, 0x7e5: 0x2000, 0x7e6: 0x2000, 0x7e7: 0x2000, 0x7e8: 0x2000, 0x7e9: 0x2000,
- 0x7eb: 0x2000, 0x7ec: 0x2000, 0x7ed: 0x2000, 0x7ee: 0x2000, 0x7ef: 0x2000,
- 0x7f0: 0x2000, 0x7f1: 0x2000, 0x7f2: 0x2000, 0x7f3: 0x2000, 0x7f4: 0x2000, 0x7f5: 0x2000,
- 0x7f6: 0x2000, 0x7f7: 0x2000, 0x7f8: 0x2000, 0x7f9: 0x2000, 0x7fa: 0x2000, 0x7fb: 0x2000,
- 0x7fc: 0x2000, 0x7fd: 0x2000, 0x7fe: 0x2000, 0x7ff: 0x2000,
- // Block 0x20, offset 0x800
- 0x800: 0x2000, 0x801: 0x2000, 0x802: 0x200d, 0x803: 0x2000, 0x804: 0x2000, 0x805: 0x2000,
- 0x806: 0x2000, 0x807: 0x2000, 0x808: 0x2000, 0x809: 0x2000, 0x80a: 0x2000, 0x80b: 0x2000,
- 0x80c: 0x2000, 0x80d: 0x2000, 0x80e: 0x2000, 0x80f: 0x2000, 0x810: 0x2000, 0x811: 0x2000,
- 0x812: 0x2000, 0x813: 0x2000, 0x814: 0x2000, 0x815: 0x2000, 0x816: 0x2000, 0x817: 0x2000,
- 0x818: 0x2000, 0x819: 0x2000, 0x81a: 0x2000, 0x81b: 0x2000, 0x81c: 0x2000, 0x81d: 0x2000,
- 0x81e: 0x2000, 0x81f: 0x2000, 0x820: 0x2000, 0x821: 0x2000, 0x822: 0x2000, 0x823: 0x2000,
- 0x824: 0x2000, 0x825: 0x2000, 0x826: 0x2000, 0x827: 0x2000, 0x828: 0x2000, 0x829: 0x2000,
- 0x82a: 0x2000, 0x82b: 0x2000, 0x82c: 0x2000, 0x82d: 0x2000, 0x82e: 0x2000, 0x82f: 0x2000,
- 0x830: 0x2000, 0x831: 0x2000, 0x832: 0x2000, 0x833: 0x2000, 0x834: 0x2000, 0x835: 0x2000,
- 0x836: 0x2000, 0x837: 0x2000, 0x838: 0x2000, 0x839: 0x2000, 0x83a: 0x2000, 0x83b: 0x2000,
- 0x83c: 0x2000, 0x83d: 0x2000, 0x83e: 0x2000, 0x83f: 0x2000,
- // Block 0x21, offset 0x840
- 0x840: 0x2000, 0x841: 0x2000, 0x842: 0x2000, 0x843: 0x2000, 0x844: 0x2000, 0x845: 0x2000,
- 0x846: 0x2000, 0x847: 0x2000, 0x848: 0x2000, 0x849: 0x2000, 0x84a: 0x2000, 0x84b: 0x2000,
- 0x850: 0x2000, 0x851: 0x2000,
- 0x852: 0x2000, 0x853: 0x2000, 0x854: 0x2000, 0x855: 0x2000, 0x856: 0x2000, 0x857: 0x2000,
- 0x858: 0x2000, 0x859: 0x2000, 0x85a: 0x2000, 0x85b: 0x2000, 0x85c: 0x2000, 0x85d: 0x2000,
- 0x85e: 0x2000, 0x85f: 0x2000, 0x860: 0x2000, 0x861: 0x2000, 0x862: 0x2000, 0x863: 0x2000,
- 0x864: 0x2000, 0x865: 0x2000, 0x866: 0x2000, 0x867: 0x2000, 0x868: 0x2000, 0x869: 0x2000,
- 0x86a: 0x2000, 0x86b: 0x2000, 0x86c: 0x2000, 0x86d: 0x2000, 0x86e: 0x2000, 0x86f: 0x2000,
- 0x870: 0x2000, 0x871: 0x2000, 0x872: 0x2000, 0x873: 0x2000,
- // Block 0x22, offset 0x880
- 0x880: 0x2000, 0x881: 0x2000, 0x882: 0x2000, 0x883: 0x2000, 0x884: 0x2000, 0x885: 0x2000,
- 0x886: 0x2000, 0x887: 0x2000, 0x888: 0x2000, 0x889: 0x2000, 0x88a: 0x2000, 0x88b: 0x2000,
- 0x88c: 0x2000, 0x88d: 0x2000, 0x88e: 0x2000, 0x88f: 0x2000,
- 0x892: 0x2000, 0x893: 0x2000, 0x894: 0x2000, 0x895: 0x2000,
- 0x8a0: 0x200e, 0x8a1: 0x2000, 0x8a3: 0x2000,
- 0x8a4: 0x2000, 0x8a5: 0x2000, 0x8a6: 0x2000, 0x8a7: 0x2000, 0x8a8: 0x2000, 0x8a9: 0x2000,
- 0x8b2: 0x2000, 0x8b3: 0x2000,
- 0x8b6: 0x2000, 0x8b7: 0x2000,
- 0x8bc: 0x2000, 0x8bd: 0x2000,
- // Block 0x23, offset 0x8c0
- 0x8c0: 0x2000, 0x8c1: 0x2000,
- 0x8c6: 0x2000, 0x8c7: 0x2000, 0x8c8: 0x2000, 0x8cb: 0x200f,
- 0x8ce: 0x2000, 0x8cf: 0x2000, 0x8d0: 0x2000, 0x8d1: 0x2000,
- 0x8e2: 0x2000, 0x8e3: 0x2000,
- 0x8e4: 0x2000, 0x8e5: 0x2000,
- 0x8ef: 0x2000,
- 0x8fd: 0x4000, 0x8fe: 0x4000,
- // Block 0x24, offset 0x900
- 0x905: 0x2000,
- 0x906: 0x2000, 0x909: 0x2000,
- 0x90e: 0x2000, 0x90f: 0x2000,
- 0x914: 0x4000, 0x915: 0x4000,
- 0x91c: 0x2000,
- 0x91e: 0x2000,
- // Block 0x25, offset 0x940
- 0x940: 0x2000, 0x942: 0x2000,
- 0x948: 0x4000, 0x949: 0x4000, 0x94a: 0x4000, 0x94b: 0x4000,
- 0x94c: 0x4000, 0x94d: 0x4000, 0x94e: 0x4000, 0x94f: 0x4000, 0x950: 0x4000, 0x951: 0x4000,
- 0x952: 0x4000, 0x953: 0x4000,
- 0x960: 0x2000, 0x961: 0x2000, 0x963: 0x2000,
- 0x964: 0x2000, 0x965: 0x2000, 0x967: 0x2000, 0x968: 0x2000, 0x969: 0x2000,
- 0x96a: 0x2000, 0x96c: 0x2000, 0x96d: 0x2000, 0x96f: 0x2000,
- 0x97f: 0x4000,
- // Block 0x26, offset 0x980
- 0x993: 0x4000,
- 0x99e: 0x2000, 0x99f: 0x2000, 0x9a1: 0x4000,
- 0x9aa: 0x4000, 0x9ab: 0x4000,
- 0x9bd: 0x4000, 0x9be: 0x4000, 0x9bf: 0x2000,
- // Block 0x27, offset 0x9c0
- 0x9c4: 0x4000, 0x9c5: 0x4000,
- 0x9c6: 0x2000, 0x9c7: 0x2000, 0x9c8: 0x2000, 0x9c9: 0x2000, 0x9ca: 0x2000, 0x9cb: 0x2000,
- 0x9cc: 0x2000, 0x9cd: 0x2000, 0x9ce: 0x4000, 0x9cf: 0x2000, 0x9d0: 0x2000, 0x9d1: 0x2000,
- 0x9d2: 0x2000, 0x9d3: 0x2000, 0x9d4: 0x4000, 0x9d5: 0x2000, 0x9d6: 0x2000, 0x9d7: 0x2000,
- 0x9d8: 0x2000, 0x9d9: 0x2000, 0x9da: 0x2000, 0x9db: 0x2000, 0x9dc: 0x2000, 0x9dd: 0x2000,
- 0x9de: 0x2000, 0x9df: 0x2000, 0x9e0: 0x2000, 0x9e1: 0x2000, 0x9e3: 0x2000,
- 0x9e8: 0x2000, 0x9e9: 0x2000,
- 0x9ea: 0x4000, 0x9eb: 0x2000, 0x9ec: 0x2000, 0x9ed: 0x2000, 0x9ee: 0x2000, 0x9ef: 0x2000,
- 0x9f0: 0x2000, 0x9f1: 0x2000, 0x9f2: 0x4000, 0x9f3: 0x4000, 0x9f4: 0x2000, 0x9f5: 0x4000,
- 0x9f6: 0x2000, 0x9f7: 0x2000, 0x9f8: 0x2000, 0x9f9: 0x2000, 0x9fa: 0x4000, 0x9fb: 0x2000,
- 0x9fc: 0x2000, 0x9fd: 0x4000, 0x9fe: 0x2000, 0x9ff: 0x2000,
- // Block 0x28, offset 0xa00
- 0xa05: 0x4000,
- 0xa0a: 0x4000, 0xa0b: 0x4000,
- 0xa28: 0x4000,
- 0xa3d: 0x2000,
- // Block 0x29, offset 0xa40
- 0xa4c: 0x4000, 0xa4e: 0x4000,
- 0xa53: 0x4000, 0xa54: 0x4000, 0xa55: 0x4000, 0xa57: 0x4000,
- 0xa76: 0x2000, 0xa77: 0x2000, 0xa78: 0x2000, 0xa79: 0x2000, 0xa7a: 0x2000, 0xa7b: 0x2000,
- 0xa7c: 0x2000, 0xa7d: 0x2000, 0xa7e: 0x2000, 0xa7f: 0x2000,
- // Block 0x2a, offset 0xa80
- 0xa95: 0x4000, 0xa96: 0x4000, 0xa97: 0x4000,
- 0xab0: 0x4000,
- 0xabf: 0x4000,
- // Block 0x2b, offset 0xac0
- 0xae6: 0x6000, 0xae7: 0x6000, 0xae8: 0x6000, 0xae9: 0x6000,
- 0xaea: 0x6000, 0xaeb: 0x6000, 0xaec: 0x6000, 0xaed: 0x6000,
- // Block 0x2c, offset 0xb00
- 0xb05: 0x6010,
- 0xb06: 0x6011,
- // Block 0x2d, offset 0xb40
- 0xb5b: 0x4000, 0xb5c: 0x4000,
- // Block 0x2e, offset 0xb80
- 0xb90: 0x4000,
- 0xb95: 0x4000, 0xb96: 0x2000, 0xb97: 0x2000,
- 0xb98: 0x2000, 0xb99: 0x2000,
- // Block 0x2f, offset 0xbc0
- 0xbc0: 0x4000, 0xbc1: 0x4000, 0xbc2: 0x4000, 0xbc3: 0x4000, 0xbc4: 0x4000, 0xbc5: 0x4000,
- 0xbc6: 0x4000, 0xbc7: 0x4000, 0xbc8: 0x4000, 0xbc9: 0x4000, 0xbca: 0x4000, 0xbcb: 0x4000,
- 0xbcc: 0x4000, 0xbcd: 0x4000, 0xbce: 0x4000, 0xbcf: 0x4000, 0xbd0: 0x4000, 0xbd1: 0x4000,
- 0xbd2: 0x4000, 0xbd3: 0x4000, 0xbd4: 0x4000, 0xbd5: 0x4000, 0xbd6: 0x4000, 0xbd7: 0x4000,
- 0xbd8: 0x4000, 0xbd9: 0x4000, 0xbdb: 0x4000, 0xbdc: 0x4000, 0xbdd: 0x4000,
- 0xbde: 0x4000, 0xbdf: 0x4000, 0xbe0: 0x4000, 0xbe1: 0x4000, 0xbe2: 0x4000, 0xbe3: 0x4000,
- 0xbe4: 0x4000, 0xbe5: 0x4000, 0xbe6: 0x4000, 0xbe7: 0x4000, 0xbe8: 0x4000, 0xbe9: 0x4000,
- 0xbea: 0x4000, 0xbeb: 0x4000, 0xbec: 0x4000, 0xbed: 0x4000, 0xbee: 0x4000, 0xbef: 0x4000,
- 0xbf0: 0x4000, 0xbf1: 0x4000, 0xbf2: 0x4000, 0xbf3: 0x4000, 0xbf4: 0x4000, 0xbf5: 0x4000,
- 0xbf6: 0x4000, 0xbf7: 0x4000, 0xbf8: 0x4000, 0xbf9: 0x4000, 0xbfa: 0x4000, 0xbfb: 0x4000,
- 0xbfc: 0x4000, 0xbfd: 0x4000, 0xbfe: 0x4000, 0xbff: 0x4000,
- // Block 0x30, offset 0xc00
- 0xc00: 0x4000, 0xc01: 0x4000, 0xc02: 0x4000, 0xc03: 0x4000, 0xc04: 0x4000, 0xc05: 0x4000,
- 0xc06: 0x4000, 0xc07: 0x4000, 0xc08: 0x4000, 0xc09: 0x4000, 0xc0a: 0x4000, 0xc0b: 0x4000,
- 0xc0c: 0x4000, 0xc0d: 0x4000, 0xc0e: 0x4000, 0xc0f: 0x4000, 0xc10: 0x4000, 0xc11: 0x4000,
- 0xc12: 0x4000, 0xc13: 0x4000, 0xc14: 0x4000, 0xc15: 0x4000, 0xc16: 0x4000, 0xc17: 0x4000,
- 0xc18: 0x4000, 0xc19: 0x4000, 0xc1a: 0x4000, 0xc1b: 0x4000, 0xc1c: 0x4000, 0xc1d: 0x4000,
- 0xc1e: 0x4000, 0xc1f: 0x4000, 0xc20: 0x4000, 0xc21: 0x4000, 0xc22: 0x4000, 0xc23: 0x4000,
- 0xc24: 0x4000, 0xc25: 0x4000, 0xc26: 0x4000, 0xc27: 0x4000, 0xc28: 0x4000, 0xc29: 0x4000,
- 0xc2a: 0x4000, 0xc2b: 0x4000, 0xc2c: 0x4000, 0xc2d: 0x4000, 0xc2e: 0x4000, 0xc2f: 0x4000,
- 0xc30: 0x4000, 0xc31: 0x4000, 0xc32: 0x4000, 0xc33: 0x4000,
- // Block 0x31, offset 0xc40
- 0xc40: 0x4000, 0xc41: 0x4000, 0xc42: 0x4000, 0xc43: 0x4000, 0xc44: 0x4000, 0xc45: 0x4000,
- 0xc46: 0x4000, 0xc47: 0x4000, 0xc48: 0x4000, 0xc49: 0x4000, 0xc4a: 0x4000, 0xc4b: 0x4000,
- 0xc4c: 0x4000, 0xc4d: 0x4000, 0xc4e: 0x4000, 0xc4f: 0x4000, 0xc50: 0x4000, 0xc51: 0x4000,
- 0xc52: 0x4000, 0xc53: 0x4000, 0xc54: 0x4000, 0xc55: 0x4000,
- 0xc70: 0x4000, 0xc71: 0x4000, 0xc72: 0x4000, 0xc73: 0x4000, 0xc74: 0x4000, 0xc75: 0x4000,
- 0xc76: 0x4000, 0xc77: 0x4000, 0xc78: 0x4000, 0xc79: 0x4000, 0xc7a: 0x4000, 0xc7b: 0x4000,
- // Block 0x32, offset 0xc80
- 0xc80: 0x9012, 0xc81: 0x4013, 0xc82: 0x4014, 0xc83: 0x4000, 0xc84: 0x4000, 0xc85: 0x4000,
- 0xc86: 0x4000, 0xc87: 0x4000, 0xc88: 0x4000, 0xc89: 0x4000, 0xc8a: 0x4000, 0xc8b: 0x4000,
- 0xc8c: 0x4015, 0xc8d: 0x4015, 0xc8e: 0x4000, 0xc8f: 0x4000, 0xc90: 0x4000, 0xc91: 0x4000,
- 0xc92: 0x4000, 0xc93: 0x4000, 0xc94: 0x4000, 0xc95: 0x4000, 0xc96: 0x4000, 0xc97: 0x4000,
- 0xc98: 0x4000, 0xc99: 0x4000, 0xc9a: 0x4000, 0xc9b: 0x4000, 0xc9c: 0x4000, 0xc9d: 0x4000,
- 0xc9e: 0x4000, 0xc9f: 0x4000, 0xca0: 0x4000, 0xca1: 0x4000, 0xca2: 0x4000, 0xca3: 0x4000,
- 0xca4: 0x4000, 0xca5: 0x4000, 0xca6: 0x4000, 0xca7: 0x4000, 0xca8: 0x4000, 0xca9: 0x4000,
- 0xcaa: 0x4000, 0xcab: 0x4000, 0xcac: 0x4000, 0xcad: 0x4000, 0xcae: 0x4000, 0xcaf: 0x4000,
- 0xcb0: 0x4000, 0xcb1: 0x4000, 0xcb2: 0x4000, 0xcb3: 0x4000, 0xcb4: 0x4000, 0xcb5: 0x4000,
- 0xcb6: 0x4000, 0xcb7: 0x4000, 0xcb8: 0x4000, 0xcb9: 0x4000, 0xcba: 0x4000, 0xcbb: 0x4000,
- 0xcbc: 0x4000, 0xcbd: 0x4000, 0xcbe: 0x4000,
- // Block 0x33, offset 0xcc0
- 0xcc1: 0x4000, 0xcc2: 0x4000, 0xcc3: 0x4000, 0xcc4: 0x4000, 0xcc5: 0x4000,
- 0xcc6: 0x4000, 0xcc7: 0x4000, 0xcc8: 0x4000, 0xcc9: 0x4000, 0xcca: 0x4000, 0xccb: 0x4000,
- 0xccc: 0x4000, 0xccd: 0x4000, 0xcce: 0x4000, 0xccf: 0x4000, 0xcd0: 0x4000, 0xcd1: 0x4000,
- 0xcd2: 0x4000, 0xcd3: 0x4000, 0xcd4: 0x4000, 0xcd5: 0x4000, 0xcd6: 0x4000, 0xcd7: 0x4000,
- 0xcd8: 0x4000, 0xcd9: 0x4000, 0xcda: 0x4000, 0xcdb: 0x4000, 0xcdc: 0x4000, 0xcdd: 0x4000,
- 0xcde: 0x4000, 0xcdf: 0x4000, 0xce0: 0x4000, 0xce1: 0x4000, 0xce2: 0x4000, 0xce3: 0x4000,
- 0xce4: 0x4000, 0xce5: 0x4000, 0xce6: 0x4000, 0xce7: 0x4000, 0xce8: 0x4000, 0xce9: 0x4000,
- 0xcea: 0x4000, 0xceb: 0x4000, 0xcec: 0x4000, 0xced: 0x4000, 0xcee: 0x4000, 0xcef: 0x4000,
- 0xcf0: 0x4000, 0xcf1: 0x4000, 0xcf2: 0x4000, 0xcf3: 0x4000, 0xcf4: 0x4000, 0xcf5: 0x4000,
- 0xcf6: 0x4000, 0xcf7: 0x4000, 0xcf8: 0x4000, 0xcf9: 0x4000, 0xcfa: 0x4000, 0xcfb: 0x4000,
- 0xcfc: 0x4000, 0xcfd: 0x4000, 0xcfe: 0x4000, 0xcff: 0x4000,
- // Block 0x34, offset 0xd00
- 0xd00: 0x4000, 0xd01: 0x4000, 0xd02: 0x4000, 0xd03: 0x4000, 0xd04: 0x4000, 0xd05: 0x4000,
- 0xd06: 0x4000, 0xd07: 0x4000, 0xd08: 0x4000, 0xd09: 0x4000, 0xd0a: 0x4000, 0xd0b: 0x4000,
- 0xd0c: 0x4000, 0xd0d: 0x4000, 0xd0e: 0x4000, 0xd0f: 0x4000, 0xd10: 0x4000, 0xd11: 0x4000,
- 0xd12: 0x4000, 0xd13: 0x4000, 0xd14: 0x4000, 0xd15: 0x4000, 0xd16: 0x4000,
- 0xd19: 0x4016, 0xd1a: 0x4017, 0xd1b: 0x4000, 0xd1c: 0x4000, 0xd1d: 0x4000,
- 0xd1e: 0x4000, 0xd1f: 0x4000, 0xd20: 0x4000, 0xd21: 0x4018, 0xd22: 0x4019, 0xd23: 0x401a,
- 0xd24: 0x401b, 0xd25: 0x401c, 0xd26: 0x401d, 0xd27: 0x401e, 0xd28: 0x401f, 0xd29: 0x4020,
- 0xd2a: 0x4021, 0xd2b: 0x4022, 0xd2c: 0x4000, 0xd2d: 0x4010, 0xd2e: 0x4000, 0xd2f: 0x4023,
- 0xd30: 0x4000, 0xd31: 0x4024, 0xd32: 0x4000, 0xd33: 0x4025, 0xd34: 0x4000, 0xd35: 0x4026,
- 0xd36: 0x4000, 0xd37: 0x401a, 0xd38: 0x4000, 0xd39: 0x4027, 0xd3a: 0x4000, 0xd3b: 0x4028,
- 0xd3c: 0x4000, 0xd3d: 0x4020, 0xd3e: 0x4000, 0xd3f: 0x4029,
- // Block 0x35, offset 0xd40
- 0xd40: 0x4000, 0xd41: 0x402a, 0xd42: 0x4000, 0xd43: 0x402b, 0xd44: 0x402c, 0xd45: 0x4000,
- 0xd46: 0x4017, 0xd47: 0x4000, 0xd48: 0x402d, 0xd49: 0x4000, 0xd4a: 0x402e, 0xd4b: 0x402f,
- 0xd4c: 0x4030, 0xd4d: 0x4017, 0xd4e: 0x4016, 0xd4f: 0x4017, 0xd50: 0x4000, 0xd51: 0x4000,
- 0xd52: 0x4031, 0xd53: 0x4000, 0xd54: 0x4000, 0xd55: 0x4031, 0xd56: 0x4000, 0xd57: 0x4000,
- 0xd58: 0x4032, 0xd59: 0x4000, 0xd5a: 0x4000, 0xd5b: 0x4032, 0xd5c: 0x4000, 0xd5d: 0x4000,
- 0xd5e: 0x4033, 0xd5f: 0x402e, 0xd60: 0x4034, 0xd61: 0x4035, 0xd62: 0x4034, 0xd63: 0x4036,
- 0xd64: 0x4037, 0xd65: 0x4024, 0xd66: 0x4035, 0xd67: 0x4025, 0xd68: 0x4038, 0xd69: 0x4038,
- 0xd6a: 0x4039, 0xd6b: 0x4039, 0xd6c: 0x403a, 0xd6d: 0x403a, 0xd6e: 0x4000, 0xd6f: 0x4035,
- 0xd70: 0x4000, 0xd71: 0x4000, 0xd72: 0x403b, 0xd73: 0x403c, 0xd74: 0x4000, 0xd75: 0x4000,
- 0xd76: 0x4000, 0xd77: 0x4000, 0xd78: 0x4000, 0xd79: 0x4000, 0xd7a: 0x4000, 0xd7b: 0x403d,
- 0xd7c: 0x401c, 0xd7d: 0x4000, 0xd7e: 0x4000, 0xd7f: 0x4000,
- // Block 0x36, offset 0xd80
- 0xd85: 0x4000,
- 0xd86: 0x4000, 0xd87: 0x4000, 0xd88: 0x4000, 0xd89: 0x4000, 0xd8a: 0x4000, 0xd8b: 0x4000,
- 0xd8c: 0x4000, 0xd8d: 0x4000, 0xd8e: 0x4000, 0xd8f: 0x4000, 0xd90: 0x4000, 0xd91: 0x4000,
- 0xd92: 0x4000, 0xd93: 0x4000, 0xd94: 0x4000, 0xd95: 0x4000, 0xd96: 0x4000, 0xd97: 0x4000,
- 0xd98: 0x4000, 0xd99: 0x4000, 0xd9a: 0x4000, 0xd9b: 0x4000, 0xd9c: 0x4000, 0xd9d: 0x4000,
- 0xd9e: 0x4000, 0xd9f: 0x4000, 0xda0: 0x4000, 0xda1: 0x4000, 0xda2: 0x4000, 0xda3: 0x4000,
- 0xda4: 0x4000, 0xda5: 0x4000, 0xda6: 0x4000, 0xda7: 0x4000, 0xda8: 0x4000, 0xda9: 0x4000,
- 0xdaa: 0x4000, 0xdab: 0x4000, 0xdac: 0x4000, 0xdad: 0x4000,
- 0xdb1: 0x403e, 0xdb2: 0x403e, 0xdb3: 0x403e, 0xdb4: 0x403e, 0xdb5: 0x403e,
- 0xdb6: 0x403e, 0xdb7: 0x403e, 0xdb8: 0x403e, 0xdb9: 0x403e, 0xdba: 0x403e, 0xdbb: 0x403e,
- 0xdbc: 0x403e, 0xdbd: 0x403e, 0xdbe: 0x403e, 0xdbf: 0x403e,
- // Block 0x37, offset 0xdc0
- 0xdc0: 0x4037, 0xdc1: 0x4037, 0xdc2: 0x4037, 0xdc3: 0x4037, 0xdc4: 0x4037, 0xdc5: 0x4037,
- 0xdc6: 0x4037, 0xdc7: 0x4037, 0xdc8: 0x4037, 0xdc9: 0x4037, 0xdca: 0x4037, 0xdcb: 0x4037,
- 0xdcc: 0x4037, 0xdcd: 0x4037, 0xdce: 0x4037, 0xdcf: 0x400e, 0xdd0: 0x403f, 0xdd1: 0x4040,
- 0xdd2: 0x4041, 0xdd3: 0x4040, 0xdd4: 0x403f, 0xdd5: 0x4042, 0xdd6: 0x4043, 0xdd7: 0x4044,
- 0xdd8: 0x4040, 0xdd9: 0x4041, 0xdda: 0x4040, 0xddb: 0x4045, 0xddc: 0x4009, 0xddd: 0x4045,
- 0xdde: 0x4046, 0xddf: 0x4045, 0xde0: 0x4047, 0xde1: 0x400b, 0xde2: 0x400a, 0xde3: 0x400c,
- 0xde4: 0x4048, 0xde5: 0x4000, 0xde6: 0x4000, 0xde7: 0x4000, 0xde8: 0x4000, 0xde9: 0x4000,
- 0xdea: 0x4000, 0xdeb: 0x4000, 0xdec: 0x4000, 0xded: 0x4000, 0xdee: 0x4000, 0xdef: 0x4000,
- 0xdf0: 0x4000, 0xdf1: 0x4000, 0xdf2: 0x4000, 0xdf3: 0x4000, 0xdf4: 0x4000, 0xdf5: 0x4000,
- 0xdf6: 0x4000, 0xdf7: 0x4000, 0xdf8: 0x4000, 0xdf9: 0x4000, 0xdfa: 0x4000, 0xdfb: 0x4000,
- 0xdfc: 0x4000, 0xdfd: 0x4000, 0xdfe: 0x4000, 0xdff: 0x4000,
- // Block 0x38, offset 0xe00
- 0xe00: 0x4000, 0xe01: 0x4000, 0xe02: 0x4000, 0xe03: 0x4000, 0xe04: 0x4000, 0xe05: 0x4000,
- 0xe06: 0x4000, 0xe07: 0x4000, 0xe08: 0x4000, 0xe09: 0x4000, 0xe0a: 0x4000, 0xe0b: 0x4000,
- 0xe0c: 0x4000, 0xe0d: 0x4000, 0xe0e: 0x4000, 0xe10: 0x4000, 0xe11: 0x4000,
- 0xe12: 0x4000, 0xe13: 0x4000, 0xe14: 0x4000, 0xe15: 0x4000, 0xe16: 0x4000, 0xe17: 0x4000,
- 0xe18: 0x4000, 0xe19: 0x4000, 0xe1a: 0x4000, 0xe1b: 0x4000, 0xe1c: 0x4000, 0xe1d: 0x4000,
- 0xe1e: 0x4000, 0xe1f: 0x4000, 0xe20: 0x4000, 0xe21: 0x4000, 0xe22: 0x4000, 0xe23: 0x4000,
- 0xe24: 0x4000, 0xe25: 0x4000, 0xe26: 0x4000, 0xe27: 0x4000, 0xe28: 0x4000, 0xe29: 0x4000,
- 0xe2a: 0x4000, 0xe2b: 0x4000, 0xe2c: 0x4000, 0xe2d: 0x4000, 0xe2e: 0x4000, 0xe2f: 0x4000,
- 0xe30: 0x4000, 0xe31: 0x4000, 0xe32: 0x4000, 0xe33: 0x4000, 0xe34: 0x4000, 0xe35: 0x4000,
- 0xe36: 0x4000, 0xe37: 0x4000, 0xe38: 0x4000, 0xe39: 0x4000, 0xe3a: 0x4000,
- // Block 0x39, offset 0xe40
- 0xe40: 0x4000, 0xe41: 0x4000, 0xe42: 0x4000, 0xe43: 0x4000, 0xe44: 0x4000, 0xe45: 0x4000,
- 0xe46: 0x4000, 0xe47: 0x4000, 0xe48: 0x4000, 0xe49: 0x4000, 0xe4a: 0x4000, 0xe4b: 0x4000,
- 0xe4c: 0x4000, 0xe4d: 0x4000, 0xe4e: 0x4000, 0xe4f: 0x4000, 0xe50: 0x4000, 0xe51: 0x4000,
- 0xe52: 0x4000, 0xe53: 0x4000, 0xe54: 0x4000, 0xe55: 0x4000, 0xe56: 0x4000, 0xe57: 0x4000,
- 0xe58: 0x4000, 0xe59: 0x4000, 0xe5a: 0x4000, 0xe5b: 0x4000, 0xe5c: 0x4000, 0xe5d: 0x4000,
- 0xe5e: 0x4000, 0xe5f: 0x4000, 0xe60: 0x4000, 0xe61: 0x4000, 0xe62: 0x4000, 0xe63: 0x4000,
- 0xe70: 0x4000, 0xe71: 0x4000, 0xe72: 0x4000, 0xe73: 0x4000, 0xe74: 0x4000, 0xe75: 0x4000,
- 0xe76: 0x4000, 0xe77: 0x4000, 0xe78: 0x4000, 0xe79: 0x4000, 0xe7a: 0x4000, 0xe7b: 0x4000,
- 0xe7c: 0x4000, 0xe7d: 0x4000, 0xe7e: 0x4000, 0xe7f: 0x4000,
- // Block 0x3a, offset 0xe80
- 0xe80: 0x4000, 0xe81: 0x4000, 0xe82: 0x4000, 0xe83: 0x4000, 0xe84: 0x4000, 0xe85: 0x4000,
- 0xe86: 0x4000, 0xe87: 0x4000, 0xe88: 0x4000, 0xe89: 0x4000, 0xe8a: 0x4000, 0xe8b: 0x4000,
- 0xe8c: 0x4000, 0xe8d: 0x4000, 0xe8e: 0x4000, 0xe8f: 0x4000, 0xe90: 0x4000, 0xe91: 0x4000,
- 0xe92: 0x4000, 0xe93: 0x4000, 0xe94: 0x4000, 0xe95: 0x4000, 0xe96: 0x4000, 0xe97: 0x4000,
- 0xe98: 0x4000, 0xe99: 0x4000, 0xe9a: 0x4000, 0xe9b: 0x4000, 0xe9c: 0x4000, 0xe9d: 0x4000,
- 0xe9e: 0x4000, 0xea0: 0x4000, 0xea1: 0x4000, 0xea2: 0x4000, 0xea3: 0x4000,
- 0xea4: 0x4000, 0xea5: 0x4000, 0xea6: 0x4000, 0xea7: 0x4000, 0xea8: 0x4000, 0xea9: 0x4000,
- 0xeaa: 0x4000, 0xeab: 0x4000, 0xeac: 0x4000, 0xead: 0x4000, 0xeae: 0x4000, 0xeaf: 0x4000,
- 0xeb0: 0x4000, 0xeb1: 0x4000, 0xeb2: 0x4000, 0xeb3: 0x4000, 0xeb4: 0x4000, 0xeb5: 0x4000,
- 0xeb6: 0x4000, 0xeb7: 0x4000, 0xeb8: 0x4000, 0xeb9: 0x4000, 0xeba: 0x4000, 0xebb: 0x4000,
- 0xebc: 0x4000, 0xebd: 0x4000, 0xebe: 0x4000, 0xebf: 0x4000,
- // Block 0x3b, offset 0xec0
- 0xec0: 0x4000, 0xec1: 0x4000, 0xec2: 0x4000, 0xec3: 0x4000, 0xec4: 0x4000, 0xec5: 0x4000,
- 0xec6: 0x4000, 0xec7: 0x4000, 0xec8: 0x2000, 0xec9: 0x2000, 0xeca: 0x2000, 0xecb: 0x2000,
- 0xecc: 0x2000, 0xecd: 0x2000, 0xece: 0x2000, 0xecf: 0x2000, 0xed0: 0x4000, 0xed1: 0x4000,
- 0xed2: 0x4000, 0xed3: 0x4000, 0xed4: 0x4000, 0xed5: 0x4000, 0xed6: 0x4000, 0xed7: 0x4000,
- 0xed8: 0x4000, 0xed9: 0x4000, 0xeda: 0x4000, 0xedb: 0x4000, 0xedc: 0x4000, 0xedd: 0x4000,
- 0xede: 0x4000, 0xedf: 0x4000, 0xee0: 0x4000, 0xee1: 0x4000, 0xee2: 0x4000, 0xee3: 0x4000,
- 0xee4: 0x4000, 0xee5: 0x4000, 0xee6: 0x4000, 0xee7: 0x4000, 0xee8: 0x4000, 0xee9: 0x4000,
- 0xeea: 0x4000, 0xeeb: 0x4000, 0xeec: 0x4000, 0xeed: 0x4000, 0xeee: 0x4000, 0xeef: 0x4000,
- 0xef0: 0x4000, 0xef1: 0x4000, 0xef2: 0x4000, 0xef3: 0x4000, 0xef4: 0x4000, 0xef5: 0x4000,
- 0xef6: 0x4000, 0xef7: 0x4000, 0xef8: 0x4000, 0xef9: 0x4000, 0xefa: 0x4000, 0xefb: 0x4000,
- 0xefc: 0x4000, 0xefd: 0x4000, 0xefe: 0x4000, 0xeff: 0x4000,
- // Block 0x3c, offset 0xf00
- 0xf00: 0x4000, 0xf01: 0x4000, 0xf02: 0x4000, 0xf03: 0x4000, 0xf04: 0x4000, 0xf05: 0x4000,
- 0xf06: 0x4000, 0xf07: 0x4000, 0xf08: 0x4000, 0xf09: 0x4000, 0xf0a: 0x4000, 0xf0b: 0x4000,
- 0xf0c: 0x4000, 0xf0d: 0x4000, 0xf0e: 0x4000, 0xf0f: 0x4000, 0xf10: 0x4000, 0xf11: 0x4000,
- 0xf12: 0x4000, 0xf13: 0x4000, 0xf14: 0x4000, 0xf15: 0x4000, 0xf16: 0x4000, 0xf17: 0x4000,
- 0xf18: 0x4000, 0xf19: 0x4000, 0xf1a: 0x4000, 0xf1b: 0x4000, 0xf1c: 0x4000, 0xf1d: 0x4000,
- 0xf1e: 0x4000, 0xf1f: 0x4000, 0xf20: 0x4000, 0xf21: 0x4000, 0xf22: 0x4000, 0xf23: 0x4000,
- 0xf24: 0x4000, 0xf25: 0x4000, 0xf26: 0x4000, 0xf27: 0x4000, 0xf28: 0x4000, 0xf29: 0x4000,
- 0xf2a: 0x4000, 0xf2b: 0x4000, 0xf2c: 0x4000, 0xf2d: 0x4000, 0xf2e: 0x4000, 0xf2f: 0x4000,
- 0xf30: 0x4000, 0xf31: 0x4000, 0xf32: 0x4000, 0xf33: 0x4000, 0xf34: 0x4000, 0xf35: 0x4000,
- 0xf36: 0x4000, 0xf37: 0x4000, 0xf38: 0x4000, 0xf39: 0x4000, 0xf3a: 0x4000, 0xf3b: 0x4000,
- 0xf3c: 0x4000, 0xf3d: 0x4000, 0xf3e: 0x4000,
- // Block 0x3d, offset 0xf40
- 0xf40: 0x4000, 0xf41: 0x4000, 0xf42: 0x4000, 0xf43: 0x4000, 0xf44: 0x4000, 0xf45: 0x4000,
- 0xf46: 0x4000, 0xf47: 0x4000, 0xf48: 0x4000, 0xf49: 0x4000, 0xf4a: 0x4000, 0xf4b: 0x4000,
- 0xf4c: 0x4000, 0xf50: 0x4000, 0xf51: 0x4000,
- 0xf52: 0x4000, 0xf53: 0x4000, 0xf54: 0x4000, 0xf55: 0x4000, 0xf56: 0x4000, 0xf57: 0x4000,
- 0xf58: 0x4000, 0xf59: 0x4000, 0xf5a: 0x4000, 0xf5b: 0x4000, 0xf5c: 0x4000, 0xf5d: 0x4000,
- 0xf5e: 0x4000, 0xf5f: 0x4000, 0xf60: 0x4000, 0xf61: 0x4000, 0xf62: 0x4000, 0xf63: 0x4000,
- 0xf64: 0x4000, 0xf65: 0x4000, 0xf66: 0x4000, 0xf67: 0x4000, 0xf68: 0x4000, 0xf69: 0x4000,
- 0xf6a: 0x4000, 0xf6b: 0x4000, 0xf6c: 0x4000, 0xf6d: 0x4000, 0xf6e: 0x4000, 0xf6f: 0x4000,
- 0xf70: 0x4000, 0xf71: 0x4000, 0xf72: 0x4000, 0xf73: 0x4000, 0xf74: 0x4000, 0xf75: 0x4000,
- 0xf76: 0x4000, 0xf77: 0x4000, 0xf78: 0x4000, 0xf79: 0x4000, 0xf7a: 0x4000, 0xf7b: 0x4000,
- 0xf7c: 0x4000, 0xf7d: 0x4000, 0xf7e: 0x4000, 0xf7f: 0x4000,
- // Block 0x3e, offset 0xf80
- 0xf80: 0x4000, 0xf81: 0x4000, 0xf82: 0x4000, 0xf83: 0x4000, 0xf84: 0x4000, 0xf85: 0x4000,
- 0xf86: 0x4000,
- // Block 0x3f, offset 0xfc0
- 0xfe0: 0x4000, 0xfe1: 0x4000, 0xfe2: 0x4000, 0xfe3: 0x4000,
- 0xfe4: 0x4000, 0xfe5: 0x4000, 0xfe6: 0x4000, 0xfe7: 0x4000, 0xfe8: 0x4000, 0xfe9: 0x4000,
- 0xfea: 0x4000, 0xfeb: 0x4000, 0xfec: 0x4000, 0xfed: 0x4000, 0xfee: 0x4000, 0xfef: 0x4000,
- 0xff0: 0x4000, 0xff1: 0x4000, 0xff2: 0x4000, 0xff3: 0x4000, 0xff4: 0x4000, 0xff5: 0x4000,
- 0xff6: 0x4000, 0xff7: 0x4000, 0xff8: 0x4000, 0xff9: 0x4000, 0xffa: 0x4000, 0xffb: 0x4000,
- 0xffc: 0x4000,
- // Block 0x40, offset 0x1000
- 0x1000: 0x4000, 0x1001: 0x4000, 0x1002: 0x4000, 0x1003: 0x4000, 0x1004: 0x4000, 0x1005: 0x4000,
- 0x1006: 0x4000, 0x1007: 0x4000, 0x1008: 0x4000, 0x1009: 0x4000, 0x100a: 0x4000, 0x100b: 0x4000,
- 0x100c: 0x4000, 0x100d: 0x4000, 0x100e: 0x4000, 0x100f: 0x4000, 0x1010: 0x4000, 0x1011: 0x4000,
- 0x1012: 0x4000, 0x1013: 0x4000, 0x1014: 0x4000, 0x1015: 0x4000, 0x1016: 0x4000, 0x1017: 0x4000,
- 0x1018: 0x4000, 0x1019: 0x4000, 0x101a: 0x4000, 0x101b: 0x4000, 0x101c: 0x4000, 0x101d: 0x4000,
- 0x101e: 0x4000, 0x101f: 0x4000, 0x1020: 0x4000, 0x1021: 0x4000, 0x1022: 0x4000, 0x1023: 0x4000,
- // Block 0x41, offset 0x1040
- 0x1040: 0x2000, 0x1041: 0x2000, 0x1042: 0x2000, 0x1043: 0x2000, 0x1044: 0x2000, 0x1045: 0x2000,
- 0x1046: 0x2000, 0x1047: 0x2000, 0x1048: 0x2000, 0x1049: 0x2000, 0x104a: 0x2000, 0x104b: 0x2000,
- 0x104c: 0x2000, 0x104d: 0x2000, 0x104e: 0x2000, 0x104f: 0x2000, 0x1050: 0x4000, 0x1051: 0x4000,
- 0x1052: 0x4000, 0x1053: 0x4000, 0x1054: 0x4000, 0x1055: 0x4000, 0x1056: 0x4000, 0x1057: 0x4000,
- 0x1058: 0x4000, 0x1059: 0x4000,
- 0x1070: 0x4000, 0x1071: 0x4000, 0x1072: 0x4000, 0x1073: 0x4000, 0x1074: 0x4000, 0x1075: 0x4000,
- 0x1076: 0x4000, 0x1077: 0x4000, 0x1078: 0x4000, 0x1079: 0x4000, 0x107a: 0x4000, 0x107b: 0x4000,
- 0x107c: 0x4000, 0x107d: 0x4000, 0x107e: 0x4000, 0x107f: 0x4000,
- // Block 0x42, offset 0x1080
- 0x1080: 0x4000, 0x1081: 0x4000, 0x1082: 0x4000, 0x1083: 0x4000, 0x1084: 0x4000, 0x1085: 0x4000,
- 0x1086: 0x4000, 0x1087: 0x4000, 0x1088: 0x4000, 0x1089: 0x4000, 0x108a: 0x4000, 0x108b: 0x4000,
- 0x108c: 0x4000, 0x108d: 0x4000, 0x108e: 0x4000, 0x108f: 0x4000, 0x1090: 0x4000, 0x1091: 0x4000,
- 0x1092: 0x4000, 0x1094: 0x4000, 0x1095: 0x4000, 0x1096: 0x4000, 0x1097: 0x4000,
- 0x1098: 0x4000, 0x1099: 0x4000, 0x109a: 0x4000, 0x109b: 0x4000, 0x109c: 0x4000, 0x109d: 0x4000,
- 0x109e: 0x4000, 0x109f: 0x4000, 0x10a0: 0x4000, 0x10a1: 0x4000, 0x10a2: 0x4000, 0x10a3: 0x4000,
- 0x10a4: 0x4000, 0x10a5: 0x4000, 0x10a6: 0x4000, 0x10a8: 0x4000, 0x10a9: 0x4000,
- 0x10aa: 0x4000, 0x10ab: 0x4000,
- // Block 0x43, offset 0x10c0
- 0x10c1: 0x9012, 0x10c2: 0x9012, 0x10c3: 0x9012, 0x10c4: 0x9012, 0x10c5: 0x9012,
- 0x10c6: 0x9012, 0x10c7: 0x9012, 0x10c8: 0x9012, 0x10c9: 0x9012, 0x10ca: 0x9012, 0x10cb: 0x9012,
- 0x10cc: 0x9012, 0x10cd: 0x9012, 0x10ce: 0x9012, 0x10cf: 0x9012, 0x10d0: 0x9012, 0x10d1: 0x9012,
- 0x10d2: 0x9012, 0x10d3: 0x9012, 0x10d4: 0x9012, 0x10d5: 0x9012, 0x10d6: 0x9012, 0x10d7: 0x9012,
- 0x10d8: 0x9012, 0x10d9: 0x9012, 0x10da: 0x9012, 0x10db: 0x9012, 0x10dc: 0x9012, 0x10dd: 0x9012,
- 0x10de: 0x9012, 0x10df: 0x9012, 0x10e0: 0x9049, 0x10e1: 0x9049, 0x10e2: 0x9049, 0x10e3: 0x9049,
- 0x10e4: 0x9049, 0x10e5: 0x9049, 0x10e6: 0x9049, 0x10e7: 0x9049, 0x10e8: 0x9049, 0x10e9: 0x9049,
- 0x10ea: 0x9049, 0x10eb: 0x9049, 0x10ec: 0x9049, 0x10ed: 0x9049, 0x10ee: 0x9049, 0x10ef: 0x9049,
- 0x10f0: 0x9049, 0x10f1: 0x9049, 0x10f2: 0x9049, 0x10f3: 0x9049, 0x10f4: 0x9049, 0x10f5: 0x9049,
- 0x10f6: 0x9049, 0x10f7: 0x9049, 0x10f8: 0x9049, 0x10f9: 0x9049, 0x10fa: 0x9049, 0x10fb: 0x9049,
- 0x10fc: 0x9049, 0x10fd: 0x9049, 0x10fe: 0x9049, 0x10ff: 0x9049,
- // Block 0x44, offset 0x1100
- 0x1100: 0x9049, 0x1101: 0x9049, 0x1102: 0x9049, 0x1103: 0x9049, 0x1104: 0x9049, 0x1105: 0x9049,
- 0x1106: 0x9049, 0x1107: 0x9049, 0x1108: 0x9049, 0x1109: 0x9049, 0x110a: 0x9049, 0x110b: 0x9049,
- 0x110c: 0x9049, 0x110d: 0x9049, 0x110e: 0x9049, 0x110f: 0x9049, 0x1110: 0x9049, 0x1111: 0x9049,
- 0x1112: 0x9049, 0x1113: 0x9049, 0x1114: 0x9049, 0x1115: 0x9049, 0x1116: 0x9049, 0x1117: 0x9049,
- 0x1118: 0x9049, 0x1119: 0x9049, 0x111a: 0x9049, 0x111b: 0x9049, 0x111c: 0x9049, 0x111d: 0x9049,
- 0x111e: 0x9049, 0x111f: 0x904a, 0x1120: 0x904b, 0x1121: 0xb04c, 0x1122: 0xb04d, 0x1123: 0xb04d,
- 0x1124: 0xb04e, 0x1125: 0xb04f, 0x1126: 0xb050, 0x1127: 0xb051, 0x1128: 0xb052, 0x1129: 0xb053,
- 0x112a: 0xb054, 0x112b: 0xb055, 0x112c: 0xb056, 0x112d: 0xb057, 0x112e: 0xb058, 0x112f: 0xb059,
- 0x1130: 0xb05a, 0x1131: 0xb05b, 0x1132: 0xb05c, 0x1133: 0xb05d, 0x1134: 0xb05e, 0x1135: 0xb05f,
- 0x1136: 0xb060, 0x1137: 0xb061, 0x1138: 0xb062, 0x1139: 0xb063, 0x113a: 0xb064, 0x113b: 0xb065,
- 0x113c: 0xb052, 0x113d: 0xb066, 0x113e: 0xb067, 0x113f: 0xb055,
- // Block 0x45, offset 0x1140
- 0x1140: 0xb068, 0x1141: 0xb069, 0x1142: 0xb06a, 0x1143: 0xb06b, 0x1144: 0xb05a, 0x1145: 0xb056,
- 0x1146: 0xb06c, 0x1147: 0xb06d, 0x1148: 0xb06b, 0x1149: 0xb06e, 0x114a: 0xb06b, 0x114b: 0xb06f,
- 0x114c: 0xb06f, 0x114d: 0xb070, 0x114e: 0xb070, 0x114f: 0xb071, 0x1150: 0xb056, 0x1151: 0xb072,
- 0x1152: 0xb073, 0x1153: 0xb072, 0x1154: 0xb074, 0x1155: 0xb073, 0x1156: 0xb075, 0x1157: 0xb075,
- 0x1158: 0xb076, 0x1159: 0xb076, 0x115a: 0xb077, 0x115b: 0xb077, 0x115c: 0xb073, 0x115d: 0xb078,
- 0x115e: 0xb079, 0x115f: 0xb067, 0x1160: 0xb07a, 0x1161: 0xb07b, 0x1162: 0xb07b, 0x1163: 0xb07b,
- 0x1164: 0xb07b, 0x1165: 0xb07b, 0x1166: 0xb07b, 0x1167: 0xb07b, 0x1168: 0xb07b, 0x1169: 0xb07b,
- 0x116a: 0xb07b, 0x116b: 0xb07b, 0x116c: 0xb07b, 0x116d: 0xb07b, 0x116e: 0xb07b, 0x116f: 0xb07b,
- 0x1170: 0xb07c, 0x1171: 0xb07c, 0x1172: 0xb07c, 0x1173: 0xb07c, 0x1174: 0xb07c, 0x1175: 0xb07c,
- 0x1176: 0xb07c, 0x1177: 0xb07c, 0x1178: 0xb07c, 0x1179: 0xb07c, 0x117a: 0xb07c, 0x117b: 0xb07c,
- 0x117c: 0xb07c, 0x117d: 0xb07c, 0x117e: 0xb07c,
- // Block 0x46, offset 0x1180
- 0x1182: 0xb07d, 0x1183: 0xb07e, 0x1184: 0xb07f, 0x1185: 0xb080,
- 0x1186: 0xb07f, 0x1187: 0xb07e, 0x118a: 0xb081, 0x118b: 0xb082,
- 0x118c: 0xb083, 0x118d: 0xb07f, 0x118e: 0xb080, 0x118f: 0xb07f,
- 0x1192: 0xb084, 0x1193: 0xb085, 0x1194: 0xb084, 0x1195: 0xb086, 0x1196: 0xb084, 0x1197: 0xb087,
- 0x119a: 0xb088, 0x119b: 0xb089, 0x119c: 0xb08a,
- 0x11a0: 0x908b, 0x11a1: 0x908b, 0x11a2: 0x908c, 0x11a3: 0x908d,
- 0x11a4: 0x908b, 0x11a5: 0x908e, 0x11a6: 0x908f, 0x11a8: 0xb090, 0x11a9: 0xb091,
- 0x11aa: 0xb092, 0x11ab: 0xb091, 0x11ac: 0xb093, 0x11ad: 0xb094, 0x11ae: 0xb095,
- 0x11bd: 0x2000,
- // Block 0x47, offset 0x11c0
- 0x11e0: 0x4000,
- // Block 0x48, offset 0x1200
- 0x1200: 0x4000, 0x1201: 0x4000, 0x1202: 0x4000, 0x1203: 0x4000, 0x1204: 0x4000, 0x1205: 0x4000,
- 0x1206: 0x4000, 0x1207: 0x4000, 0x1208: 0x4000, 0x1209: 0x4000, 0x120a: 0x4000, 0x120b: 0x4000,
- 0x120c: 0x4000, 0x120d: 0x4000, 0x120e: 0x4000, 0x120f: 0x4000, 0x1210: 0x4000, 0x1211: 0x4000,
- 0x1212: 0x4000, 0x1213: 0x4000, 0x1214: 0x4000, 0x1215: 0x4000, 0x1216: 0x4000, 0x1217: 0x4000,
- 0x1218: 0x4000, 0x1219: 0x4000, 0x121a: 0x4000, 0x121b: 0x4000, 0x121c: 0x4000, 0x121d: 0x4000,
- 0x121e: 0x4000, 0x121f: 0x4000, 0x1220: 0x4000, 0x1221: 0x4000, 0x1222: 0x4000, 0x1223: 0x4000,
- 0x1224: 0x4000, 0x1225: 0x4000, 0x1226: 0x4000, 0x1227: 0x4000, 0x1228: 0x4000, 0x1229: 0x4000,
- 0x122a: 0x4000, 0x122b: 0x4000, 0x122c: 0x4000,
- // Block 0x49, offset 0x1240
- 0x1240: 0x4000, 0x1241: 0x4000, 0x1242: 0x4000, 0x1243: 0x4000, 0x1244: 0x4000, 0x1245: 0x4000,
- 0x1246: 0x4000, 0x1247: 0x4000, 0x1248: 0x4000, 0x1249: 0x4000, 0x124a: 0x4000, 0x124b: 0x4000,
- 0x124c: 0x4000, 0x124d: 0x4000, 0x124e: 0x4000, 0x124f: 0x4000, 0x1250: 0x4000, 0x1251: 0x4000,
- 0x1252: 0x4000, 0x1253: 0x4000, 0x1254: 0x4000, 0x1255: 0x4000, 0x1256: 0x4000, 0x1257: 0x4000,
- 0x1258: 0x4000, 0x1259: 0x4000, 0x125a: 0x4000, 0x125b: 0x4000, 0x125c: 0x4000, 0x125d: 0x4000,
- 0x125e: 0x4000, 0x125f: 0x4000, 0x1260: 0x4000, 0x1261: 0x4000, 0x1262: 0x4000, 0x1263: 0x4000,
- 0x1264: 0x4000, 0x1265: 0x4000, 0x1266: 0x4000, 0x1267: 0x4000, 0x1268: 0x4000, 0x1269: 0x4000,
- 0x126a: 0x4000, 0x126b: 0x4000, 0x126c: 0x4000, 0x126d: 0x4000, 0x126e: 0x4000, 0x126f: 0x4000,
- 0x1270: 0x4000, 0x1271: 0x4000, 0x1272: 0x4000,
- // Block 0x4a, offset 0x1280
- 0x1280: 0x4000, 0x1281: 0x4000,
- // Block 0x4b, offset 0x12c0
- 0x12c4: 0x4000,
- // Block 0x4c, offset 0x1300
- 0x130f: 0x4000,
- // Block 0x4d, offset 0x1340
- 0x1340: 0x2000, 0x1341: 0x2000, 0x1342: 0x2000, 0x1343: 0x2000, 0x1344: 0x2000, 0x1345: 0x2000,
- 0x1346: 0x2000, 0x1347: 0x2000, 0x1348: 0x2000, 0x1349: 0x2000, 0x134a: 0x2000,
- 0x1350: 0x2000, 0x1351: 0x2000,
- 0x1352: 0x2000, 0x1353: 0x2000, 0x1354: 0x2000, 0x1355: 0x2000, 0x1356: 0x2000, 0x1357: 0x2000,
- 0x1358: 0x2000, 0x1359: 0x2000, 0x135a: 0x2000, 0x135b: 0x2000, 0x135c: 0x2000, 0x135d: 0x2000,
- 0x135e: 0x2000, 0x135f: 0x2000, 0x1360: 0x2000, 0x1361: 0x2000, 0x1362: 0x2000, 0x1363: 0x2000,
- 0x1364: 0x2000, 0x1365: 0x2000, 0x1366: 0x2000, 0x1367: 0x2000, 0x1368: 0x2000, 0x1369: 0x2000,
- 0x136a: 0x2000, 0x136b: 0x2000, 0x136c: 0x2000, 0x136d: 0x2000,
- 0x1370: 0x2000, 0x1371: 0x2000, 0x1372: 0x2000, 0x1373: 0x2000, 0x1374: 0x2000, 0x1375: 0x2000,
- 0x1376: 0x2000, 0x1377: 0x2000, 0x1378: 0x2000, 0x1379: 0x2000, 0x137a: 0x2000, 0x137b: 0x2000,
- 0x137c: 0x2000, 0x137d: 0x2000, 0x137e: 0x2000, 0x137f: 0x2000,
- // Block 0x4e, offset 0x1380
- 0x1380: 0x2000, 0x1381: 0x2000, 0x1382: 0x2000, 0x1383: 0x2000, 0x1384: 0x2000, 0x1385: 0x2000,
- 0x1386: 0x2000, 0x1387: 0x2000, 0x1388: 0x2000, 0x1389: 0x2000, 0x138a: 0x2000, 0x138b: 0x2000,
- 0x138c: 0x2000, 0x138d: 0x2000, 0x138e: 0x2000, 0x138f: 0x2000, 0x1390: 0x2000, 0x1391: 0x2000,
- 0x1392: 0x2000, 0x1393: 0x2000, 0x1394: 0x2000, 0x1395: 0x2000, 0x1396: 0x2000, 0x1397: 0x2000,
- 0x1398: 0x2000, 0x1399: 0x2000, 0x139a: 0x2000, 0x139b: 0x2000, 0x139c: 0x2000, 0x139d: 0x2000,
- 0x139e: 0x2000, 0x139f: 0x2000, 0x13a0: 0x2000, 0x13a1: 0x2000, 0x13a2: 0x2000, 0x13a3: 0x2000,
- 0x13a4: 0x2000, 0x13a5: 0x2000, 0x13a6: 0x2000, 0x13a7: 0x2000, 0x13a8: 0x2000, 0x13a9: 0x2000,
- 0x13b0: 0x2000, 0x13b1: 0x2000, 0x13b2: 0x2000, 0x13b3: 0x2000, 0x13b4: 0x2000, 0x13b5: 0x2000,
- 0x13b6: 0x2000, 0x13b7: 0x2000, 0x13b8: 0x2000, 0x13b9: 0x2000, 0x13ba: 0x2000, 0x13bb: 0x2000,
- 0x13bc: 0x2000, 0x13bd: 0x2000, 0x13be: 0x2000, 0x13bf: 0x2000,
- // Block 0x4f, offset 0x13c0
- 0x13c0: 0x2000, 0x13c1: 0x2000, 0x13c2: 0x2000, 0x13c3: 0x2000, 0x13c4: 0x2000, 0x13c5: 0x2000,
- 0x13c6: 0x2000, 0x13c7: 0x2000, 0x13c8: 0x2000, 0x13c9: 0x2000, 0x13ca: 0x2000, 0x13cb: 0x2000,
- 0x13cc: 0x2000, 0x13cd: 0x2000, 0x13ce: 0x4000, 0x13cf: 0x2000, 0x13d0: 0x2000, 0x13d1: 0x4000,
- 0x13d2: 0x4000, 0x13d3: 0x4000, 0x13d4: 0x4000, 0x13d5: 0x4000, 0x13d6: 0x4000, 0x13d7: 0x4000,
- 0x13d8: 0x4000, 0x13d9: 0x4000, 0x13da: 0x4000, 0x13db: 0x2000, 0x13dc: 0x2000, 0x13dd: 0x2000,
- 0x13de: 0x2000, 0x13df: 0x2000, 0x13e0: 0x2000, 0x13e1: 0x2000, 0x13e2: 0x2000, 0x13e3: 0x2000,
- 0x13e4: 0x2000, 0x13e5: 0x2000, 0x13e6: 0x2000, 0x13e7: 0x2000, 0x13e8: 0x2000, 0x13e9: 0x2000,
- 0x13ea: 0x2000, 0x13eb: 0x2000, 0x13ec: 0x2000,
- // Block 0x50, offset 0x1400
- 0x1400: 0x4000, 0x1401: 0x4000, 0x1402: 0x4000,
- 0x1410: 0x4000, 0x1411: 0x4000,
- 0x1412: 0x4000, 0x1413: 0x4000, 0x1414: 0x4000, 0x1415: 0x4000, 0x1416: 0x4000, 0x1417: 0x4000,
- 0x1418: 0x4000, 0x1419: 0x4000, 0x141a: 0x4000, 0x141b: 0x4000, 0x141c: 0x4000, 0x141d: 0x4000,
- 0x141e: 0x4000, 0x141f: 0x4000, 0x1420: 0x4000, 0x1421: 0x4000, 0x1422: 0x4000, 0x1423: 0x4000,
- 0x1424: 0x4000, 0x1425: 0x4000, 0x1426: 0x4000, 0x1427: 0x4000, 0x1428: 0x4000, 0x1429: 0x4000,
- 0x142a: 0x4000, 0x142b: 0x4000, 0x142c: 0x4000, 0x142d: 0x4000, 0x142e: 0x4000, 0x142f: 0x4000,
- 0x1430: 0x4000, 0x1431: 0x4000, 0x1432: 0x4000, 0x1433: 0x4000, 0x1434: 0x4000, 0x1435: 0x4000,
- 0x1436: 0x4000, 0x1437: 0x4000, 0x1438: 0x4000, 0x1439: 0x4000, 0x143a: 0x4000, 0x143b: 0x4000,
- // Block 0x51, offset 0x1440
- 0x1440: 0x4000, 0x1441: 0x4000, 0x1442: 0x4000, 0x1443: 0x4000, 0x1444: 0x4000, 0x1445: 0x4000,
- 0x1446: 0x4000, 0x1447: 0x4000, 0x1448: 0x4000,
- 0x1450: 0x4000, 0x1451: 0x4000,
- // Block 0x52, offset 0x1480
- 0x1480: 0x4000, 0x1481: 0x4000, 0x1482: 0x4000, 0x1483: 0x4000, 0x1484: 0x4000, 0x1485: 0x4000,
- 0x1486: 0x4000, 0x1487: 0x4000, 0x1488: 0x4000, 0x1489: 0x4000, 0x148a: 0x4000, 0x148b: 0x4000,
- 0x148c: 0x4000, 0x148d: 0x4000, 0x148e: 0x4000, 0x148f: 0x4000, 0x1490: 0x4000, 0x1491: 0x4000,
- 0x1492: 0x4000, 0x1493: 0x4000, 0x1494: 0x4000, 0x1495: 0x4000, 0x1496: 0x4000, 0x1497: 0x4000,
- 0x1498: 0x4000, 0x1499: 0x4000, 0x149a: 0x4000, 0x149b: 0x4000, 0x149c: 0x4000, 0x149d: 0x4000,
- 0x149e: 0x4000, 0x149f: 0x4000, 0x14a0: 0x4000,
- 0x14ad: 0x4000, 0x14ae: 0x4000, 0x14af: 0x4000,
- 0x14b0: 0x4000, 0x14b1: 0x4000, 0x14b2: 0x4000, 0x14b3: 0x4000, 0x14b4: 0x4000, 0x14b5: 0x4000,
- 0x14b7: 0x4000, 0x14b8: 0x4000, 0x14b9: 0x4000, 0x14ba: 0x4000, 0x14bb: 0x4000,
- 0x14bc: 0x4000, 0x14bd: 0x4000, 0x14be: 0x4000, 0x14bf: 0x4000,
- // Block 0x53, offset 0x14c0
- 0x14c0: 0x4000, 0x14c1: 0x4000, 0x14c2: 0x4000, 0x14c3: 0x4000, 0x14c4: 0x4000, 0x14c5: 0x4000,
- 0x14c6: 0x4000, 0x14c7: 0x4000, 0x14c8: 0x4000, 0x14c9: 0x4000, 0x14ca: 0x4000, 0x14cb: 0x4000,
- 0x14cc: 0x4000, 0x14cd: 0x4000, 0x14ce: 0x4000, 0x14cf: 0x4000, 0x14d0: 0x4000, 0x14d1: 0x4000,
- 0x14d2: 0x4000, 0x14d3: 0x4000, 0x14d4: 0x4000, 0x14d5: 0x4000, 0x14d6: 0x4000, 0x14d7: 0x4000,
- 0x14d8: 0x4000, 0x14d9: 0x4000, 0x14da: 0x4000, 0x14db: 0x4000, 0x14dc: 0x4000, 0x14dd: 0x4000,
- 0x14de: 0x4000, 0x14df: 0x4000, 0x14e0: 0x4000, 0x14e1: 0x4000, 0x14e2: 0x4000, 0x14e3: 0x4000,
- 0x14e4: 0x4000, 0x14e5: 0x4000, 0x14e6: 0x4000, 0x14e7: 0x4000, 0x14e8: 0x4000, 0x14e9: 0x4000,
- 0x14ea: 0x4000, 0x14eb: 0x4000, 0x14ec: 0x4000, 0x14ed: 0x4000, 0x14ee: 0x4000, 0x14ef: 0x4000,
- 0x14f0: 0x4000, 0x14f1: 0x4000, 0x14f2: 0x4000, 0x14f3: 0x4000, 0x14f4: 0x4000, 0x14f5: 0x4000,
- 0x14f6: 0x4000, 0x14f7: 0x4000, 0x14f8: 0x4000, 0x14f9: 0x4000, 0x14fa: 0x4000, 0x14fb: 0x4000,
- 0x14fc: 0x4000, 0x14fe: 0x4000, 0x14ff: 0x4000,
- // Block 0x54, offset 0x1500
- 0x1500: 0x4000, 0x1501: 0x4000, 0x1502: 0x4000, 0x1503: 0x4000, 0x1504: 0x4000, 0x1505: 0x4000,
- 0x1506: 0x4000, 0x1507: 0x4000, 0x1508: 0x4000, 0x1509: 0x4000, 0x150a: 0x4000, 0x150b: 0x4000,
- 0x150c: 0x4000, 0x150d: 0x4000, 0x150e: 0x4000, 0x150f: 0x4000, 0x1510: 0x4000, 0x1511: 0x4000,
- 0x1512: 0x4000, 0x1513: 0x4000,
- 0x1520: 0x4000, 0x1521: 0x4000, 0x1522: 0x4000, 0x1523: 0x4000,
- 0x1524: 0x4000, 0x1525: 0x4000, 0x1526: 0x4000, 0x1527: 0x4000, 0x1528: 0x4000, 0x1529: 0x4000,
- 0x152a: 0x4000, 0x152b: 0x4000, 0x152c: 0x4000, 0x152d: 0x4000, 0x152e: 0x4000, 0x152f: 0x4000,
- 0x1530: 0x4000, 0x1531: 0x4000, 0x1532: 0x4000, 0x1533: 0x4000, 0x1534: 0x4000, 0x1535: 0x4000,
- 0x1536: 0x4000, 0x1537: 0x4000, 0x1538: 0x4000, 0x1539: 0x4000, 0x153a: 0x4000, 0x153b: 0x4000,
- 0x153c: 0x4000, 0x153d: 0x4000, 0x153e: 0x4000, 0x153f: 0x4000,
- // Block 0x55, offset 0x1540
- 0x1540: 0x4000, 0x1541: 0x4000, 0x1542: 0x4000, 0x1543: 0x4000, 0x1544: 0x4000, 0x1545: 0x4000,
- 0x1546: 0x4000, 0x1547: 0x4000, 0x1548: 0x4000, 0x1549: 0x4000, 0x154a: 0x4000,
- 0x154f: 0x4000, 0x1550: 0x4000, 0x1551: 0x4000,
- 0x1552: 0x4000, 0x1553: 0x4000,
- 0x1560: 0x4000, 0x1561: 0x4000, 0x1562: 0x4000, 0x1563: 0x4000,
- 0x1564: 0x4000, 0x1565: 0x4000, 0x1566: 0x4000, 0x1567: 0x4000, 0x1568: 0x4000, 0x1569: 0x4000,
- 0x156a: 0x4000, 0x156b: 0x4000, 0x156c: 0x4000, 0x156d: 0x4000, 0x156e: 0x4000, 0x156f: 0x4000,
- 0x1570: 0x4000, 0x1574: 0x4000,
- 0x1578: 0x4000, 0x1579: 0x4000, 0x157a: 0x4000, 0x157b: 0x4000,
- 0x157c: 0x4000, 0x157d: 0x4000, 0x157e: 0x4000, 0x157f: 0x4000,
- // Block 0x56, offset 0x1580
- 0x1580: 0x4000, 0x1582: 0x4000, 0x1583: 0x4000, 0x1584: 0x4000, 0x1585: 0x4000,
- 0x1586: 0x4000, 0x1587: 0x4000, 0x1588: 0x4000, 0x1589: 0x4000, 0x158a: 0x4000, 0x158b: 0x4000,
- 0x158c: 0x4000, 0x158d: 0x4000, 0x158e: 0x4000, 0x158f: 0x4000, 0x1590: 0x4000, 0x1591: 0x4000,
- 0x1592: 0x4000, 0x1593: 0x4000, 0x1594: 0x4000, 0x1595: 0x4000, 0x1596: 0x4000, 0x1597: 0x4000,
- 0x1598: 0x4000, 0x1599: 0x4000, 0x159a: 0x4000, 0x159b: 0x4000, 0x159c: 0x4000, 0x159d: 0x4000,
- 0x159e: 0x4000, 0x159f: 0x4000, 0x15a0: 0x4000, 0x15a1: 0x4000, 0x15a2: 0x4000, 0x15a3: 0x4000,
- 0x15a4: 0x4000, 0x15a5: 0x4000, 0x15a6: 0x4000, 0x15a7: 0x4000, 0x15a8: 0x4000, 0x15a9: 0x4000,
- 0x15aa: 0x4000, 0x15ab: 0x4000, 0x15ac: 0x4000, 0x15ad: 0x4000, 0x15ae: 0x4000, 0x15af: 0x4000,
- 0x15b0: 0x4000, 0x15b1: 0x4000, 0x15b2: 0x4000, 0x15b3: 0x4000, 0x15b4: 0x4000, 0x15b5: 0x4000,
- 0x15b6: 0x4000, 0x15b7: 0x4000, 0x15b8: 0x4000, 0x15b9: 0x4000, 0x15ba: 0x4000, 0x15bb: 0x4000,
- 0x15bc: 0x4000, 0x15bd: 0x4000, 0x15be: 0x4000, 0x15bf: 0x4000,
- // Block 0x57, offset 0x15c0
- 0x15c0: 0x4000, 0x15c1: 0x4000, 0x15c2: 0x4000, 0x15c3: 0x4000, 0x15c4: 0x4000, 0x15c5: 0x4000,
- 0x15c6: 0x4000, 0x15c7: 0x4000, 0x15c8: 0x4000, 0x15c9: 0x4000, 0x15ca: 0x4000, 0x15cb: 0x4000,
- 0x15cc: 0x4000, 0x15cd: 0x4000, 0x15ce: 0x4000, 0x15cf: 0x4000, 0x15d0: 0x4000, 0x15d1: 0x4000,
- 0x15d2: 0x4000, 0x15d3: 0x4000, 0x15d4: 0x4000, 0x15d5: 0x4000, 0x15d6: 0x4000, 0x15d7: 0x4000,
- 0x15d8: 0x4000, 0x15d9: 0x4000, 0x15da: 0x4000, 0x15db: 0x4000, 0x15dc: 0x4000, 0x15dd: 0x4000,
- 0x15de: 0x4000, 0x15df: 0x4000, 0x15e0: 0x4000, 0x15e1: 0x4000, 0x15e2: 0x4000, 0x15e3: 0x4000,
- 0x15e4: 0x4000, 0x15e5: 0x4000, 0x15e6: 0x4000, 0x15e7: 0x4000, 0x15e8: 0x4000, 0x15e9: 0x4000,
- 0x15ea: 0x4000, 0x15eb: 0x4000, 0x15ec: 0x4000, 0x15ed: 0x4000, 0x15ee: 0x4000, 0x15ef: 0x4000,
- 0x15f0: 0x4000, 0x15f1: 0x4000, 0x15f2: 0x4000, 0x15f3: 0x4000, 0x15f4: 0x4000, 0x15f5: 0x4000,
- 0x15f6: 0x4000, 0x15f7: 0x4000, 0x15f8: 0x4000, 0x15f9: 0x4000, 0x15fa: 0x4000, 0x15fb: 0x4000,
- 0x15fc: 0x4000, 0x15ff: 0x4000,
- // Block 0x58, offset 0x1600
- 0x1600: 0x4000, 0x1601: 0x4000, 0x1602: 0x4000, 0x1603: 0x4000, 0x1604: 0x4000, 0x1605: 0x4000,
- 0x1606: 0x4000, 0x1607: 0x4000, 0x1608: 0x4000, 0x1609: 0x4000, 0x160a: 0x4000, 0x160b: 0x4000,
- 0x160c: 0x4000, 0x160d: 0x4000, 0x160e: 0x4000, 0x160f: 0x4000, 0x1610: 0x4000, 0x1611: 0x4000,
- 0x1612: 0x4000, 0x1613: 0x4000, 0x1614: 0x4000, 0x1615: 0x4000, 0x1616: 0x4000, 0x1617: 0x4000,
- 0x1618: 0x4000, 0x1619: 0x4000, 0x161a: 0x4000, 0x161b: 0x4000, 0x161c: 0x4000, 0x161d: 0x4000,
- 0x161e: 0x4000, 0x161f: 0x4000, 0x1620: 0x4000, 0x1621: 0x4000, 0x1622: 0x4000, 0x1623: 0x4000,
- 0x1624: 0x4000, 0x1625: 0x4000, 0x1626: 0x4000, 0x1627: 0x4000, 0x1628: 0x4000, 0x1629: 0x4000,
- 0x162a: 0x4000, 0x162b: 0x4000, 0x162c: 0x4000, 0x162d: 0x4000, 0x162e: 0x4000, 0x162f: 0x4000,
- 0x1630: 0x4000, 0x1631: 0x4000, 0x1632: 0x4000, 0x1633: 0x4000, 0x1634: 0x4000, 0x1635: 0x4000,
- 0x1636: 0x4000, 0x1637: 0x4000, 0x1638: 0x4000, 0x1639: 0x4000, 0x163a: 0x4000, 0x163b: 0x4000,
- 0x163c: 0x4000, 0x163d: 0x4000,
- // Block 0x59, offset 0x1640
- 0x164b: 0x4000,
- 0x164c: 0x4000, 0x164d: 0x4000, 0x164e: 0x4000, 0x1650: 0x4000, 0x1651: 0x4000,
- 0x1652: 0x4000, 0x1653: 0x4000, 0x1654: 0x4000, 0x1655: 0x4000, 0x1656: 0x4000, 0x1657: 0x4000,
- 0x1658: 0x4000, 0x1659: 0x4000, 0x165a: 0x4000, 0x165b: 0x4000, 0x165c: 0x4000, 0x165d: 0x4000,
- 0x165e: 0x4000, 0x165f: 0x4000, 0x1660: 0x4000, 0x1661: 0x4000, 0x1662: 0x4000, 0x1663: 0x4000,
- 0x1664: 0x4000, 0x1665: 0x4000, 0x1666: 0x4000, 0x1667: 0x4000,
- 0x167a: 0x4000,
- // Block 0x5a, offset 0x1680
- 0x1695: 0x4000, 0x1696: 0x4000,
- 0x16a4: 0x4000,
- // Block 0x5b, offset 0x16c0
- 0x16fb: 0x4000,
- 0x16fc: 0x4000, 0x16fd: 0x4000, 0x16fe: 0x4000, 0x16ff: 0x4000,
- // Block 0x5c, offset 0x1700
- 0x1700: 0x4000, 0x1701: 0x4000, 0x1702: 0x4000, 0x1703: 0x4000, 0x1704: 0x4000, 0x1705: 0x4000,
- 0x1706: 0x4000, 0x1707: 0x4000, 0x1708: 0x4000, 0x1709: 0x4000, 0x170a: 0x4000, 0x170b: 0x4000,
- 0x170c: 0x4000, 0x170d: 0x4000, 0x170e: 0x4000, 0x170f: 0x4000,
- // Block 0x5d, offset 0x1740
- 0x1740: 0x4000, 0x1741: 0x4000, 0x1742: 0x4000, 0x1743: 0x4000, 0x1744: 0x4000, 0x1745: 0x4000,
- 0x174c: 0x4000, 0x1750: 0x4000, 0x1751: 0x4000,
- 0x1752: 0x4000,
- 0x176b: 0x4000, 0x176c: 0x4000,
- 0x1774: 0x4000, 0x1775: 0x4000,
- 0x1776: 0x4000,
- // Block 0x5e, offset 0x1780
- 0x1790: 0x4000, 0x1791: 0x4000,
- 0x1792: 0x4000, 0x1793: 0x4000, 0x1794: 0x4000, 0x1795: 0x4000, 0x1796: 0x4000, 0x1797: 0x4000,
- 0x1798: 0x4000, 0x1799: 0x4000, 0x179a: 0x4000, 0x179b: 0x4000, 0x179c: 0x4000, 0x179d: 0x4000,
- 0x179e: 0x4000, 0x17a0: 0x4000, 0x17a1: 0x4000, 0x17a2: 0x4000, 0x17a3: 0x4000,
- 0x17a4: 0x4000, 0x17a5: 0x4000, 0x17a6: 0x4000, 0x17a7: 0x4000,
- 0x17b0: 0x4000, 0x17b3: 0x4000, 0x17b4: 0x4000, 0x17b5: 0x4000,
- 0x17b6: 0x4000, 0x17b7: 0x4000, 0x17b8: 0x4000, 0x17b9: 0x4000, 0x17ba: 0x4000, 0x17bb: 0x4000,
- 0x17bc: 0x4000, 0x17bd: 0x4000, 0x17be: 0x4000,
- // Block 0x5f, offset 0x17c0
- 0x17c0: 0x4000, 0x17c1: 0x4000, 0x17c2: 0x4000, 0x17c3: 0x4000, 0x17c4: 0x4000, 0x17c5: 0x4000,
- 0x17c6: 0x4000, 0x17c7: 0x4000, 0x17c8: 0x4000, 0x17c9: 0x4000, 0x17ca: 0x4000, 0x17cb: 0x4000,
- 0x17d0: 0x4000, 0x17d1: 0x4000,
- 0x17d2: 0x4000, 0x17d3: 0x4000, 0x17d4: 0x4000, 0x17d5: 0x4000, 0x17d6: 0x4000, 0x17d7: 0x4000,
- 0x17d8: 0x4000, 0x17d9: 0x4000, 0x17da: 0x4000, 0x17db: 0x4000, 0x17dc: 0x4000, 0x17dd: 0x4000,
- 0x17de: 0x4000,
- // Block 0x60, offset 0x1800
- 0x1800: 0x4000, 0x1801: 0x4000, 0x1802: 0x4000, 0x1803: 0x4000, 0x1804: 0x4000, 0x1805: 0x4000,
- 0x1806: 0x4000, 0x1807: 0x4000, 0x1808: 0x4000, 0x1809: 0x4000, 0x180a: 0x4000, 0x180b: 0x4000,
- 0x180c: 0x4000, 0x180d: 0x4000, 0x180e: 0x4000, 0x180f: 0x4000, 0x1810: 0x4000, 0x1811: 0x4000,
- // Block 0x61, offset 0x1840
- 0x1840: 0x4000,
- // Block 0x62, offset 0x1880
- 0x1880: 0x2000, 0x1881: 0x2000, 0x1882: 0x2000, 0x1883: 0x2000, 0x1884: 0x2000, 0x1885: 0x2000,
- 0x1886: 0x2000, 0x1887: 0x2000, 0x1888: 0x2000, 0x1889: 0x2000, 0x188a: 0x2000, 0x188b: 0x2000,
- 0x188c: 0x2000, 0x188d: 0x2000, 0x188e: 0x2000, 0x188f: 0x2000, 0x1890: 0x2000, 0x1891: 0x2000,
- 0x1892: 0x2000, 0x1893: 0x2000, 0x1894: 0x2000, 0x1895: 0x2000, 0x1896: 0x2000, 0x1897: 0x2000,
- 0x1898: 0x2000, 0x1899: 0x2000, 0x189a: 0x2000, 0x189b: 0x2000, 0x189c: 0x2000, 0x189d: 0x2000,
- 0x189e: 0x2000, 0x189f: 0x2000, 0x18a0: 0x2000, 0x18a1: 0x2000, 0x18a2: 0x2000, 0x18a3: 0x2000,
- 0x18a4: 0x2000, 0x18a5: 0x2000, 0x18a6: 0x2000, 0x18a7: 0x2000, 0x18a8: 0x2000, 0x18a9: 0x2000,
- 0x18aa: 0x2000, 0x18ab: 0x2000, 0x18ac: 0x2000, 0x18ad: 0x2000, 0x18ae: 0x2000, 0x18af: 0x2000,
- 0x18b0: 0x2000, 0x18b1: 0x2000, 0x18b2: 0x2000, 0x18b3: 0x2000, 0x18b4: 0x2000, 0x18b5: 0x2000,
- 0x18b6: 0x2000, 0x18b7: 0x2000, 0x18b8: 0x2000, 0x18b9: 0x2000, 0x18ba: 0x2000, 0x18bb: 0x2000,
- 0x18bc: 0x2000, 0x18bd: 0x2000,
-}
-
-// widthIndex: 22 blocks, 1408 entries, 1408 bytes
-// Block 0 is the zero block.
-var widthIndex = [1408]uint8{
- // Block 0x0, offset 0x0
- // Block 0x1, offset 0x40
- // Block 0x2, offset 0x80
- // Block 0x3, offset 0xc0
- 0xc2: 0x01, 0xc3: 0x02, 0xc4: 0x03, 0xc5: 0x04, 0xc7: 0x05,
- 0xc9: 0x06, 0xcb: 0x07, 0xcc: 0x08, 0xcd: 0x09, 0xce: 0x0a, 0xcf: 0x0b,
- 0xd0: 0x0c, 0xd1: 0x0d,
- 0xe1: 0x02, 0xe2: 0x03, 0xe3: 0x04, 0xe4: 0x05, 0xe5: 0x06, 0xe6: 0x06, 0xe7: 0x06,
- 0xe8: 0x06, 0xe9: 0x06, 0xea: 0x07, 0xeb: 0x06, 0xec: 0x06, 0xed: 0x08, 0xee: 0x09, 0xef: 0x0a,
- 0xf0: 0x0f, 0xf3: 0x12, 0xf4: 0x13,
- // Block 0x4, offset 0x100
- 0x104: 0x0e, 0x105: 0x0f,
- // Block 0x5, offset 0x140
- 0x140: 0x10, 0x141: 0x11, 0x142: 0x12, 0x144: 0x13, 0x145: 0x14, 0x146: 0x15, 0x147: 0x16,
- 0x148: 0x17, 0x149: 0x18, 0x14a: 0x19, 0x14c: 0x1a, 0x14f: 0x1b,
- 0x151: 0x1c, 0x152: 0x08, 0x153: 0x1d, 0x154: 0x1e, 0x155: 0x1f, 0x156: 0x20, 0x157: 0x21,
- 0x158: 0x22, 0x159: 0x23, 0x15a: 0x24, 0x15b: 0x25, 0x15c: 0x26, 0x15d: 0x27, 0x15e: 0x28, 0x15f: 0x29,
- 0x166: 0x2a,
- 0x16c: 0x2b, 0x16d: 0x2c,
- 0x17a: 0x2d, 0x17b: 0x2e, 0x17c: 0x0e, 0x17d: 0x0e, 0x17e: 0x0e, 0x17f: 0x2f,
- // Block 0x6, offset 0x180
- 0x180: 0x30, 0x181: 0x31, 0x182: 0x32, 0x183: 0x33, 0x184: 0x34, 0x185: 0x35, 0x186: 0x36, 0x187: 0x37,
- 0x188: 0x38, 0x189: 0x39, 0x18a: 0x0e, 0x18b: 0x3a, 0x18c: 0x0e, 0x18d: 0x0e, 0x18e: 0x0e, 0x18f: 0x0e,
- 0x190: 0x0e, 0x191: 0x0e, 0x192: 0x0e, 0x193: 0x0e, 0x194: 0x0e, 0x195: 0x0e, 0x196: 0x0e, 0x197: 0x0e,
- 0x198: 0x0e, 0x199: 0x0e, 0x19a: 0x0e, 0x19b: 0x0e, 0x19c: 0x0e, 0x19d: 0x0e, 0x19e: 0x0e, 0x19f: 0x0e,
- 0x1a0: 0x0e, 0x1a1: 0x0e, 0x1a2: 0x0e, 0x1a3: 0x0e, 0x1a4: 0x0e, 0x1a5: 0x0e, 0x1a6: 0x0e, 0x1a7: 0x0e,
- 0x1a8: 0x0e, 0x1a9: 0x0e, 0x1aa: 0x0e, 0x1ab: 0x0e, 0x1ac: 0x0e, 0x1ad: 0x0e, 0x1ae: 0x0e, 0x1af: 0x0e,
- 0x1b0: 0x0e, 0x1b1: 0x0e, 0x1b2: 0x0e, 0x1b3: 0x0e, 0x1b4: 0x0e, 0x1b5: 0x0e, 0x1b6: 0x0e, 0x1b7: 0x0e,
- 0x1b8: 0x0e, 0x1b9: 0x0e, 0x1ba: 0x0e, 0x1bb: 0x0e, 0x1bc: 0x0e, 0x1bd: 0x0e, 0x1be: 0x0e, 0x1bf: 0x0e,
- // Block 0x7, offset 0x1c0
- 0x1c0: 0x0e, 0x1c1: 0x0e, 0x1c2: 0x0e, 0x1c3: 0x0e, 0x1c4: 0x0e, 0x1c5: 0x0e, 0x1c6: 0x0e, 0x1c7: 0x0e,
- 0x1c8: 0x0e, 0x1c9: 0x0e, 0x1ca: 0x0e, 0x1cb: 0x0e, 0x1cc: 0x0e, 0x1cd: 0x0e, 0x1ce: 0x0e, 0x1cf: 0x0e,
- 0x1d0: 0x0e, 0x1d1: 0x0e, 0x1d2: 0x0e, 0x1d3: 0x0e, 0x1d4: 0x0e, 0x1d5: 0x0e, 0x1d6: 0x0e, 0x1d7: 0x0e,
- 0x1d8: 0x0e, 0x1d9: 0x0e, 0x1da: 0x0e, 0x1db: 0x0e, 0x1dc: 0x0e, 0x1dd: 0x0e, 0x1de: 0x0e, 0x1df: 0x0e,
- 0x1e0: 0x0e, 0x1e1: 0x0e, 0x1e2: 0x0e, 0x1e3: 0x0e, 0x1e4: 0x0e, 0x1e5: 0x0e, 0x1e6: 0x0e, 0x1e7: 0x0e,
- 0x1e8: 0x0e, 0x1e9: 0x0e, 0x1ea: 0x0e, 0x1eb: 0x0e, 0x1ec: 0x0e, 0x1ed: 0x0e, 0x1ee: 0x0e, 0x1ef: 0x0e,
- 0x1f0: 0x0e, 0x1f1: 0x0e, 0x1f2: 0x0e, 0x1f3: 0x0e, 0x1f4: 0x0e, 0x1f5: 0x0e, 0x1f6: 0x0e,
- 0x1f8: 0x0e, 0x1f9: 0x0e, 0x1fa: 0x0e, 0x1fb: 0x0e, 0x1fc: 0x0e, 0x1fd: 0x0e, 0x1fe: 0x0e, 0x1ff: 0x0e,
- // Block 0x8, offset 0x200
- 0x200: 0x0e, 0x201: 0x0e, 0x202: 0x0e, 0x203: 0x0e, 0x204: 0x0e, 0x205: 0x0e, 0x206: 0x0e, 0x207: 0x0e,
- 0x208: 0x0e, 0x209: 0x0e, 0x20a: 0x0e, 0x20b: 0x0e, 0x20c: 0x0e, 0x20d: 0x0e, 0x20e: 0x0e, 0x20f: 0x0e,
- 0x210: 0x0e, 0x211: 0x0e, 0x212: 0x0e, 0x213: 0x0e, 0x214: 0x0e, 0x215: 0x0e, 0x216: 0x0e, 0x217: 0x0e,
- 0x218: 0x0e, 0x219: 0x0e, 0x21a: 0x0e, 0x21b: 0x0e, 0x21c: 0x0e, 0x21d: 0x0e, 0x21e: 0x0e, 0x21f: 0x0e,
- 0x220: 0x0e, 0x221: 0x0e, 0x222: 0x0e, 0x223: 0x0e, 0x224: 0x0e, 0x225: 0x0e, 0x226: 0x0e, 0x227: 0x0e,
- 0x228: 0x0e, 0x229: 0x0e, 0x22a: 0x0e, 0x22b: 0x0e, 0x22c: 0x0e, 0x22d: 0x0e, 0x22e: 0x0e, 0x22f: 0x0e,
- 0x230: 0x0e, 0x231: 0x0e, 0x232: 0x0e, 0x233: 0x0e, 0x234: 0x0e, 0x235: 0x0e, 0x236: 0x0e, 0x237: 0x0e,
- 0x238: 0x0e, 0x239: 0x0e, 0x23a: 0x0e, 0x23b: 0x0e, 0x23c: 0x0e, 0x23d: 0x0e, 0x23e: 0x0e, 0x23f: 0x0e,
- // Block 0x9, offset 0x240
- 0x240: 0x0e, 0x241: 0x0e, 0x242: 0x0e, 0x243: 0x0e, 0x244: 0x0e, 0x245: 0x0e, 0x246: 0x0e, 0x247: 0x0e,
- 0x248: 0x0e, 0x249: 0x0e, 0x24a: 0x0e, 0x24b: 0x0e, 0x24c: 0x0e, 0x24d: 0x0e, 0x24e: 0x0e, 0x24f: 0x0e,
- 0x250: 0x0e, 0x251: 0x0e, 0x252: 0x3b, 0x253: 0x3c,
- 0x265: 0x3d,
- 0x270: 0x0e, 0x271: 0x0e, 0x272: 0x0e, 0x273: 0x0e, 0x274: 0x0e, 0x275: 0x0e, 0x276: 0x0e, 0x277: 0x0e,
- 0x278: 0x0e, 0x279: 0x0e, 0x27a: 0x0e, 0x27b: 0x0e, 0x27c: 0x0e, 0x27d: 0x0e, 0x27e: 0x0e, 0x27f: 0x0e,
- // Block 0xa, offset 0x280
- 0x280: 0x0e, 0x281: 0x0e, 0x282: 0x0e, 0x283: 0x0e, 0x284: 0x0e, 0x285: 0x0e, 0x286: 0x0e, 0x287: 0x0e,
- 0x288: 0x0e, 0x289: 0x0e, 0x28a: 0x0e, 0x28b: 0x0e, 0x28c: 0x0e, 0x28d: 0x0e, 0x28e: 0x0e, 0x28f: 0x0e,
- 0x290: 0x0e, 0x291: 0x0e, 0x292: 0x0e, 0x293: 0x0e, 0x294: 0x0e, 0x295: 0x0e, 0x296: 0x0e, 0x297: 0x0e,
- 0x298: 0x0e, 0x299: 0x0e, 0x29a: 0x0e, 0x29b: 0x0e, 0x29c: 0x0e, 0x29d: 0x0e, 0x29e: 0x3e,
- // Block 0xb, offset 0x2c0
- 0x2c0: 0x08, 0x2c1: 0x08, 0x2c2: 0x08, 0x2c3: 0x08, 0x2c4: 0x08, 0x2c5: 0x08, 0x2c6: 0x08, 0x2c7: 0x08,
- 0x2c8: 0x08, 0x2c9: 0x08, 0x2ca: 0x08, 0x2cb: 0x08, 0x2cc: 0x08, 0x2cd: 0x08, 0x2ce: 0x08, 0x2cf: 0x08,
- 0x2d0: 0x08, 0x2d1: 0x08, 0x2d2: 0x08, 0x2d3: 0x08, 0x2d4: 0x08, 0x2d5: 0x08, 0x2d6: 0x08, 0x2d7: 0x08,
- 0x2d8: 0x08, 0x2d9: 0x08, 0x2da: 0x08, 0x2db: 0x08, 0x2dc: 0x08, 0x2dd: 0x08, 0x2de: 0x08, 0x2df: 0x08,
- 0x2e0: 0x08, 0x2e1: 0x08, 0x2e2: 0x08, 0x2e3: 0x08, 0x2e4: 0x08, 0x2e5: 0x08, 0x2e6: 0x08, 0x2e7: 0x08,
- 0x2e8: 0x08, 0x2e9: 0x08, 0x2ea: 0x08, 0x2eb: 0x08, 0x2ec: 0x08, 0x2ed: 0x08, 0x2ee: 0x08, 0x2ef: 0x08,
- 0x2f0: 0x08, 0x2f1: 0x08, 0x2f2: 0x08, 0x2f3: 0x08, 0x2f4: 0x08, 0x2f5: 0x08, 0x2f6: 0x08, 0x2f7: 0x08,
- 0x2f8: 0x08, 0x2f9: 0x08, 0x2fa: 0x08, 0x2fb: 0x08, 0x2fc: 0x08, 0x2fd: 0x08, 0x2fe: 0x08, 0x2ff: 0x08,
- // Block 0xc, offset 0x300
- 0x300: 0x08, 0x301: 0x08, 0x302: 0x08, 0x303: 0x08, 0x304: 0x08, 0x305: 0x08, 0x306: 0x08, 0x307: 0x08,
- 0x308: 0x08, 0x309: 0x08, 0x30a: 0x08, 0x30b: 0x08, 0x30c: 0x08, 0x30d: 0x08, 0x30e: 0x08, 0x30f: 0x08,
- 0x310: 0x08, 0x311: 0x08, 0x312: 0x08, 0x313: 0x08, 0x314: 0x08, 0x315: 0x08, 0x316: 0x08, 0x317: 0x08,
- 0x318: 0x08, 0x319: 0x08, 0x31a: 0x08, 0x31b: 0x08, 0x31c: 0x08, 0x31d: 0x08, 0x31e: 0x08, 0x31f: 0x08,
- 0x320: 0x08, 0x321: 0x08, 0x322: 0x08, 0x323: 0x08, 0x324: 0x0e, 0x325: 0x0e, 0x326: 0x0e, 0x327: 0x0e,
- 0x328: 0x0e, 0x329: 0x0e, 0x32a: 0x0e, 0x32b: 0x0e,
- 0x338: 0x3f, 0x339: 0x40, 0x33c: 0x41, 0x33d: 0x42, 0x33e: 0x43, 0x33f: 0x44,
- // Block 0xd, offset 0x340
- 0x37f: 0x45,
- // Block 0xe, offset 0x380
- 0x380: 0x0e, 0x381: 0x0e, 0x382: 0x0e, 0x383: 0x0e, 0x384: 0x0e, 0x385: 0x0e, 0x386: 0x0e, 0x387: 0x0e,
- 0x388: 0x0e, 0x389: 0x0e, 0x38a: 0x0e, 0x38b: 0x0e, 0x38c: 0x0e, 0x38d: 0x0e, 0x38e: 0x0e, 0x38f: 0x0e,
- 0x390: 0x0e, 0x391: 0x0e, 0x392: 0x0e, 0x393: 0x0e, 0x394: 0x0e, 0x395: 0x0e, 0x396: 0x0e, 0x397: 0x0e,
- 0x398: 0x0e, 0x399: 0x0e, 0x39a: 0x0e, 0x39b: 0x0e, 0x39c: 0x0e, 0x39d: 0x0e, 0x39e: 0x0e, 0x39f: 0x46,
- 0x3a0: 0x0e, 0x3a1: 0x0e, 0x3a2: 0x0e, 0x3a3: 0x0e, 0x3a4: 0x0e, 0x3a5: 0x0e, 0x3a6: 0x0e, 0x3a7: 0x0e,
- 0x3a8: 0x0e, 0x3a9: 0x0e, 0x3aa: 0x0e, 0x3ab: 0x47,
- // Block 0xf, offset 0x3c0
- 0x3c0: 0x48,
- // Block 0x10, offset 0x400
- 0x400: 0x49, 0x403: 0x4a, 0x404: 0x4b, 0x405: 0x4c, 0x406: 0x4d,
- 0x408: 0x4e, 0x409: 0x4f, 0x40c: 0x50, 0x40d: 0x51, 0x40e: 0x52, 0x40f: 0x53,
- 0x410: 0x3a, 0x411: 0x54, 0x412: 0x0e, 0x413: 0x55, 0x414: 0x56, 0x415: 0x57, 0x416: 0x58, 0x417: 0x59,
- 0x418: 0x0e, 0x419: 0x5a, 0x41a: 0x0e, 0x41b: 0x5b,
- 0x424: 0x5c, 0x425: 0x5d, 0x426: 0x5e, 0x427: 0x5f,
- // Block 0x11, offset 0x440
- 0x456: 0x0b, 0x457: 0x06,
- 0x458: 0x0c, 0x45b: 0x0d, 0x45f: 0x0e,
- 0x460: 0x06, 0x461: 0x06, 0x462: 0x06, 0x463: 0x06, 0x464: 0x06, 0x465: 0x06, 0x466: 0x06, 0x467: 0x06,
- 0x468: 0x06, 0x469: 0x06, 0x46a: 0x06, 0x46b: 0x06, 0x46c: 0x06, 0x46d: 0x06, 0x46e: 0x06, 0x46f: 0x06,
- 0x470: 0x06, 0x471: 0x06, 0x472: 0x06, 0x473: 0x06, 0x474: 0x06, 0x475: 0x06, 0x476: 0x06, 0x477: 0x06,
- 0x478: 0x06, 0x479: 0x06, 0x47a: 0x06, 0x47b: 0x06, 0x47c: 0x06, 0x47d: 0x06, 0x47e: 0x06, 0x47f: 0x06,
- // Block 0x12, offset 0x480
- 0x484: 0x08, 0x485: 0x08, 0x486: 0x08, 0x487: 0x09,
- // Block 0x13, offset 0x4c0
- 0x4c0: 0x08, 0x4c1: 0x08, 0x4c2: 0x08, 0x4c3: 0x08, 0x4c4: 0x08, 0x4c5: 0x08, 0x4c6: 0x08, 0x4c7: 0x08,
- 0x4c8: 0x08, 0x4c9: 0x08, 0x4ca: 0x08, 0x4cb: 0x08, 0x4cc: 0x08, 0x4cd: 0x08, 0x4ce: 0x08, 0x4cf: 0x08,
- 0x4d0: 0x08, 0x4d1: 0x08, 0x4d2: 0x08, 0x4d3: 0x08, 0x4d4: 0x08, 0x4d5: 0x08, 0x4d6: 0x08, 0x4d7: 0x08,
- 0x4d8: 0x08, 0x4d9: 0x08, 0x4da: 0x08, 0x4db: 0x08, 0x4dc: 0x08, 0x4dd: 0x08, 0x4de: 0x08, 0x4df: 0x08,
- 0x4e0: 0x08, 0x4e1: 0x08, 0x4e2: 0x08, 0x4e3: 0x08, 0x4e4: 0x08, 0x4e5: 0x08, 0x4e6: 0x08, 0x4e7: 0x08,
- 0x4e8: 0x08, 0x4e9: 0x08, 0x4ea: 0x08, 0x4eb: 0x08, 0x4ec: 0x08, 0x4ed: 0x08, 0x4ee: 0x08, 0x4ef: 0x08,
- 0x4f0: 0x08, 0x4f1: 0x08, 0x4f2: 0x08, 0x4f3: 0x08, 0x4f4: 0x08, 0x4f5: 0x08, 0x4f6: 0x08, 0x4f7: 0x08,
- 0x4f8: 0x08, 0x4f9: 0x08, 0x4fa: 0x08, 0x4fb: 0x08, 0x4fc: 0x08, 0x4fd: 0x08, 0x4fe: 0x08, 0x4ff: 0x60,
- // Block 0x14, offset 0x500
- 0x520: 0x10,
- 0x530: 0x09, 0x531: 0x09, 0x532: 0x09, 0x533: 0x09, 0x534: 0x09, 0x535: 0x09, 0x536: 0x09, 0x537: 0x09,
- 0x538: 0x09, 0x539: 0x09, 0x53a: 0x09, 0x53b: 0x09, 0x53c: 0x09, 0x53d: 0x09, 0x53e: 0x09, 0x53f: 0x11,
- // Block 0x15, offset 0x540
- 0x540: 0x09, 0x541: 0x09, 0x542: 0x09, 0x543: 0x09, 0x544: 0x09, 0x545: 0x09, 0x546: 0x09, 0x547: 0x09,
- 0x548: 0x09, 0x549: 0x09, 0x54a: 0x09, 0x54b: 0x09, 0x54c: 0x09, 0x54d: 0x09, 0x54e: 0x09, 0x54f: 0x11,
-}
-
-// inverseData contains 4-byte entries of the following format:
-// <0 padding>
-// The last byte of the UTF-8-encoded rune is xor-ed with the last byte of the
-// UTF-8 encoding of the original rune. Mappings often have the following
-// pattern:
-// A -> A (U+FF21 -> U+0041)
-// B -> B (U+FF22 -> U+0042)
-// ...
-// By xor-ing the last byte the same entry can be shared by many mappings. This
-// reduces the total number of distinct entries by about two thirds.
-// The resulting entry for the aforementioned mappings is
-// { 0x01, 0xE0, 0x00, 0x00 }
-// Using this entry to map U+FF21 (UTF-8 [EF BC A1]), we get
-// E0 ^ A1 = 41.
-// Similarly, for U+FF22 (UTF-8 [EF BC A2]), we get
-// E0 ^ A2 = 42.
-// Note that because of the xor-ing, the byte sequence stored in the entry is
-// not valid UTF-8.
-var inverseData = [150][4]byte{
- {0x00, 0x00, 0x00, 0x00},
- {0x03, 0xe3, 0x80, 0xa0},
- {0x03, 0xef, 0xbc, 0xa0},
- {0x03, 0xef, 0xbc, 0xe0},
- {0x03, 0xef, 0xbd, 0xe0},
- {0x03, 0xef, 0xbf, 0x02},
- {0x03, 0xef, 0xbf, 0x00},
- {0x03, 0xef, 0xbf, 0x0e},
- {0x03, 0xef, 0xbf, 0x0c},
- {0x03, 0xef, 0xbf, 0x0f},
- {0x03, 0xef, 0xbf, 0x39},
- {0x03, 0xef, 0xbf, 0x3b},
- {0x03, 0xef, 0xbf, 0x3f},
- {0x03, 0xef, 0xbf, 0x2a},
- {0x03, 0xef, 0xbf, 0x0d},
- {0x03, 0xef, 0xbf, 0x25},
- {0x03, 0xef, 0xbd, 0x1a},
- {0x03, 0xef, 0xbd, 0x26},
- {0x01, 0xa0, 0x00, 0x00},
- {0x03, 0xef, 0xbd, 0x25},
- {0x03, 0xef, 0xbd, 0x23},
- {0x03, 0xef, 0xbd, 0x2e},
- {0x03, 0xef, 0xbe, 0x07},
- {0x03, 0xef, 0xbe, 0x05},
- {0x03, 0xef, 0xbd, 0x06},
- {0x03, 0xef, 0xbd, 0x13},
- {0x03, 0xef, 0xbd, 0x0b},
- {0x03, 0xef, 0xbd, 0x16},
- {0x03, 0xef, 0xbd, 0x0c},
- {0x03, 0xef, 0xbd, 0x15},
- {0x03, 0xef, 0xbd, 0x0d},
- {0x03, 0xef, 0xbd, 0x1c},
- {0x03, 0xef, 0xbd, 0x02},
- {0x03, 0xef, 0xbd, 0x1f},
- {0x03, 0xef, 0xbd, 0x1d},
- {0x03, 0xef, 0xbd, 0x17},
- {0x03, 0xef, 0xbd, 0x08},
- {0x03, 0xef, 0xbd, 0x09},
- {0x03, 0xef, 0xbd, 0x0e},
- {0x03, 0xef, 0xbd, 0x04},
- {0x03, 0xef, 0xbd, 0x05},
- {0x03, 0xef, 0xbe, 0x3f},
- {0x03, 0xef, 0xbe, 0x00},
- {0x03, 0xef, 0xbd, 0x2c},
- {0x03, 0xef, 0xbe, 0x06},
- {0x03, 0xef, 0xbe, 0x0c},
- {0x03, 0xef, 0xbe, 0x0f},
- {0x03, 0xef, 0xbe, 0x0d},
- {0x03, 0xef, 0xbe, 0x0b},
- {0x03, 0xef, 0xbe, 0x19},
- {0x03, 0xef, 0xbe, 0x15},
- {0x03, 0xef, 0xbe, 0x11},
- {0x03, 0xef, 0xbe, 0x31},
- {0x03, 0xef, 0xbe, 0x33},
- {0x03, 0xef, 0xbd, 0x0f},
- {0x03, 0xef, 0xbe, 0x30},
- {0x03, 0xef, 0xbe, 0x3e},
- {0x03, 0xef, 0xbe, 0x32},
- {0x03, 0xef, 0xbe, 0x36},
- {0x03, 0xef, 0xbd, 0x14},
- {0x03, 0xef, 0xbe, 0x2e},
- {0x03, 0xef, 0xbd, 0x1e},
- {0x03, 0xef, 0xbe, 0x10},
- {0x03, 0xef, 0xbf, 0x13},
- {0x03, 0xef, 0xbf, 0x15},
- {0x03, 0xef, 0xbf, 0x17},
- {0x03, 0xef, 0xbf, 0x1f},
- {0x03, 0xef, 0xbf, 0x1d},
- {0x03, 0xef, 0xbf, 0x1b},
- {0x03, 0xef, 0xbf, 0x09},
- {0x03, 0xef, 0xbf, 0x0b},
- {0x03, 0xef, 0xbf, 0x37},
- {0x03, 0xef, 0xbe, 0x04},
- {0x01, 0xe0, 0x00, 0x00},
- {0x03, 0xe2, 0xa6, 0x1a},
- {0x03, 0xe2, 0xa6, 0x26},
- {0x03, 0xe3, 0x80, 0x23},
- {0x03, 0xe3, 0x80, 0x2e},
- {0x03, 0xe3, 0x80, 0x25},
- {0x03, 0xe3, 0x83, 0x1e},
- {0x03, 0xe3, 0x83, 0x14},
- {0x03, 0xe3, 0x82, 0x06},
- {0x03, 0xe3, 0x82, 0x0b},
- {0x03, 0xe3, 0x82, 0x0c},
- {0x03, 0xe3, 0x82, 0x0d},
- {0x03, 0xe3, 0x82, 0x02},
- {0x03, 0xe3, 0x83, 0x0f},
- {0x03, 0xe3, 0x83, 0x08},
- {0x03, 0xe3, 0x83, 0x09},
- {0x03, 0xe3, 0x83, 0x2c},
- {0x03, 0xe3, 0x83, 0x0c},
- {0x03, 0xe3, 0x82, 0x13},
- {0x03, 0xe3, 0x82, 0x16},
- {0x03, 0xe3, 0x82, 0x15},
- {0x03, 0xe3, 0x82, 0x1c},
- {0x03, 0xe3, 0x82, 0x1f},
- {0x03, 0xe3, 0x82, 0x1d},
- {0x03, 0xe3, 0x82, 0x1a},
- {0x03, 0xe3, 0x82, 0x17},
- {0x03, 0xe3, 0x82, 0x08},
- {0x03, 0xe3, 0x82, 0x09},
- {0x03, 0xe3, 0x82, 0x0e},
- {0x03, 0xe3, 0x82, 0x04},
- {0x03, 0xe3, 0x82, 0x05},
- {0x03, 0xe3, 0x82, 0x3f},
- {0x03, 0xe3, 0x83, 0x00},
- {0x03, 0xe3, 0x83, 0x06},
- {0x03, 0xe3, 0x83, 0x05},
- {0x03, 0xe3, 0x83, 0x0d},
- {0x03, 0xe3, 0x83, 0x0b},
- {0x03, 0xe3, 0x83, 0x07},
- {0x03, 0xe3, 0x83, 0x19},
- {0x03, 0xe3, 0x83, 0x15},
- {0x03, 0xe3, 0x83, 0x11},
- {0x03, 0xe3, 0x83, 0x31},
- {0x03, 0xe3, 0x83, 0x33},
- {0x03, 0xe3, 0x83, 0x30},
- {0x03, 0xe3, 0x83, 0x3e},
- {0x03, 0xe3, 0x83, 0x32},
- {0x03, 0xe3, 0x83, 0x36},
- {0x03, 0xe3, 0x83, 0x2e},
- {0x03, 0xe3, 0x82, 0x07},
- {0x03, 0xe3, 0x85, 0x04},
- {0x03, 0xe3, 0x84, 0x10},
- {0x03, 0xe3, 0x85, 0x30},
- {0x03, 0xe3, 0x85, 0x0d},
- {0x03, 0xe3, 0x85, 0x13},
- {0x03, 0xe3, 0x85, 0x15},
- {0x03, 0xe3, 0x85, 0x17},
- {0x03, 0xe3, 0x85, 0x1f},
- {0x03, 0xe3, 0x85, 0x1d},
- {0x03, 0xe3, 0x85, 0x1b},
- {0x03, 0xe3, 0x85, 0x09},
- {0x03, 0xe3, 0x85, 0x0f},
- {0x03, 0xe3, 0x85, 0x0b},
- {0x03, 0xe3, 0x85, 0x37},
- {0x03, 0xe3, 0x85, 0x3b},
- {0x03, 0xe3, 0x85, 0x39},
- {0x03, 0xe3, 0x85, 0x3f},
- {0x02, 0xc2, 0x02, 0x00},
- {0x02, 0xc2, 0x0e, 0x00},
- {0x02, 0xc2, 0x0c, 0x00},
- {0x02, 0xc2, 0x00, 0x00},
- {0x03, 0xe2, 0x82, 0x0f},
- {0x03, 0xe2, 0x94, 0x2a},
- {0x03, 0xe2, 0x86, 0x39},
- {0x03, 0xe2, 0x86, 0x3b},
- {0x03, 0xe2, 0x86, 0x3f},
- {0x03, 0xe2, 0x96, 0x0d},
- {0x03, 0xe2, 0x97, 0x25},
-}
-
-// Total table size 14680 bytes (14KiB)
diff --git a/vendor/golang.org/x/text/width/transform.go b/vendor/golang.org/x/text/width/transform.go
deleted file mode 100644
index 0049f700..00000000
--- a/vendor/golang.org/x/text/width/transform.go
+++ /dev/null
@@ -1,239 +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 width
-
-import (
- "unicode/utf8"
-
- "golang.org/x/text/transform"
-)
-
-type foldTransform struct {
- transform.NopResetter
-}
-
-func (foldTransform) Span(src []byte, atEOF bool) (n int, err error) {
- for n < len(src) {
- if src[n] < utf8.RuneSelf {
- // ASCII fast path.
- for n++; n < len(src) && src[n] < utf8.RuneSelf; n++ {
- }
- continue
- }
- v, size := trie.lookup(src[n:])
- if size == 0 { // incomplete UTF-8 encoding
- if !atEOF {
- err = transform.ErrShortSrc
- } else {
- n = len(src)
- }
- break
- }
- if elem(v)&tagNeedsFold != 0 {
- err = transform.ErrEndOfSpan
- break
- }
- n += size
- }
- return n, err
-}
-
-func (foldTransform) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
- for nSrc < len(src) {
- if src[nSrc] < utf8.RuneSelf {
- // ASCII fast path.
- start, end := nSrc, len(src)
- if d := len(dst) - nDst; d < end-start {
- end = nSrc + d
- }
- for nSrc++; nSrc < end && src[nSrc] < utf8.RuneSelf; nSrc++ {
- }
- n := copy(dst[nDst:], src[start:nSrc])
- if nDst += n; nDst == len(dst) {
- nSrc = start + n
- if nSrc == len(src) {
- return nDst, nSrc, nil
- }
- if src[nSrc] < utf8.RuneSelf {
- return nDst, nSrc, transform.ErrShortDst
- }
- }
- continue
- }
- v, size := trie.lookup(src[nSrc:])
- if size == 0 { // incomplete UTF-8 encoding
- if !atEOF {
- return nDst, nSrc, transform.ErrShortSrc
- }
- size = 1 // gobble 1 byte
- }
- if elem(v)&tagNeedsFold == 0 {
- if size != copy(dst[nDst:], src[nSrc:nSrc+size]) {
- return nDst, nSrc, transform.ErrShortDst
- }
- nDst += size
- } else {
- data := inverseData[byte(v)]
- if len(dst)-nDst < int(data[0]) {
- return nDst, nSrc, transform.ErrShortDst
- }
- i := 1
- for end := int(data[0]); i < end; i++ {
- dst[nDst] = data[i]
- nDst++
- }
- dst[nDst] = data[i] ^ src[nSrc+size-1]
- nDst++
- }
- nSrc += size
- }
- return nDst, nSrc, nil
-}
-
-type narrowTransform struct {
- transform.NopResetter
-}
-
-func (narrowTransform) Span(src []byte, atEOF bool) (n int, err error) {
- for n < len(src) {
- if src[n] < utf8.RuneSelf {
- // ASCII fast path.
- for n++; n < len(src) && src[n] < utf8.RuneSelf; n++ {
- }
- continue
- }
- v, size := trie.lookup(src[n:])
- if size == 0 { // incomplete UTF-8 encoding
- if !atEOF {
- err = transform.ErrShortSrc
- } else {
- n = len(src)
- }
- break
- }
- if k := elem(v).kind(); byte(v) == 0 || k != EastAsianFullwidth && k != EastAsianWide && k != EastAsianAmbiguous {
- } else {
- err = transform.ErrEndOfSpan
- break
- }
- n += size
- }
- return n, err
-}
-
-func (narrowTransform) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
- for nSrc < len(src) {
- if src[nSrc] < utf8.RuneSelf {
- // ASCII fast path.
- start, end := nSrc, len(src)
- if d := len(dst) - nDst; d < end-start {
- end = nSrc + d
- }
- for nSrc++; nSrc < end && src[nSrc] < utf8.RuneSelf; nSrc++ {
- }
- n := copy(dst[nDst:], src[start:nSrc])
- if nDst += n; nDst == len(dst) {
- nSrc = start + n
- if nSrc == len(src) {
- return nDst, nSrc, nil
- }
- if src[nSrc] < utf8.RuneSelf {
- return nDst, nSrc, transform.ErrShortDst
- }
- }
- continue
- }
- v, size := trie.lookup(src[nSrc:])
- if size == 0 { // incomplete UTF-8 encoding
- if !atEOF {
- return nDst, nSrc, transform.ErrShortSrc
- }
- size = 1 // gobble 1 byte
- }
- if k := elem(v).kind(); byte(v) == 0 || k != EastAsianFullwidth && k != EastAsianWide && k != EastAsianAmbiguous {
- if size != copy(dst[nDst:], src[nSrc:nSrc+size]) {
- return nDst, nSrc, transform.ErrShortDst
- }
- nDst += size
- } else {
- data := inverseData[byte(v)]
- if len(dst)-nDst < int(data[0]) {
- return nDst, nSrc, transform.ErrShortDst
- }
- i := 1
- for end := int(data[0]); i < end; i++ {
- dst[nDst] = data[i]
- nDst++
- }
- dst[nDst] = data[i] ^ src[nSrc+size-1]
- nDst++
- }
- nSrc += size
- }
- return nDst, nSrc, nil
-}
-
-type wideTransform struct {
- transform.NopResetter
-}
-
-func (wideTransform) Span(src []byte, atEOF bool) (n int, err error) {
- for n < len(src) {
- // TODO: Consider ASCII fast path. Special-casing ASCII handling can
- // reduce the ns/op of BenchmarkWideASCII by about 30%. This is probably
- // not enough to warrant the extra code and complexity.
- v, size := trie.lookup(src[n:])
- if size == 0 { // incomplete UTF-8 encoding
- if !atEOF {
- err = transform.ErrShortSrc
- } else {
- n = len(src)
- }
- break
- }
- if k := elem(v).kind(); byte(v) == 0 || k != EastAsianHalfwidth && k != EastAsianNarrow {
- } else {
- err = transform.ErrEndOfSpan
- break
- }
- n += size
- }
- return n, err
-}
-
-func (wideTransform) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
- for nSrc < len(src) {
- // TODO: Consider ASCII fast path. Special-casing ASCII handling can
- // reduce the ns/op of BenchmarkWideASCII by about 30%. This is probably
- // not enough to warrant the extra code and complexity.
- v, size := trie.lookup(src[nSrc:])
- if size == 0 { // incomplete UTF-8 encoding
- if !atEOF {
- return nDst, nSrc, transform.ErrShortSrc
- }
- size = 1 // gobble 1 byte
- }
- if k := elem(v).kind(); byte(v) == 0 || k != EastAsianHalfwidth && k != EastAsianNarrow {
- if size != copy(dst[nDst:], src[nSrc:nSrc+size]) {
- return nDst, nSrc, transform.ErrShortDst
- }
- nDst += size
- } else {
- data := inverseData[byte(v)]
- if len(dst)-nDst < int(data[0]) {
- return nDst, nSrc, transform.ErrShortDst
- }
- i := 1
- for end := int(data[0]); i < end; i++ {
- dst[nDst] = data[i]
- nDst++
- }
- dst[nDst] = data[i] ^ src[nSrc+size-1]
- nDst++
- }
- nSrc += size
- }
- return nDst, nSrc, nil
-}
diff --git a/vendor/golang.org/x/text/width/trieval.go b/vendor/golang.org/x/text/width/trieval.go
deleted file mode 100644
index ca8e45fd..00000000
--- a/vendor/golang.org/x/text/width/trieval.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
-
-package width
-
-// elem is an entry of the width trie. The high byte is used to encode the type
-// of the rune. The low byte is used to store the index to a mapping entry in
-// the inverseData array.
-type elem uint16
-
-const (
- tagNeutral elem = iota << typeShift
- tagAmbiguous
- tagWide
- tagNarrow
- tagFullwidth
- tagHalfwidth
-)
-
-const (
- numTypeBits = 3
- typeShift = 16 - numTypeBits
-
- // tagNeedsFold is true for all fullwidth and halfwidth runes except for
- // the Won sign U+20A9.
- tagNeedsFold = 0x1000
-
- // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide
- // variant.
- wonSign rune = 0x20A9
-)
diff --git a/vendor/golang.org/x/text/width/width.go b/vendor/golang.org/x/text/width/width.go
deleted file mode 100644
index 29c7509b..00000000
--- a/vendor/golang.org/x/text/width/width.go
+++ /dev/null
@@ -1,206 +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.
-
-//go:generate stringer -type=Kind
-//go:generate go run gen.go gen_common.go gen_trieval.go
-
-// Package width provides functionality for handling different widths in text.
-//
-// Wide characters behave like ideographs; they tend to allow line breaks after
-// each character and remain upright in vertical text layout. Narrow characters
-// are kept together in words or runs that are rotated sideways in vertical text
-// layout.
-//
-// For more information, see https://unicode.org/reports/tr11/.
-package width // import "golang.org/x/text/width"
-
-import (
- "unicode/utf8"
-
- "golang.org/x/text/transform"
-)
-
-// TODO
-// 1) Reduce table size by compressing blocks.
-// 2) API proposition for computing display length
-// (approximation, fixed pitch only).
-// 3) Implement display length.
-
-// Kind indicates the type of width property as defined in https://unicode.org/reports/tr11/.
-type Kind int
-
-const (
- // Neutral characters do not occur in legacy East Asian character sets.
- Neutral Kind = iota
-
- // EastAsianAmbiguous characters that can be sometimes wide and sometimes
- // narrow and require additional information not contained in the character
- // code to further resolve their width.
- EastAsianAmbiguous
-
- // EastAsianWide characters are wide in its usual form. They occur only in
- // the context of East Asian typography. These runes may have explicit
- // halfwidth counterparts.
- EastAsianWide
-
- // EastAsianNarrow characters are narrow in its usual form. They often have
- // fullwidth counterparts.
- EastAsianNarrow
-
- // Note: there exist Narrow runes that do not have fullwidth or wide
- // counterparts, despite what the definition says (e.g. U+27E6).
-
- // EastAsianFullwidth characters have a compatibility decompositions of type
- // wide that map to a narrow counterpart.
- EastAsianFullwidth
-
- // EastAsianHalfwidth characters have a compatibility decomposition of type
- // narrow that map to a wide or ambiguous counterpart, plus U+20A9 ₩ WON
- // SIGN.
- EastAsianHalfwidth
-
- // Note: there exist runes that have a halfwidth counterparts but that are
- // classified as Ambiguous, rather than wide (e.g. U+2190).
-)
-
-// TODO: the generated tries need to return size 1 for invalid runes for the
-// width to be computed correctly (each byte should render width 1)
-
-var trie = newWidthTrie(0)
-
-// Lookup reports the Properties of the first rune in b and the number of bytes
-// of its UTF-8 encoding.
-func Lookup(b []byte) (p Properties, size int) {
- v, sz := trie.lookup(b)
- return Properties{elem(v), b[sz-1]}, sz
-}
-
-// LookupString reports the Properties of the first rune in s and the number of
-// bytes of its UTF-8 encoding.
-func LookupString(s string) (p Properties, size int) {
- v, sz := trie.lookupString(s)
- return Properties{elem(v), s[sz-1]}, sz
-}
-
-// LookupRune reports the Properties of rune r.
-func LookupRune(r rune) Properties {
- var buf [4]byte
- n := utf8.EncodeRune(buf[:], r)
- v, _ := trie.lookup(buf[:n])
- last := byte(r)
- if r >= utf8.RuneSelf {
- last = 0x80 + byte(r&0x3f)
- }
- return Properties{elem(v), last}
-}
-
-// Properties provides access to width properties of a rune.
-type Properties struct {
- elem elem
- last byte
-}
-
-func (e elem) kind() Kind {
- return Kind(e >> typeShift)
-}
-
-// Kind returns the Kind of a rune as defined in Unicode TR #11.
-// See https://unicode.org/reports/tr11/ for more details.
-func (p Properties) Kind() Kind {
- return p.elem.kind()
-}
-
-// Folded returns the folded variant of a rune or 0 if the rune is canonical.
-func (p Properties) Folded() rune {
- if p.elem&tagNeedsFold != 0 {
- buf := inverseData[byte(p.elem)]
- buf[buf[0]] ^= p.last
- r, _ := utf8.DecodeRune(buf[1 : 1+buf[0]])
- return r
- }
- return 0
-}
-
-// Narrow returns the narrow variant of a rune or 0 if the rune is already
-// narrow or doesn't have a narrow variant.
-func (p Properties) Narrow() rune {
- if k := p.elem.kind(); byte(p.elem) != 0 && (k == EastAsianFullwidth || k == EastAsianWide || k == EastAsianAmbiguous) {
- buf := inverseData[byte(p.elem)]
- buf[buf[0]] ^= p.last
- r, _ := utf8.DecodeRune(buf[1 : 1+buf[0]])
- return r
- }
- return 0
-}
-
-// Wide returns the wide variant of a rune or 0 if the rune is already
-// wide or doesn't have a wide variant.
-func (p Properties) Wide() rune {
- if k := p.elem.kind(); byte(p.elem) != 0 && (k == EastAsianHalfwidth || k == EastAsianNarrow) {
- buf := inverseData[byte(p.elem)]
- buf[buf[0]] ^= p.last
- r, _ := utf8.DecodeRune(buf[1 : 1+buf[0]])
- return r
- }
- return 0
-}
-
-// TODO for Properties:
-// - Add Fullwidth/Halfwidth or Inverted methods for computing variants
-// mapping.
-// - Add width information (including information on non-spacing runes).
-
-// Transformer implements the transform.Transformer interface.
-type Transformer struct {
- t transform.SpanningTransformer
-}
-
-// Reset implements the transform.Transformer interface.
-func (t Transformer) Reset() { t.t.Reset() }
-
-// Transform implements the transform.Transformer interface.
-func (t Transformer) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) {
- return t.t.Transform(dst, src, atEOF)
-}
-
-// Span implements the transform.SpanningTransformer interface.
-func (t Transformer) Span(src []byte, atEOF bool) (n int, err error) {
- return t.t.Span(src, atEOF)
-}
-
-// Bytes returns a new byte slice with the result of applying t to b.
-func (t Transformer) Bytes(b []byte) []byte {
- b, _, _ = transform.Bytes(t, b)
- return b
-}
-
-// String returns a string with the result of applying t to s.
-func (t Transformer) String(s string) string {
- s, _, _ = transform.String(t, s)
- return s
-}
-
-var (
- // Fold is a transform that maps all runes to their canonical width.
- //
- // Note that the NFKC and NFKD transforms in golang.org/x/text/unicode/norm
- // provide a more generic folding mechanism.
- Fold Transformer = Transformer{foldTransform{}}
-
- // Widen is a transform that maps runes to their wide variant, if
- // available.
- Widen Transformer = Transformer{wideTransform{}}
-
- // Narrow is a transform that maps runes to their narrow variant, if
- // available.
- Narrow Transformer = Transformer{narrowTransform{}}
-)
-
-// TODO: Consider the following options:
-// - Treat Ambiguous runes that have a halfwidth counterpart as wide, or some
-// generalized variant of this.
-// - Consider a wide Won character to be the default width (or some generalized
-// variant of this).
-// - Filter the set of characters that gets converted (the preferred approach is
-// to allow applying filters to transforms).
diff --git a/vendor/golang.org/x/time/rate/rate.go b/vendor/golang.org/x/time/rate/rate.go
index b0b982e9..e77ade39 100644
--- a/vendor/golang.org/x/time/rate/rate.go
+++ b/vendor/golang.org/x/time/rate/rate.go
@@ -196,13 +196,15 @@ func (lim *Limiter) Reserve() *Reservation {
// The Limiter takes this Reservation into account when allowing future events.
// The returned Reservation’s OK() method returns false if n exceeds the Limiter's burst size.
// Usage example:
-// r := lim.ReserveN(time.Now(), 1)
-// if !r.OK() {
-// // Not allowed to act! Did you remember to set lim.burst to be > 0 ?
-// return
-// }
-// time.Sleep(r.Delay())
-// Act()
+//
+// r := lim.ReserveN(time.Now(), 1)
+// if !r.OK() {
+// // Not allowed to act! Did you remember to set lim.burst to be > 0 ?
+// return
+// }
+// time.Sleep(r.Delay())
+// Act()
+//
// Use this method if you wish to wait and slow down in accordance with the rate limit without dropping events.
// If you need to respect a deadline or cancel the delay, use Wait instead.
// To drop or skip events exceeding rate limit, use Allow instead.
diff --git a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
index 1a33cd5c..84cfb807 100644
--- a/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
+++ b/vendor/golang.org/x/tools/go/internal/gcimporter/iimport.go
@@ -237,6 +237,15 @@ func iimportCommon(fset *token.FileSet, imports map[string]*types.Package, data
pkg.MarkComplete()
}
+ // SetConstraint can't be called if the constraint type is not yet complete.
+ // When type params are created in the 'P' case of (*importReader).obj(),
+ // the associated constraint type may not be complete due to recursion.
+ // Therefore, we defer calling SetConstraint there, and call it here instead
+ // after all types are complete.
+ for _, d := range p.later {
+ typeparams.SetTypeParamConstraint(d.t, d.constraint)
+ }
+
for _, typ := range p.interfaceList {
typ.Complete()
}
@@ -244,6 +253,11 @@ func iimportCommon(fset *token.FileSet, imports map[string]*types.Package, data
return pkgs, nil
}
+type setConstraintArgs struct {
+ t *typeparams.TypeParam
+ constraint types.Type
+}
+
type iimporter struct {
version int
ipath string
@@ -260,6 +274,9 @@ type iimporter struct {
fake fakeFileSet
interfaceList []*types.Interface
+ // Arguments for calls to SetConstraint that are deferred due to recursive types
+ later []setConstraintArgs
+
indent int // for tracing support
}
@@ -458,7 +475,11 @@ func (r *importReader) obj(name string) {
}
typeparams.MarkImplicit(iface)
}
- typeparams.SetTypeParamConstraint(t, constraint)
+ // The constraint type may not be complete, if we
+ // are in the middle of a type recursion involving type
+ // constraints. So, we defer SetConstraint until we have
+ // completely set up all types in ImportData.
+ r.p.later = append(r.p.later, setConstraintArgs{t: t, constraint: constraint})
case 'V':
typ := r.typ()
diff --git a/vendor/golang.org/x/tools/go/loader/loader.go b/vendor/golang.org/x/tools/go/loader/loader.go
index 508a1fd0..3ba91f7c 100644
--- a/vendor/golang.org/x/tools/go/loader/loader.go
+++ b/vendor/golang.org/x/tools/go/loader/loader.go
@@ -23,6 +23,7 @@ import (
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/internal/cgo"
+ "golang.org/x/tools/internal/typeparams"
)
var ignoreVendor build.ImportMode
@@ -1053,6 +1054,7 @@ func (imp *importer) newPackageInfo(path, dir string) *PackageInfo {
errorFunc: imp.conf.TypeChecker.Error,
dir: dir,
}
+ typeparams.InitInstanceInfo(&info.Info)
// Copy the types.Config so we can vary it across PackageInfos.
tc := imp.conf.TypeChecker
diff --git a/vendor/golang.org/x/tools/internal/gocommand/invoke.go b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
index 8659a0c5..f7533683 100644
--- a/vendor/golang.org/x/tools/internal/gocommand/invoke.go
+++ b/vendor/golang.org/x/tools/internal/gocommand/invoke.go
@@ -9,7 +9,6 @@ import (
"bytes"
"context"
"fmt"
- exec "golang.org/x/sys/execabs"
"io"
"os"
"regexp"
@@ -18,6 +17,8 @@ import (
"sync"
"time"
+ exec "golang.org/x/sys/execabs"
+
"golang.org/x/tools/internal/event"
)
@@ -131,9 +132,16 @@ type Invocation struct {
Verb string
Args []string
BuildFlags []string
- ModFlag string
- ModFile string
- Overlay string
+
+ // If ModFlag is set, the go command is invoked with -mod=ModFlag.
+ ModFlag string
+
+ // If ModFile is set, the go command is invoked with -modfile=ModFile.
+ ModFile string
+
+ // If Overlay is set, the go command is invoked with -overlay=Overlay.
+ Overlay string
+
// If CleanEnv is set, the invocation will run only with the environment
// in Env, not starting with os.Environ.
CleanEnv bool
diff --git a/vendor/golang.org/x/tools/internal/gocommand/vendor.go b/vendor/golang.org/x/tools/internal/gocommand/vendor.go
index 5e75bd6d..2d3d408c 100644
--- a/vendor/golang.org/x/tools/internal/gocommand/vendor.go
+++ b/vendor/golang.org/x/tools/internal/gocommand/vendor.go
@@ -38,10 +38,10 @@ var modFlagRegexp = regexp.MustCompile(`-mod[ =](\w+)`)
// with the supplied context.Context and Invocation. The Invocation can contain pre-defined fields,
// of which only Verb and Args are modified to run the appropriate Go command.
// Inspired by setDefaultBuildMod in modload/init.go
-func VendorEnabled(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) {
+func VendorEnabled(ctx context.Context, inv Invocation, r *Runner) (bool, *ModuleJSON, error) {
mainMod, go114, err := getMainModuleAnd114(ctx, inv, r)
if err != nil {
- return nil, false, err
+ return false, nil, err
}
// We check the GOFLAGS to see if there is anything overridden or not.
@@ -49,7 +49,7 @@ func VendorEnabled(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON,
inv.Args = []string{"GOFLAGS"}
stdout, err := r.Run(ctx, inv)
if err != nil {
- return nil, false, err
+ return false, nil, err
}
goflags := string(bytes.TrimSpace(stdout.Bytes()))
matches := modFlagRegexp.FindStringSubmatch(goflags)
@@ -57,25 +57,27 @@ func VendorEnabled(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON,
if len(matches) != 0 {
modFlag = matches[1]
}
- if modFlag != "" {
- // Don't override an explicit '-mod=' argument.
- return mainMod, modFlag == "vendor", nil
+ // Don't override an explicit '-mod=' argument.
+ if modFlag == "vendor" {
+ return true, mainMod, nil
+ } else if modFlag != "" {
+ return false, nil, nil
}
if mainMod == nil || !go114 {
- return mainMod, false, nil
+ return false, nil, nil
}
// Check 1.14's automatic vendor mode.
if fi, err := os.Stat(filepath.Join(mainMod.Dir, "vendor")); err == nil && fi.IsDir() {
if mainMod.GoVersion != "" && semver.Compare("v"+mainMod.GoVersion, "v1.14") >= 0 {
// The Go version is at least 1.14, and a vendor directory exists.
// Set -mod=vendor by default.
- return mainMod, true, nil
+ return true, mainMod, nil
}
}
- return mainMod, false, nil
+ return false, nil, nil
}
-// getMainModuleAnd114 gets the main module's information and whether the
+// getMainModuleAnd114 gets one of the main modules' information and whether the
// go command in use is 1.14+. This is the information needed to figure out
// if vendoring should be enabled.
func getMainModuleAnd114(ctx context.Context, inv Invocation, r *Runner) (*ModuleJSON, bool, error) {
diff --git a/vendor/golang.org/x/tools/internal/imports/imports.go b/vendor/golang.org/x/tools/internal/imports/imports.go
index 2815edc3..25973989 100644
--- a/vendor/golang.org/x/tools/internal/imports/imports.go
+++ b/vendor/golang.org/x/tools/internal/imports/imports.go
@@ -306,7 +306,7 @@ func matchSpace(orig []byte, src []byte) []byte {
return b.Bytes()
}
-var impLine = regexp.MustCompile(`^\s+(?:[\w\.]+\s+)?"(.+)"`)
+var impLine = regexp.MustCompile(`^\s+(?:[\w\.]+\s+)?"(.+?)"`)
func addImportSpaces(r io.Reader, breaks []string) ([]byte, error) {
var out bytes.Buffer
diff --git a/vendor/golang.org/x/tools/internal/imports/mod.go b/vendor/golang.org/x/tools/internal/imports/mod.go
index dff6d553..2bcf41f5 100644
--- a/vendor/golang.org/x/tools/internal/imports/mod.go
+++ b/vendor/golang.org/x/tools/internal/imports/mod.go
@@ -34,7 +34,8 @@ type ModuleResolver struct {
scannedRoots map[gopathwalk.Root]bool
initialized bool
- main *gocommand.ModuleJSON
+ mains []*gocommand.ModuleJSON
+ mainByDir map[string]*gocommand.ModuleJSON
modsByModPath []*gocommand.ModuleJSON // All modules, ordered by # of path components in module Path...
modsByDir []*gocommand.ModuleJSON // ...or Dir.
@@ -69,21 +70,21 @@ func (r *ModuleResolver) init() error {
Logf: r.env.Logf,
WorkingDir: r.env.WorkingDir,
}
- mainMod, vendorEnabled, err := gocommand.VendorEnabled(context.TODO(), inv, r.env.GocmdRunner)
+ vendorEnabled, mainModVendor, err := gocommand.VendorEnabled(context.TODO(), inv, r.env.GocmdRunner)
if err != nil {
return err
}
- if mainMod != nil && vendorEnabled {
+ if mainModVendor != nil && vendorEnabled {
// Vendor mode is on, so all the non-Main modules are irrelevant,
// and we need to search /vendor for everything.
- r.main = mainMod
+ r.mains = []*gocommand.ModuleJSON{mainModVendor}
r.dummyVendorMod = &gocommand.ModuleJSON{
Path: "",
- Dir: filepath.Join(mainMod.Dir, "vendor"),
+ Dir: filepath.Join(mainModVendor.Dir, "vendor"),
}
- r.modsByModPath = []*gocommand.ModuleJSON{mainMod, r.dummyVendorMod}
- r.modsByDir = []*gocommand.ModuleJSON{mainMod, r.dummyVendorMod}
+ r.modsByModPath = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod}
+ r.modsByDir = []*gocommand.ModuleJSON{mainModVendor, r.dummyVendorMod}
} else {
// Vendor mode is off, so run go list -m ... to find everything.
err := r.initAllMods()
@@ -122,8 +123,10 @@ func (r *ModuleResolver) init() error {
r.roots = []gopathwalk.Root{
{filepath.Join(goenv["GOROOT"], "/src"), gopathwalk.RootGOROOT},
}
- if r.main != nil {
- r.roots = append(r.roots, gopathwalk.Root{r.main.Dir, gopathwalk.RootCurrentModule})
+ r.mainByDir = make(map[string]*gocommand.ModuleJSON)
+ for _, main := range r.mains {
+ r.roots = append(r.roots, gopathwalk.Root{main.Dir, gopathwalk.RootCurrentModule})
+ r.mainByDir[main.Dir] = main
}
if vendorEnabled {
r.roots = append(r.roots, gopathwalk.Root{r.dummyVendorMod.Dir, gopathwalk.RootOther})
@@ -189,7 +192,7 @@ func (r *ModuleResolver) initAllMods() error {
r.modsByModPath = append(r.modsByModPath, mod)
r.modsByDir = append(r.modsByDir, mod)
if mod.Main {
- r.main = mod
+ r.mains = append(r.mains, mod)
}
}
return nil
@@ -609,7 +612,7 @@ func (r *ModuleResolver) scanDirForPackage(root gopathwalk.Root, dir string) dir
}
switch root.Type {
case gopathwalk.RootCurrentModule:
- importPath = path.Join(r.main.Path, filepath.ToSlash(subdir))
+ importPath = path.Join(r.mainByDir[root.Path].Path, filepath.ToSlash(subdir))
case gopathwalk.RootModuleCache:
matches := modCacheRegexp.FindStringSubmatch(subdir)
if len(matches) == 0 {
diff --git a/vendor/golang.org/x/tools/internal/typeparams/common.go b/vendor/golang.org/x/tools/internal/typeparams/common.go
index 1222764b..ab6b30b8 100644
--- a/vendor/golang.org/x/tools/internal/typeparams/common.go
+++ b/vendor/golang.org/x/tools/internal/typeparams/common.go
@@ -77,3 +77,104 @@ func IsTypeParam(t types.Type) bool {
_, ok := t.(*TypeParam)
return ok
}
+
+// OriginMethod returns the origin method associated with the method fn.
+// For methods on a non-generic receiver base type, this is just
+// fn. However, for methods with a generic receiver, OriginMethod returns the
+// corresponding method in the method set of the origin type.
+//
+// As a special case, if fn is not a method (has no receiver), OriginMethod
+// returns fn.
+func OriginMethod(fn *types.Func) *types.Func {
+ recv := fn.Type().(*types.Signature).Recv()
+ if recv == nil {
+
+ return fn
+ }
+ base := recv.Type()
+ p, isPtr := base.(*types.Pointer)
+ if isPtr {
+ base = p.Elem()
+ }
+ named, isNamed := base.(*types.Named)
+ if !isNamed {
+ // Receiver is a *types.Interface.
+ return fn
+ }
+ if ForNamed(named).Len() == 0 {
+ // Receiver base has no type parameters, so we can avoid the lookup below.
+ return fn
+ }
+ orig := NamedTypeOrigin(named)
+ gfn, _, _ := types.LookupFieldOrMethod(orig, true, fn.Pkg(), fn.Name())
+ return gfn.(*types.Func)
+}
+
+// GenericAssignableTo is a generalization of types.AssignableTo that
+// implements the following rule for uninstantiated generic types:
+//
+// If V and T are generic named types, then V is considered assignable to T if,
+// for every possible instantation of V[A_1, ..., A_N], the instantiation
+// T[A_1, ..., A_N] is valid and V[A_1, ..., A_N] implements T[A_1, ..., A_N].
+//
+// If T has structural constraints, they must be satisfied by V.
+//
+// For example, consider the following type declarations:
+//
+// type Interface[T any] interface {
+// Accept(T)
+// }
+//
+// type Container[T any] struct {
+// Element T
+// }
+//
+// func (c Container[T]) Accept(t T) { c.Element = t }
+//
+// In this case, GenericAssignableTo reports that instantiations of Container
+// are assignable to the corresponding instantiation of Interface.
+func GenericAssignableTo(ctxt *Context, V, T types.Type) bool {
+ // If V and T are not both named, or do not have matching non-empty type
+ // parameter lists, fall back on types.AssignableTo.
+
+ VN, Vnamed := V.(*types.Named)
+ TN, Tnamed := T.(*types.Named)
+ if !Vnamed || !Tnamed {
+ return types.AssignableTo(V, T)
+ }
+
+ vtparams := ForNamed(VN)
+ ttparams := ForNamed(TN)
+ if vtparams.Len() == 0 || vtparams.Len() != ttparams.Len() || NamedTypeArgs(VN).Len() != 0 || NamedTypeArgs(TN).Len() != 0 {
+ return types.AssignableTo(V, T)
+ }
+
+ // V and T have the same (non-zero) number of type params. Instantiate both
+ // with the type parameters of V. This must always succeed for V, and will
+ // succeed for T if and only if the type set of each type parameter of V is a
+ // subset of the type set of the corresponding type parameter of T, meaning
+ // that every instantiation of V corresponds to a valid instantiation of T.
+
+ // Minor optimization: ensure we share a context across the two
+ // instantiations below.
+ if ctxt == nil {
+ ctxt = NewContext()
+ }
+
+ var targs []types.Type
+ for i := 0; i < vtparams.Len(); i++ {
+ targs = append(targs, vtparams.At(i))
+ }
+
+ vinst, err := Instantiate(ctxt, V, targs, true)
+ if err != nil {
+ panic("type parameters should satisfy their own constraints")
+ }
+
+ tinst, err := Instantiate(ctxt, T, targs, true)
+ if err != nil {
+ return false
+ }
+
+ return types.AssignableTo(vinst, tinst)
+}
diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
index 5fd3fc35..b4788978 100644
--- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
+++ b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go117.go
@@ -185,6 +185,11 @@ func GetInstances(info *types.Info) map[*ast.Ident]Instance { return nil }
// this Go version.
type Context struct{}
+// NewContext returns a placeholder Context instance.
+func NewContext() *Context {
+ return &Context{}
+}
+
// Instantiate is unsupported on this Go version, and panics.
func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
unsupported()
diff --git a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
index 7470aed8..114a36b8 100644
--- a/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
+++ b/vendor/golang.org/x/tools/internal/typeparams/typeparams_go118.go
@@ -140,6 +140,11 @@ func GetInstances(info *types.Info) map[*ast.Ident]Instance {
// Context is an alias for types.Context.
type Context = types.Context
+// NewContext calls types.NewContext.
+func NewContext() *Context {
+ return types.NewContext()
+}
+
// Instantiate calls types.Instantiate.
func Instantiate(ctxt *Context, typ types.Type, targs []types.Type, validate bool) (types.Type, error) {
return types.Instantiate(ctxt, typ, targs, validate)
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go
index fa2834e2..d38ee3c2 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go
@@ -1365,4 +1365,162 @@ const (
// return i
// }
InvalidGo
+
+ // All codes below were added in Go 1.17.
+
+ /* decl */
+
+ // BadDecl occurs when a declaration has invalid syntax.
+ BadDecl
+
+ // RepeatedDecl occurs when an identifier occurs more than once on the left
+ // hand side of a short variable declaration.
+ //
+ // Example:
+ // func _() {
+ // x, y, y := 1, 2, 3
+ // }
+ RepeatedDecl
+
+ /* unsafe */
+
+ // InvalidUnsafeAdd occurs when unsafe.Add is called with a
+ // length argument that is not of integer type.
+ //
+ // Example:
+ // import "unsafe"
+ //
+ // var p unsafe.Pointer
+ // var _ = unsafe.Add(p, float64(1))
+ InvalidUnsafeAdd
+
+ // InvalidUnsafeSlice occurs when unsafe.Slice is called with a
+ // pointer argument that is not of pointer type or a length argument
+ // that is not of integer type, negative, or out of bounds.
+ //
+ // Example:
+ // import "unsafe"
+ //
+ // var x int
+ // var _ = unsafe.Slice(x, 1)
+ //
+ // Example:
+ // import "unsafe"
+ //
+ // var x int
+ // var _ = unsafe.Slice(&x, float64(1))
+ //
+ // Example:
+ // import "unsafe"
+ //
+ // var x int
+ // var _ = unsafe.Slice(&x, -1)
+ //
+ // Example:
+ // import "unsafe"
+ //
+ // var x int
+ // var _ = unsafe.Slice(&x, uint64(1) << 63)
+ InvalidUnsafeSlice
+
+ // All codes below were added in Go 1.18.
+
+ /* features */
+
+ // UnsupportedFeature occurs when a language feature is used that is not
+ // supported at this Go version.
+ UnsupportedFeature
+
+ /* type params */
+
+ // NotAGenericType occurs when a non-generic type is used where a generic
+ // type is expected: in type or function instantiation.
+ //
+ // Example:
+ // type T int
+ //
+ // var _ T[int]
+ NotAGenericType
+
+ // WrongTypeArgCount occurs when a type or function is instantiated with an
+ // incorrent number of type arguments, including when a generic type or
+ // function is used without instantiation.
+ //
+ // Errors inolving failed type inference are assigned other error codes.
+ //
+ // Example:
+ // type T[p any] int
+ //
+ // var _ T[int, string]
+ //
+ // Example:
+ // func f[T any]() {}
+ //
+ // var x = f
+ WrongTypeArgCount
+
+ // CannotInferTypeArgs occurs when type or function type argument inference
+ // fails to infer all type arguments.
+ //
+ // Example:
+ // func f[T any]() {}
+ //
+ // func _() {
+ // f()
+ // }
+ //
+ // Example:
+ // type N[P, Q any] struct{}
+ //
+ // var _ N[int]
+ CannotInferTypeArgs
+
+ // InvalidTypeArg occurs when a type argument does not satisfy its
+ // corresponding type parameter constraints.
+ //
+ // Example:
+ // type T[P ~int] struct{}
+ //
+ // var _ T[string]
+ InvalidTypeArg // arguments? InferenceFailed
+
+ // InvalidInstanceCycle occurs when an invalid cycle is detected
+ // within the instantiation graph.
+ //
+ // Example:
+ // func f[T any]() { f[*T]() }
+ InvalidInstanceCycle
+
+ // InvalidUnion occurs when an embedded union or approximation element is
+ // not valid.
+ //
+ // Example:
+ // type _ interface {
+ // ~int | interface{ m() }
+ // }
+ InvalidUnion
+
+ // MisplacedConstraintIface occurs when a constraint-type interface is used
+ // outside of constraint position.
+ //
+ // Example:
+ // type I interface { ~int }
+ //
+ // var _ I
+ MisplacedConstraintIface
+
+ // InvalidMethodTypeParams occurs when methods have type parameters.
+ //
+ // It cannot be encountered with an AST parsed using go/parser.
+ InvalidMethodTypeParams
+
+ // MisplacedTypeParam occurs when a type parameter is used in a place where
+ // it is not permitted.
+ //
+ // Example:
+ // type T[P any] P
+ //
+ // Example:
+ // type T[P any] struct{ *P }
+ MisplacedTypeParam
)
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/errorcode_string.go b/vendor/golang.org/x/tools/internal/typesinternal/errorcode_string.go
index 3e5842a5..de90e951 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/errorcode_string.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/errorcode_string.go
@@ -138,11 +138,25 @@ func _() {
_ = x[UnusedResults-128]
_ = x[InvalidDefer-129]
_ = x[InvalidGo-130]
+ _ = x[BadDecl-131]
+ _ = x[RepeatedDecl-132]
+ _ = x[InvalidUnsafeAdd-133]
+ _ = x[InvalidUnsafeSlice-134]
+ _ = x[UnsupportedFeature-135]
+ _ = x[NotAGenericType-136]
+ _ = x[WrongTypeArgCount-137]
+ _ = x[CannotInferTypeArgs-138]
+ _ = x[InvalidTypeArg-139]
+ _ = x[InvalidInstanceCycle-140]
+ _ = x[InvalidUnion-141]
+ _ = x[MisplacedConstraintIface-142]
+ _ = x[InvalidMethodTypeParams-143]
+ _ = x[MisplacedTypeParam-144]
}
-const _ErrorCode_name = "TestBlankPkgNameMismatchedPkgNameInvalidPkgUseBadImportPathBrokenImportImportCRenamedUnusedImportInvalidInitCycleDuplicateDeclInvalidDeclCycleInvalidTypeCycleInvalidConstInitInvalidConstValInvalidConstTypeUntypedNilWrongAssignCountUnassignableOperandNoNewVarMultiValAssignOpInvalidIfaceAssignInvalidChanAssignIncompatibleAssignUnaddressableFieldAssignNotATypeInvalidArrayLenBlankIfaceMethodIncomparableMapKeyInvalidIfaceEmbedInvalidPtrEmbedBadRecvInvalidRecvDuplicateFieldAndMethodDuplicateMethodInvalidBlankInvalidIotaMissingInitBodyInvalidInitSigInvalidInitDeclInvalidMainDeclTooManyValuesNotAnExprTruncatedFloatNumericOverflowUndefinedOpMismatchedTypesDivByZeroNonNumericIncDecUnaddressableOperandInvalidIndirectionNonIndexableOperandInvalidIndexSwappedSliceIndicesNonSliceableOperandInvalidSliceExprInvalidShiftCountInvalidShiftOperandInvalidReceiveInvalidSendDuplicateLitKeyMissingLitKeyInvalidLitIndexOversizeArrayLitMixedStructLitInvalidStructLitMissingLitFieldDuplicateLitFieldUnexportedLitFieldInvalidLitFieldUntypedLitInvalidLitAmbiguousSelectorUndeclaredImportedNameUnexportedNameUndeclaredNameMissingFieldOrMethodBadDotDotDotSyntaxNonVariadicDotDotDotMisplacedDotDotDotInvalidDotDotDotOperandInvalidDotDotDotUncalledBuiltinInvalidAppendInvalidCapInvalidCloseInvalidCopyInvalidComplexInvalidDeleteInvalidImagInvalidLenSwappedMakeArgsInvalidMakeInvalidRealInvalidAssertImpossibleAssertInvalidConversionInvalidUntypedConversionBadOffsetofSyntaxInvalidOffsetofUnusedExprUnusedVarMissingReturnWrongResultCountOutOfScopeResultInvalidCondInvalidPostDeclInvalidChanRangeInvalidIterVarInvalidRangeExprMisplacedBreakMisplacedContinueMisplacedFallthroughDuplicateCaseDuplicateDefaultBadTypeKeywordInvalidTypeSwitchInvalidExprSwitchInvalidSelectCaseUndeclaredLabelDuplicateLabelMisplacedLabelUnusedLabelJumpOverDeclJumpIntoBlockInvalidMethodExprWrongArgCountInvalidCallUnusedResultsInvalidDeferInvalidGo"
+const _ErrorCode_name = "TestBlankPkgNameMismatchedPkgNameInvalidPkgUseBadImportPathBrokenImportImportCRenamedUnusedImportInvalidInitCycleDuplicateDeclInvalidDeclCycleInvalidTypeCycleInvalidConstInitInvalidConstValInvalidConstTypeUntypedNilWrongAssignCountUnassignableOperandNoNewVarMultiValAssignOpInvalidIfaceAssignInvalidChanAssignIncompatibleAssignUnaddressableFieldAssignNotATypeInvalidArrayLenBlankIfaceMethodIncomparableMapKeyInvalidIfaceEmbedInvalidPtrEmbedBadRecvInvalidRecvDuplicateFieldAndMethodDuplicateMethodInvalidBlankInvalidIotaMissingInitBodyInvalidInitSigInvalidInitDeclInvalidMainDeclTooManyValuesNotAnExprTruncatedFloatNumericOverflowUndefinedOpMismatchedTypesDivByZeroNonNumericIncDecUnaddressableOperandInvalidIndirectionNonIndexableOperandInvalidIndexSwappedSliceIndicesNonSliceableOperandInvalidSliceExprInvalidShiftCountInvalidShiftOperandInvalidReceiveInvalidSendDuplicateLitKeyMissingLitKeyInvalidLitIndexOversizeArrayLitMixedStructLitInvalidStructLitMissingLitFieldDuplicateLitFieldUnexportedLitFieldInvalidLitFieldUntypedLitInvalidLitAmbiguousSelectorUndeclaredImportedNameUnexportedNameUndeclaredNameMissingFieldOrMethodBadDotDotDotSyntaxNonVariadicDotDotDotMisplacedDotDotDotInvalidDotDotDotOperandInvalidDotDotDotUncalledBuiltinInvalidAppendInvalidCapInvalidCloseInvalidCopyInvalidComplexInvalidDeleteInvalidImagInvalidLenSwappedMakeArgsInvalidMakeInvalidRealInvalidAssertImpossibleAssertInvalidConversionInvalidUntypedConversionBadOffsetofSyntaxInvalidOffsetofUnusedExprUnusedVarMissingReturnWrongResultCountOutOfScopeResultInvalidCondInvalidPostDeclInvalidChanRangeInvalidIterVarInvalidRangeExprMisplacedBreakMisplacedContinueMisplacedFallthroughDuplicateCaseDuplicateDefaultBadTypeKeywordInvalidTypeSwitchInvalidExprSwitchInvalidSelectCaseUndeclaredLabelDuplicateLabelMisplacedLabelUnusedLabelJumpOverDeclJumpIntoBlockInvalidMethodExprWrongArgCountInvalidCallUnusedResultsInvalidDeferInvalidGoBadDeclRepeatedDeclInvalidUnsafeAddInvalidUnsafeSliceUnsupportedFeatureNotAGenericTypeWrongTypeArgCountCannotInferTypeArgsInvalidTypeArgInvalidInstanceCycleInvalidUnionMisplacedConstraintIfaceInvalidMethodTypeParamsMisplacedTypeParam"
-var _ErrorCode_index = [...]uint16{0, 4, 16, 33, 46, 59, 71, 85, 97, 113, 126, 142, 158, 174, 189, 205, 215, 231, 250, 258, 274, 292, 309, 327, 351, 359, 374, 390, 408, 425, 440, 447, 458, 481, 496, 508, 519, 534, 548, 563, 578, 591, 600, 614, 629, 640, 655, 664, 680, 700, 718, 737, 749, 768, 787, 803, 820, 839, 853, 864, 879, 892, 907, 923, 937, 953, 968, 985, 1003, 1018, 1028, 1038, 1055, 1077, 1091, 1105, 1125, 1143, 1163, 1181, 1204, 1220, 1235, 1248, 1258, 1270, 1281, 1295, 1308, 1319, 1329, 1344, 1355, 1366, 1379, 1395, 1412, 1436, 1453, 1468, 1478, 1487, 1500, 1516, 1532, 1543, 1558, 1574, 1588, 1604, 1618, 1635, 1655, 1668, 1684, 1698, 1715, 1732, 1749, 1764, 1778, 1792, 1803, 1815, 1828, 1845, 1858, 1869, 1882, 1894, 1903}
+var _ErrorCode_index = [...]uint16{0, 4, 16, 33, 46, 59, 71, 85, 97, 113, 126, 142, 158, 174, 189, 205, 215, 231, 250, 258, 274, 292, 309, 327, 351, 359, 374, 390, 408, 425, 440, 447, 458, 481, 496, 508, 519, 534, 548, 563, 578, 591, 600, 614, 629, 640, 655, 664, 680, 700, 718, 737, 749, 768, 787, 803, 820, 839, 853, 864, 879, 892, 907, 923, 937, 953, 968, 985, 1003, 1018, 1028, 1038, 1055, 1077, 1091, 1105, 1125, 1143, 1163, 1181, 1204, 1220, 1235, 1248, 1258, 1270, 1281, 1295, 1308, 1319, 1329, 1344, 1355, 1366, 1379, 1395, 1412, 1436, 1453, 1468, 1478, 1487, 1500, 1516, 1532, 1543, 1558, 1574, 1588, 1604, 1618, 1635, 1655, 1668, 1684, 1698, 1715, 1732, 1749, 1764, 1778, 1792, 1803, 1815, 1828, 1845, 1858, 1869, 1882, 1894, 1903, 1910, 1922, 1938, 1956, 1974, 1989, 2006, 2025, 2039, 2059, 2071, 2095, 2118, 2136}
func (i ErrorCode) String() string {
i -= 1
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types.go b/vendor/golang.org/x/tools/internal/typesinternal/types.go
index 7c77c2fb..ce7d4351 100644
--- a/vendor/golang.org/x/tools/internal/typesinternal/types.go
+++ b/vendor/golang.org/x/tools/internal/typesinternal/types.go
@@ -48,3 +48,5 @@ func ReadGo116ErrorData(err types.Error) (code ErrorCode, start, end token.Pos,
}
return ErrorCode(data[0]), token.Pos(data[1]), token.Pos(data[2]), true
}
+
+var SetGoVersion = func(conf *types.Config, version string) bool { return false }
diff --git a/vendor/golang.org/x/tools/internal/typesinternal/types_118.go b/vendor/golang.org/x/tools/internal/typesinternal/types_118.go
new file mode 100644
index 00000000..a42b072a
--- /dev/null
+++ b/vendor/golang.org/x/tools/internal/typesinternal/types_118.go
@@ -0,0 +1,19 @@
+// Copyright 2021 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.
+
+//go:build go1.18
+// +build go1.18
+
+package typesinternal
+
+import (
+ "go/types"
+)
+
+func init() {
+ SetGoVersion = func(conf *types.Config, version string) bool {
+ conf.GoVersion = version
+ return true
+ }
+}
diff --git a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
index a427f8b7..9c61112f 100644
--- a/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
+++ b/vendor/google.golang.org/protobuf/encoding/protowire/wire.go
@@ -21,10 +21,11 @@ import (
type Number int32
const (
- MinValidNumber Number = 1
- FirstReservedNumber Number = 19000
- LastReservedNumber Number = 19999
- MaxValidNumber Number = 1<<29 - 1
+ MinValidNumber Number = 1
+ FirstReservedNumber Number = 19000
+ LastReservedNumber Number = 19999
+ MaxValidNumber Number = 1<<29 - 1
+ DefaultRecursionLimit = 10000
)
// IsValid reports whether the field number is semantically valid.
@@ -55,6 +56,7 @@ const (
errCodeOverflow
errCodeReserved
errCodeEndGroup
+ errCodeRecursionDepth
)
var (
@@ -112,6 +114,10 @@ func ConsumeField(b []byte) (Number, Type, int) {
// When parsing a group, the length includes the end group marker and
// the end group is verified to match the starting field number.
func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {
+ return consumeFieldValueD(num, typ, b, DefaultRecursionLimit)
+}
+
+func consumeFieldValueD(num Number, typ Type, b []byte, depth int) (n int) {
switch typ {
case VarintType:
_, n = ConsumeVarint(b)
@@ -126,6 +132,9 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {
_, n = ConsumeBytes(b)
return n
case StartGroupType:
+ if depth < 0 {
+ return errCodeRecursionDepth
+ }
n0 := len(b)
for {
num2, typ2, n := ConsumeTag(b)
@@ -140,7 +149,7 @@ func ConsumeFieldValue(num Number, typ Type, b []byte) (n int) {
return n0 - len(b)
}
- n = ConsumeFieldValue(num2, typ2, b)
+ n = consumeFieldValueD(num2, typ2, b, depth-1)
if n < 0 {
return n // forward error code
}
diff --git a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
index eb10ea10..37803773 100644
--- a/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
+++ b/vendor/google.golang.org/protobuf/internal/encoding/text/decode.go
@@ -381,7 +381,7 @@ func (d *Decoder) currentOpenKind() (Kind, byte) {
case '[':
return ListOpen, ']'
}
- panic(fmt.Sprintf("Decoder: openStack contains invalid byte %s", string(openCh)))
+ panic(fmt.Sprintf("Decoder: openStack contains invalid byte %c", openCh))
}
func (d *Decoder) pushOpenStack(ch byte) {
diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go
index f90e909b..fbcd3492 100644
--- a/vendor/google.golang.org/protobuf/internal/errors/is_go112.go
+++ b/vendor/google.golang.org/protobuf/internal/errors/is_go112.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.13
// +build !go1.13
package errors
diff --git a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go
index dc05f419..5e72f1cd 100644
--- a/vendor/google.golang.org/protobuf/internal/errors/is_go113.go
+++ b/vendor/google.golang.org/protobuf/internal/errors/is_go113.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.13
// +build go1.13
package errors
diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
index a72995f0..bda8e8cf 100644
--- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
+++ b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !protolegacy
// +build !protolegacy
package flags
diff --git a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
index 772e2f0e..6d8d9bd6 100644
--- a/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
+++ b/vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build protolegacy
// +build protolegacy
package flags
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go
index 2706bb67..4b15493f 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go111.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !go1.12
// +build !go1.12
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go
index 1533ef60..0b31b66e 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build go1.12
// +build go1.12
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
index 90705e3a..145c577b 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_reflect.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
index e118af1e..757642e2 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/decode.go b/vendor/google.golang.org/protobuf/internal/impl/decode.go
index 949dc49a..c65b0325 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/decode.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/decode.go
@@ -18,6 +18,7 @@ import (
)
var errDecode = errors.New("cannot parse invalid wire-format data")
+var errRecursionDepth = errors.New("exceeded maximum recursion depth")
type unmarshalOptions struct {
flags protoiface.UnmarshalInputFlags
@@ -25,6 +26,7 @@ type unmarshalOptions struct {
FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
}
+ depth int
}
func (o unmarshalOptions) Options() proto.UnmarshalOptions {
@@ -44,6 +46,7 @@ func (o unmarshalOptions) IsDefault() bool {
var lazyUnmarshalOptions = unmarshalOptions{
resolver: preg.GlobalTypes,
+ depth: protowire.DefaultRecursionLimit,
}
type unmarshalOutput struct {
@@ -62,6 +65,7 @@ func (mi *MessageInfo) unmarshal(in piface.UnmarshalInput) (piface.UnmarshalOutp
out, err := mi.unmarshalPointer(in.Buf, p, 0, unmarshalOptions{
flags: in.Flags,
resolver: in.Resolver,
+ depth: in.Depth,
})
var flags piface.UnmarshalOutputFlags
if out.initialized {
@@ -82,6 +86,10 @@ var errUnknown = errors.New("unknown")
func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) {
mi.init()
+ opts.depth--
+ if opts.depth < 0 {
+ return out, errRecursionDepth
+ }
if flags.ProtoLegacy && mi.isMessageSet {
return unmarshalMessageSet(mi, b, p, opts)
}
diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
index 9e3ed821..4c491bdf 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_reflect.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
index 9ecf23a8..ee0e0573 100644
--- a/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
+++ b/vendor/google.golang.org/protobuf/internal/impl/pointer_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package impl
diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
index 85e074c9..a1f6f333 100644
--- a/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
+++ b/vendor/google.golang.org/protobuf/internal/strs/strings_pure.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package strs
diff --git a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go
index 2160c701..56a8a4ed 100644
--- a/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go
+++ b/vendor/google.golang.org/protobuf/internal/strs/strings_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package strs
diff --git a/vendor/google.golang.org/protobuf/internal/version/version.go b/vendor/google.golang.org/protobuf/internal/version/version.go
index 14e774fb..3d40d524 100644
--- a/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -52,8 +52,8 @@ import (
// 10. Send out the CL for review and submit it.
const (
Major = 1
- Minor = 27
- Patch = 1
+ Minor = 28
+ Patch = 0
PreRelease = ""
)
diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go
index 49f9b8c8..11bf7173 100644
--- a/vendor/google.golang.org/protobuf/proto/decode.go
+++ b/vendor/google.golang.org/protobuf/proto/decode.go
@@ -42,18 +42,25 @@ type UnmarshalOptions struct {
FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
}
+
+ // RecursionLimit limits how deeply messages may be nested.
+ // If zero, a default limit is applied.
+ RecursionLimit int
}
// Unmarshal parses the wire-format message in b and places the result in m.
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func Unmarshal(b []byte, m Message) error {
- _, err := UnmarshalOptions{}.unmarshal(b, m.ProtoReflect())
+ _, err := UnmarshalOptions{RecursionLimit: protowire.DefaultRecursionLimit}.unmarshal(b, m.ProtoReflect())
return err
}
// Unmarshal parses the wire-format message in b and places the result in m.
// The provided message must be mutable (e.g., a non-nil pointer to a message).
func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {
+ if o.RecursionLimit == 0 {
+ o.RecursionLimit = protowire.DefaultRecursionLimit
+ }
_, err := o.unmarshal(b, m.ProtoReflect())
return err
}
@@ -63,6 +70,9 @@ func (o UnmarshalOptions) Unmarshal(b []byte, m Message) error {
// This method permits fine-grained control over the unmarshaler.
// Most users should use Unmarshal instead.
func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) {
+ if o.RecursionLimit == 0 {
+ o.RecursionLimit = protowire.DefaultRecursionLimit
+ }
return o.unmarshal(in.Buf, in.Message)
}
@@ -86,12 +96,17 @@ func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out proto
Message: m,
Buf: b,
Resolver: o.Resolver,
+ Depth: o.RecursionLimit,
}
if o.DiscardUnknown {
in.Flags |= protoiface.UnmarshalDiscardUnknown
}
out, err = methods.Unmarshal(in)
} else {
+ o.RecursionLimit--
+ if o.RecursionLimit < 0 {
+ return out, errors.New("exceeded max recursion depth")
+ }
err = o.unmarshalMessageSlow(b, m)
}
if err != nil {
diff --git a/vendor/google.golang.org/protobuf/proto/proto_methods.go b/vendor/google.golang.org/protobuf/proto/proto_methods.go
index d8dd604f..465e057b 100644
--- a/vendor/google.golang.org/protobuf/proto/proto_methods.go
+++ b/vendor/google.golang.org/protobuf/proto/proto_methods.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// The protoreflect build tag disables use of fast-path methods.
+//go:build !protoreflect
// +build !protoreflect
package proto
diff --git a/vendor/google.golang.org/protobuf/proto/proto_reflect.go b/vendor/google.golang.org/protobuf/proto/proto_reflect.go
index b103d432..494d6cee 100644
--- a/vendor/google.golang.org/protobuf/proto/proto_reflect.go
+++ b/vendor/google.golang.org/protobuf/proto/proto_reflect.go
@@ -3,6 +3,7 @@
// license that can be found in the LICENSE file.
// The protoreflect build tag disables use of fast-path methods.
+//go:build protoreflect
// +build protoreflect
package proto
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
index 6be5d16e..d5d5af6e 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/methods.go
@@ -53,6 +53,7 @@ type (
FindExtensionByName(field FullName) (ExtensionType, error)
FindExtensionByNumber(message FullName, field FieldNumber) (ExtensionType, error)
}
+ Depth int
}
unmarshalOutput = struct {
pragma.NoUnkeyedLiterals
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
index 918e685e..7ced876f 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_pure.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build purego || appengine
// +build purego appengine
package protoreflect
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
index 5a341472..eb7764c3 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_union.go
@@ -41,6 +41,31 @@ import (
// Converting to/from a Value and a concrete Go value panics on type mismatch.
// For example, ValueOf("hello").Int() panics because this attempts to
// retrieve an int64 from a string.
+//
+// List, Map, and Message Values are called "composite" values.
+//
+// A composite Value may alias (reference) memory at some location,
+// such that changes to the Value updates the that location.
+// A composite value acquired with a Mutable method, such as Message.Mutable,
+// always references the source object.
+//
+// For example:
+// // Append a 0 to a "repeated int32" field.
+// // Since the Value returned by Mutable is guaranteed to alias
+// // the source message, modifying the Value modifies the message.
+// message.Mutable(fieldDesc).(List).Append(protoreflect.ValueOfInt32(0))
+//
+// // Assign [0] to a "repeated int32" field by creating a new Value,
+// // modifying it, and assigning it.
+// list := message.NewField(fieldDesc).(List)
+// list.Append(protoreflect.ValueOfInt32(0))
+// message.Set(fieldDesc, list)
+// // ERROR: Since it is not defined whether Set aliases the source,
+// // appending to the List here may or may not modify the message.
+// list.Append(protoreflect.ValueOfInt32(0))
+//
+// Some operations, such as Message.Get, may return an "empty, read-only"
+// composite Value. Modifying an empty, read-only value panics.
type Value value
// The protoreflect API uses a custom Value union type instead of interface{}
diff --git a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go
index c45debdc..702ddf22 100644
--- a/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go
+++ b/vendor/google.golang.org/protobuf/reflect/protoreflect/value_unsafe.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build !purego && !appengine
// +build !purego,!appengine
package protoreflect
diff --git a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
index 32c04f67..44cf467d 100644
--- a/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
+++ b/vendor/google.golang.org/protobuf/runtime/protoiface/methods.go
@@ -103,6 +103,7 @@ type UnmarshalInput = struct {
FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error)
FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error)
}
+ Depth int
}
// UnmarshalOutput is output from the Unmarshal method.
diff --git a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
deleted file mode 100644
index 8c10797b..00000000
--- a/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
+++ /dev/null
@@ -1,498 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/any.proto
-
-// Package anypb contains generated types for google/protobuf/any.proto.
-//
-// The Any message is a dynamic representation of any other message value.
-// It is functionally a tuple of the full name of the remote message type and
-// the serialized bytes of the remote message value.
-//
-//
-// Constructing an Any
-//
-// An Any message containing another message value is constructed using New:
-//
-// any, err := anypb.New(m)
-// if err != nil {
-// ... // handle error
-// }
-// ... // make use of any
-//
-//
-// Unmarshaling an Any
-//
-// With a populated Any message, the underlying message can be serialized into
-// a remote concrete message value in a few ways.
-//
-// If the exact concrete type is known, then a new (or pre-existing) instance
-// of that message can be passed to the UnmarshalTo method:
-//
-// m := new(foopb.MyMessage)
-// if err := any.UnmarshalTo(m); err != nil {
-// ... // handle error
-// }
-// ... // make use of m
-//
-// If the exact concrete type is not known, then the UnmarshalNew method can be
-// used to unmarshal the contents into a new instance of the remote message type:
-//
-// m, err := any.UnmarshalNew()
-// if err != nil {
-// ... // handle error
-// }
-// ... // make use of m
-//
-// UnmarshalNew uses the global type registry to resolve the message type and
-// construct a new instance of that message to unmarshal into. In order for a
-// message type to appear in the global registry, the Go type representing that
-// protobuf message type must be linked into the Go binary. For messages
-// generated by protoc-gen-go, this is achieved through an import of the
-// generated Go package representing a .proto file.
-//
-// A common pattern with UnmarshalNew is to use a type switch with the resulting
-// proto.Message value:
-//
-// switch m := m.(type) {
-// case *foopb.MyMessage:
-// ... // make use of m as a *foopb.MyMessage
-// case *barpb.OtherMessage:
-// ... // make use of m as a *barpb.OtherMessage
-// case *bazpb.SomeMessage:
-// ... // make use of m as a *bazpb.SomeMessage
-// }
-//
-// This pattern ensures that the generated packages containing the message types
-// listed in the case clauses are linked into the Go binary and therefore also
-// registered in the global registry.
-//
-//
-// Type checking an Any
-//
-// In order to type check whether an Any message represents some other message,
-// then use the MessageIs method:
-//
-// if any.MessageIs((*foopb.MyMessage)(nil)) {
-// ... // make use of any, knowing that it contains a foopb.MyMessage
-// }
-//
-// The MessageIs method can also be used with an allocated instance of the target
-// message type if the intention is to unmarshal into it if the type matches:
-//
-// m := new(foopb.MyMessage)
-// if any.MessageIs(m) {
-// if err := any.UnmarshalTo(m); err != nil {
-// ... // handle error
-// }
-// ... // make use of m
-// }
-//
-package anypb
-
-import (
- proto "google.golang.org/protobuf/proto"
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoregistry "google.golang.org/protobuf/reflect/protoregistry"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- reflect "reflect"
- strings "strings"
- sync "sync"
-)
-
-// `Any` contains an arbitrary serialized protocol buffer message along with a
-// URL that describes the type of the serialized message.
-//
-// Protobuf library provides support to pack/unpack Any values in the form
-// of utility functions or additional generated methods of the Any type.
-//
-// Example 1: Pack and unpack a message in C++.
-//
-// Foo foo = ...;
-// Any any;
-// any.PackFrom(foo);
-// ...
-// if (any.UnpackTo(&foo)) {
-// ...
-// }
-//
-// Example 2: Pack and unpack a message in Java.
-//
-// Foo foo = ...;
-// Any any = Any.pack(foo);
-// ...
-// if (any.is(Foo.class)) {
-// foo = any.unpack(Foo.class);
-// }
-//
-// Example 3: Pack and unpack a message in Python.
-//
-// foo = Foo(...)
-// any = Any()
-// any.Pack(foo)
-// ...
-// if any.Is(Foo.DESCRIPTOR):
-// any.Unpack(foo)
-// ...
-//
-// Example 4: Pack and unpack a message in Go
-//
-// foo := &pb.Foo{...}
-// any, err := anypb.New(foo)
-// if err != nil {
-// ...
-// }
-// ...
-// foo := &pb.Foo{}
-// if err := any.UnmarshalTo(foo); err != nil {
-// ...
-// }
-//
-// The pack methods provided by protobuf library will by default use
-// 'type.googleapis.com/full.type.name' as the type URL and the unpack
-// methods only use the fully qualified type name after the last '/'
-// in the type URL, for example "foo.bar.com/x/y.z" will yield type
-// name "y.z".
-//
-//
-// JSON
-// ====
-// The JSON representation of an `Any` value uses the regular
-// representation of the deserialized, embedded message, with an
-// additional field `@type` which contains the type URL. Example:
-//
-// package google.profile;
-// message Person {
-// string first_name = 1;
-// string last_name = 2;
-// }
-//
-// {
-// "@type": "type.googleapis.com/google.profile.Person",
-// "firstName": ,
-// "lastName":
-// }
-//
-// If the embedded message type is well-known and has a custom JSON
-// representation, that representation will be embedded adding a field
-// `value` which holds the custom JSON in addition to the `@type`
-// field. Example (for message [google.protobuf.Duration][]):
-//
-// {
-// "@type": "type.googleapis.com/google.protobuf.Duration",
-// "value": "1.212s"
-// }
-//
-type Any struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // A URL/resource name that uniquely identifies the type of the serialized
- // protocol buffer message. This string must contain at least
- // one "/" character. The last segment of the URL's path must represent
- // the fully qualified name of the type (as in
- // `path/google.protobuf.Duration`). The name should be in a canonical form
- // (e.g., leading "." is not accepted).
- //
- // In practice, teams usually precompile into the binary all types that they
- // expect it to use in the context of Any. However, for URLs which use the
- // scheme `http`, `https`, or no scheme, one can optionally set up a type
- // server that maps type URLs to message definitions as follows:
- //
- // * If no scheme is provided, `https` is assumed.
- // * An HTTP GET on the URL must yield a [google.protobuf.Type][]
- // value in binary format, or produce an error.
- // * Applications are allowed to cache lookup results based on the
- // URL, or have them precompiled into a binary to avoid any
- // lookup. Therefore, binary compatibility needs to be preserved
- // on changes to types. (Use versioned type names to manage
- // breaking changes.)
- //
- // Note: this functionality is not currently available in the official
- // protobuf release, and it is not used for type URLs beginning with
- // type.googleapis.com.
- //
- // Schemes other than `http`, `https` (or the empty scheme) might be
- // used with implementation specific semantics.
- //
- TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl,proto3" json:"type_url,omitempty"`
- // Must be a valid serialized protocol buffer of the above specified type.
- Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
-}
-
-// New marshals src into a new Any instance.
-func New(src proto.Message) (*Any, error) {
- dst := new(Any)
- if err := dst.MarshalFrom(src); err != nil {
- return nil, err
- }
- return dst, nil
-}
-
-// MarshalFrom marshals src into dst as the underlying message
-// using the provided marshal options.
-//
-// If no options are specified, call dst.MarshalFrom instead.
-func MarshalFrom(dst *Any, src proto.Message, opts proto.MarshalOptions) error {
- const urlPrefix = "type.googleapis.com/"
- if src == nil {
- return protoimpl.X.NewError("invalid nil source message")
- }
- b, err := opts.Marshal(src)
- if err != nil {
- return err
- }
- dst.TypeUrl = urlPrefix + string(src.ProtoReflect().Descriptor().FullName())
- dst.Value = b
- return nil
-}
-
-// UnmarshalTo unmarshals the underlying message from src into dst
-// using the provided unmarshal options.
-// It reports an error if dst is not of the right message type.
-//
-// If no options are specified, call src.UnmarshalTo instead.
-func UnmarshalTo(src *Any, dst proto.Message, opts proto.UnmarshalOptions) error {
- if src == nil {
- return protoimpl.X.NewError("invalid nil source message")
- }
- if !src.MessageIs(dst) {
- got := dst.ProtoReflect().Descriptor().FullName()
- want := src.MessageName()
- return protoimpl.X.NewError("mismatched message type: got %q, want %q", got, want)
- }
- return opts.Unmarshal(src.GetValue(), dst)
-}
-
-// UnmarshalNew unmarshals the underlying message from src into dst,
-// which is newly created message using a type resolved from the type URL.
-// The message type is resolved according to opt.Resolver,
-// which should implement protoregistry.MessageTypeResolver.
-// It reports an error if the underlying message type could not be resolved.
-//
-// If no options are specified, call src.UnmarshalNew instead.
-func UnmarshalNew(src *Any, opts proto.UnmarshalOptions) (dst proto.Message, err error) {
- if src.GetTypeUrl() == "" {
- return nil, protoimpl.X.NewError("invalid empty type URL")
- }
- if opts.Resolver == nil {
- opts.Resolver = protoregistry.GlobalTypes
- }
- r, ok := opts.Resolver.(protoregistry.MessageTypeResolver)
- if !ok {
- return nil, protoregistry.NotFound
- }
- mt, err := r.FindMessageByURL(src.GetTypeUrl())
- if err != nil {
- if err == protoregistry.NotFound {
- return nil, err
- }
- return nil, protoimpl.X.NewError("could not resolve %q: %v", src.GetTypeUrl(), err)
- }
- dst = mt.New().Interface()
- return dst, opts.Unmarshal(src.GetValue(), dst)
-}
-
-// MessageIs reports whether the underlying message is of the same type as m.
-func (x *Any) MessageIs(m proto.Message) bool {
- if m == nil {
- return false
- }
- url := x.GetTypeUrl()
- name := string(m.ProtoReflect().Descriptor().FullName())
- if !strings.HasSuffix(url, name) {
- return false
- }
- return len(url) == len(name) || url[len(url)-len(name)-1] == '/'
-}
-
-// MessageName reports the full name of the underlying message,
-// returning an empty string if invalid.
-func (x *Any) MessageName() protoreflect.FullName {
- url := x.GetTypeUrl()
- name := protoreflect.FullName(url)
- if i := strings.LastIndexByte(url, '/'); i >= 0 {
- name = name[i+len("/"):]
- }
- if !name.IsValid() {
- return ""
- }
- return name
-}
-
-// MarshalFrom marshals m into x as the underlying message.
-func (x *Any) MarshalFrom(m proto.Message) error {
- return MarshalFrom(x, m, proto.MarshalOptions{})
-}
-
-// UnmarshalTo unmarshals the contents of the underlying message of x into m.
-// It resets m before performing the unmarshal operation.
-// It reports an error if m is not of the right message type.
-func (x *Any) UnmarshalTo(m proto.Message) error {
- return UnmarshalTo(x, m, proto.UnmarshalOptions{})
-}
-
-// UnmarshalNew unmarshals the contents of the underlying message of x into
-// a newly allocated message of the specified type.
-// It reports an error if the underlying message type could not be resolved.
-func (x *Any) UnmarshalNew() (proto.Message, error) {
- return UnmarshalNew(x, proto.UnmarshalOptions{})
-}
-
-func (x *Any) Reset() {
- *x = Any{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_any_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Any) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Any) ProtoMessage() {}
-
-func (x *Any) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_any_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Any.ProtoReflect.Descriptor instead.
-func (*Any) Descriptor() ([]byte, []int) {
- return file_google_protobuf_any_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *Any) GetTypeUrl() string {
- if x != nil {
- return x.TypeUrl
- }
- return ""
-}
-
-func (x *Any) GetValue() []byte {
- if x != nil {
- return x.Value
- }
- return nil
-}
-
-var File_google_protobuf_any_proto protoreflect.FileDescriptor
-
-var file_google_protobuf_any_proto_rawDesc = []byte{
- 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x67, 0x6f, 0x6f,
- 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x36, 0x0a, 0x03,
- 0x41, 0x6e, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18,
- 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x79, 0x70, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x14,
- 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76,
- 0x61, 0x6c, 0x75, 0x65, 0x42, 0x76, 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
- 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x08, 0x41, 0x6e, 0x79,
- 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
- 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f,
- 0x61, 0x6e, 0x79, 0x70, 0x62, 0xa2, 0x02, 0x03, 0x47, 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f,
- 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65,
- 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72,
- 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
- file_google_protobuf_any_proto_rawDescOnce sync.Once
- file_google_protobuf_any_proto_rawDescData = file_google_protobuf_any_proto_rawDesc
-)
-
-func file_google_protobuf_any_proto_rawDescGZIP() []byte {
- file_google_protobuf_any_proto_rawDescOnce.Do(func() {
- file_google_protobuf_any_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_any_proto_rawDescData)
- })
- return file_google_protobuf_any_proto_rawDescData
-}
-
-var file_google_protobuf_any_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_google_protobuf_any_proto_goTypes = []interface{}{
- (*Any)(nil), // 0: google.protobuf.Any
-}
-var file_google_protobuf_any_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_google_protobuf_any_proto_init() }
-func file_google_protobuf_any_proto_init() {
- if File_google_protobuf_any_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_google_protobuf_any_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Any); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_any_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 1,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_google_protobuf_any_proto_goTypes,
- DependencyIndexes: file_google_protobuf_any_proto_depIdxs,
- MessageInfos: file_google_protobuf_any_proto_msgTypes,
- }.Build()
- File_google_protobuf_any_proto = out.File
- file_google_protobuf_any_proto_rawDesc = nil
- file_google_protobuf_any_proto_goTypes = nil
- file_google_protobuf_any_proto_depIdxs = nil
-}
diff --git a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go b/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go
deleted file mode 100644
index a583ca2f..00000000
--- a/vendor/google.golang.org/protobuf/types/known/durationpb/duration.pb.go
+++ /dev/null
@@ -1,379 +0,0 @@
-// Protocol Buffers - Google's data interchange format
-// Copyright 2008 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
-//
-// 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.
-
-// Code generated by protoc-gen-go. DO NOT EDIT.
-// source: google/protobuf/duration.proto
-
-// Package durationpb contains generated types for google/protobuf/duration.proto.
-//
-// The Duration message represents a signed span of time.
-//
-//
-// Conversion to a Go Duration
-//
-// The AsDuration method can be used to convert a Duration message to a
-// standard Go time.Duration value:
-//
-// d := dur.AsDuration()
-// ... // make use of d as a time.Duration
-//
-// Converting to a time.Duration is a common operation so that the extensive
-// set of time-based operations provided by the time package can be leveraged.
-// See https://golang.org/pkg/time for more information.
-//
-// The AsDuration method performs the conversion on a best-effort basis.
-// Durations with denormal values (e.g., nanoseconds beyond -99999999 and
-// +99999999, inclusive; or seconds and nanoseconds with opposite signs)
-// are normalized during the conversion to a time.Duration. To manually check for
-// invalid Duration per the documented limitations in duration.proto,
-// additionally call the CheckValid method:
-//
-// if err := dur.CheckValid(); err != nil {
-// ... // handle error
-// }
-//
-// Note that the documented limitations in duration.proto does not protect a
-// Duration from overflowing the representable range of a time.Duration in Go.
-// The AsDuration method uses saturation arithmetic such that an overflow clamps
-// the resulting value to the closest representable value (e.g., math.MaxInt64
-// for positive overflow and math.MinInt64 for negative overflow).
-//
-//
-// Conversion from a Go Duration
-//
-// The durationpb.New function can be used to construct a Duration message
-// from a standard Go time.Duration value:
-//
-// dur := durationpb.New(d)
-// ... // make use of d as a *durationpb.Duration
-//
-package durationpb
-
-import (
- protoreflect "google.golang.org/protobuf/reflect/protoreflect"
- protoimpl "google.golang.org/protobuf/runtime/protoimpl"
- math "math"
- reflect "reflect"
- sync "sync"
- time "time"
-)
-
-// A Duration represents a signed, fixed-length span of time represented
-// as a count of seconds and fractions of seconds at nanosecond
-// resolution. It is independent of any calendar and concepts like "day"
-// or "month". It is related to Timestamp in that the difference between
-// two Timestamp values is a Duration and it can be added or subtracted
-// from a Timestamp. Range is approximately +-10,000 years.
-//
-// # Examples
-//
-// Example 1: Compute Duration from two Timestamps in pseudo code.
-//
-// Timestamp start = ...;
-// Timestamp end = ...;
-// Duration duration = ...;
-//
-// duration.seconds = end.seconds - start.seconds;
-// duration.nanos = end.nanos - start.nanos;
-//
-// if (duration.seconds < 0 && duration.nanos > 0) {
-// duration.seconds += 1;
-// duration.nanos -= 1000000000;
-// } else if (duration.seconds > 0 && duration.nanos < 0) {
-// duration.seconds -= 1;
-// duration.nanos += 1000000000;
-// }
-//
-// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
-//
-// Timestamp start = ...;
-// Duration duration = ...;
-// Timestamp end = ...;
-//
-// end.seconds = start.seconds + duration.seconds;
-// end.nanos = start.nanos + duration.nanos;
-//
-// if (end.nanos < 0) {
-// end.seconds -= 1;
-// end.nanos += 1000000000;
-// } else if (end.nanos >= 1000000000) {
-// end.seconds += 1;
-// end.nanos -= 1000000000;
-// }
-//
-// Example 3: Compute Duration from datetime.timedelta in Python.
-//
-// td = datetime.timedelta(days=3, minutes=10)
-// duration = Duration()
-// duration.FromTimedelta(td)
-//
-// # JSON Mapping
-//
-// In JSON format, the Duration type is encoded as a string rather than an
-// object, where the string ends in the suffix "s" (indicating seconds) and
-// is preceded by the number of seconds, with nanoseconds expressed as
-// fractional seconds. For example, 3 seconds with 0 nanoseconds should be
-// encoded in JSON format as "3s", while 3 seconds and 1 nanosecond should
-// be expressed in JSON format as "3.000000001s", and 3 seconds and 1
-// microsecond should be expressed in JSON format as "3.000001s".
-//
-//
-type Duration struct {
- state protoimpl.MessageState
- sizeCache protoimpl.SizeCache
- unknownFields protoimpl.UnknownFields
-
- // Signed seconds of the span of time. Must be from -315,576,000,000
- // to +315,576,000,000 inclusive. Note: these bounds are computed from:
- // 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
- Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
- // Signed fractions of a second at nanosecond resolution of the span
- // of time. Durations less than one second are represented with a 0
- // `seconds` field and a positive or negative `nanos` field. For durations
- // of one second or more, a non-zero value for the `nanos` field must be
- // of the same sign as the `seconds` field. Must be from -999,999,999
- // to +999,999,999 inclusive.
- Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
-}
-
-// New constructs a new Duration from the provided time.Duration.
-func New(d time.Duration) *Duration {
- nanos := d.Nanoseconds()
- secs := nanos / 1e9
- nanos -= secs * 1e9
- return &Duration{Seconds: int64(secs), Nanos: int32(nanos)}
-}
-
-// AsDuration converts x to a time.Duration,
-// returning the closest duration value in the event of overflow.
-func (x *Duration) AsDuration() time.Duration {
- secs := x.GetSeconds()
- nanos := x.GetNanos()
- d := time.Duration(secs) * time.Second
- overflow := d/time.Second != time.Duration(secs)
- d += time.Duration(nanos) * time.Nanosecond
- overflow = overflow || (secs < 0 && nanos < 0 && d > 0)
- overflow = overflow || (secs > 0 && nanos > 0 && d < 0)
- if overflow {
- switch {
- case secs < 0:
- return time.Duration(math.MinInt64)
- case secs > 0:
- return time.Duration(math.MaxInt64)
- }
- }
- return d
-}
-
-// IsValid reports whether the duration is valid.
-// It is equivalent to CheckValid == nil.
-func (x *Duration) IsValid() bool {
- return x.check() == 0
-}
-
-// CheckValid returns an error if the duration is invalid.
-// In particular, it checks whether the value is within the range of
-// -10000 years to +10000 years inclusive.
-// An error is reported for a nil Duration.
-func (x *Duration) CheckValid() error {
- switch x.check() {
- case invalidNil:
- return protoimpl.X.NewError("invalid nil Duration")
- case invalidUnderflow:
- return protoimpl.X.NewError("duration (%v) exceeds -10000 years", x)
- case invalidOverflow:
- return protoimpl.X.NewError("duration (%v) exceeds +10000 years", x)
- case invalidNanosRange:
- return protoimpl.X.NewError("duration (%v) has out-of-range nanos", x)
- case invalidNanosSign:
- return protoimpl.X.NewError("duration (%v) has seconds and nanos with different signs", x)
- default:
- return nil
- }
-}
-
-const (
- _ = iota
- invalidNil
- invalidUnderflow
- invalidOverflow
- invalidNanosRange
- invalidNanosSign
-)
-
-func (x *Duration) check() uint {
- const absDuration = 315576000000 // 10000yr * 365.25day/yr * 24hr/day * 60min/hr * 60sec/min
- secs := x.GetSeconds()
- nanos := x.GetNanos()
- switch {
- case x == nil:
- return invalidNil
- case secs < -absDuration:
- return invalidUnderflow
- case secs > +absDuration:
- return invalidOverflow
- case nanos <= -1e9 || nanos >= +1e9:
- return invalidNanosRange
- case (secs > 0 && nanos < 0) || (secs < 0 && nanos > 0):
- return invalidNanosSign
- default:
- return 0
- }
-}
-
-func (x *Duration) Reset() {
- *x = Duration{}
- if protoimpl.UnsafeEnabled {
- mi := &file_google_protobuf_duration_proto_msgTypes[0]
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- ms.StoreMessageInfo(mi)
- }
-}
-
-func (x *Duration) String() string {
- return protoimpl.X.MessageStringOf(x)
-}
-
-func (*Duration) ProtoMessage() {}
-
-func (x *Duration) ProtoReflect() protoreflect.Message {
- mi := &file_google_protobuf_duration_proto_msgTypes[0]
- if protoimpl.UnsafeEnabled && x != nil {
- ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
- if ms.LoadMessageInfo() == nil {
- ms.StoreMessageInfo(mi)
- }
- return ms
- }
- return mi.MessageOf(x)
-}
-
-// Deprecated: Use Duration.ProtoReflect.Descriptor instead.
-func (*Duration) Descriptor() ([]byte, []int) {
- return file_google_protobuf_duration_proto_rawDescGZIP(), []int{0}
-}
-
-func (x *Duration) GetSeconds() int64 {
- if x != nil {
- return x.Seconds
- }
- return 0
-}
-
-func (x *Duration) GetNanos() int32 {
- if x != nil {
- return x.Nanos
- }
- return 0
-}
-
-var File_google_protobuf_duration_proto protoreflect.FileDescriptor
-
-var file_google_protobuf_duration_proto_rawDesc = []byte{
- 0x0a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
- 0x12, 0x0f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
- 0x66, 0x22, 0x3a, 0x0a, 0x08, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a,
- 0x07, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
- 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73,
- 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x42, 0x83, 0x01,
- 0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
- 0x74, 0x6f, 0x62, 0x75, 0x66, 0x42, 0x0d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50,
- 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67,
- 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
- 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x64,
- 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x62, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x47,
- 0x50, 0x42, 0xaa, 0x02, 0x1e, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74,
- 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79,
- 0x70, 0x65, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
-}
-
-var (
- file_google_protobuf_duration_proto_rawDescOnce sync.Once
- file_google_protobuf_duration_proto_rawDescData = file_google_protobuf_duration_proto_rawDesc
-)
-
-func file_google_protobuf_duration_proto_rawDescGZIP() []byte {
- file_google_protobuf_duration_proto_rawDescOnce.Do(func() {
- file_google_protobuf_duration_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_protobuf_duration_proto_rawDescData)
- })
- return file_google_protobuf_duration_proto_rawDescData
-}
-
-var file_google_protobuf_duration_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
-var file_google_protobuf_duration_proto_goTypes = []interface{}{
- (*Duration)(nil), // 0: google.protobuf.Duration
-}
-var file_google_protobuf_duration_proto_depIdxs = []int32{
- 0, // [0:0] is the sub-list for method output_type
- 0, // [0:0] is the sub-list for method input_type
- 0, // [0:0] is the sub-list for extension type_name
- 0, // [0:0] is the sub-list for extension extendee
- 0, // [0:0] is the sub-list for field type_name
-}
-
-func init() { file_google_protobuf_duration_proto_init() }
-func file_google_protobuf_duration_proto_init() {
- if File_google_protobuf_duration_proto != nil {
- return
- }
- if !protoimpl.UnsafeEnabled {
- file_google_protobuf_duration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
- switch v := v.(*Duration); i {
- case 0:
- return &v.state
- case 1:
- return &v.sizeCache
- case 2:
- return &v.unknownFields
- default:
- return nil
- }
- }
- }
- type x struct{}
- out := protoimpl.TypeBuilder{
- File: protoimpl.DescBuilder{
- GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
- RawDescriptor: file_google_protobuf_duration_proto_rawDesc,
- NumEnums: 0,
- NumMessages: 1,
- NumExtensions: 0,
- NumServices: 0,
- },
- GoTypes: file_google_protobuf_duration_proto_goTypes,
- DependencyIndexes: file_google_protobuf_duration_proto_depIdxs,
- MessageInfos: file_google_protobuf_duration_proto_msgTypes,
- }.Build()
- File_google_protobuf_duration_proto = out.File
- file_google_protobuf_duration_proto_rawDesc = nil
- file_google_protobuf_duration_proto_goTypes = nil
- file_google_protobuf_duration_proto_depIdxs = nil
-}
diff --git a/vendor/modules.txt b/vendor/modules.txt
index d1522b70..b84f59c4 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -1,4 +1,4 @@
-# github.com/99designs/gqlgen v0.17.1
+# github.com/99designs/gqlgen v0.17.9
## explicit
github.com/99designs/gqlgen
github.com/99designs/gqlgen/api
@@ -26,12 +26,7 @@ github.com/99designs/gqlgen/plugin/resolvergen
github.com/99designs/gqlgen/plugin/servergen
# github.com/KyleBanks/depth v1.2.1
github.com/KyleBanks/depth
-# github.com/PuerkitoBio/purell v1.1.1
-github.com/PuerkitoBio/purell
-# github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
-github.com/PuerkitoBio/urlesc
# github.com/agnivade/levenshtein v1.1.1
-## explicit
github.com/agnivade/levenshtein
# github.com/alecthomas/jsonschema v0.0.0-20211228220459-151e3c21f49d
## explicit
@@ -79,9 +74,11 @@ github.com/go-ole/go-ole
github.com/go-ole/go-ole/oleutil
# github.com/go-openapi/jsonpointer v0.19.5
github.com/go-openapi/jsonpointer
-# github.com/go-openapi/jsonreference v0.19.6
+# github.com/go-openapi/jsonreference v0.20.0
github.com/go-openapi/jsonreference
-# github.com/go-openapi/spec v0.20.4
+github.com/go-openapi/jsonreference/internal
+# github.com/go-openapi/spec v0.20.6
+## explicit
github.com/go-openapi/spec
# github.com/go-openapi/swag v0.21.1
## explicit
@@ -91,28 +88,23 @@ github.com/go-playground/locales
github.com/go-playground/locales/currency
# github.com/go-playground/universal-translator v0.18.0
github.com/go-playground/universal-translator
-# github.com/go-playground/validator/v10 v10.10.1
+# github.com/go-playground/validator/v10 v10.11.0
## explicit
github.com/go-playground/validator/v10
# github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang-jwt/jwt
-# github.com/golang-jwt/jwt/v4 v4.3.0
+# github.com/golang-jwt/jwt/v4 v4.4.1
## explicit
github.com/golang-jwt/jwt/v4
# github.com/golang/protobuf v1.5.2
github.com/golang/protobuf/proto
-github.com/golang/protobuf/ptypes
-github.com/golang/protobuf/ptypes/any
-github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/timestamp
# github.com/google/uuid v1.3.0
## explicit
github.com/google/uuid
# github.com/gorilla/websocket v1.5.0
-## explicit
github.com/gorilla/websocket
# github.com/hashicorp/golang-lru v0.5.4
-## explicit
github.com/hashicorp/golang-lru
github.com/hashicorp/golang-lru/simplelru
# github.com/iancoleman/orderedmap v0.2.0
@@ -124,7 +116,7 @@ github.com/joho/godotenv
github.com/joho/godotenv/autoload
# github.com/josharian/intern v1.0.0
github.com/josharian/intern
-# github.com/labstack/echo/v4 v4.7.0
+# github.com/labstack/echo/v4 v4.7.2
## explicit
github.com/labstack/echo/v4
github.com/labstack/echo/v4/middleware
@@ -138,27 +130,26 @@ github.com/leodido/go-urn
# github.com/lithammer/shortuuid/v4 v4.0.0
## explicit
github.com/lithammer/shortuuid/v4
-# github.com/lufia/plan9stats v0.0.0-20220305071607-d0b38dbe16db
+# github.com/lufia/plan9stats v0.0.0-20220517141722-cf486979b281
## explicit
github.com/lufia/plan9stats
# github.com/mailru/easyjson v0.7.7
github.com/mailru/easyjson/buffer
github.com/mailru/easyjson/jlexer
github.com/mailru/easyjson/jwriter
-# github.com/matryer/moq v0.2.3
+# github.com/matryer/moq v0.2.7
github.com/matryer/moq
github.com/matryer/moq/internal/registry
github.com/matryer/moq/internal/template
github.com/matryer/moq/pkg/moq
# github.com/mattn/go-colorable v0.1.12
-## explicit
github.com/mattn/go-colorable
# github.com/mattn/go-isatty v0.0.14
## explicit
github.com/mattn/go-isatty
# github.com/matttproud/golang_protobuf_extensions v1.0.1
github.com/matttproud/golang_protobuf_extensions/pbutil
-# github.com/mitchellh/mapstructure v1.4.3
+# github.com/mitchellh/mapstructure v1.5.0
## explicit
github.com/mitchellh/mapstructure
# github.com/pmezard/go-difflib v1.0.0
@@ -169,14 +160,15 @@ github.com/power-devops/perfstat
# github.com/prep/average v0.0.0-20200506183628-d26c465f48c3
## explicit
github.com/prep/average
-# github.com/prometheus/client_golang v1.12.1
+# github.com/prometheus/client_golang v1.12.2
## explicit
github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/internal
github.com/prometheus/client_golang/prometheus/promhttp
# github.com/prometheus/client_model v0.2.0
github.com/prometheus/client_model/go
-# github.com/prometheus/common v0.32.1
+# github.com/prometheus/common v0.34.0
+## explicit
github.com/prometheus/common/expfmt
github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
github.com/prometheus/common/model
@@ -186,7 +178,7 @@ github.com/prometheus/procfs/internal/fs
github.com/prometheus/procfs/internal/util
# github.com/russross/blackfriday/v2 v2.1.0
github.com/russross/blackfriday/v2
-# github.com/shirou/gopsutil/v3 v3.22.2
+# github.com/shirou/gopsutil/v3 v3.22.4
## explicit
github.com/shirou/gopsutil/v3/cpu
github.com/shirou/gopsutil/v3/disk
@@ -194,30 +186,30 @@ github.com/shirou/gopsutil/v3/internal/common
github.com/shirou/gopsutil/v3/mem
github.com/shirou/gopsutil/v3/net
github.com/shirou/gopsutil/v3/process
-# github.com/stretchr/testify v1.7.0
+# github.com/stretchr/testify v1.7.1
## explicit
github.com/stretchr/testify/assert
github.com/stretchr/testify/require
-# github.com/swaggo/echo-swagger v1.3.0
+# github.com/swaggo/echo-swagger v1.3.2
## explicit
github.com/swaggo/echo-swagger
# github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2
github.com/swaggo/files
-# github.com/swaggo/swag v1.8.0
+# github.com/swaggo/swag v1.8.2
## explicit
github.com/swaggo/swag
# github.com/tklauser/go-sysconf v0.3.10
-## explicit
github.com/tklauser/go-sysconf
-# github.com/tklauser/numcpus v0.4.0
+# github.com/tklauser/numcpus v0.5.0
+## explicit
github.com/tklauser/numcpus
-# github.com/urfave/cli/v2 v2.3.0
+# github.com/urfave/cli/v2 v2.8.1
github.com/urfave/cli/v2
# github.com/valyala/bytebufferpool v1.0.0
github.com/valyala/bytebufferpool
# github.com/valyala/fasttemplate v1.2.1
github.com/valyala/fasttemplate
-# github.com/vektah/gqlparser/v2 v2.4.1
+# github.com/vektah/gqlparser/v2 v2.4.4
## explicit
github.com/vektah/gqlparser/v2
github.com/vektah/gqlparser/v2/ast
@@ -234,19 +226,21 @@ github.com/xeipuuv/gojsonreference
# github.com/xeipuuv/gojsonschema v1.2.0
## explicit
github.com/xeipuuv/gojsonschema
+# github.com/xrash/smetrics v0.0.0-20201216005158-039620a65673
+github.com/xrash/smetrics
# github.com/yusufpapurcu/wmi v1.2.2
github.com/yusufpapurcu/wmi
-# golang.org/x/crypto v0.0.0-20220307211146-efcb8507fb70
+# golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e
## explicit
golang.org/x/crypto/acme
golang.org/x/crypto/acme/autocert
golang.org/x/crypto/sha3
-# golang.org/x/mod v0.5.1
+# golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3
## explicit
golang.org/x/mod/internal/lazyregexp
golang.org/x/mod/module
golang.org/x/mod/semver
-# golang.org/x/net v0.0.0-20220225172249-27dd8689420f
+# golang.org/x/net v0.0.0-20220526153639-5463443f8c37
## explicit
golang.org/x/net/http/httpguts
golang.org/x/net/http2
@@ -255,8 +249,7 @@ golang.org/x/net/http2/hpack
golang.org/x/net/idna
golang.org/x/net/webdav
golang.org/x/net/webdav/internal/xml
-# golang.org/x/sys v0.0.0-20220307203707-22a9840ba4d7
-## explicit
+# golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a
golang.org/x/sys/cpu
golang.org/x/sys/execabs
golang.org/x/sys/internal/unsafeheader
@@ -271,11 +264,10 @@ golang.org/x/text/secure/bidirule
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
-golang.org/x/text/width
-# golang.org/x/time v0.0.0-20220224211638-0e9765cccd65
+# golang.org/x/time v0.0.0-20220411224347-583f2d630306
## explicit
golang.org/x/time/rate
-# golang.org/x/tools v0.1.9
+# golang.org/x/tools v0.1.10
golang.org/x/tools/go/ast/astutil
golang.org/x/tools/go/buildutil
golang.org/x/tools/go/gcexportdata
@@ -299,8 +291,7 @@ golang.org/x/tools/internal/typesinternal
# golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1
golang.org/x/xerrors
golang.org/x/xerrors/internal
-# google.golang.org/protobuf v1.27.1
-## explicit
+# google.golang.org/protobuf v1.28.0
google.golang.org/protobuf/encoding/prototext
google.golang.org/protobuf/encoding/protowire
google.golang.org/protobuf/internal/descfmt
@@ -328,8 +319,6 @@ google.golang.org/protobuf/reflect/protoregistry
google.golang.org/protobuf/runtime/protoiface
google.golang.org/protobuf/runtime/protoimpl
google.golang.org/protobuf/types/descriptorpb
-google.golang.org/protobuf/types/known/anypb
-google.golang.org/protobuf/types/known/durationpb
google.golang.org/protobuf/types/known/timestamppb
# gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v2