Skip to content

Commit

Permalink
hotfix: use http get instead of head to check reachable url (#64)
Browse files Browse the repository at this point in the history
* hotfix: use http get instead of head to check reachable url

* bump: changelog
  • Loading branch information
atjhoendz authored Jul 29, 2024
1 parent 1179eed commit eaf7c2f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
29 changes: 16 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# go-utils

<a name="v1.39.3"></a>
## [v1.39.3] - 2024-07-29
### Fixes
- use http get instead of head to check reachable url


<a name="v1.39.2"></a>
## [v1.39.2] - 2024-07-09
### Other Improvements
- fix vulnerabilities in go.mod
- fix vulnerabilities in go.mod ([#63](https://github.com/kumparan/go-utils/issues/63))


<a name="v1.39.1"></a>
Expand Down Expand Up @@ -156,9 +162,6 @@

<a name="v1.20.0"></a>
## [v1.20.0] - 2022-03-11

<a name="v.1.20.0"></a>
## [v.1.20.0] - 2022-03-11
### New Features
- add constraint size gql directive ([#30](https://github.com/kumparan/go-utils/issues/30))

Expand Down Expand Up @@ -256,11 +259,11 @@
- add money formatter for multiple currencies ([#13](https://github.com/kumparan/go-utils/issues/13))


<a name="v1.8.0"></a>
## [v1.8.0] - 2020-12-10

<a name="v1.7.1"></a>
## [v1.7.1] - 2020-12-10

<a name="v1.8.0"></a>
## [v1.8.0] - 2020-12-10
### New Features
- add formatter for indonesian money and date

Expand Down Expand Up @@ -325,7 +328,8 @@
- init go-utils


[Unreleased]: https://github.com/kumparan/go-utils/compare/v1.39.2...HEAD
[Unreleased]: https://github.com/kumparan/go-utils/compare/v1.39.3...HEAD
[v1.39.3]: https://github.com/kumparan/go-utils/compare/v1.39.2...v1.39.3
[v1.39.2]: https://github.com/kumparan/go-utils/compare/v1.39.1...v1.39.2
[v1.39.1]: https://github.com/kumparan/go-utils/compare/v1.39.0...v1.39.1
[v1.39.0]: https://github.com/kumparan/go-utils/compare/v1.38.0...v1.39.0
Expand All @@ -351,8 +355,7 @@
[v1.22.0]: https://github.com/kumparan/go-utils/compare/v1.21.0...v1.22.0
[v1.21.0]: https://github.com/kumparan/go-utils/compare/v1.20.1...v1.21.0
[v1.20.1]: https://github.com/kumparan/go-utils/compare/v1.20.0...v1.20.1
[v1.20.0]: https://github.com/kumparan/go-utils/compare/v.1.20.0...v1.20.0
[v.1.20.0]: https://github.com/kumparan/go-utils/compare/v1.19.3...v.1.20.0
[v1.20.0]: https://github.com/kumparan/go-utils/compare/v1.19.3...v1.20.0
[v1.19.3]: https://github.com/kumparan/go-utils/compare/v1.19.2...v1.19.3
[v1.19.2]: https://github.com/kumparan/go-utils/compare/v1.19.1...v1.19.2
[v1.19.1]: https://github.com/kumparan/go-utils/compare/v1.19.0...v1.19.1
Expand All @@ -368,9 +371,9 @@
[v1.12.0]: https://github.com/kumparan/go-utils/compare/v1.11.0...v1.12.0
[v1.11.0]: https://github.com/kumparan/go-utils/compare/v1.10.0...v1.11.0
[v1.10.0]: https://github.com/kumparan/go-utils/compare/v1.9.0...v1.10.0
[v1.9.0]: https://github.com/kumparan/go-utils/compare/v1.8.0...v1.9.0
[v1.8.0]: https://github.com/kumparan/go-utils/compare/v1.7.1...v1.8.0
[v1.7.1]: https://github.com/kumparan/go-utils/compare/v1.7.0...v1.7.1
[v1.9.0]: https://github.com/kumparan/go-utils/compare/v1.7.1...v1.9.0
[v1.7.1]: https://github.com/kumparan/go-utils/compare/v1.8.0...v1.7.1
[v1.8.0]: https://github.com/kumparan/go-utils/compare/v1.7.0...v1.8.0
[v1.7.0]: https://github.com/kumparan/go-utils/compare/v1.6.0...v1.7.0
[v1.6.0]: https://github.com/kumparan/go-utils/compare/v1.5.0...v1.6.0
[v1.5.0]: https://github.com/kumparan/go-utils/compare/v1.4.0...v1.5.0
Expand Down
2 changes: 1 addition & 1 deletion url.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func JoinURL(baseURL string, pathElements ...string) (string, error) {

// IsURLReachable check is the url reachable
func IsURLReachable(url string) bool {
res, err := http.Head(url) //nolint:gosec
res, err := http.Get(url) //nolint:gosec
if err != nil {
log.WithField("url", url).Error(err)
return false
Expand Down

0 comments on commit eaf7c2f

Please sign in to comment.