From d079521b6f51b37b7592b53d311f19d324a17e1a Mon Sep 17 00:00:00 2001 From: shantuo Date: Tue, 23 Apr 2019 13:27:33 -0700 Subject: [PATCH] wire: reword the deprecation message of struct (#158) --- internal/wire/parse.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/wire/parse.go b/internal/wire/parse.go index af0b4f7..cbe5b17 100644 --- a/internal/wire/parse.go +++ b/internal/wire/parse.go @@ -753,9 +753,10 @@ func processStructLiteralProvider(fset *token.FileSet, typeName *types.TypeName) pos := typeName.Pos() fmt.Fprintf(os.Stderr, - "Deprecated: %v, see https://godoc.org/github.com/google/wire#Struct for more information.", + "Warning: %v, see https://godoc.org/github.com/google/wire#Struct for more information.\n", notePosition(fset.Position(pos), - fmt.Errorf("using struct literal to inject %s, use wire.Struct instead", typeName.Type()))) + fmt.Errorf("using struct literal to inject %s is deprecated and will be removed in the next release; use wire.Struct instead", + typeName.Type()))) provider := &Provider{ Pkg: typeName.Pkg(), Name: typeName.Name(),