Skip to content

U: mod #847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions internal/base/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
)

// URL - base.URL
const URL = "https://github.com/openset/leetcode/tree/master"
const URL = "https://github.com/awesee/leetcode/tree/master"

// CmdName - base.CmdName
var CmdName = filepath.Base(os.Args[0])
Expand Down Expand Up @@ -68,9 +68,9 @@ func CheckErr(err error) {
func AuthInfo(cmd string) string {
format := "<!--|This file generated by command(leetcode %s); DO NOT EDIT.%s|-->\n"
format += "<!--+----------------------------------------------------------------------+-->\n"
format += "<!--|@author openset <[email protected]> |-->\n"
format += "<!--|@link https://github.com/openset |-->\n"
format += "<!--|@home https://github.com/openset/leetcode |-->\n"
format += "<!--|@author awesee <[email protected]> |-->\n"
format += "<!--|@link https://github.com/awesee |-->\n"
format += "<!--|@home https://github.com/awesee/leetcode |-->\n"
format += "<!--+----------------------------------------------------------------------+-->\n"
return fmt.Sprintf(format, cmd, strings.Repeat(" ", 15-len(cmd)))
}
Expand Down
6 changes: 3 additions & 3 deletions internal/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"os/exec"
"time"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/version"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/version"
)

// CmdBuild - build.CmdBuild
Expand Down Expand Up @@ -56,7 +56,7 @@ func runBuild(cmd *base.Command, args []string) {
Modified: time.Now(),
})
base.CheckErr(err)
err = exec.Command("go", "build", "-ldflags", "-s -w", "github.com/openset/leetcode").Run()
err = exec.Command("go", "build", "-ldflags", "-s -w", "github.com/awesee/leetcode").Run()
base.CheckErr(err)
src, err := os.Open(binName())
base.CheckErr(err)
Expand Down
4 changes: 2 additions & 2 deletions internal/clean/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
package clean

import (
"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/leetcode"
)

// CmdClean - clean.CmdClean
Expand Down
2 changes: 1 addition & 1 deletion internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/http/cookiejar"
"strings"

"github.com/openset/leetcode/internal/base"
"github.com/awesee/leetcode/internal/base"
)

var err error
Expand Down
4 changes: 2 additions & 2 deletions internal/description/description.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"runtime"
"sync"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/leetcode"
)

// CmdDescription - description.CmdDescription
Expand Down
2 changes: 1 addition & 1 deletion internal/help/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package help
import (
"fmt"

"github.com/openset/leetcode/internal/base"
"github.com/awesee/leetcode/internal/base"
)

// CmdHelp - help.CmdHelp
Expand Down
2 changes: 1 addition & 1 deletion internal/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"bytes"
"os/exec"

"github.com/openset/leetcode/internal/base"
"github.com/awesee/leetcode/internal/base"
)

// CmdHelper - help.CmdHelper
Expand Down
4 changes: 2 additions & 2 deletions internal/leetcode/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/client"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/client"
)

// leetcode var
Expand Down
2 changes: 1 addition & 1 deletion internal/leetcode/problems_algorithms.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package leetcode

import "github.com/openset/leetcode/internal/client"
import "github.com/awesee/leetcode/internal/client"

// ProblemsAlgorithms - leetcode.ProblemsAlgorithms
func ProblemsAlgorithms() (ps ProblemsType) {
Expand Down
2 changes: 1 addition & 1 deletion internal/leetcode/problems_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sort"
"strings"

"github.com/openset/leetcode/internal/client"
"github.com/awesee/leetcode/internal/client"
)

// ProblemsType - leetcode.ProblemsType
Expand Down
2 changes: 1 addition & 1 deletion internal/leetcode/problems_database.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package leetcode

import "github.com/openset/leetcode/internal/client"
import "github.com/awesee/leetcode/internal/client"

// ProblemsDatabase - leetcode.ProblemsDatabase
func ProblemsDatabase() (ps ProblemsType) {
Expand Down
2 changes: 1 addition & 1 deletion internal/leetcode/problems_shell.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package leetcode

import "github.com/openset/leetcode/internal/client"
import "github.com/awesee/leetcode/internal/client"

// ProblemsShell - leetcode.ProblemsShell
func ProblemsShell() (ps ProblemsType) {
Expand Down
2 changes: 1 addition & 1 deletion internal/leetcode/question_article.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"regexp"

"github.com/openset/leetcode/internal/client"
"github.com/awesee/leetcode/internal/client"
)

// GetDescription - leetcode.GetDescription
Expand Down
2 changes: 1 addition & 1 deletion internal/leetcode/topic_tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strconv"
"sync"

"github.com/openset/leetcode/internal/client"
"github.com/awesee/leetcode/internal/client"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions internal/open/open.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"fmt"
"strconv"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/browser"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/browser"
"github.com/awesee/leetcode/internal/leetcode"
)

