1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-10 03:47:03 +02:00
goreleaser/internal/logext/writer.go
Carlos Alexandro Becker 60f4fe7d2d
feat: moved sign log to info and stream output (#1276)
* fix: moved sign log to info

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* feat: stream cmd output

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* chore: fmt

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: log writer

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: log

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: wait already closes

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: wait for wg first

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: use lib

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>

* fix: version

Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
2019-12-27 11:55:15 -03:00

19 lines
321 B
Go

package logext
import "github.com/apex/log"
// Writer writes with log.Info
type Writer struct {
ctx *log.Entry
}
// NewWriter creates a new log writer
func NewWriter(ctx *log.Entry) Writer {
return Writer{ctx: ctx}
}
func (t Writer) Write(p []byte) (n int, err error) {
t.ctx.Info(string(p))
return len(p), nil
}