using new organization
This commit is contained in:
@@ -26,7 +26,7 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/astaxie/beego/core/utils"
|
||||
"github.com/beego/beego/core/utils"
|
||||
)
|
||||
|
||||
var startTime = time.Now()
|
||||
|
||||
@@ -22,7 +22,7 @@ import (
|
||||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
const DefaultValueTagKey = "default"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
// Package config is used to parse config.
|
||||
// Usage:
|
||||
// import "github.com/astaxie/beego/config"
|
||||
// import "github.com/beego/beego/config"
|
||||
// Examples.
|
||||
//
|
||||
// cnf, err := config.NewConfig("ini", "config.conf")
|
||||
|
||||
2
core/config/env/env.go
vendored
2
core/config/env/env.go
vendored
@@ -21,7 +21,7 @@ import (
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/astaxie/beego/core/utils"
|
||||
"github.com/beego/beego/core/utils"
|
||||
)
|
||||
|
||||
var env *utils.BeeMap
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/config"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
type EtcdConfiger struct {
|
||||
|
||||
@@ -20,7 +20,7 @@ var globalInstance Configer
|
||||
|
||||
// InitGlobalInstance will ini the global instance
|
||||
// If you want to use specific implementation, don't forget to import it.
|
||||
// e.g. _ import "github.com/astaxie/beego/core/config/etcd"
|
||||
// e.g. _ import "github.com/beego/beego/core/config/etcd"
|
||||
// err := InitGlobalInstance("etcd", "someconfig")
|
||||
func InitGlobalInstance(name string, cfg string) error {
|
||||
var err error
|
||||
|
||||
@@ -30,7 +30,7 @@ import (
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -26,8 +26,8 @@ import (
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/config"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
// JSONConfig is a json config parser and implements Config interface.
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/beego/beego/core/config"
|
||||
)
|
||||
|
||||
func TestJsonStartsWithArray(t *testing.T) {
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/pelletier/go-toml"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/beego/beego/core/config"
|
||||
)
|
||||
|
||||
const keySeparator = "."
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/beego/beego/core/config"
|
||||
)
|
||||
|
||||
func TestConfig_Parse(t *testing.T) {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
//
|
||||
// Usage:
|
||||
// import(
|
||||
// _ "github.com/astaxie/beego/config/xml"
|
||||
// "github.com/astaxie/beego/config"
|
||||
// _ "github.com/beego/beego/config/xml"
|
||||
// "github.com/beego/beego/config"
|
||||
// )
|
||||
//
|
||||
// cnf, err := config.NewConfig("xml", "config.xml")
|
||||
@@ -41,8 +41,8 @@ import (
|
||||
|
||||
"github.com/mitchellh/mapstructure"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/config"
|
||||
"github.com/beego/beego/core/logs"
|
||||
|
||||
"github.com/beego/x2j"
|
||||
)
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/beego/beego/core/config"
|
||||
)
|
||||
|
||||
func TestXML(t *testing.T) {
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
//
|
||||
// Usage:
|
||||
// import(
|
||||
// _ "github.com/astaxie/beego/config/yaml"
|
||||
// "github.com/astaxie/beego/config"
|
||||
// _ "github.com/beego/beego/config/yaml"
|
||||
// "github.com/beego/beego/config"
|
||||
// )
|
||||
//
|
||||
// cnf, err := config.NewConfig("yaml", "config.yaml")
|
||||
@@ -43,8 +43,8 @@ import (
|
||||
"github.com/beego/goyaml2"
|
||||
"gopkg.in/yaml.v2"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/config"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
// Config is a yaml config parser and implements Config interface.
|
||||
|
||||
@@ -21,7 +21,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/astaxie/beego/core/config"
|
||||
"github.com/beego/beego/core/config"
|
||||
)
|
||||
|
||||
func TestYaml(t *testing.T) {
|
||||
|
||||
@@ -4,7 +4,7 @@ logs is a Go logs manager. It can use many logs adapters. The repo is inspired b
|
||||
|
||||
## How to install?
|
||||
|
||||
go get github.com/astaxie/beego/logs
|
||||
go get github.com/beego/beego/logs
|
||||
|
||||
|
||||
## What adapters are supported?
|
||||
@@ -18,7 +18,7 @@ First you must import it
|
||||
|
||||
```golang
|
||||
import (
|
||||
"github.com/astaxie/beego/logs"
|
||||
"github.com/beego/beego/logs"
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"github.com/gogo/protobuf/proto"
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
"github.com/elastic/go-elasticsearch/v6"
|
||||
"github.com/elastic/go-elasticsearch/v6/esapi"
|
||||
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
// NewES returns a LoggerInterface
|
||||
@@ -29,7 +29,7 @@ func NewES() logs.Logger {
|
||||
// please import this package
|
||||
// usually means that you can import this package in your main package
|
||||
// for example, anonymous:
|
||||
// import _ "github.com/astaxie/beego/logs/es"
|
||||
// import _ "github.com/beego/beego/logs/es"
|
||||
type esLogger struct {
|
||||
*elasticsearch.Client
|
||||
DSN string `json:"dsn"`
|
||||
|
||||
@@ -17,7 +17,7 @@ package es
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
// IndexNaming generate the index name
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
func TestDefaultIndexNaming_IndexName(t *testing.T) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Package logs provide a general log interface
|
||||
// Usage:
|
||||
//
|
||||
// import "github.com/astaxie/beego/logs"
|
||||
// import "github.com/beego/beego/logs"
|
||||
//
|
||||
// log := NewLogger(10000)
|
||||
// log.SetLogger("console", "")
|
||||
|
||||
@@ -8,7 +8,7 @@ In your beego.Controller:
|
||||
|
||||
package controllers
|
||||
|
||||
import "github.com/astaxie/beego/core/utils/pagination"
|
||||
import "github.com/beego/beego/core/utils/pagination"
|
||||
|
||||
type PostsController struct {
|
||||
beego.Controller
|
||||
|
||||
@@ -7,18 +7,18 @@ validation is a form validation for a data validation and error collecting using
|
||||
|
||||
Install:
|
||||
|
||||
go get github.com/astaxie/beego/validation
|
||||
go get github.com/beego/beego/validation
|
||||
|
||||
Test:
|
||||
|
||||
go test github.com/astaxie/beego/validation
|
||||
go test github.com/beego/beego/validation
|
||||
|
||||
## Example
|
||||
|
||||
Direct Use:
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/validation"
|
||||
"github.com/beego/beego/validation"
|
||||
"log"
|
||||
)
|
||||
|
||||
@@ -49,7 +49,7 @@ Direct Use:
|
||||
Struct Tag Use:
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/validation"
|
||||
"github.com/beego/beego/validation"
|
||||
)
|
||||
|
||||
// validation function follow with "valid" tag
|
||||
@@ -81,7 +81,7 @@ Struct Tag Use:
|
||||
Use custom function:
|
||||
|
||||
import (
|
||||
"github.com/astaxie/beego/validation"
|
||||
"github.com/beego/beego/validation"
|
||||
)
|
||||
|
||||
type user struct {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Package validation for validations
|
||||
//
|
||||
// import (
|
||||
// "github.com/astaxie/beego/validation"
|
||||
// "github.com/beego/beego/validation"
|
||||
// "log"
|
||||
// )
|
||||
//
|
||||
|
||||
@@ -23,7 +23,7 @@ import (
|
||||
"time"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/astaxie/beego/core/logs"
|
||||
"github.com/beego/beego/core/logs"
|
||||
)
|
||||
|
||||
// CanSkipFuncs will skip valid if RequiredFirst is true and the struct field's value is empty
|
||||
|
||||
Reference in New Issue
Block a user