// CmdOpen - open.CmdOpen
Expand Down
4 changes: 2 additions & 2 deletions internal/page/page.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
package page

import (
"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/readme"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/readme"
)

// CmdPage - page.CmdPage
Expand Down
6 changes: 3 additions & 3 deletions internal/post/post.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/leetcode"
)

const frontMatter = `---
Expand Down Expand Up @@ -43,7 +43,7 @@ var CmdPost = &base.Command{

var (
homeDir, _ = os.UserHomeDir()
basePath = filepath.Join(homeDir, "openset", "openset")
basePath = filepath.Join(homeDir, "awesee", "awesee")
)

func runPost(cmd *base.Command, args []string) {
Expand Down
4 changes: 2 additions & 2 deletions internal/question/question.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"strconv"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/leetcode"
)

// CmdQuestion - question.CmdQuestion
Expand Down
22 changes: 11 additions & 11 deletions internal/readme/readme.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ import (
"fmt"
"path/filepath"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/leetcode"
)

const defaultStr = `
# [LeetCode](https://openset.github.io/leetcode)
# [LeetCode](https://awesee.github.io/leetcode)
LeetCode Problems' Solutions
[[力扣](https://openset.github.io/categories/leetcode/) ∙ [话题分类](https://github.com/openset/leetcode/blob/master/tag/README.md)]
[[力扣](https://awesee.github.io/categories/leetcode/) ∙ [话题分类](https://github.com/awesee/leetcode/blob/master/tag/README.md)]

[![Go](https://github.com/openset/leetcode/workflows/Go/badge.svg)](https://github.com/openset/leetcode/actions)
[![codecov](https://codecov.io/gh/openset/leetcode/branch/master/graph/badge.svg)](https://codecov.io/gh/openset/leetcode)
[![Go Report Card](https://goreportcard.com/badge/github.com/openset/leetcode)](https://goreportcard.com/report/github.com/openset/leetcode)
[![GitHub contributors](https://img.shields.io/github/contributors/openset/leetcode.svg)](https://github.com/openset/leetcode/graphs/contributors)
[![license](https://img.shields.io/github/license/openset/leetcode.svg)](https://github.com/openset/leetcode/blob/master/LICENSE)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fopenset%2Fleetcode.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fopenset%2Fleetcode?ref=badge_shield)
[![Join the chat](https://badges.gitter.im/openset/leetcode.svg)](https://gitter.im/openset/leetcode?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Go](https://github.com/awesee/leetcode/workflows/Go/badge.svg)](https://github.com/awesee/leetcode/actions)
[![codecov](https://codecov.io/gh/awesee/leetcode/branch/master/graph/badge.svg)](https://codecov.io/gh/awesee/leetcode)
[![Go Report Card](https://goreportcard.com/badge/github.com/awesee/leetcode)](https://goreportcard.com/report/github.com/awesee/leetcode)
[![GitHub contributors](https://img.shields.io/github/contributors/awesee/leetcode.svg)](https://github.com/awesee/leetcode/graphs/contributors)
[![license](https://img.shields.io/github/license/awesee/leetcode.svg)](https://github.com/awesee/leetcode/blob/master/LICENSE)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fawesee%2Fleetcode.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fawesee%2Fleetcode?ref=badge_shield)
[![Join the chat](https://badges.gitter.im/awesee/leetcode.svg)](https://gitter.im/awesee/leetcode?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

`

Expand Down
6 changes: 3 additions & 3 deletions internal/tag/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"reflect"
"sync"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/leetcode"
)

// CmdTag - tag.CmdTag
Expand All @@ -31,7 +31,7 @@ func runTag(cmd *base.Command, args []string) {
buf.WriteString("\n## 话题分类\n\n")
buf.WriteString("| # | Topic | 话题 | | # | Topic | 话题 |\n")
buf.WriteString("| :-: | - | :-: | - | :-: | - | :-: |\n")
format := "| %d | [%s](%s/README.md) | [%s](https://openset.github.io/tags/%s/) | "
format := "| %d | [%s](%s/README.md) | [%s](https://awesee.github.io/tags/%s/) | "
n := buf.Len()
for times := 0; times < 2; times++ {
buf.Truncate(n)
Expand Down
4 changes: 2 additions & 2 deletions internal/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os/exec"
"strconv"

"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/leetcode"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/leetcode"
)

// CmdTest - test.CmdTest
Expand Down
4 changes: 2 additions & 2 deletions internal/update/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"os"
"os/exec"

"github.com/openset/leetcode/internal/base"
"github.com/awesee/leetcode/internal/base"
)

// CmdUpdate - update.CmdUpdate
Expand All @@ -22,7 +22,7 @@ func runUpdate(cmd *base.Command, args []string) {
cmd.Usage()
return
}
err := exec.Command("go", "get", "-u", "github.com/openset/leetcode").Run()
err := exec.Command("go", "get", "-u", "github.com/awesee/leetcode").Run()
base.CheckErr(err)
c := exec.Command(base.CmdName, "version")
c.Stdout = os.Stdout
Expand Down
2 changes: 1 addition & 1 deletion internal/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"
"runtime"

"github.com/openset/leetcode/internal/base"
"github.com/awesee/leetcode/internal/base"
)

const version = "1.6.5"
Expand Down
30 changes: 15 additions & 15 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
package main

import (
"github.com/openset/leetcode/internal/base"
"github.com/openset/leetcode/internal/build"
"github.com/openset/leetcode/internal/clean"
"github.com/openset/leetcode/internal/description"
"github.com/openset/leetcode/internal/help"
"github.com/openset/leetcode/internal/helper"
"github.com/openset/leetcode/internal/open"
"github.com/openset/leetcode/internal/page"
"github.com/openset/leetcode/internal/post"
"github.com/openset/leetcode/internal/question"
"github.com/openset/leetcode/internal/readme"
"github.com/openset/leetcode/internal/tag"
"github.com/openset/leetcode/internal/test"
"github.com/openset/leetcode/internal/update"
"github.com/openset/leetcode/internal/version"
"github.com/awesee/leetcode/internal/base"
"github.com/awesee/leetcode/internal/build"
"github.com/awesee/leetcode/internal/clean"
"github.com/awesee/leetcode/internal/description"
"github.com/awesee/leetcode/internal/help"
"github.com/awesee/leetcode/internal/helper"
"github.com/awesee/leetcode/internal/open"
"github.com/awesee/leetcode/internal/page"
"github.com/awesee/leetcode/internal/post"
"github.com/awesee/leetcode/internal/question"
"github.com/awesee/leetcode/internal/readme"
"github.com/awesee/leetcode/internal/tag"
"github.com/awesee/leetcode/internal/test"
"github.com/awesee/leetcode/internal/update"
"github.com/awesee/leetcode/internal/version"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion problems/add-one-row-to-tree/add_one_row_to_tree.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package problem623

import "github.com/openset/leetcode/internal/kit"
import "github.com/awesee/leetcode/internal/kit"

// TreeNode - Definition for a binary tree node.
type TreeNode = kit.TreeNode
Expand Down
2 changes: 1 addition & 1 deletion problems/add-one-row-to-tree/add_one_row_to_tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/openset/leetcode/internal/kit"
"github.com/awesee/leetcode/internal/kit"
)

type testType struct {
Expand Down
2 changes: 1 addition & 1 deletion problems/add-two-numbers-ii/add_two_numbers_ii.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package problem445

import "github.com/openset/leetcode/internal/kit"
import "github.com/awesee/leetcode/internal/kit"

// ListNode - Definition for singly-linked list.
type ListNode = kit.ListNode
Expand Down
2 changes: 1 addition & 1 deletion problems/add-two-numbers-ii/add_two_numbers_ii_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/openset/leetcode/internal/kit"
"github.com/awesee/leetcode/internal/kit"
)

type testType struct {
Expand Down
2 changes: 1 addition & 1 deletion problems/add-two-numbers/add_two_numbers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package problem2

import "github.com/openset/leetcode/internal/kit"
import "github.com/awesee/leetcode/internal/kit"

// ListNode - Definition for singly-linked list.
type ListNode = kit.ListNode
Expand Down
2 changes: 1 addition & 1 deletion problems/add-two-numbers/add_two_numbers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"reflect"
"testing"

"github.com/openset/leetcode/internal/kit"
"github.com/awesee/leetcode/internal/kit"
)

type testType struct {
Expand Down
2 changes: 1 addition & 1 deletion problems/balanced-binary-tree/balanced_binary_tree.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package problem110

import "github.com/openset/leetcode/internal/kit"
import "github.com/awesee/leetcode/internal/kit"

// TreeNode - Definition for a binary tree node.
type TreeNode = kit.TreeNode
Expand Down
Loading