Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix typos #21

Merged
merged 1 commit into from
Jun 13, 2024
Merged
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 .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ coverage:
# https://docs.codecov.com/docs/ignoring-paths
ignore:
- cmd
- internal/repl
- internal/shell
- "**/*_mock*.go"
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ RUN set -eux; apk update; apk add --no-cache git openssh
# Install dependencies
RUN go mod download
RUN go mod verify
RUN cd $GO_WORKDIR/cmd/repl && go install
RUN cd $GO_WORKDIR/cmd/shell && go install

# Put everything together in a clean image
FROM scratch

# Copy binary into PATH
COPY --from=build-env /go/bin/repl /usr/local/bin/repl
COPY --from=build-env /go/bin/shell /usr/local/bin/shell

ENTRYPOINT ["repl"]
CMD ["shell"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The NanoDB command line provides an SQL shell that can be used to select, insert
```shell
git clone https://github.com/i-sevostyanov/NanoDB.git
cd NanoDB
go run ./cmd/repl/main.go
go run ./cmd/shell/main.go
#> \import <path to project>/testdata/demo.sql
```

Expand Down
8 changes: 4 additions & 4 deletions internal/shell/shell.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ func (s *Shell) Run(ctx context.Context) {
continue
}

if repl, err := s.exec(input); err != nil {
if reply, err := s.exec(input); err != nil {
s.write(err.Error() + "\n")
} else if repl != "" {
s.write(repl)
} else if reply != "" {
s.write(reply)
}
}
}()
Expand Down Expand Up @@ -249,7 +249,7 @@ func (s *Shell) importFile(params []string) (string, error) {
}

func (s *Shell) showHelp() string {
help := `repl is the NanoDB interactive terminal.
help := `shell is the NanoDB interactive terminal.

Commands:
\use <database> Use specified database
Expand Down