mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-16 19:14:41 -07:00
Change test to use require_NoError instead of explicitly checking err and calling Fatalf throughout all the tests in the file
Improvements to readability
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1724,11 +1724,9 @@ func (mset *stream) sourceInfo(si *sourceInfo) *StreamSourceInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
var ssi *StreamSourceInfo
|
||||
var ssi = StreamSourceInfo{Name: si.name, Lag: si.lag, Error: si.err, FilterSubject: si.sf}
|
||||
if si.tr != nil {
|
||||
ssi = &StreamSourceInfo{Name: si.name, Lag: si.lag, Error: si.err, FilterSubject: si.sf, SubjectTransform: si.tr.dest}
|
||||
} else {
|
||||
ssi = &StreamSourceInfo{Name: si.name, Lag: si.lag, Error: si.err, FilterSubject: si.sf}
|
||||
ssi.SubjectTransform = si.tr.dest
|
||||
}
|
||||
// If we have not heard from the source, set Active to -1.
|
||||
if si.last.IsZero() {
|
||||
@@ -1749,7 +1747,7 @@ func (mset *stream) sourceInfo(si *sourceInfo) *StreamSourceInfo {
|
||||
DeliverPrefix: ext.DeliverPrefix,
|
||||
}
|
||||
}
|
||||
return ssi
|
||||
return &ssi
|
||||
}
|
||||
|
||||
// Return our source info for our mirror.
|
||||
|
||||
@@ -172,8 +172,8 @@ func transformIndexIntArgsHelper(token string, args []string, transformType int1
|
||||
}
|
||||
|
||||
// Helper to ingest and index the subjectTransform destination token (e.g. $x or {{}}) in the token
|
||||
// returns a transformation type, and three function arguments: an array of source subject token indexes, and a single number (e.g. number of partitions, or a slice size), and a string (e.g.a split delimiter)
|
||||
|
||||
// returns a transformation type, and three function arguments: an array of source subject token indexes,
|
||||
// and a single number (e.g. number of partitions, or a slice size), and a string (e.g.a split delimiter)
|
||||
func indexPlaceHolders(token string) (int16, []int, int32, string, error) {
|
||||
length := len(token)
|
||||
if length > 1 {
|
||||
|
||||
Reference in New Issue
Block a user