projects/sievemgr

changeset 3:3cd182bff992

Show warning messages in put output
author Guido Berhoerster <guido+sievemgr@berhoerster.name>
date Tue Oct 27 17:54:58 2020 +0100 (4 months ago)
parents 6db34a5344b8
children f925f15d8ce5
files cmd/sievemgr/put.go go.mod go.sum
line diff
     1.1 --- a/cmd/sievemgr/put.go	Mon Oct 26 15:32:20 2020 +0100
     1.2 +++ b/cmd/sievemgr/put.go	Tue Oct 27 17:54:58 2020 +0100
     1.3 @@ -85,8 +85,10 @@
     1.4  	}
     1.5  	defer c.Logout()
     1.6  
     1.7 -	if err := c.PutScript(scriptName, script); err != nil {
     1.8 +	if warnings, err := c.PutScript(scriptName, script); err != nil {
     1.9  		return err
    1.10 +	} else if warnings != "" {
    1.11 +		fmt.Fprintln(os.Stderr, warnings)
    1.12  	}
    1.13  
    1.14  	return nil
     2.1 --- a/go.mod	Mon Oct 26 15:32:20 2020 +0100
     2.2 +++ b/go.mod	Tue Oct 27 17:54:58 2020 +0100
     2.3 @@ -3,6 +3,6 @@
     2.4  go 1.14
     2.5  
     2.6  require (
     2.7 -	go.guido-berhoerster.org/managesieve v0.0.0-20201026142443-8413916df2be
     2.8 +	go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447
     2.9  	golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897
    2.10  )
     3.1 --- a/go.sum	Mon Oct 26 15:32:20 2020 +0100
     3.2 +++ b/go.sum	Tue Oct 27 17:54:58 2020 +0100
     3.3 @@ -2,6 +2,8 @@
     3.4  go.guido-berhoerster.org/managesieve v0.0.0-20201026131555-3fe1614de42c/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
     3.5  go.guido-berhoerster.org/managesieve v0.0.0-20201026142443-8413916df2be h1:pKZGpXqtVG/1d16ZzVMYzjXV09q1jPU+6BsdvVVVqZU=
     3.6  go.guido-berhoerster.org/managesieve v0.0.0-20201026142443-8413916df2be/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
     3.7 +go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447 h1:VdMnQ1Nq0N6cY/ViKe1v0gUURhyWCN2WgCPJfnz6c9Y=
     3.8 +go.guido-berhoerster.org/managesieve v0.0.0-20201027164714-f9bb517e9447/go.mod h1:uvqvWGFO2zONQiEQuDNH37Mg2pM7gTsDZSXtBOSmj98=
     3.9  golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
    3.10  golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
    3.11  golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E=