I've literally told my coworkers "I'm not saying we should never use dependencies. But every time you add a dependency, you should hate yourself a little bit more. Some self flagellation can't hurt either."
So, every time I use a library to recognize patterns on a picture, to interact with Kafka, do some SSL, or do database mapping, I should hate myself, noted
We did Elastic API integration in Java by creating and maintaining huge half-codegenerated transformer from code to Elasticsearch's JSONs, it was a pain and it was source of more than one error
Dependences should be reviewed and audited to make sure they do what you need and they are worth using. Just making everything in-house gets you nowhere most of the time
Nobody is arguing that you should never depend on anything and create everything yourself, but adding a dependency for literally a one liner function is awful. Like one of the Go proverbs goes, a little copying is better than a little dependency.
One of the (few) good things about corporate bureaucracy is that if I want to use a new dependency, I have to double check the licence and if it has any restrictions, I need to tell my PM or release engineer to create a new request with legal who will get back to us in 2-3 weeks.