Skip to content

Commit 3dd35e2

Browse files
committed
fix(livelog): use sentence case in livelog messages and mark them as done
1 parent 90fbbef commit 3dd35e2

13 files changed

Lines changed: 15 additions & 13 deletions

File tree

internal/commands/ipaddress/modify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func (s *modifyCommand) Execute(exec commands.Executor, arg string) (output.Outp
5151
if arg == "" {
5252
return nil, errors.New("need ip address to modify")
5353
}
54-
msg := fmt.Sprintf("modifying ip-address %v", arg)
54+
msg := fmt.Sprintf("Modifying ip-address %v", arg)
5555
logline := exec.NewLogEntry(msg)
5656

5757
logline.StartedNow()

internal/commands/ipaddress/remove.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (s *removeCommand) InitCommand() {
4141

4242
// Execute implements commands.MultipleArgumentCommand
4343
func (s *removeCommand) Execute(exec commands.Executor, arg string) (output.Output, error) {
44-
msg := fmt.Sprintf("removing ip-address %v", arg)
44+
msg := fmt.Sprintf("Removing ip-address %v", arg)
4545
logline := exec.NewLogEntry(msg)
4646

4747
logline.StartedNow()

internal/commands/network/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ func (s *createCommand) ExecuteWithoutArguments(exec commands.Executor) (output.
101101
}
102102
svc := exec.Network()
103103

104-
msg := fmt.Sprintf("creating network %v", s.name)
104+
msg := fmt.Sprintf("Creating network %v", s.name)
105105
logline := exec.NewLogEntry(msg)
106106
logline.StartedNow()
107107

internal/commands/network/delete.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func (s *deleteCommand) InitCommand() {
3737
// Execute implements commands.MultipleArgumentCommand
3838
func (s *deleteCommand) Execute(exec commands.Executor, arg string) (output.Output, error) {
3939
svc := exec.Network()
40-
msg := fmt.Sprintf("deleting network %v", arg)
40+
msg := fmt.Sprintf("Deleting network %v", arg)
4141
logline := exec.NewLogEntry(msg)
4242
logline.StartedNow()
4343
err := svc.DeleteNetwork(&request.DeleteNetworkRequest{

internal/commands/server/create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func (s *createCommand) ExecuteWithoutArguments(exec commands.Executor) (output.
312312
serverSvc := exec.Server()
313313
planSvc := exec.Plan()
314314
storageSvc := exec.Storage()
315-
msg := fmt.Sprintf("creating server %v", s.params.Hostname)
315+
msg := fmt.Sprintf("Creating server %v", s.params.Hostname)
316316
logline := exec.NewLogEntry(msg)
317317

318318
logline.StartedNow()

internal/commands/server/delete.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (s *deleteCommand) InitCommand() {
4444
// Execute implements commands.MultipleArgumentCommand
4545
func (s *deleteCommand) Execute(exec commands.Executor, uuid string) (output.Output, error) {
4646
svc := exec.Server()
47-
msg := fmt.Sprintf("deleting server %v", uuid)
47+
msg := fmt.Sprintf("Deleting server %v", uuid)
4848
logline := exec.NewLogEntry(msg)
4949

5050
logline.StartedNow()
@@ -68,6 +68,7 @@ func (s *deleteCommand) Execute(exec commands.Executor, uuid string) (output.Out
6868
}
6969

7070
logline.SetMessage(fmt.Sprintf("%s: done", msg))
71+
logline.MarkDone()
7172

7273
return output.None{}, nil
7374
}

internal/commands/server/modify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ func (s *modifyCommand) Execute(exec commands.Executor, uuid string) (output.Out
9898
s.params.Plan = "custom" // Valid for all custom plans.
9999
}
100100

101-
msg := fmt.Sprintf("modifying server %v", uuid)
101+
msg := fmt.Sprintf("Modifying server %v", uuid)
102102
logline := exec.NewLogEntry(msg)
103103

104104
logline.StartedNow()

internal/commands/server/restart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func (s *restartCommand) MaximumExecutions() int {
5656
// Execute implements commands.MultipleArgumentCommand
5757
func (s *restartCommand) Execute(exec commands.Executor, uuid string) (output.Output, error) {
5858
svc := exec.Server()
59-
msg := fmt.Sprintf("restarting server %v", uuid)
59+
msg := fmt.Sprintf("Restarting server %v", uuid)
6060
logline := exec.NewLogEntry(msg)
6161

6262
logline.StartedNow()

internal/commands/server/start.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func (s *startCommand) InitCommand() {
3838
// Execute implements commands.MultipleArgumentCommand
3939
func (s *startCommand) Execute(exec commands.Executor, uuid string) (output.Output, error) {
4040
svc := exec.Server()
41-
msg := fmt.Sprintf("starting server %v", uuid)
41+
msg := fmt.Sprintf("Starting server %v", uuid)
4242
logline := exec.NewLogEntry(msg)
4343

4444
logline.StartedNow()

internal/commands/server/stop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func (s *stopCommand) InitCommand() {
4444
// Execute implements commands.MultipleArgumentCommand
4545
func (s *stopCommand) Execute(exec commands.Executor, uuid string) (output.Output, error) {
4646
svc := exec.Server()
47-
msg := fmt.Sprintf("stopping server %v", uuid)
47+
msg := fmt.Sprintf("Stopping server %v", uuid)
4848
logline := exec.NewLogEntry(msg)
4949

5050
logline.StartedNow()

0 commit comments

Comments
 (0)