From 939b58c45750e1c49af269904ee334257a0b2803 Mon Sep 17 00:00:00 2001 From: "Quentin McGaw (desktop)" Date: Wed, 4 Mar 2020 23:47:21 +0000 Subject: [PATCH] Ortograph! Renamed annoucement to announcement --- README.md | 2 +- internal/constants/splash.go | 8 ++++---- internal/constants/splash_test.go | 6 +++--- internal/mullvad/conf.go | 1 - internal/splash/splash.go | 10 +++++----- 5 files changed, 13 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 657458bc..8d15d02d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ *Lightweight swiss-knife-like VPN client to tunnel to Private Internet Access or Mullvad VPN servers, using Go, OpenVPN, iptables, DNS over TLS, ShadowSocks and Tinyproxy* -**ANNOUCEMENT**: *Support for [Mullvad](http://mullvad.net)* +**ANNOUNCEMENT**: *Support for [Mullvad](http://mullvad.net)* diff --git a/internal/constants/splash.go b/internal/constants/splash.go index 511e9ca1..44b799fb 100644 --- a/internal/constants/splash.go +++ b/internal/constants/splash.go @@ -1,10 +1,10 @@ package constants const ( - // Annoucement is a message annoucement - Annoucement = "Support for Mullvad" - // AnnoucementExpiration is the expiration date of the annoucement in format yyyy-mm-dd - AnnoucementExpiration = "2020-03-15" + // Announcement is a message announcement + Announcement = "Support for Mullvad (a bit unstable)" + // AnnouncementExpiration is the expiration date of the announcement in format yyyy-mm-dd + AnnouncementExpiration = "2020-03-15" ) const ( diff --git a/internal/constants/splash_test.go b/internal/constants/splash_test.go index 0a014b90..77a5d379 100644 --- a/internal/constants/splash_test.go +++ b/internal/constants/splash_test.go @@ -7,11 +7,11 @@ import ( "github.com/stretchr/testify/assert" ) -func Test_AnnoucementExpiration(t *testing.T) { +func Test_AnnouncementExpiration(t *testing.T) { t.Parallel() - if len(AnnoucementExpiration) == 0 { + if len(AnnouncementExpiration) == 0 { return } - _, err := time.Parse("2006-01-02", AnnoucementExpiration) + _, err := time.Parse("2006-01-02", AnnouncementExpiration) assert.NoError(t, err) } diff --git a/internal/mullvad/conf.go b/internal/mullvad/conf.go index 8602c17e..c4e4a37c 100644 --- a/internal/mullvad/conf.go +++ b/internal/mullvad/conf.go @@ -44,7 +44,6 @@ func (c *configurator) BuildConf(connections []models.OpenVPNConnection, verbosi // "rcvbuf 524288" "cipher AES-256-CBC", "tls-cipher TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA", - "tun-ipv6", // Added constant values "mute-replay-warnings", diff --git a/internal/splash/splash.go b/internal/splash/splash.go index 41f349e3..57f49421 100644 --- a/internal/splash/splash.go +++ b/internal/splash/splash.go @@ -19,7 +19,7 @@ func Splash(paramsReader params.ParamsReader) string { lines = append(lines, "") lines = append(lines, fmt.Sprintf("Running version %s built on %s (commit %s)", version, buildDate, vcsRef)) lines = append(lines, "") - lines = append(lines, annoucement()...) + lines = append(lines, announcement()...) lines = append(lines, "") lines = append(lines, links()...) return strings.Join(lines, "\n") @@ -38,15 +38,15 @@ func title() []string { } } -func annoucement() []string { - if len(constants.Annoucement) == 0 { +func announcement() []string { + if len(constants.Announcement) == 0 { return nil } - expirationDate, _ := time.Parse("2006-01-02", constants.AnnoucementExpiration) // error covered by a unit test + expirationDate, _ := time.Parse("2006-01-02", constants.AnnouncementExpiration) // error covered by a unit test if time.Now().After(expirationDate) { return nil } - return []string{emoji.Sprint(":mega: ") + constants.Annoucement} + return []string{emoji.Sprint(":mega: ") + constants.Announcement} } func links() []string {