Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modules: add a secondary go.mod to segregate CLI dependencies #1139

Merged
merged 1 commit into from
Aug 15, 2020

Conversation

MichaelMure
Copy link
Contributor

Fix #1138

This PR add a secondary go.mod specifically for the CLI tool which has the effect of removing its dependencies from the main go.mod file imported in projects.

This simple change reduced the number of dependencies of https://github.com/MichaelMure/git-bug from 313 to 148.

@MichaelMure
Copy link
Contributor Author

I can rebase that, but will someone merge it ? @umarcor ?

@MichaelMure
Copy link
Contributor Author

Rebased and updated. Can someone merge before it get outdated again?

@eparis eparis merged commit 81e0311 into spf13:master Aug 15, 2020
jharshman added a commit to jharshman/cobra that referenced this pull request Aug 23, 2020
PR spf13#1139 introduced a complexity that will have to be taken into account
as we figure out our release pipeline. This fix pins to cobrav1.0.0 as a
temporary workaround.
jharshman added a commit to jharshman/cobra that referenced this pull request Aug 23, 2020
PR spf13#1139 introduced a complexity that will have to be taken into account
as we figure out our release pipeline. This fix pins to cobrav1.0.0 as a
temporary workaround.

fixes: spf13#1191
eparis pushed a commit that referenced this pull request Aug 23, 2020
PR #1139 introduced a complexity that will have to be taken into account
as we figure out our release pipeline. This fix pins to cobrav1.0.0 as a
temporary workaround.

fixes: #1191
searKing added a commit to searKing/golang that referenced this pull request Apr 11, 2022
searKing added a commit to searKing/golang that referenced this pull request Apr 11, 2022
searKing pushed a commit to searKing/sole that referenced this pull request Sep 21, 2022
…f7b85f..b1354dc447

