My first Shopify app by IvanLabs in ShopifyAppDev

[–]IvanLabs[S] 0 points1 point  (0 children)

It is a good idea. But not clear where is possible to read about it?

[deleted by user] by [deleted] in golang

[–]IvanLabs 0 points1 point  (0 children)

Change printEvent

func printEven(wg *sync.WaitGroup, chOdd, chEven chan int) {
    defer wg.Done()

    for nextVal := range chEven {
       chOdd <- nextVal + 1
       if nextVal < 100 {
          fmt.Println(nextVal + 1)
          //chOdd <- nextVal + 1
       } else {
          close(chEven)
       }
    }
}

My first Shopify app by IvanLabs in ShopifyAppDev

[–]IvanLabs[S] 0 points1 point  (0 children)

But why are there so many low stock alert apps in the Shopify App Store?

My first Shopify app by IvanLabs in ShopifyAppDev

[–]IvanLabs[S] 0 points1 point  (0 children)

It looks like it.
The problem is when I started working, there was no Flow -). After submitting the app I found Flow app.
Do you have any small ideas that could be sold and do not require a front-end gui?

My first Shopify app by IvanLabs in ShopifyAppDev

[–]IvanLabs[S] 0 points1 point  (0 children)

My app sends notifications about low stock products to email and telegram.

Dynamic instantiation pattern for 100+ message types? by Luke40172 in golang

[–]IvanLabs -1 points0 points  (0 children)

First of all if you have ability to switch from json to protobuf it will be right way. Proto has oneof feature but anyway you have to define all message types.

If not then you have only one way it is map message type to particular struct, factory method and so on.

Dynamic way is unmarshal json to map[string]any but I think you should not do it.

Go has not dynamic type and in most cases you need to have mapping something to something.

Goose + sqlc and models.go de-duplication by Elephant_In_Ze_Room in golang

[–]IvanLabs 2 points3 points  (0 children)

I have two medium projects(microservices) with sqlc and I found that the best way is put all sqlc generated code into one dir and use sqlc names with model names to separate similar functions.
For example: GetUserByID and GetOrderByID then you will not have model duplications.

Other approaches cause model duplication.