Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Musat committed Dec 11, 2022
1 parent 74161b7 commit 9f82bb5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var Root = &cobra.Command{

if endsWith(entrypoint, js.Extensions) {
content, err := graph.RenderGraph[js.Data](entrypoint, &js.Parser{
path.Dir(entrypoint),
RootDir: path.Dir(entrypoint),
})
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion internal/node/level.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func calculateLevel[T any](
}
}
if maxLevel == unknown {
// TODO: there is a but here, there are cases where this is reached
// TODO: there is a but here, there are cases where this is reached.
panic("This should not be reachable")
} else {
return ctx, maxLevel
Expand Down
8 changes: 4 additions & 4 deletions internal/render/board.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ func MakeBoard(options BoardOptions) *Board {
}

func (b *Board) Render() (string, error) {
// 1. Create Cell matrix
// 1. Create Cell matrix.
elements := make([][]graphics.CellStack, b.h)
for i := range elements {
elements[i] = make([]graphics.CellStack, b.w)
}

// 2. Render blocks
// 2. Render blocks.
for _, k := range b.blocks.Keys() {
block, _ := b.blocks.Get(k)
err := block.Render(elements)
Expand All @@ -45,7 +45,7 @@ func (b *Board) Render() (string, error) {
}
}

// 3. Render connectors
// 3. Render connectors.
for _, k := range b.connectors.Keys() {
connector, _ := b.connectors.Get(k)
err := connector.Render(elements)
Expand All @@ -54,7 +54,7 @@ func (b *Board) Render() (string, error) {
}
}

// 4. dump Cells to a string
// 4. dump Cells to a string.
rendered := ""
for j := 0; j < b.h; j++ {
for i := 0; i < b.w; i++ {
Expand Down

0 comments on commit 9f82bb5

Please sign in to comment.