diff --git a/stream.go b/stream.go index 45ac2c4..fb8d395 100644 --- a/stream.go +++ b/stream.go @@ -10,15 +10,10 @@ import ( // AddStream add new stream, with default config func AddStream(name string, subjects []string) error { // Get info about the stream - stream, err := natsJS.StreamInfo(name) - if err != nil { - msg := fmt.Sprintf("error getting stream info: %s", err.Error()) - return errors.New(msg) - } - + stream, _ := natsJS.StreamInfo(name) // If stream not found, create new if stream == nil { - _, err = natsJS.AddStream(&nats.StreamConfig{ + _, err := natsJS.AddStream(&nats.StreamConfig{ Name: name, Subjects: subjects, Storage: nats.FileStorage,