Add support for onedrive in getM365 --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change <!--- Please check the type of change your PR introduces: ---> - [x] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [ ] 🤖 Test - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Issue(s) <!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. --> * #<issue> #### Test Plan <!-- How will this be tested prior to merging.--> - [x] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
33 lines
601 B
Go
33 lines
601 B
Go
package main
|
|
|
|
import (
|
|
"context"
|
|
"os"
|
|
|
|
"github.com/spf13/cobra"
|
|
|
|
. "github.com/alcionai/corso/src/cli/print"
|
|
"github.com/alcionai/corso/src/cmd/getM365/exchange"
|
|
"github.com/alcionai/corso/src/cmd/getM365/onedrive"
|
|
"github.com/alcionai/corso/src/pkg/logger"
|
|
)
|
|
|
|
var rootCmd = &cobra.Command{
|
|
Use: "getM365",
|
|
}
|
|
|
|
func main() {
|
|
ctx, _ := logger.SeedLevel(context.Background(), logger.Development)
|
|
|
|
ctx = SetRootCmd(ctx, rootCmd)
|
|
defer logger.Flush(ctx)
|
|
|
|
exchange.AddCommands(rootCmd)
|
|
onedrive.AddCommands(rootCmd)
|
|
|
|
if err := rootCmd.Execute(); err != nil {
|
|
Err(ctx, err)
|
|
os.Exit(1)
|
|
}
|
|
}
|