Fix up a bunch of lint errors and other stuff
This commit is contained in:
parent
62f14856d6
commit
b6ada6371c
@ -20,7 +20,9 @@ pipeline:
|
|||||||
secrets:
|
secrets:
|
||||||
- offline_twatter_passwd
|
- offline_twatter_passwd
|
||||||
when: # At least one
|
when: # At least one
|
||||||
- path: pkg/scraper/**
|
- path:
|
||||||
|
- pkg/scraper/**
|
||||||
|
- cmd/**
|
||||||
- branch: release-*
|
- branch: release-*
|
||||||
commands:
|
commands:
|
||||||
- cd cmd
|
- cd cmd
|
||||||
|
@ -36,7 +36,9 @@ insert into tombstone_types(rowid, short_name, tombstone_text) values
|
|||||||
(4, 'unavailable', 'This Tweet is unavailable'),
|
(4, 'unavailable', 'This Tweet is unavailable'),
|
||||||
(5, 'violated', 'This Tweet violated the Twitter Rules'),
|
(5, 'violated', 'This Tweet violated the Twitter Rules'),
|
||||||
(6, 'no longer exists', 'This Tweet is from an account that no longer exists'),
|
(6, 'no longer exists', 'This Tweet is from an account that no longer exists'),
|
||||||
(7, 'age-restricted', 'Age-restricted adult content. This content might not be appropriate for people under 18 years old. To view this media, you’ll need to log in to Twitter');
|
(7, 'age-restricted', 'Age-restricted adult content. This content might not be appropriate for people under 18 years old. To view this media, you’ll need to log in to Twitter'),
|
||||||
|
(8, 'newer-version-available', 'There’s a new version of this Tweet');
|
||||||
|
|
||||||
|
|
||||||
create table tweets (rowid integer primary key,
|
create table tweets (rowid integer primary key,
|
||||||
id integer unique not null check(typeof(id) = 'integer'),
|
id integer unique not null check(typeof(id) = 'integer'),
|
||||||
|
@ -149,6 +149,8 @@ var MIGRATIONS = []string{
|
|||||||
drop table likes_old;
|
drop table likes_old;
|
||||||
commit;
|
commit;
|
||||||
vacuum;`,
|
vacuum;`,
|
||||||
|
`insert into tombstone_types(rowid, short_name, tombstone_text)
|
||||||
|
values (8, 'newer-version-available', 'There’s a new version of this Tweet')`,
|
||||||
}
|
}
|
||||||
var ENGINE_DATABASE_VERSION = len(MIGRATIONS)
|
var ENGINE_DATABASE_VERSION = len(MIGRATIONS)
|
||||||
|
|
||||||
|
@ -150,13 +150,13 @@ func (s *Int64Slice) UnmarshalJSON(data []byte) error {
|
|||||||
var result []string
|
var result []string
|
||||||
|
|
||||||
if err := json.Unmarshal(data, &result); err != nil {
|
if err := json.Unmarshal(data, &result); err != nil {
|
||||||
return err
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, str := range result {
|
for _, str := range result {
|
||||||
num, err := strconv.ParseInt(str, 10, 64)
|
num, err := strconv.ParseInt(str, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
panic(err)
|
||||||
}
|
}
|
||||||
*s = append(*s, num)
|
*s = append(*s, num)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user