b1354dc447 test(viper): add test case
b70f55ef23 feat(grpc-gateway-v2): go get -u
681483bc5c feat(grpc): go get -u
f6c53a6bc1 feat(grpc-gateway-v2): ProtoMarshaller from runtime.ProtoMarshaller to proto.MarshalOptions|proto.UnmarshalOptions
52ddeeb85a feat(proto): MessageShortName returns the short name of proto.Message.
b90d3a8719 fix(webserver): block if NonBlockingRun return an error
bbc0a5e64d feat(webserver): go get -u ./...
fee322c329 fix(webserver): block if NonBlockingRun return an error [webserver.go:153](Run) [graceful-termination] waiting for http server to be stopped
7e304dd4ec feat(exp/slices): add Contains, Filter, Intersect, Union, Reverse
2befa04f5d feat(exp/math): add Clamp returns the value between boundary [lo,hi], as v < lo ? v : hi > v : hi : v.
b5a2f7bc58 feat(webserver): grpc v1.47.0 -> v1,49.0
1c767905af feat(grpc-gateway): v2.10.3 -> v2.11.3
8baef05a28 feat(grpc-gateway): v2.10.3 -> v2.11.3
03c2ddfb5d feat(grpc): v1.47.0 -> v1,49.0
c03036ac51 fix(webserver): recreate rotated file if not exist, avoid write deleted file
9f2876b42a fix(logrus): recreate rotated file if not exist, avoid write deleted file
c615070377 fix(os): recreate rotated file if not exist, avoid write deleted file
367a416d0a fix(logrus): invalid seq risk if rotate
21da7a759d fix(os): invalid seq risk if rotate
00d6dac5c7 fix(resolver): uses RFC 3986 semantics to parse the given target into a resolver.Target
f47877b27e fix(resolver): add missing ctx for unix resolver
455000d26d fix(webserver): use local ip if no resolver is providered
f3a1cadadd refact(webserver): add error as result of runPostStartHook
91b466886c feat(sync): wait only for f has been executed or panic
c6e051c0db feat(go.mod): go mod tidy
bb8c5ca847 feat(pkg/webserver): go mod tidy
922100cdeb feat(sync): sync.Thread.Do will call the function f in the same thread or escape thread.
af3b532d2e feat(go.mod): go mod tidy
c54bd64eda feat(pkg/webserver): go mod tidy
670748894e feat(sync): sync.Thread.EscapableDo will call the function f in the same thread or escape thread.
ab82dbf44f feat(go): go mod tidy
aa2495c63f feat(exp/slices): SplitN slices s into subslices and returns a slice of the subslices
a6a684fec1 fear(webserver): go mod tidy
6674df4207 fear(glog): GlogPreRotate -> GlogRotateHeader
9f645c9eb9 feat(image): add ScaleRectangleBySize and UnionPoints
83119d524e fix(tools/cmd): compatible for deprecated tools
f9ad18308f fix(tools/cmd): compatible for deprecated tools
09e010a568 feat(go.mod): resolve ambiguous import
4792e77301 feat(cube-facedrive): rename from fuse_param -> driver_param
6be2a978d8 feat(go.mod): resolve ambiguous import
6c652cd5c9 feat(go.mod): resolve ambiguous import
cf24361470 feat(go.mod): resolve ambiguous import
7020379018 feat(go.mod): resolve ambiguous import
98c5a09b62 feat(go.mod): resolve ambiguous import
87661de4bd feat(go.mod): resolve ambiguous import
3bb8c7836c feat(go.mod): resolve ambiguous import
1fa2cf86b7 feat(go.mod): resolve ambiguous import
9d7b0ad969 feat(go.mod): resolve ambiguous import
8940b411b7 fix(go): add doc.go as a placeHolder file, so repository root can be seen as a go package
c0d1201d62 fix(go): revert comments after package name, by https://pkg.go.dev/cmd/go#hdr-Import_path_checking
f6fd58c4b0 fix(go): fix 'go: downgraded' when go get -u
3dfa0dca68 fix(go): fix 'go: downgraded' when go get -u
1a656fb9fa fix(go): add doc.go as a placeHolder file, so repository root can be seen as a go package
353ee03ea4 fix(go): add doc.go as a placeHolder file, so repository root can be seen as a go package
544be4f059 feat(go.mod): update github.com/searKing/golang/go -> v1.2.29
973bacd88a feat(go.mod): update github.com/searKing/golang/go -> v1.2.29
87ddbef3f6 feat(cgosymbolizer): support different build tags, defined in https://www.boost.org/doc/libs/develop/doc/html/stacktrace/configuration_and_build.html
1aa9bce674 feat(cgosymbolizer): add tests
abc7ea3c6a fix(go/os): typo, reverse GoRoutine
fe76bc7636 feat(go.sum): go mod tidy
472259989c feat(github.com/spf13/pflag): add InitFlags normalizes, parses, then logs the command line flags
81f0fca1e7 feat(go/version): Get returns GitTag as version
c1392ed307 feat(webserver): retract v1.2.26
98abd37475 feat(webserver): module name webserver -> github.com/searKing/golang/pkg/webserver
3e97b1b654 doc(README): update link to latest
2c8f9e7ba6 feat(webserver): add webserver to use easily, within grpc server and http server inside
e35a06fc43 feat(logrus): add factory to use easily
84165acf52 feat(go/x/graceful): typo of comment
29f856466b feat(go/time): Duration is alias of time.Duration for marshal and unmarshal
6a755033be feat(go/exp): Set implements a non-thread safe Set
2c05b4aa6b fix(image): Rectangle2f.RoundPoint -> RoundPoint.RoundRectangle
fa858e4650 feat(image): add Point2f and Rectangle2f
26a24d1ca2 fix(os): ExceedBytes misuse of avail as used
75c2165786 feat(os): add quota for UnlinkOldestFiles and UnlinkOldestFilesFunc
0cef5c21dd feat(net/http): split target to proxy target and req url target, add support proxyUrl
128a66c504 fix(otel): NewFactory for a dimensionality-reset Processor Factory that passes data to the next stage in an export pipeline.
6682e1e059 feat(opentelemetry): go.opentelemetry.io/otel/sdk/metric v0.29.0 -> v0.30.0
71d56146cd feat(grpc-gateway): go mod tidy
d8c63155a3 feat(grpc-gateway-v2): go mod tidy
e18e345b21 feat(grpc/status): Errore returns an error representing c and msg if err is not status.Status.
a024b62572 feat(errors): implements As for markError and multiError
ccbd0015c0 feat(image): add UnionPoints and UnionRectangles
736c1a1cab fix(net/http): keep host if replaceHostInRequest is false
32624bbc90 feat(net/http): targetAsProxy -> replaceHostInRequest
4a21de6740 refact(exp/slices): add Filter or FilterFunc
a594b607d9 refact(exp/sync): add Cap for LRU
add22ac84a Merge branch 'master' of https://github.com/searKing/golang
ce2a7a0005 refact(exp/sync): New -> NewLRU
757de3c16d feat(errors): add test case for Mark
9053faac7d feat(doc): fix typo
680d7421b1 feat(gcloud.dev): add BucketURLOpenerFunc
376a703c14 feat(exp/slices): And, Or
3ea48afd27 feat(exp/slices): FirstOrZero[S ~[]E, E comparable](s S) E -> FirstOrZero[E comparable](s ...E) E
dab9499393 feat(gcloud.dev): add BucketURLOpenerFunc
a053b26925 feat(exp/slices): add FirstFunc, FirstOrZero, FirstOrZeroFunc
3e8505845c feat(net/http): add RoundTripDecorators and HandlerDecorators
b947f45c7f refact(go-option): typo
5cb0359945 feat(exp/sync): add lru using generics see also: https://github.com/hashicorp/golang-lru/blob/master/simplelru/lru.go
e33a6be24e feat(exp/container): add lru using generics see also: https://github.com/hashicorp/golang-lru/blob/master/simplelru/lru.go
f1a6b3c608 feat(errors): add ErrIgnore
b56b6ddd71 feat(exp/net/grpc): add Wrap
c1e8120299 feat(exp/slices): add Reverse
14ef28e53b feat(third_party/github.com/open-telemetry): add wrap processor
0b36d60121 feat(exp/reflect): add FieldByNames and SetFieldByNames
f90845ae67 feat(reflect): add FieldByNames and SetFieldByNames
b5044aa355 fix(opentelemetry): add NewWithExactDistribution for opentelemetry v0.29.0 https://github.com/open-telemetry/opentelemetry-go/blob/metric/v0.25.0/sdk/metric/aggregator/exact/exact.go https://github.com/open-telemetry/opentelemetry-go/blob/metric/v0.25.0/sdk/metric/selector/simple/simple.go
f69b4b8ef9 fix(otelgrpc): migrate to [email protected]
099b3c8929 fix(otelgrpc): migrate to [email protected]
587d6bfe27 fix(net/http): remove duplicate http method in Methods
b2a5a2992b feat(exp/types): add Pointer and Value between pointer and value
3a5429257b fix(pkg): remove temp files
55d37c0869 feat(tools): update dependency
c18b161b3a feat(third_party/github.com/google.golang.org/grpc): update dependency
b98d2086cf feat(third_party/github.com/syndtr/goleveldb): update dependency
d439a6d7f8 feat(third_party/github.com/spf13/viper): update dependency
244e6dd835 feat(third_party/github.com/sirupsen/logrus): update dependency
5daf25c34b feat(third_party/github.com/open-telemetry): update dependency
4955f230f9 feat(third_party/github.com/jmoiron/sqlx): update dependency
ed63882d48 feat(third_party/github.com/gtank/cryptopasta): update dependency
241e4faac8 feat(third_party/github.com/grpc-ecosystem): deprecate instrumentedsql
8024228a6a feat(third_party/github.com/golang/go): deprecate instrumentedsql
7a3d931f47 feat(third_party/github.com/go-sql-driver/mysql): update dependency
3595a17cbf feat(third_party/github.com/gin-gonic/gin): remove dependency of negroni
4d13d82d0d feat(third_party/github.com/gin-gonic/gin): update dependency
3ac9a9c4ed feat(third_party/google.golang.org/grpc|third_party/github.com/gorilla/websocket): update dependency
cc116f0714 feat(third_party/google.golang.org/protobuf): update dependency
d4853952ba fix(modules): add a secondary go.mod to segregate go dependencies ambiguous import: found package  in multiple modules spf13/cobra#1215 spf13/cobra#1139
e4fc34d5e4 fix(modules): add a secondary go.mod to segregate go dependencies ambiguous import: found package  in multiple modules spf13/cobra#1215 spf13/cobra#1139
de0f98a54b feat(net/http): add RoundTripperWithBackoff
7c3e23aa8f feat(net/http): add WithDoWithBackoffOptionProxy
3a7977100f feat(exp/math): add Min/Max/Dim
3423f9d0f6 feat(constraints): add Number
705bd15a4b feat(slices): add LinearSearch|LinearSearchFunc
c277d57fa9 feat(net/http): add PutWithBackoff
5a4efa49fb feat(os): add RemoveIfExist, like os.Remove, except that if the path does not exist, RemoveIfExist returns nil (no error).
8150500b34 feat(slices): support slices.SplitN
00c98c1889 feat(maps): support maps.SplitN
38ed0bd7c5 feat(go.mod): third_party/github.com/grpc-ecosystem/grpc-gateway-v2
bb81fe8044 feat(go.mod): third_party/github.com/open-telemetry
d085c28c44 feat(go.mod): third_party/github.com/open-telemetry
f72367da62 feat(go.mod): third_party/github.com/grpc-ecosystemgrpc-gateway
a96debca0a feat(go.mod): third_party/github.com/grpc-ecosystem/go-grpc-middleware
a11ee027a5 feat(go.mod): third_party/github.com/spf13/viper
443bda674e feat(go.mod): third_party/google.golang.org/grpc
fb8fdd5c4b fear(go.mod): third_party/github.com/gin-gonic/gin
4c80c8e48c fear(go.mod): third_party/google.golang.org/protobuf
49154ec2b8 fear(go.mod): github.com/searKing/golang/third_party/github.com/urfave/negroni
afb398b1d1 fear(go.mod): github.com/searKing/golang/third_party/github.com/syndtr/goleveldb
25b09c54b8 fear(go.mod): github.com/searKing/golang/third_party/github.com/sirupsen/logrus
50ee52e045 fear(go.mod): github.com/searKing/golang/third_party/github.com/julienschmidt/httprouter
f0b8aa8d22 fear(go.mod): github.com/searKing/golang/third_party/github.com/jmoiron/sqlx
2d746110bd fear(go.mod): github.com/searKing/golang/third_party/github.com/gtank/cryptopasta
34109b114c fear(go.mod): github.com/searKing/golang/third_party/github.com/gorilla/websocket
e32009b146 fear(go.mod): github.com/searKing/golang/third_party/github.com/google/uuid
740e663e5a fear(go.mod): github.com/searKing/golang/third_party/github.com/golang/protobuf
54ad497d51 fear(go.mod): github.com/searKing/golang/third_party/github.com/golang/go
7fba13885b feat(github.com/go-sql-driver/mysql): github.com/go-sql-driver/mysql
1571699d56 feat(go-xxx): add go-xxx
a9377aaa02 feat(go-nulljson): add go-nulljson
2b8d0016a9 feat(go-option): add go-option
65cc2e523d feat(tools): add pkg in tools
8379822e5d feat(golang): keep go only to reduce dependency
c48a44f3ad fix(go-nulljson): fix "without types was imported from" when generate with go1.18+
fea0a33af5 feat(logrus): DisableSorting for GlogEnhancedFormatter
da6fc787d2 feat(grpc-gateway): add WithLogrusLoggerConfig
35dec3956f fix(http): call WrapHandle in reverse order in InjectHttpHandler
fd4069e99d style(http): comment
b025a2a18c feat(grpc-gateway): support http log for grpc gateway by WithLogrusLogger
ffce5f9a72 feat(sql): remove vitess
a456c49a00 feat(logrus): change KeyStringFunc's key type from interface{} to string
09b637c267 feat(logrus): add MessageStringFunc|KeyStringFunc|ValueStringFunc for GlogFormatter
cf7fd9a05f feat(mysql): add server-side errors https://dev.mysql.com/doc/mysql-errors/8.0/en/server-error-reference.html
afe5dfd65d refact(ioutil): As of Go 1.16, this function simply calls os instead of ioutil
63680d3e9a Merge remote-tracking branch 'origin/master'
31da0f92a5 refact(go.mod): update dependency to latest
e166a67230 refact(ioutil): As of Go 1.16, this function simply calls os instead of ioutil
f4ac76f41f feat(ioutil): Add WriteRenameFileAllFrom and more
02ac754dd6 feat(reflect): update example of Truncate
04fe953701 fix(os): add missing linux support for DiskUsage
34ac15fa52 feat(reflect): add support of slice、array、map for Truncate
28191cfa49 feat(os): DiskUsage returns total and free bytes available in a directory, e.g. `/`.
928adcbcdc feat(errors): Mark returns an error with the supplied errors as marks. If err is nil, return nil. marks take effects only when Is and '%v' in fmt. Is returns true if err or any marks match the target.
18de0d68f9 feat(errors): add Unwrap() for Multi, returns the error in e, if there is exactly one. If there is more than one error, Unwrap returns nil, since there is no way to determine which should be returned.
b386053582 fix(viper):trick: replace merge trick below of merge option for protojson.Unmarshal See protocolbuffers/protobuf#8263
0753227be2 feat(go-nulljson):example
dc5f6bd4b3 feat(go-nulljson):example
a9346b785e feat(go-nulljson):-protojson generate codec of proto by protojson, instead of json
1f02ffc93b feat(runtime): GetCallerFrame returns the caller frame of the function that calls it.
25346e45da feat(logrus): add logrus glog formatter
3be4a57a51 feat(logrus): add logrus glog formatter
5812fdec1e fix(os): return exactly error if no file to be written
8091b37e2b feat(viper): Unmarshal if UnmarshalViper's v is nil
3f9a536c26 feat(viper): DecodeProtoJsonHook
76a28209bc fix(go-option): generate only func() if Field is func without both params and results
6a8f92b84c feat(go-option): support map、slice、array、func、interface{} of indent
d8a5ccc3c8 test(go-option): update test case
28fb55029f feat(go-option): support struct tag `option:"-,short"` and comment
734bc7ec4d fix(ioutil): name of file contains temp dir already
e3d7c431b9 feat(databse/sql): special case, remove scheme for mysql*
b4947ccfcd feat(otlpsql): defaults of db.type https://opentracing.io/specification/conventions/
de4fdc263f feat(otlpsql): OpenTelemetry SQL database driver wrapper. Add an otlpsql wrapper to your existing database code to instrument the interactions with the database.
4471cecc28 feat(otlpsql): OpenTelemetry SQL database driver wrapper. Add an otlpsql wrapper to your existing database code to instrument the interactions with the database.
b202fa4758 feat(go-option): doc
3006b34155 feat(go-option): generate WithXXXOption for struct

git-subtree-dir: .third_party/github.com/searKing/golang
git-subtree-split: b1354dc4475c7401217b4573458f936e3d721352
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cobra pull a lot of dependencies through viper
3 participants