Skip to content

Commit

Permalink
nobug: fix readme and add newline to cli
Browse files Browse the repository at this point in the history
  • Loading branch information
bubbajoe committed Jun 22, 2024
1 parent 1fee755 commit b33fcfc
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 47 deletions.
13 changes: 1 addition & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
*__debug_bin*
.vscode
.idea
.fleet

infra/
.aws/
dist/
./dgate
./k6

# Local files #
.dgate*/
.dgate
cov.out
go.work.sum
.env
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,3 @@ DGate CLI is a command-line interface that can be used to interact with the DGat
- Error Handler Module (`errorHandler`) - executed when an error occurs when sending a request to the upstream server. This module is used to modify the response before it is sent to the client.

- Request Handler Module (`requestHandler`) - executed when a request is received from the client. This module is used to handle arbitrary requests, instead of using an upstream service.



- Examples
- [x] ip hash load balancer
- [x] short url service
- [x] modify json request/response
- [x] send multiple upstream requests and combine them

2 changes: 2 additions & 0 deletions cmd/dgate-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ func main() {
os.Stderr.WriteString(err.Error())
os.Stderr.WriteString("\n")
os.Exit(1)
return

Check warning on line 19 in cmd/dgate-cli/main.go

View check run for this annotation

Codecov / codecov/patch

cmd/dgate-cli/main.go#L19

Added line #L19 was not covered by tests
}
os.Stdout.WriteString("\n")

Check warning on line 21 in cmd/dgate-cli/main.go

View check run for this annotation

Codecov / codecov/patch

cmd/dgate-cli/main.go#L21

Added line #L21 was not covered by tests
}
26 changes: 0 additions & 26 deletions internal/proxy/change_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -453,29 +453,3 @@ START:
removeList = sliceutil.SliceUnique(removeList, func(cl *spec.ChangeLog) string { return cl.ID })
return removeList
}

// Function to check if there is a delete command between two logs with matching keys
// func hasDeleteBetween(logs []*spec.ChangeLog, start, end *spec.ChangeLog) bool {
// startIndex := -1
// endIndex := -1

// for i, log := range logs {
// if log.ID == start.ID {
// startIndex = i
// }
// if log.ID == end.ID {
// endIndex = i
// }
// }

// if startIndex == -1 || endIndex == -1 {
// return false
// }

// for i := startIndex + 1; i < endIndex; i++ {
// if logs[i].Cmd.IsDeleteCommand() {
// return true
// }
// }
// return false
// }

0 comments on commit b33fcfc

Please sign in to comment.