feat: implement HashArray utility and refactor product key generation for Redis

This commit is contained in:
2025-08-17 11:46:44 +03:00
parent e35d44dacb
commit fb1be5ddc3
6 changed files with 40 additions and 14 deletions

View File

@@ -1,8 +1,11 @@
package main
//package main
import "sipro-mps/pkg/utils"
// package main
//
// import (
//
//import (
// "context"
// "fmt"
// "sipro-mps/internal/wb/products/mapping/generated"
@@ -12,15 +15,26 @@ package main
// "sipro-mps/pkg/api/wb/client"
//
// "github.com/deliveryhero/pipeline/v2"
//)
//
//func main() {
// )
//
// input := "1,2,3,4,5"
// func main() {
//
// for out := range pipeline.Process(context.Background(), apply, pipeline.Emit(input)) {
// for j := range out {
// fmt.Printf("process: %s\n", out[j])
// input := "1,2,3,4,5"
//
// for out := range pipeline.Process(context.Background(), apply, pipeline.Emit(input)) {
// for j := range out {
// fmt.Printf("process: %s\n", out[j])
// }
// }
// }
//}
func main() {
arr := []string{"1", "2", "3", "4", "5"}
hash, err := utils.HashArray(arr)
if err != nil {
panic(err)
}
println("Hash of array:", hash)
}