Errorgen: support to run outside of GOPATH

pull/2757/head
loyalsoldier 4 years ago
parent 0650af46f4
commit b181045b0c
No known key found for this signature in database
GPG Key ID: 23829BBC1ACF2C90

@ -2,7 +2,7 @@
package commander package commander
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package dispatcher package dispatcher
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,4 +2,4 @@
package dispatcher package dispatcher
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,4 +1,4 @@
// Package dns is an implementation of core.DNS feature. // Package dns is an implementation of core.DNS feature.
package dns package dns
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -2,7 +2,7 @@
package dns package dns
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package command package command
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package log package log
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -1,4 +1,4 @@
// Package policy is an implementation of policy.Manager feature. // Package policy is an implementation of policy.Manager feature.
package policy package policy
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,3 +1,3 @@
package command package command
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,6 +1,6 @@
package inbound package inbound
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -1,6 +1,6 @@
package outbound package outbound
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package reverse package reverse
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package command package command
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package router package router
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package command package command
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package stats package stats
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -1,4 +1,4 @@
// Package buf provides a light-weight memory allocation mechanism. // Package buf provides a light-weight memory allocation mechanism.
package buf // import "v2ray.com/core/common/buf" package buf // import "v2ray.com/core/common/buf"
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -13,7 +13,7 @@ import (
"v2ray.com/core/common/errors" "v2ray.com/core/common/errors"
) )
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
var ( var (
// ErrNoClue is for the situation that existing information is not enough to make a decision. For example, Router may return this error when there is no suitable route. // ErrNoClue is for the situation that existing information is not enough to make a decision. For example, Router may return this error when there is no suitable route.

@ -1,4 +1,4 @@
// Package crypto provides common crypto libraries for V2Ray. // Package crypto provides common crypto libraries for V2Ray.
package crypto // import "v2ray.com/core/common/crypto" package crypto // import "v2ray.com/core/common/crypto"
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,3 +1,3 @@
package mux package mux
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,4 +1,4 @@
// Package net is a drop-in replacement to Golang's net package, with some more functionalities. // Package net is a drop-in replacement to Golang's net package, with some more functionalities.
package net // import "v2ray.com/core/common/net" package net // import "v2ray.com/core/common/net"
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -10,7 +10,7 @@ import (
"v2ray.com/core/common/platform" "v2ray.com/core/common/platform"
) )
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
func Run(args []string, input io.Reader) (buf.MultiBuffer, error) { func Run(args []string, input io.Reader) (buf.MultiBuffer, error) {
v2ctl := platform.GetToolLocation("v2ctl") v2ctl := platform.GetToolLocation("v2ctl")

@ -1,3 +1,3 @@
package protocol // import "v2ray.com/core/common/protocol" package protocol // import "v2ray.com/core/common/protocol"
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -15,7 +15,7 @@ import (
"v2ray.com/core/common" "v2ray.com/core/common"
) )
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
type Certificate struct { type Certificate struct {
// Cerificate in ASN.1 DER format // Cerificate in ASN.1 DER format

@ -1,6 +1,6 @@
package retry // import "v2ray.com/core/common/retry" package retry // import "v2ray.com/core/common/retry"
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"time" "time"

@ -9,8 +9,7 @@
// connections. // connections.
package core package core
//go:generate go install "v2ray.com/core/common/errors/errorgen" //go:generate go run v2ray.com/core/common/errors/errorgen
//go:generate errorgen
import ( import (
"runtime" "runtime"

@ -2,7 +2,7 @@ package features
import "v2ray.com/core/common" import "v2ray.com/core/common"
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
// Feature is the interface for V2Ray features. All features must implement this interface. // Feature is the interface for V2Ray features. All features must implement this interface.
// All existing features have an implementation in app directory. These features can be replaced by third-party ones. // All existing features have an implementation in app directory. These features can be replaced by third-party ones.

@ -1,6 +1,6 @@
package dns package dns
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"v2ray.com/core/common/net" "v2ray.com/core/common/net"

@ -1,6 +1,6 @@
package stats package stats
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -1,6 +1,6 @@
package command package command
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"os" "os"

@ -1,3 +1,3 @@
package conf package conf
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,3 +1,3 @@
package serial package serial
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,3 +1,3 @@
package control package control
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,6 +1,6 @@
package external package external
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"bytes" "bytes"

@ -1,6 +1,6 @@
package json package json
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"io" "io"

@ -1,6 +1,6 @@
package main package main
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"flag" "flag"

@ -4,7 +4,7 @@
package blackhole package blackhole
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package dokodemo package dokodemo
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package freedom package freedom
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -1,3 +1,3 @@
package http package http
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,3 +1,3 @@
package mtproto package mtproto
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -5,4 +5,4 @@
// R.I.P Shadowsocks // R.I.P Shadowsocks
package shadowsocks package shadowsocks
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,4 +1,4 @@
// Package socks provides implements of Socks protocol 4, 4a and 5. // Package socks provides implements of Socks protocol 4, 4a and 5.
package socks package socks
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -2,7 +2,7 @@
package encoding package encoding
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"io" "io"

@ -2,7 +2,7 @@
package inbound package inbound
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package outbound package outbound
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -5,7 +5,7 @@
// clients with 'socks' for proxying. // clients with 'socks' for proxying.
package vless package vless
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
const ( const (
XRO = "xtls-rprx-origin" XRO = "xtls-rprx-origin"

@ -5,7 +5,7 @@ import (
"v2ray.com/core/common/protocol" "v2ray.com/core/common/protocol"
) )
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
const ( const (
Version = byte(1) Version = byte(1)

@ -2,7 +2,7 @@
package inbound package inbound
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -2,7 +2,7 @@
package outbound package outbound
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"context" "context"

@ -5,4 +5,4 @@
// clients with 'socks' for proxying. // clients with 'socks' for proxying.
package vmess package vmess
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,3 +1,3 @@
package domainsocket package domainsocket
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,6 +1,6 @@
package http package http
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
import ( import (
"bufio" "bufio"

@ -1,3 +1,3 @@
package http package http
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -1,3 +1,3 @@
package internet package internet
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -5,4 +5,4 @@
// xtaci@github for translating to Golang // xtaci@github for translating to Golang
package kcp package kcp
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -7,7 +7,7 @@ import (
"v2ray.com/core/transport/internet" "v2ray.com/core/transport/internet"
) )
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
// Here is some modification needs to be done before update quic vendor. // Here is some modification needs to be done before update quic vendor.
// * use bytespool in buffer_pool.go // * use bytespool in buffer_pool.go

@ -1,3 +1,3 @@
package tcp package tcp
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -9,7 +9,7 @@ import (
"v2ray.com/core/common/net" "v2ray.com/core/common/net"
) )
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
var ( var (
_ buf.Writer = (*Conn)(nil) _ buf.Writer = (*Conn)(nil)

@ -1,5 +1,5 @@
package udp package udp
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
const protocolName = "udp" const protocolName = "udp"

@ -4,4 +4,4 @@ Websocket transport implements an HTTP(S) compliable, surveillance proof transpo
*/ */
package websocket package websocket
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen

@ -9,7 +9,7 @@ import (
"v2ray.com/core/common/net" "v2ray.com/core/common/net"
) )
//go:generate errorgen //go:generate go run v2ray.com/core/common/errors/errorgen
var ( var (
_ buf.Writer = (*Conn)(nil) _ buf.Writer = (*Conn)(nil)

Loading…
Cancel
Save