From cb93f08f78cca45b1bbaf20e143248dd14da49bb Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Tue, 3 Dec 2024 02:56:29 +0100 Subject: [PATCH] Fix typos (#255) --- README.md | 8 ++++---- internal/provider/ovh/ovh_handler.go | 4 ++-- internal/utils/settings_test.go | 2 +- pkg/lib/ip_helper.go | 4 ++-- pkg/resolver/resolver.go | 2 +- web/app/network/page.tsx | 2 +- web/components/domain-card.tsx | 2 +- web/components/ip-interface.tsx | 2 +- web/components/ip-mode.tsx | 10 +++++----- 9 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 36434955..a59c9c07 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ - [Discord](#discord) - [Pushover](#pushover) - [Webhook](#webhook) - - [Webhook with HTTP GET reqeust](#webhook-with-http-get-reqeust) + - [Webhook with HTTP GET request](#webhook-with-http-get-request) - [Webhook with HTTP POST request](#webhook-with-http-post-request) - [Miscellaneous topics](#miscellaneous-topics) - [IPv6 support](#ipv6-support) @@ -743,7 +743,7 @@ More info: [English](https://faq.infomaniak.com/2376) For Hetzner, you have to create an access token. This can be done in the DNS-Console. (Person Icon in the top left corner --> API Tokens) Notice: If a domain has multiple Records **only the first** Record will be updated. -Make shure there is just one record. +Make sure there is just one record.
Example @@ -773,7 +773,7 @@ Make shure there is just one record. #### OVH For OVH, you need to provide a Consumerkey, an Appsecret, an Appkey and configure all the domains & subdomains. -The neeeded values can be obtaines by visting [this site](https://www.ovh.com/auth/api/createToken) +The needed values can be obtained by visiting [this site](https://www.ovh.com/auth/api/createToken) Rights should be '\*' on GET, POST and PUT More info: [help.ovhcloud.com](https://help.ovhcloud.com/csm/en-gb-api-getting-started-ovhcloud-api?id=kb_article_view&sysparm_article=KB0042784) @@ -978,7 +978,7 @@ Available variables: > - `IP`: The new IP address. > - `IPType`: The type of the IP: `IPV4` or `IPV6`. -#### Webhook with HTTP GET reqeust +#### Webhook with HTTP GET request ```json "webhook": { diff --git a/internal/provider/ovh/ovh_handler.go b/internal/provider/ovh/ovh_handler.go index 916d1433..f9fe2481 100644 --- a/internal/provider/ovh/ovh_handler.go +++ b/internal/provider/ovh/ovh_handler.go @@ -47,8 +47,8 @@ func (provider *DNSProvider) UpdateIP(domainName string, subdomainName string, i return err } if len(IDs) < 1 { - log.Error("No machting records") - return fmt.Errorf("no macthing records") + log.Error("No matching records") + return fmt.Errorf("no matching records") } outrec := Record{} diff --git a/internal/utils/settings_test.go b/internal/utils/settings_test.go index a5e13491..df50f13d 100644 --- a/internal/utils/settings_test.go +++ b/internal/utils/settings_test.go @@ -28,6 +28,6 @@ func TestCheckSettings(t *testing.T) { if err := CheckSettings(settingHE); err != nil { t.Log("HE setting without password, passed") } else { - t.Error("HE setting without password, should be faild") + t.Error("HE setting without password, should be failed") } } diff --git a/pkg/lib/ip_helper.go b/pkg/lib/ip_helper.go index 7a764410..22202527 100644 --- a/pkg/lib/ip_helper.go +++ b/pkg/lib/ip_helper.go @@ -151,7 +151,7 @@ func (helper *IPHelper) getIPFromMikrotik() string { defer response.Body.Close() if response.StatusCode != http.StatusOK { - log.Error("requst code failed: ", response.StatusCode) + log.Error("request code failed: ", response.StatusCode) return "" } body, err := io.ReadAll(response.Body) @@ -215,7 +215,7 @@ func (helper *IPHelper) getIPFromInterface() (string, error) { } if ip.String() != "" { - log.Debugf("Get ip success from network intereface by: %s, IP: %s", helper.configuration.IPInterface, ip.String()) + log.Debugf("Get ip success from network interface by: %s, IP: %s", helper.configuration.IPInterface, ip.String()) return ip.String(), nil } } diff --git a/pkg/resolver/resolver.go b/pkg/resolver/resolver.go index b3737a70..ced9d77f 100644 --- a/pkg/resolver/resolver.go +++ b/pkg/resolver/resolver.go @@ -48,7 +48,7 @@ func NewFromResolvConf(path string) (*DNSResolver, error) { return &DNSResolver{servers, len(servers) * 2, rand.New(rand.NewSource(time.Now().UnixNano()))}, err } -// LookupHost returns IP addresses of provied host. +// LookupHost returns IP addresses of provided host. // In case of timeout retries query RetryTimes times. func (r *DNSResolver) LookupHost(host string, dnsType uint16) ([]net.IP, error) { return r.lookupHost(host, dnsType, r.RetryTimes) diff --git a/web/app/network/page.tsx b/web/app/network/page.tsx index 3d0de3aa..14866983 100644 --- a/web/app/network/page.tsx +++ b/web/app/network/page.tsx @@ -44,7 +44,7 @@ export default function Network() { IPMode={settings.ip_mode} IPUrls={settings.ip_urls} IPV6Urls={settings.ipv6_urls} - onIpModeChagne={(data) => { + onIpModeChange={(data) => { setSettings({ ...settings, ip_mode: data.IPMode, diff --git a/web/components/domain-card.tsx b/web/components/domain-card.tsx index 35da90b2..7f5eec57 100644 --- a/web/components/domain-card.tsx +++ b/web/components/domain-card.tsx @@ -54,7 +54,7 @@ export const DomainCard = (props: DomainControlProps) => {

Remove this domain?

-

You will permanently remove this domian from the configuration.

+

You will permanently remove this domain from the configuration.

diff --git a/web/components/ip-interface.tsx b/web/components/ip-interface.tsx index 4373cb5e..24f38bab 100644 --- a/web/components/ip-interface.tsx +++ b/web/components/ip-interface.tsx @@ -9,7 +9,7 @@ export const IPInterface = (props: IPInterfaceProps) => { return (
-
IP Inerface
+
IP Interface
Set the network interface diff --git a/web/components/ip-mode.tsx b/web/components/ip-mode.tsx index ef39f108..40bde93b 100644 --- a/web/components/ip-mode.tsx +++ b/web/components/ip-mode.tsx @@ -5,7 +5,7 @@ interface IpModeProps { IPMode: string; IPUrls?: string[]; IPV6Urls?: string[]; - onIpModeChagne?: (data: IpModeProps) => void; + onIpModeChange?: (data: IpModeProps) => void; } export const IpMode = (props: IpModeProps) => { @@ -28,8 +28,8 @@ export const IpMode = (props: IpModeProps) => { checked={isIPV6} onClick={() => { isIPV6 = !isIPV6; - if (props.onIpModeChagne) { - props.onIpModeChagne({ + if (props.onIpModeChange) { + props.onIpModeChange({ IPMode: isIPV6 ? 'IPV6' : 'IPV4', IPUrls: props.IPUrls, IPV6Urls: props.IPV6Urls, @@ -50,8 +50,8 @@ export const IpMode = (props: IpModeProps) => { value={isIPV6 && props.IPV6Urls ? props.IPV6Urls.join('\n') : !isIPV6 && props.IPUrls ? props.IPUrls.join('\n') : ''} onChange={(e) => { - if (props.onIpModeChagne) { - props.onIpModeChagne({ + if (props.onIpModeChange) { + props.onIpModeChange({ IPMode: isIPV6 ? 'IPV6' : 'IPV4', IPUrls: isIPV6 ? props.IPUrls : e.target.value.split('\n'), IPV6Urls: isIPV6 ? e.target.value.split('\n') : props.IPV6Urls