gianarb/kube-port-forward

Cutset might remove unnecessary chars.

Closed this issue · 1 comments

Thanks for the interesting article. FYI, the trimming here might be problematic if the host is a dns name and starts with one of these letters htps

https://github.com/gianarb/kube-port-forward/blob/master/main.go#L117

https://play.golang.org/p/Sb96n9n2zea

Hello @vaikas ! Thank you for opening this issue, I am sure other people will land here googling why this code does not work for them and I hope this issue will point them to the right direction.

This code is not meant to be reusable as library, it is mainly done for the purpose of the article I wrote on my blog
https://gianarb.it/blog/programmatically-kube-port-forward-in-go

Feel free to copy/paste or change this code as you wish!