Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api/models/graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
func (g Graph) GetTree(current string) Graph {
graph := Graph{}
queue := []string{current}
for i := 0; i < len(queue); i++ {
for i := range len(queue) {

Check failure on line 8 in api/models/graph.go

View workflow job for this annotation

GitHub Actions / build

cannot range over len(queue) (value of type int)

Check failure on line 8 in api/models/graph.go

View workflow job for this annotation

GitHub Actions / build

cannot range over len(queue) (value of type int)
k := queue[i]
for _, v := range g[k] {
queue = append(queue, v)
Expand Down
2 changes: 1 addition & 1 deletion dependency_graph.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ func (g *DependencyGraphBuilder) sort(key []string, key2Model func(string) iDepe
queue = append(queue, k)
}
}
for i := 0; i < len(queue); i++ {
for i := range len(queue) {
node := queue[i]
for _, v := range graph[node] {
inDegree[v]--
Expand Down
2 changes: 1 addition & 1 deletion dictionary_adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func GetDependencyTree(adapter IAdapter, current string) (models.Graph, error) {
visit := map[string]bool{current: true}
graph := models.Graph{current: nil}
queue := []string{current}
for i := 0; i < len(queue); i++ {
for i := range len(queue) {
node, err := adapter.GetSourceByKey(queue[i])
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion dictionary_column.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func isSameColumnTables(t1, t2 []string) error {
sort.Strings(t1)
sort.Strings(t2)
// TODO linq
for i := 0; i < len(t1); i++ {
for i := range len(t1) {
if t1[i] != t2[i] {
return fmt.Errorf("table is not same t1=%v, t2=%v", t1, t2)
}
Expand Down
2 changes: 1 addition & 1 deletion dictionary_splitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ func (n *NormalClauseSplitter) buildDimensionJoin() []*types.Join {
}
ds1, dl1, ds2, dl2 := v.Get1().DataSource, v.Get1().Dimension, v.Get2().DataSource, v.Get2().Dimension
var on []*types.JoinOn
for i := 0; i < len(dl1); i++ {
for i := range len(dl1) {
k1 := fmt.Sprintf("%v.%v", ds1, dl1[i])
k2 := fmt.Sprintf("%v.%v", ds2, dl2[i])
d1, _ := dGraph.GetDimension(k1)
Expand Down
Loading