Files
ragflow/cmd/ragflow_cli.go
Jin Hai 70e9743ef1 RAGFlow go API server (#13240)
# RAGFlow Go Implementation Plan 🚀

This repository tracks the progress of porting RAGFlow to Go. We'll
implement core features and provide performance comparisons between
Python and Go versions.

## Implementation Checklist

- [x] User Management APIs
- [x] Dataset Management Operations
- [x] Retrieval Test
- [x] Chat Management Operations
- [x] Infinity Go SDK

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
Co-authored-by: Yingfeng Zhang <yingfeng.zhang@gmail.com>
2026-03-04 19:17:16 +08:00

35 lines
526 B
Go

package main
import (
"fmt"
"os"
"os/signal"
"syscall"
"ragflow/internal/cli"
)
func main() {
// Create CLI instance
cliApp, err := cli.NewCLI()
if err != nil {
fmt.Printf("Failed to create CLI: %v\n", err)
os.Exit(1)
}
// Handle interrupt signal
sigChan := make(chan os.Signal, 1)
signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-sigChan
cliApp.Cleanup()
os.Exit(0)
}()
// Run CLI
if err := cliApp.Run(); err != nil {
fmt.Printf("CLI error: %v\n", err)
os.Exit(1)
}
}