move flag to pkg value
This commit is contained in:
@@ -6,9 +6,9 @@ import (
|
||||
|
||||
"gitoa.ru/go-4devs/console"
|
||||
"gitoa.ru/go-4devs/console/input"
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/option"
|
||||
"gitoa.ru/go-4devs/console/input/validator"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
"gitoa.ru/go-4devs/console/output"
|
||||
)
|
||||
|
||||
|
||||
2
help.go
2
help.go
@@ -8,9 +8,9 @@ import (
|
||||
|
||||
"gitoa.ru/go-4devs/console/input"
|
||||
"gitoa.ru/go-4devs/console/input/argument"
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/option"
|
||||
"gitoa.ru/go-4devs/console/input/validator"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
"gitoa.ru/go-4devs/console/output"
|
||||
"gitoa.ru/go-4devs/console/output/descriptor"
|
||||
)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package argument
|
||||
|
||||
import (
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
func New(name, description string, opts ...func(*Argument)) Argument {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package argument
|
||||
|
||||
import (
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
func Required(a *Argument) {
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
package input
|
||||
@@ -1,7 +1,7 @@
|
||||
package option
|
||||
|
||||
import (
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
func Bool(name, description string, opts ...func(*Option)) Option {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package option
|
||||
|
||||
import (
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
func Required(o *Option) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package validator
|
||||
|
||||
import (
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
//nolint: gocyclo
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/validator"
|
||||
"gitoa.ru/go-4devs/console/input/value"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
func TestNotBlank(t *testing.T) {
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/validator"
|
||||
"gitoa.ru/go-4devs/console/input/value"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
func TestValid(t *testing.T) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package value
|
||||
|
||||
import "gitoa.ru/go-4devs/console/input/flag"
|
||||
import "gitoa.ru/go-4devs/console/input/value/flag"
|
||||
|
||||
type Any struct {
|
||||
empty
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Bool struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Duration struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Float64 struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Int struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Int64 struct {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package value
|
||||
|
||||
import "gitoa.ru/go-4devs/console/input/flag"
|
||||
import "gitoa.ru/go-4devs/console/input/value/flag"
|
||||
|
||||
type String struct {
|
||||
empty
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Time struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Uint struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Uint64 struct {
|
||||
|
||||
@@ -3,7 +3,7 @@ package value
|
||||
import (
|
||||
"time"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
)
|
||||
|
||||
type Value interface {
|
||||
|
||||
@@ -10,8 +10,8 @@ import (
|
||||
"time"
|
||||
|
||||
"gitoa.ru/go-4devs/console/input"
|
||||
"gitoa.ru/go-4devs/console/input/flag"
|
||||
"gitoa.ru/go-4devs/console/input/value"
|
||||
"gitoa.ru/go-4devs/console/input/value/flag"
|
||||
"gitoa.ru/go-4devs/console/output"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user