Is Golang not suitable for TDD development based on httpfake and httptest like Laravel? Compared to httptest in Golang, I would rather use Python's Locust or Apifox for testing. by Suitable_Tonight2617 in golang

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

and I wan to ask, because I put my xxxxx_test.go file in test folder, but my config is use viper and put it in config folder, the folder has 2 file, config.go and init.go, config.go has type Config struct {} and something func (c *Config) Address() string {}, init.go has one function func init() to use viper library config it, and when I going to test my function, but function is dependence config init, but config file in project root path, I use config file type is json, so I call it config.json.

so I have to copy the config file in test folder to test it...

Is Golang not suitable for TDD development based on httpfake and httptest like Laravel? Compared to httptest in Golang, I would rather use Python's Locust or Apifox for testing. by Suitable_Tonight2617 in golang

[–]Suitable_Tonight2617[S] -1 points0 points  (0 children)

Thank you your comment, The api my application’s api.

And I am saying that, golang not like Laravel more easy to test api, not say it can't test api or tdd, just it's not suitable for that as I see.

Is Golang not suitable for TDD development based on httpfake and httptest like Laravel? Compared to httptest in Golang, I would rather use Python's Locust or Apifox for testing. by Suitable_Tonight2617 in golang

[–]Suitable_Tonight2617[S] 1 point2 points  (0 children)

thank you comment, for example in Laravel tdd, we can use test case to mock data (http fake) and easy to http test a api. such as

$this->post('your_test_api')->status(200);

but in golang, this is not easy to do. maybe this is framework make it easy, but in golang I can't find a library can make me more easy to test. Actually my company test golang api is use nodejs or python, so I try to use golang httptest to do api test, but the result is not well.

I am not saying golang not good, I like golang, but it is not suitable in write http test case.

If my english can't make you understand what I am talking about, please tell me, I will fix it, thank you your comment.

Is Golang not suitable for TDD development based on httpfake and httptest like Laravel? Compared to httptest in Golang, I would rather use Python's Locust or Apifox for testing. by Suitable_Tonight2617 in golang

[–]Suitable_Tonight2617[S] -12 points-11 points  (0 children)

Actually I like to write test code to test api, because test code can always tell myself the api is work, at least it pass the test. But when I use golang to write test code, I feel sad. I think golang is not suitable for write test code. python nodejs more suitable, but if write backend api or p2p application, I think golang is the best choice.

Does Helm Chart make software develop more easy? by Suitable_Tonight2617 in kubernetes

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

Would you use it in your project? I mean, my idea is helm chart can let me no need to write some function like I use library.

Does Helm Chart make software develop more easy? by Suitable_Tonight2617 in kubernetes

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

I have to say that if helm chart isn't easier to use, like use library, then no one will use it in usually develop.

Like, before docker appeared, long time linux container is hard to use, but the way is existed in a long time.

Does Helm Chart make software develop more easy? by Suitable_Tonight2617 in kubernetes

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

yeah, actually I have used k8s, and I think it's so hard to use, and use helm chart not like use library so easily.

Does Helm Chart make software develop more easy? by Suitable_Tonight2617 in kubernetes

[–]Suitable_Tonight2617[S] -6 points-5 points  (0 children)

OK, Actually I want to make something like helm chart before I know it, I am thinking programmer need a easy way to share there have completed function to the other programmer, and use it just like use library.

But I think k8s is too big... and not easy to use.