Skip to content

Commit

Permalink
Revert "Rex4539's Fix Typos (keybase#11362)" (keybase#11384)
Browse files Browse the repository at this point in the history
This reverts commit dfae548.
  • Loading branch information
maxtaco authored Apr 12, 2018
1 parent 1e5c5ed commit 5f958b4
Show file tree
Hide file tree
Showing 211 changed files with 327 additions and 327 deletions.
2 changes: 1 addition & 1 deletion browser/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function init() {
if (location.hostname.endsWith('twitter.com')) {
// Twitter hack: Monitor location for changes and re-init. Twitter does
// weird single-page-app stuff that makes it difficult to hook into.
// FIXME: This is sad. An alternative would be very desirable.
// FIXME: This is sad. An alternative would be very desireable.
// Subscribing to `popstate` does not work.
let loc = window.location.pathname;
function twitterMonitor() {
Expand Down
2 changes: 1 addition & 1 deletion go/auth/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var ErrShutdown = errors.New("shutting down")
// ErrUserDeleted is raised when a user is deleted, but was loaded without the loadDeleted flag
var ErrUserDeleted = errors.New("user was deleted")

// BadUsernameError is raised when the given username disagrees with the expected
// BadUsernameError is raised when the given username disagreeds with the expected
// username
type BadUsernameError struct {
expected libkb.NormalizedUsername
Expand Down
8 changes: 4 additions & 4 deletions go/chat/active_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ func TestChatActive(t *testing.T) {
touch := TouchFirstChatActiveQueryTime(ctx, g, log).Unix()
afterTouch := time.Now().Unix()
if touch < beforeTouch {
t.Fatalf("touch unexpectedly early: %d < %d", touch, beforeTouch)
t.Fatalf("touch unexpectly early: %d < %d", touch, beforeTouch)
}
if touch > afterTouch {
t.Fatalf("touch unexpectedly late: %d > %d", touch, afterTouch)
t.Fatalf("touch unexpectly late: %d > %d", touch, afterTouch)
}

// Subsequent queries shouldn't change the first query time.
Expand All @@ -46,9 +46,9 @@ func TestChatActive(t *testing.T) {
lastSend := GetLastSendTime(ctx, g, log).Unix()
afterSend := time.Now().Unix()
if lastSend < beforeSend {
t.Fatalf("send unexpectedly early: %d < %d", lastSend, beforeSend)
t.Fatalf("send unexpectly early: %d < %d", lastSend, beforeSend)
}
if lastSend > afterSend {
t.Fatalf("send unexpectedly late: %d > %d", lastSend, afterSend)
t.Fatalf("send unexpectly late: %d > %d", lastSend, afterSend)
}
}
2 changes: 1 addition & 1 deletion go/chat/attachment_preview.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func imageToPaletted(img image.Image) *image.Paletted {
return pm
}

// gifDuration returns the duration of one loop of an animated gif
// gifDuration returns the duration of one loop of an animiated gif
// in milliseconds.
func gifDuration(g *gif.GIF) int {
var total int
Expand Down
8 changes: 4 additions & 4 deletions go/chat/boxer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Boxer struct {
// Normally set to normal implementations.
hashV1 func(data []byte) chat1.Hash

// Slots for replacing with test implementations.
// Slots for replacing with with test implementations.
// These are normally nil.
testingValidSenderKey func(context.Context, gregor1.UID, []byte, gregor1.Time) (found, validAtCTime bool, revoked *gregor1.Time, unboxingErr UnboxingError)
testingGetSenderInfoLocal func(context.Context, gregor1.UID, gregor1.DeviceID) (senderUsername string, senderDeviceName string, senderDeviceType string)
Expand Down Expand Up @@ -463,7 +463,7 @@ func (b *Boxer) unboxV1(ctx context.Context, boxed chat1.MessageBoxed,
skipBodyVerification := (len(boxed.BodyCiphertext.E) == 0)

// TODO We should check whether the body is allowed to have been deleted by checking
// that there is in fact a message that deleted it.
// the there is in fact a message that deleted it.
// We should fetch that message and check its signed body.
// That involves fetching a message whose ID is not known here.

Expand Down Expand Up @@ -645,7 +645,7 @@ func (b *Boxer) unboxV2(ctx context.Context, boxed chat1.MessageBoxed,
isBodyDeleted := (len(boxed.BodyCiphertext.E) == 0)

// TODO We should check whether the body is allowed to have been deleted by checking
// that there is in fact a message that deleted it.
// the there is in fact a message that deleted it.
// We should fetch that message and check its signed body.
// That involves fetching a message whose ID is not known here.

Expand Down Expand Up @@ -944,7 +944,7 @@ func (b *Boxer) getSenderInfoLocal(ctx context.Context, uid1 gregor1.UID, device

username, deviceName, deviceType, err := b.getUsernameAndDevice(ctx, uid, did)
if err != nil {
b.Debug(ctx, "unable to fetch sender and device information: UID: %s deviceID: %s",
b.Debug(ctx, "unable to fetch sender and device informaton: UID: %s deviceID: %s",
uid1, deviceID1)
// try to just get username
username, err = b.getUsername(ctx, uid)
Expand Down
2 changes: 1 addition & 1 deletion go/chat/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ L:
case chat1.ConversationMembersType_KBFS:
debugger.Debug(ctx, "FindConversations: failed with KBFS, aborting")
// We don't want to return random errors from KBFS if we are falling back to it,
// just return no conversations and call it a day
// just return no conversatins and call it a day
if membersTypeIn == chat1.ConversationMembersType_KBFS {
err = ierr
}
Expand Down
4 changes: 2 additions & 2 deletions go/chat/inboxsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ func (s *HybridInboxSource) Read(ctx context.Context, uid gregor1.UID,

// Write metadata to the inbox cache
if err = storage.NewInbox(s.G(), uid).MergeLocalMetadata(ctx, inbox.Convs); err != nil {
// Don't abort the operation on this kind of error
// Don't abort the operaton on this kind of error
s.Debug(ctx, "Read: unable to write inbox local metadata: %s", err)
}

Expand Down Expand Up @@ -632,7 +632,7 @@ func (s *HybridInboxSource) ReadUnverified(ctx context.Context, uid gregor1.UID,
return res, rl, err
}

// Write out to local storage only if we are using local data
// Write out to local storage only if we are using local daata
if useLocalData {
if cerr = inboxStore.Merge(ctx, res.Version, utils.PluckConvs(res.ConvsUnverified), query, p); cerr != nil {
s.Debug(ctx, "ReadUnverified: failed to write inbox to local storage: %s", cerr.Error())
Expand Down
2 changes: 1 addition & 1 deletion go/chat/pager/pager.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func (p InboxPager) MakePage(res []InboxEntry, reqed int) (*chat1.Pagination, er
return p.Pager.MakePage(len(res), reqed, nextPF, prevPF)
}

// threadPager provides a convenient interface to pager for the thread use case
// threadPager provides a covenient interface to pager for the thread use case
type ThreadPager struct {
Pager
}
Expand Down
4 changes: 2 additions & 2 deletions go/chat/s3/multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ type completeResponse struct {
// final object. This operation may take several minutes.
//
// The complete call to AMZ may still fail after returning HTTP 200,
// so even though it's unused, the body of the reply must be demarshalled
// so even though it's unusued, the body of the reply must be demarshalled
// and checked to see whether or not the complete succeeded.
//
// See http://goo.gl/2Z7Tw for details.
Expand Down Expand Up @@ -413,7 +413,7 @@ func (m *Multi) Complete(ctx context.Context, parts []Part) error {
panic("unreachable")
}

// Abort deletes an unfinished multipart upload and any previously
// Abort deletes an unifinished multipart upload and any previously
// uploaded parts for it.
//
// After a multipart upload is aborted, no additional parts can be
Expand Down
4 changes: 2 additions & 2 deletions go/chat/s3/s3.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func (b *Bucket) Exists(path string) (exists bool, err error) {
}

if err != nil {
// We can treat a 403 or 404 as non existence
// We can treat a 403 or 404 as non existance
if e, ok := err.(*Error); ok && (e.StatusCode == 403 || e.StatusCode == 404) {
return false, nil
}
Expand Down Expand Up @@ -772,7 +772,7 @@ func (b *Bucket) GetBucketContents() (*map[string]Key, error) {
return &bucketContents, nil
}

// URL returns a non-signed URL that allows retrieving the
// URL returns a non-signed URL that allows retriving the
// object at path. It only works if the object is publicly
// readable (see SignedURL).
func (b *Bucket) URL(path string) string {
Expand Down
6 changes: 3 additions & 3 deletions go/chat/sender.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (s *BlockingSender) addPrevPointersAndCheckConvID(ctx context.Context, msg
}

if len(prevs) == 0 {
return chat1.MessagePlaintext{}, fmt.Errorf("Could not find previous messages for prev pointers (of %v)", len(res.Messages))
return chat1.MessagePlaintext{}, fmt.Errorf("Could not find previous messsages for prev pointers (of %v)", len(res.Messages))
}

for _, msg2 := range res.Messages {
Expand Down Expand Up @@ -806,7 +806,7 @@ func (s *Deliverer) Queue(ctx context.Context, convID chat1.ConversationID, msg
identifyBehavior keybase1.TLFIdentifyBehavior) (obr chat1.OutboxRecord, err error) {
defer s.Trace(ctx, func() error { return err }, "Queue")()

// Push onto outbox and immediately return
// Push onto outbox and immediatley return
obr, err = s.outbox.PushMessage(ctx, convID, msg, outboxID, identifyBehavior)
if err != nil {
return obr, err
Expand Down Expand Up @@ -886,7 +886,7 @@ func (s *Deliverer) deliverLoop() {
// Wait for the signal to take action
select {
case cb := <-s.shutdownCh:
s.Debug(bgctx, "shutting down outbox deliver loop: uid: %s", s.outbox.GetUID())
s.Debug(bgctx, "shuttting down outbox deliver loop: uid: %s", s.outbox.GetUID())
defer close(cb)
return
case <-s.reconnectCh:
Expand Down
2 changes: 1 addition & 1 deletion go/chat/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ func (h *Server) GetInboxNonblockLocal(ctx context.Context, arg chat1.GetInboxNo
convLocals = append(convLocals, convLocal)
}
if err = storage.NewInbox(h.G(), uid.ToBytes()).MergeLocalMetadata(ctx, convLocals); err != nil {
// Don't abort the operation on this kind of error
// Don't abort the operaton on this kind of error
h.Debug(ctx, "GetInboxNonblockLocal: unable to write inbox local metadata: %s", err)
}

Expand Down
6 changes: 3 additions & 3 deletions go/chat/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,7 @@ func TestChatSrvGetInboxNonblockLocalMetadata(t *testing.T) {
require.Fail(t, "no conv received")
}
}
require.Equal(t, 0, len(convs), "didn't get all convs")
require.Equal(t, 0, len(convs), "didnt get all convs")

_, err = ctc.as(t, users[0]).chatLocalHandler().GetInboxNonblockLocal(ctx,
chat1.GetInboxNonblockLocalArg{
Expand Down Expand Up @@ -1587,7 +1587,7 @@ func TestChatSrvGetInboxSummaryForCLILocal(t *testing.T) {
t.Fatalf("GetInboxSummaryForCLILocal error: %v", err)
}
if len(res.Conversations) != 2 {
t.Fatalf("unexpected response from GetInboxSummaryForCLILocal . expected 1 item, got %d\n", len(res.Conversations))
t.Fatalf("unexpected response from GetInboxSummaryForCLILocal . expected 1 items, got %d\n", len(res.Conversations))
}

res, err = ctc.as(t, users[0]).chatLocalHandler().GetInboxSummaryForCLILocal(ctx, chat1.GetInboxSummaryForCLILocalQuery{
Expand All @@ -1603,7 +1603,7 @@ func TestChatSrvGetInboxSummaryForCLILocal(t *testing.T) {
t.Fatalf("GetInboxSummaryForCLILocal error: %v", err)
}
if len(res.Conversations) != 3 {
t.Fatalf("unexpected response from GetInboxSummaryForCLILocal . expected 1 item, got %d\n", len(res.Conversations))
t.Fatalf("unexpected response from GetInboxSummaryForCLILocal . expected 1 items, got %d\n", len(res.Conversations))
}
})
}
Expand Down
10 changes: 5 additions & 5 deletions go/chat/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func decode(data []byte, res interface{}) error {
return err
}

// SimpleResultCollector aggregates all results in a basic way. It is not thread safe.
// SimpleResultCollector aggregates all results in a the basic way. It is not thread safe.
type SimpleResultCollector struct {
res []chat1.MessageUnboxed
target int
Expand Down Expand Up @@ -177,7 +177,7 @@ func (s *InsatiableResultCollector) PushPlaceholder(chat1.MessageID) bool {
return true
}

// TypedResultCollector aggregates results with a type constraints. It is not thread safe.
// TypedResultCollector aggregates results with a type contraints. It is not thread safe.
type TypedResultCollector struct {
res []chat1.MessageUnboxed
target, cur int
Expand Down Expand Up @@ -321,7 +321,7 @@ func (s *Storage) MergeHelper(ctx context.Context,
var err Error

// All public functions get locks to make access to the database single threaded.
// They should never be called from private functions.
// They should never be called from private functons.
locks.Storage.Lock()
defer locks.Storage.Unlock()

Expand Down Expand Up @@ -742,7 +742,7 @@ func (s *Storage) FetchUpToLocalMaxMsgID(ctx context.Context,
convID chat1.ConversationID, uid gregor1.UID, rc ResultCollector, query *chat1.GetThreadQuery,
pagination *chat1.Pagination) (res chat1.ThreadView, err Error) {
// All public functions get locks to make access to the database single threaded.
// They should never be called from private functions.
// They should never be called from private functons.
locks.Storage.Lock()
defer locks.Storage.Unlock()
defer s.Trace(ctx, func() error { return err }, "FetchUpToLocalMaxMsgID")()
Expand All @@ -759,7 +759,7 @@ func (s *Storage) FetchUpToLocalMaxMsgID(ctx context.Context,
func (s *Storage) Fetch(ctx context.Context, conv chat1.Conversation,
uid gregor1.UID, rc ResultCollector, query *chat1.GetThreadQuery, pagination *chat1.Pagination) (res chat1.ThreadView, err Error) {
// All public functions get locks to make access to the database single threaded.
// They should never be called from private functions.
// They should never be called from private functons.
locks.Storage.Lock()
defer locks.Storage.Unlock()
defer s.Trace(ctx, func() error { return err }, "Fetch")()
Expand Down
2 changes: 1 addition & 1 deletion go/client/chat_cli_rendering.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (v conversationListView) convNameLite(g *libkb.GlobalContext, convErr chat1
// When we hit identify failures looking up a conversation, we short-circuit
// before we get to parsing out readers and writers (which itself does more
// identifying). Instead we get an untrusted TLF name string, and we have the
// visibility. Cobble together a poor man's conversation name from those, by
// visiblity. Cobble together a poor man's conversation name from those, by
// hacking out the current user's name. This should only be displayed next to
// an indication that it's unverified.
func formatUnverifiedConvName(unverifiedTLFName string, visibility keybase1.TLFVisibility, myUsername string) string {
Expand Down
2 changes: 1 addition & 1 deletion go/client/chat_resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ func (r *chatConversationResolver) Resolve(ctx context.Context, req chatConversa
// 2) user specified TLF name but we auto-completed it or canonicalized
// it.
//
// Either way, we present a visual confirmation so that user knows which
// Either way, we present a visual confirmation so that user knows chich
// conversation she's sending into or reading from.
if info.Triple.TopicType == chat1.TopicType_CHAT {
r.G.UI.GetTerminalUI().Printf("Found %s %s conversation: %s\n",
Expand Down
2 changes: 1 addition & 1 deletion go/client/chat_svc_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ type MsgSummary struct {
KBFSEncrypted bool `json:"kbfs_encrypted,omitempty"`
}

// Message contains either a MsgSummary or an Error. Used for JSON output.
// Message contains eiter a MsgSummary or an Error. Used for JSON output.
type Message struct {
Msg *MsgSummary `json:"msg,omitempty"`
Error *string `json:"error,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion go/client/cmd_chat_delete_history.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ func (c *CmdChatDeleteHistory) GetUsage() libkb.Usage {
}
}

// Returns a duration and English string like "2 days".
// Returns a duration and english string like "2 days".
func (c *CmdChatDeleteHistory) parseAge(s string) (gregor1.DurationSec, string, error) {
generalErr := fmt.Errorf("duration must be an integer and suffix [s,h,d,w,m] like: 10d")
if len(s) < 2 {
Expand Down
6 changes: 3 additions & 3 deletions go/client/cmd_chat_retention.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (c *CmdChatSetRetention) showNonTeamConv(conv *chat1.ConversationLocal) (er
c.println(dui, "Unrecognized policy 'inherit'")
return errUnrecoginzedPolicy
default:
c.println(dui, "Unrecognized policy type '%v'", rpType)
c.println(dui, "Unregonized policy type '%v'", rpType)
return errUnrecoginzedPolicy
}
return nil
Expand Down Expand Up @@ -264,7 +264,7 @@ func (c *CmdChatSetRetention) showTeamChannelHTeam(conv *chat1.ConversationLocal
c.println(dui, "Unrecognized policy 'inherit'")
return errUnrecoginzedPolicy
default:
c.println(dui, "Unrecognized policy type '%v'", rpType)
c.println(dui, "Unregonized policy type '%v'", rpType)
return errUnrecoginzedPolicy
}
c.println(dui, "Team policy: %v", desc)
Expand Down Expand Up @@ -293,7 +293,7 @@ func (c *CmdChatSetRetention) showTeamChannelHChannel(conv *chat1.ConversationLo
case chat1.RetentionPolicyType_INHERIT:
desc = rpInheritMsg
default:
c.println(dui, "Unrecognized policy type '%v'", rpType)
c.println(dui, "Unregonized policy type '%v'", rpType)
return errUnrecoginzedPolicy
}
c.println(dui, "#%v channel: %v", conv.Info.TopicName, desc)
Expand Down
2 changes: 1 addition & 1 deletion go/client/cmd_passphrase_recover.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c *CmdPassphraseRecover) Run() error {
return err
}

// Run the main recovery engine. At this point the user should be logged in with
// Run the main recovery engine.At this point the user should be logged in with
// unlocked keys. This has the potential to issue all sorts of prompts
// but given that we should now be logged in and unlocked, it shouldn't
// issue any prompts.
Expand Down
2 changes: 1 addition & 1 deletion go/client/cmd_pgp_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func NewCmdPGPGen(cl *libcmdline.CommandLine, g *libkb.GlobalContext) cli.Comman
},
},
Description: `"keybase pgp gen" generates a new PGP key for this account.
In all cases, it signs the public key with an existing device key,
In all cases, it signs the public key with an exising device key,
and pushes the signature to the server. Thus, the user will have a
publicly-visible "PGP device" after running this operation.
Expand Down
2 changes: 1 addition & 1 deletion go/client/cmd_prove.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"github.com/keybase/go-framed-msgpack-rpc/rpc"
)

// CmdProve is the wrapper structure for the `keybase prove` operation.
// CmdProve is the wrapper structure for the the `keybase prove` operation.
type CmdProve struct {
libkb.Contextified
arg keybase1.StartProofArg
Expand Down
4 changes: 2 additions & 2 deletions go/client/cmd_simplefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func pathToString(path keybase1.Path) string {
return path.Local()
}

// Check whether the given path is a directory and return its string
// Cheeck whether the given path is a directory and return its string
func checkPathIsDir(ctx context.Context, cli keybase1.SimpleFSInterface, path keybase1.Path) (bool, string, error) {
var isDir bool
var pathString string
Expand Down Expand Up @@ -236,7 +236,7 @@ func parseSrcDestArgs(g *libkb.GlobalContext, ctx *cli.Context, name string) ([]
}

if srcType == keybase1.PathType_LOCAL && destType == keybase1.PathType_LOCAL {
return srcPaths, destPath, errors.New(name + " reacquires KBFS source and/or destination")
return srcPaths, destPath, errors.New(name + " reaquires KBFS source and/or destination")
}
return srcPaths, destPath, nil
}
Expand Down
2 changes: 1 addition & 1 deletion go/client/cmd_simplefs_copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (c *CmdSimpleFSCopy) Run() error {
return err
}

// ParseArgv gets the required arguments for this command.
// ParseArgv gets the rquired arguments for this command.
func (c *CmdSimpleFSCopy) ParseArgv(ctx *cli.Context) error {
var err error

Expand Down
2 changes: 1 addition & 1 deletion go/client/cmd_simplefs_get_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (c *CmdSimpleFSGetStatus) Run() error {
return err
}

// ParseArgv gets the required path argument for this command.
// ParseArgv gets the rquired path argument for this command.
func (c *CmdSimpleFSGetStatus) ParseArgv(ctx *cli.Context) error {
var err error

Expand Down
Loading

0 comments on commit 5f958b4

Please sign in to comment.