Skip to content

Commit

Permalink
Remove protocol handler impl
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartpa committed Apr 6, 2023
1 parent 3ac1554 commit b239523
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 264 deletions.
25 changes: 1 addition & 24 deletions cmd/modern/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
package main

import (
"encoding/base64"
"encoding/json"
legacyCmd "github.com/microsoft/go-sqlcmd/cmd/sqlcmd"
"github.com/microsoft/go-sqlcmd/internal"
"github.com/microsoft/go-sqlcmd/internal/cmdparser"
"github.com/microsoft/go-sqlcmd/internal/cmdparser/dependency"
Expand All @@ -26,9 +25,6 @@ import (
"github.com/spf13/cobra"
"os"
"path"
"strings"

legacyCmd "github.com/microsoft/go-sqlcmd/cmd/sqlcmd"
)

var rootCmd *Root
Expand All @@ -46,25 +42,6 @@ func main() {
ErrorHandler: checkErr,
HintHandler: displayHints})}
rootCmd = cmdparser.New[*Root](dependencies)

//var input string

if strings.HasPrefix(os.Args[1], "sqlcmd://") {
sqlcmdUrl := strings.TrimRight(os.Args[1][9:], "/")

data2, err := base64.StdEncoding.DecodeString(sqlcmdUrl)
if err == nil {
var genre2 []string
if err = json.Unmarshal(data2, &genre2); err == nil {
cobra.MousetrapHelpText = ""
cmdparser.Initialize(initializeCallback)
rootCmd.SetArgsForUnitTesting(genre2)
rootCmd.Execute()
os.Exit(0)
}
}
}

if isFirstArgModernCliSubCommand() {
cmdparser.Initialize(initializeCallback)
rootCmd.Execute()
Expand Down
1 change: 0 additions & 1 deletion cmd/modern/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ func (c *Root) SubCommands() []cmdparser.Command {
cmdparser.New[*root.Query](dependencies),
cmdparser.New[*root.Start](dependencies),
cmdparser.New[*root.Stop](dependencies),
cmdparser.New[*root.System](dependencies),
cmdparser.New[*root.Uninstall](dependencies),
cmdparser.New[*root.Use](dependencies),
}
Expand Down
40 changes: 0 additions & 40 deletions cmd/modern/root/system.go

This file was deleted.

47 changes: 0 additions & 47 deletions cmd/modern/root/system/protocol.go

This file was deleted.

93 changes: 0 additions & 93 deletions cmd/modern/root/system/protocol/add-handler.go

This file was deleted.

58 changes: 0 additions & 58 deletions cmd/modern/root/system/protocol/delete-handler.go

This file was deleted.

1 change: 0 additions & 1 deletion pkg/mssqlcontainer/ingest-db_test.go

This file was deleted.

0 comments on commit b239523

Please sign in to comment.